From be44cbdbd345ddfdd8bc09dead0b5fd63c7ac813 Mon Sep 17 00:00:00 2001 From: Anders Hansen Date: Wed, 29 Jan 2020 11:39:14 +0100 Subject: [PATCH] Build version 1.2.4 --- dist/README.md | 41 ++++++++++++++++++++++++++++---------- dist/module.js | 2 +- dist/partials/options.html | 11 +++++++++- dist/plugin.json | 4 ++-- 4 files changed, 43 insertions(+), 15 deletions(-) diff --git a/dist/README.md b/dist/README.md index 968998d..766a279 100644 --- a/dist/README.md +++ b/dist/README.md @@ -8,20 +8,39 @@ ## Usage ### Queries -To use the plugin the data needs to be formatted as a table with either contains `location` in NGSIv2 format: +To use the plugin the data needs to be formatted as a table with either contains simple `lat` and `lon`, or as `location` in NGSIv2 format. Here is a example of how the data from the query should look like using `location`: ```javascript -{ - ..., - "location": { - "type": "geo:json", - "value": { - "coordinates": [55.96086,9.75394], - "type": "Point" - } +[ + { + "columns": [ + { + "text": "location" + } + ], + "rows": [ + [ + { + "type": "geo:json", + "value": { + "type": "Point", + "coordinates": [56.171884, 10.189101] + } + } + ], + [ + { + "type": "geo:json", + "value": { + "type": "Point", + "coordinates": [56.18803, 10.16773] + } + } + ] + ], + "type": "table" } -} +] ``` -Or simply a `lat` and `lon`. A example of a query for location against a CrateDB/PostgreSQL: ```sql diff --git a/dist/module.js b/dist/module.js index fcf8f3d..6426388 100644 --- a/dist/module.js +++ b/dist/module.js @@ -1,2 +1,2 @@ /*! For license information please see module.js.LICENSE */ -define(["app/plugins/sdk","lodash"],(function(__WEBPACK_EXTERNAL_MODULE__14__,__WEBPACK_EXTERNAL_MODULE__15__){return function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{enumerable:!0,get:getter})},__webpack_require__.r=function(exports){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.t=function(value,mode){if(1&mode&&(value=__webpack_require__(value)),8&mode)return value;if(4&mode&&"object"==typeof value&&value&&value.__esModule)return value;var ns=Object.create(null);if(__webpack_require__.r(ns),Object.defineProperty(ns,"default",{enumerable:!0,value:value}),2&mode&&"string"!=typeof value)for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=32)}([function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,factory;function _typeof(obj){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj})(obj)}factory=function(exports){"use strict";var freeze=Object.freeze;function extend(dest){var i,j,len,src;for(j=1,len=arguments.length;j0?Math.floor(v):Math.ceil(v)};function toPoint(x,y,round){return x instanceof Point?x:isArray(x)?new Point(x[0],x[1]):null==x?x:"object"===_typeof(x)&&"x"in x&&"y"in x?new Point(x.x,x.y):new Point(x,y,round)}function Bounds(a,b){if(a)for(var points=b?[a,b]:a,i=0,len=points.length;i=this.min.x&&max.x<=this.max.x&&min.y>=this.min.y&&max.y<=this.max.y},intersects:function(bounds){bounds=toBounds(bounds);var min=this.min,max=this.max,min2=bounds.min,max2=bounds.max,xIntersects=max2.x>=min.x&&min2.x<=max.x,yIntersects=max2.y>=min.y&&min2.y<=max.y;return xIntersects&&yIntersects},overlaps:function(bounds){bounds=toBounds(bounds);var min=this.min,max=this.max,min2=bounds.min,max2=bounds.max,xOverlaps=max2.x>min.x&&min2.xmin.y&&min2.y=sw.lat&&ne2.lat<=ne.lat&&sw2.lng>=sw.lng&&ne2.lng<=ne.lng},intersects:function(bounds){bounds=toLatLngBounds(bounds);var sw=this._southWest,ne=this._northEast,sw2=bounds.getSouthWest(),ne2=bounds.getNorthEast(),latIntersects=ne2.lat>=sw.lat&&sw2.lat<=ne.lat,lngIntersects=ne2.lng>=sw.lng&&sw2.lng<=ne.lng;return latIntersects&&lngIntersects},overlaps:function(bounds){bounds=toLatLngBounds(bounds);var sw=this._southWest,ne=this._northEast,sw2=bounds.getSouthWest(),ne2=bounds.getNorthEast(),latOverlaps=ne2.lat>sw.lat&&sw2.latsw.lng&&sw2.lng1,passiveEvents=function(){var supportsPassiveOption=!1;try{var opts=Object.defineProperty({},"passive",{get:function(){supportsPassiveOption=!0}});window.addEventListener("testPassiveEventSupport",falseFn,opts),window.removeEventListener("testPassiveEventSupport",falseFn,opts)}catch(e){}return supportsPassiveOption},canvas=!!document.createElement("canvas").getContext,svg=!(!document.createElementNS||!svgCreate("svg").createSVGRect),vml=!svg&&function(){try{var div=document.createElement("div");div.innerHTML='';var shape=div.firstChild;return shape.style.behavior="url(#default#VML)",shape&&"object"===_typeof(shape.adj)}catch(e){return!1}}();function userAgentContains(str){return navigator.userAgent.toLowerCase().indexOf(str)>=0}var Browser=(Object.freeze||Object)({ie:ie,ielt9:ielt9,edge:edge,webkit:webkit,android:android,android23:android23,androidStock:androidStock,opera:opera,chrome:chrome,gecko:gecko,safari:safari,phantom:phantom,opera12:opera12,win:win,ie3d:ie3d,webkit3d:webkit3d,gecko3d:gecko3d,any3d:any3d,mobile:mobile,mobileWebkit:mobileWebkit,mobileWebkit3d:mobileWebkit3d,msPointer:msPointer,pointer:pointer,touch:touch,mobileOpera:mobileOpera,mobileGecko:mobileGecko,retina:retina,passiveEvents:passiveEvents,canvas:canvas,svg:svg,vml:vml}),POINTER_DOWN=msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE=msPointer?"MSPointerMove":"pointermove",POINTER_UP=msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL=msPointer?"MSPointerCancel":"pointercancel",TAG_WHITE_LIST=["INPUT","SELECT","OPTION"],_pointers={},_pointerDocListener=!1,_pointersCount=0;function addPointerListener(obj,type,handler,id){return"touchstart"===type?function(obj,handler,id){var onDown=bind((function(e){if("mouse"!==e.pointerType&&e.MSPOINTER_TYPE_MOUSE&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE){if(!(TAG_WHITE_LIST.indexOf(e.target.tagName)<0))return;preventDefault(e)}_handlePointer(e,handler)}));obj["_leaflet_touchstart"+id]=onDown,obj.addEventListener(POINTER_DOWN,onDown,!1),_pointerDocListener||(document.documentElement.addEventListener(POINTER_DOWN,_globalPointerDown,!0),document.documentElement.addEventListener(POINTER_MOVE,_globalPointerMove,!0),document.documentElement.addEventListener(POINTER_UP,_globalPointerUp,!0),document.documentElement.addEventListener(POINTER_CANCEL,_globalPointerUp,!0),_pointerDocListener=!0)}(obj,handler,id):"touchmove"===type?function(obj,handler,id){var onMove=function(e){(e.pointerType!==e.MSPOINTER_TYPE_MOUSE&&"mouse"!==e.pointerType||0!==e.buttons)&&_handlePointer(e,handler)};obj["_leaflet_touchmove"+id]=onMove,obj.addEventListener(POINTER_MOVE,onMove,!1)}(obj,handler,id):"touchend"===type&&function(obj,handler,id){var onUp=function(e){_handlePointer(e,handler)};obj["_leaflet_touchend"+id]=onUp,obj.addEventListener(POINTER_UP,onUp,!1),obj.addEventListener(POINTER_CANCEL,onUp,!1)}(obj,handler,id),this}function _globalPointerDown(e){_pointers[e.pointerId]=e,_pointersCount++}function _globalPointerMove(e){_pointers[e.pointerId]&&(_pointers[e.pointerId]=e)}function _globalPointerUp(e){delete _pointers[e.pointerId],_pointersCount--}function _handlePointer(e,handler){for(var i in e.touches=[],_pointers)e.touches.push(_pointers[i]);e.changedTouches=[e],handler(e)}var _touchstart=msPointer?"MSPointerDown":pointer?"pointerdown":"touchstart",_touchend=msPointer?"MSPointerUp":pointer?"pointerup":"touchend",_pre="_leaflet_";function addDoubleTapListener(obj,handler,id){var last,touch$$1,doubleTap=!1,delay=250;function onTouchStart(e){var count;if(pointer){if(!edge||"mouse"===e.pointerType)return;count=_pointersCount}else count=e.touches.length;if(!(count>1)){var now=Date.now(),delta=now-(last||now);touch$$1=e.touches?e.touches[0]:e,doubleTap=delta>0&&delta<=delay,last=now}}function onTouchEnd(e){if(doubleTap&&!touch$$1.cancelBubble){if(pointer){if(!edge||"mouse"===e.pointerType)return;var prop,i,newTouch={};for(i in touch$$1)prop=touch$$1[i],newTouch[i]=prop&&prop.bind?prop.bind(touch$$1):prop;touch$$1=newTouch}touch$$1.type="dblclick",touch$$1.button=0,handler(touch$$1),last=null}}return obj[_pre+_touchstart+id]=onTouchStart,obj[_pre+_touchend+id]=onTouchEnd,obj[_pre+"dblclick"+id]=handler,obj.addEventListener(_touchstart,onTouchStart,!!passiveEvents&&{passive:!1}),obj.addEventListener(_touchend,onTouchEnd,!!passiveEvents&&{passive:!1}),obj.addEventListener("dblclick",handler,!1),this}function removeDoubleTapListener(obj,id){var touchstart=obj[_pre+_touchstart+id],touchend=obj[_pre+_touchend+id],dblclick=obj[_pre+"dblclick"+id];return obj.removeEventListener(_touchstart,touchstart,!!passiveEvents&&{passive:!1}),obj.removeEventListener(_touchend,touchend,!!passiveEvents&&{passive:!1}),edge||obj.removeEventListener("dblclick",dblclick,!1),this}var disableTextSelection,enableTextSelection,_userSelect,_outlineElement,_outlineStyle,TRANSFORM=testProp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),TRANSITION=testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),TRANSITION_END="webkitTransition"===TRANSITION||"OTransition"===TRANSITION?TRANSITION+"End":"transitionend";function get(id){return"string"==typeof id?document.getElementById(id):id}function getStyle(el,style){var value=el.style[style]||el.currentStyle&&el.currentStyle[style];if((!value||"auto"===value)&&document.defaultView){var css=document.defaultView.getComputedStyle(el,null);value=css?css[style]:null}return"auto"===value?null:value}function create$1(tagName,className,container){var el=document.createElement(tagName);return el.className=className||"",container&&container.appendChild(el),el}function _remove(el){var parent=el.parentNode;parent&&parent.removeChild(el)}function empty(el){for(;el.firstChild;)el.removeChild(el.firstChild)}function toFront(el){var parent=el.parentNode;parent&&parent.lastChild!==el&&parent.appendChild(el)}function toBack(el){var parent=el.parentNode;parent&&parent.firstChild!==el&&parent.insertBefore(el,parent.firstChild)}function hasClass(el,name){if(void 0!==el.classList)return el.classList.contains(name);var className=getClass(el);return className.length>0&&new RegExp("(^|\\s)"+name+"(\\s|$)").test(className)}function addClass(el,name){if(void 0!==el.classList)for(var classes=splitWords(name),i=0,len=classes.length;i100&&elapsed<500||e.target._simulatedClick&&!e._simulated?stop(e):(lastClick=timeStamp,handler(e))}(e,originalHandler)}),obj.addEventListener(type,handler,!1)):"attachEvent"in obj&&obj.attachEvent("on"+type,handler):addDoubleTapListener(obj,handler,id),obj[eventsKey]=obj[eventsKey]||{},obj[eventsKey][id]=handler}function removeOne(obj,type,fn,context){var id=type+stamp(fn)+(context?"_"+stamp(context):""),handler=obj[eventsKey]&&obj[eventsKey][id];if(!handler)return this;pointer&&0===type.indexOf("touch")?function(obj,type,id){var handler=obj["_leaflet_"+type+id];"touchstart"===type?obj.removeEventListener(POINTER_DOWN,handler,!1):"touchmove"===type?obj.removeEventListener(POINTER_MOVE,handler,!1):"touchend"===type&&(obj.removeEventListener(POINTER_UP,handler,!1),obj.removeEventListener(POINTER_CANCEL,handler,!1))}(obj,type,id):!touch||"dblclick"!==type||!removeDoubleTapListener||pointer&&chrome?"removeEventListener"in obj?"mousewheel"===type?obj.removeEventListener("onwheel"in obj?"wheel":"mousewheel",handler,!!passiveEvents&&{passive:!1}):obj.removeEventListener("mouseenter"===type?"mouseover":"mouseleave"===type?"mouseout":type,handler,!1):"detachEvent"in obj&&obj.detachEvent("on"+type,handler):removeDoubleTapListener(obj,id),obj[eventsKey][id]=null}function stopPropagation(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,skipped(e),this}function disableScrollPropagation(el){return addOne(el,"mousewheel",stopPropagation),this}function disableClickPropagation(el){return on(el,"mousedown touchstart dblclick",stopPropagation),addOne(el,"click",fakeStop),this}function preventDefault(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function stop(e){return preventDefault(e),stopPropagation(e),this}function getMousePosition(e,container){if(!container)return new Point(e.clientX,e.clientY);var scale=getScale(container),offset=scale.boundingClientRect;return new Point((e.clientX-offset.left)/scale.x-container.clientLeft,(e.clientY-offset.top)/scale.y-container.clientTop)}var wheelPxFactor=win&&chrome?2*window.devicePixelRatio:gecko?window.devicePixelRatio:1;function getWheelDelta(e){return edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/wheelPxFactor:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}var lastClick,skipEvents={};function fakeStop(e){skipEvents[e.type]=!0}function skipped(e){var events=skipEvents[e.type];return skipEvents[e.type]=!1,events}function isExternalTarget(el,e){var related=e.relatedTarget;if(!related)return!0;try{for(;related&&related!==el;)related=related.parentNode}catch(err){return!1}return related!==el}var DomEvent=(Object.freeze||Object)({on:on,off:off,stopPropagation:stopPropagation,disableScrollPropagation:disableScrollPropagation,disableClickPropagation:disableClickPropagation,preventDefault:preventDefault,stop:stop,getMousePosition:getMousePosition,getWheelDelta:getWheelDelta,fakeStop:fakeStop,skipped:skipped,isExternalTarget:isExternalTarget,addListener:on,removeListener:off}),PosAnimation=Evented.extend({run:function(el,newPos,duration,easeLinearity){this.stop(),this._el=el,this._inProgress=!0,this._duration=duration||.25,this._easeOutPower=1/Math.max(easeLinearity||.5,.2),this._startPos=getPosition(el),this._offset=newPos.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=requestAnimFrame(this._animate,this),this._step()},_step:function(round){var elapsed=+new Date-this._startTime,duration=1e3*this._duration;elapsedthis.options.maxZoom)?this.setZoom(zoom):this},panInsideBounds:function(bounds,options){this._enforcingBounds=!0;var center=this.getCenter(),newCenter=this._limitCenter(center,this._zoom,toLatLngBounds(bounds));return center.equals(newCenter)||this.panTo(newCenter,options),this._enforcingBounds=!1,this},panInside:function(latlng,options){var paddingTL=toPoint((options=options||{}).paddingTopLeft||options.padding||[0,0]),paddingBR=toPoint(options.paddingBottomRight||options.padding||[0,0]),center=this.getCenter(),pixelCenter=this.project(center),pixelPoint=this.project(latlng),pixelBounds=this.getPixelBounds(),halfPixelBounds=pixelBounds.getSize().divideBy(2),paddedBounds=toBounds([pixelBounds.min.add(paddingTL),pixelBounds.max.subtract(paddingBR)]);if(!paddedBounds.contains(pixelPoint)){this._enforcingBounds=!0;var diff=pixelCenter.subtract(pixelPoint),newCenter=toPoint(pixelPoint.x+diff.x,pixelPoint.y+diff.y);(pixelPoint.xpaddedBounds.max.x)&&(newCenter.x=pixelCenter.x-diff.x,diff.x>0?newCenter.x+=halfPixelBounds.x-paddingTL.x:newCenter.x-=halfPixelBounds.x-paddingBR.x),(pixelPoint.ypaddedBounds.max.y)&&(newCenter.y=pixelCenter.y-diff.y,diff.y>0?newCenter.y+=halfPixelBounds.y-paddingTL.y:newCenter.y-=halfPixelBounds.y-paddingBR.y),this.panTo(this.unproject(newCenter),options),this._enforcingBounds=!1}return this},invalidateSize:function(options){if(!this._loaded)return this;options=extend({animate:!1,pan:!0},!0===options?{animate:!0}:options);var oldSize=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var newSize=this.getSize(),oldCenter=oldSize.divideBy(2).round(),newCenter=newSize.divideBy(2).round(),offset=oldCenter.subtract(newCenter);return offset.x||offset.y?(options.animate&&options.pan?this.panBy(offset):(options.pan&&this._rawPanBy(offset),this.fire("move"),options.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:oldSize,newSize:newSize})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(options){if(options=this._locateOptions=extend({timeout:1e4,watch:!1},options),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var onResponse=bind(this._handleGeolocationResponse,this),onError=bind(this._handleGeolocationError,this);return options.watch?this._locationWatchId=navigator.geolocation.watchPosition(onResponse,onError,options):navigator.geolocation.getCurrentPosition(onResponse,onError,options),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(error){var c=error.code,message=error.message||(1===c?"permission denied":2===c?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:c,message:"Geolocation error: "+message+"."})},_handleGeolocationResponse:function(pos){var latlng=new LatLng(pos.coords.latitude,pos.coords.longitude),bounds=latlng.toBounds(2*pos.coords.accuracy),options=this._locateOptions;if(options.setView){var zoom=this.getBoundsZoom(bounds);this.setView(latlng,options.maxZoom?Math.min(zoom,options.maxZoom):zoom)}var data={latlng:latlng,bounds:bounds,timestamp:pos.timestamp};for(var i in pos.coords)"number"==typeof pos.coords[i]&&(data[i]=pos.coords[i]);this.fire("locationfound",data)},addHandler:function(name,HandlerClass){if(!HandlerClass)return this;var handler=this[name]=new HandlerClass(this);return this._handlers.push(handler),this.options[name]&&handler.enable(),this},remove:function(){if(this._initEvents(!0),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(e){this._container._leaflet_id=void 0,this._containerId=void 0}var i;for(i in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),_remove(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(cancelAnimFrame(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[i].remove();for(i in this._panes)_remove(this._panes[i]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(name,container){var pane=create$1("div","leaflet-pane"+(name?" leaflet-"+name.replace("Pane","")+"-pane":""),container||this._mapPane);return name&&(this._panes[name]=pane),pane},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var bounds=this.getPixelBounds();return new LatLngBounds(this.unproject(bounds.getBottomLeft()),this.unproject(bounds.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(bounds,inside,padding){bounds=toLatLngBounds(bounds),padding=toPoint(padding||[0,0]);var zoom=this.getZoom()||0,min=this.getMinZoom(),max=this.getMaxZoom(),nw=bounds.getNorthWest(),se=bounds.getSouthEast(),size=this.getSize().subtract(padding),boundsSize=toBounds(this.project(se,zoom),this.project(nw,zoom)).getSize(),snap=any3d?this.options.zoomSnap:1,scalex=size.x/boundsSize.x,scaley=size.y/boundsSize.y,scale=inside?Math.max(scalex,scaley):Math.min(scalex,scaley);return zoom=this.getScaleZoom(scale,zoom),snap&&(zoom=Math.round(zoom/(snap/100))*(snap/100),zoom=inside?Math.ceil(zoom/snap)*snap:Math.floor(zoom/snap)*snap),Math.max(min,Math.min(max,zoom))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(center,zoom){var topLeftPoint=this._getTopLeftPoint(center,zoom);return new Bounds(topLeftPoint,topLeftPoint.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(zoom){return this.options.crs.getProjectedBounds(void 0===zoom?this.getZoom():zoom)},getPane:function(pane){return"string"==typeof pane?this._panes[pane]:pane},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(toZoom,fromZoom){var crs=this.options.crs;return fromZoom=void 0===fromZoom?this._zoom:fromZoom,crs.scale(toZoom)/crs.scale(fromZoom)},getScaleZoom:function(scale,fromZoom){var crs=this.options.crs;fromZoom=void 0===fromZoom?this._zoom:fromZoom;var zoom=crs.zoom(scale*crs.scale(fromZoom));return isNaN(zoom)?1/0:zoom},project:function(latlng,zoom){return zoom=void 0===zoom?this._zoom:zoom,this.options.crs.latLngToPoint(toLatLng(latlng),zoom)},unproject:function(point,zoom){return zoom=void 0===zoom?this._zoom:zoom,this.options.crs.pointToLatLng(toPoint(point),zoom)},layerPointToLatLng:function(point){var projectedPoint=toPoint(point).add(this.getPixelOrigin());return this.unproject(projectedPoint)},latLngToLayerPoint:function(latlng){return this.project(toLatLng(latlng))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(latlng){return this.options.crs.wrapLatLng(toLatLng(latlng))},wrapLatLngBounds:function(latlng){return this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng))},distance:function(latlng1,latlng2){return this.options.crs.distance(toLatLng(latlng1),toLatLng(latlng2))},containerPointToLayerPoint:function(point){return toPoint(point).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(point){return toPoint(point).add(this._getMapPanePos())},containerPointToLatLng:function(point){var layerPoint=this.containerPointToLayerPoint(toPoint(point));return this.layerPointToLatLng(layerPoint)},latLngToContainerPoint:function(latlng){return this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng)))},mouseEventToContainerPoint:function(e){return getMousePosition(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(id){var container=this._container=get(id);if(!container)throw new Error("Map container not found.");if(container._leaflet_id)throw new Error("Map container is already initialized.");on(container,"scroll",this._onScroll,this),this._containerId=stamp(container)},_initLayout:function(){var container=this._container;this._fadeAnimated=this.options.fadeAnimation&&any3d,addClass(container,"leaflet-container"+(touch?" leaflet-touch":"")+(retina?" leaflet-retina":"")+(ielt9?" leaflet-oldie":"")+(safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var position=getStyle(container,"position");"absolute"!==position&&"relative"!==position&&"fixed"!==position&&(container.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var panes=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),setPosition(this._mapPane,new Point(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(addClass(panes.markerPane,"leaflet-zoom-hide"),addClass(panes.shadowPane,"leaflet-zoom-hide"))},_resetView:function(center,zoom){setPosition(this._mapPane,new Point(0,0));var loading=!this._loaded;this._loaded=!0,zoom=this._limitZoom(zoom),this.fire("viewprereset");var zoomChanged=this._zoom!==zoom;this._moveStart(zoomChanged,!1)._move(center,zoom)._moveEnd(zoomChanged),this.fire("viewreset"),loading&&this.fire("load")},_moveStart:function(zoomChanged,noMoveStart){return zoomChanged&&this.fire("zoomstart"),noMoveStart||this.fire("movestart"),this},_move:function(center,zoom,data){void 0===zoom&&(zoom=this._zoom);var zoomChanged=this._zoom!==zoom;return this._zoom=zoom,this._lastCenter=center,this._pixelOrigin=this._getNewPixelOrigin(center),(zoomChanged||data&&data.pinch)&&this.fire("zoom",data),this.fire("move",data)},_moveEnd:function(zoomChanged){return zoomChanged&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(offset){setPosition(this._mapPane,this._getMapPanePos().subtract(offset))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(remove$$1){this._targets={},this._targets[stamp(this._container)]=this;var onOff=remove$$1?off:on;onOff(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&onOff(window,"resize",this._onResize,this),any3d&&this.options.transform3DLimit&&(remove$$1?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){cancelAnimFrame(this._resizeRequest),this._resizeRequest=requestAnimFrame((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var pos=this._getMapPanePos();Math.max(Math.abs(pos.x),Math.abs(pos.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,type){for(var target,targets=[],isHover="mouseout"===type||"mouseover"===type,src=e.target||e.srcElement,dragging=!1;src;){if((target=this._targets[stamp(src)])&&("click"===type||"preclick"===type)&&!e._simulated&&this._draggableMoved(target)){dragging=!0;break}if(target&&target.listens(type,!0)){if(isHover&&!isExternalTarget(src,e))break;if(targets.push(target),isHover)break}if(src===this._container)break;src=src.parentNode}return targets.length||dragging||isHover||!isExternalTarget(src,e)||(targets=[this]),targets},_handleDOMEvent:function(e){if(this._loaded&&!skipped(e)){var type=e.type;"mousedown"!==type&&"keypress"!==type&&"keyup"!==type&&"keydown"!==type||preventOutline(e.target||e.srcElement),this._fireDOMEvent(e,type)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,type,targets){if("click"===e.type){var synth=extend({},e);synth.type="preclick",this._fireDOMEvent(synth,synth.type,targets)}if(!e._stopped&&(targets=(targets||[]).concat(this._findEventTargets(e,type))).length){var target=targets[0];"contextmenu"===type&&target.listens(type,!0)&&preventDefault(e);var data={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){var isMarker=target.getLatLng&&(!target._radius||target._radius<=10);data.containerPoint=isMarker?this.latLngToContainerPoint(target.getLatLng()):this.mouseEventToContainerPoint(e),data.layerPoint=this.containerPointToLayerPoint(data.containerPoint),data.latlng=isMarker?target.getLatLng():this.layerPointToLatLng(data.layerPoint)}for(var i=0;i0?Math.round(left-right)/2:Math.max(0,Math.ceil(left))-Math.max(0,Math.floor(right))},_limitZoom:function(zoom){var min=this.getMinZoom(),max=this.getMaxZoom(),snap=any3d?this.options.zoomSnap:1;return snap&&(zoom=Math.round(zoom/snap)*snap),Math.max(min,Math.min(max,zoom))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(center,options){var offset=this._getCenterOffset(center)._trunc();return!(!0!==(options&&options.animate)&&!this.getSize().contains(offset)||(this.panBy(offset,options),0))},_createAnimProxy:function(){var proxy=this._proxy=create$1("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(proxy),this.on("zoomanim",(function(e){var prop=TRANSFORM,transform=this._proxy.style[prop];setTransform(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),transform===this._proxy.style[prop]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){_remove(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var c=this.getCenter(),z=this.getZoom();setTransform(this._proxy,this.project(c,z),this.getZoomScale(z,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(center,zoom,options){if(this._animatingZoom)return!0;if(options=options||{},!this._zoomAnimated||!1===options.animate||this._nothingToAnimate()||Math.abs(zoom-this._zoom)>this.options.zoomAnimationThreshold)return!1;var scale=this.getZoomScale(zoom),offset=this._getCenterOffset(center)._divideBy(1-1/scale);return!(!0!==options.animate&&!this.getSize().contains(offset)||(requestAnimFrame((function(){this._moveStart(!0,!1)._animateZoom(center,zoom,!0)}),this),0))},_animateZoom:function(center,zoom,startAnim,noUpdate){this._mapPane&&(startAnim&&(this._animatingZoom=!0,this._animateToCenter=center,this._animateToZoom=zoom,addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:center,zoom:zoom,noUpdate:noUpdate}),setTimeout(bind(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),requestAnimFrame((function(){this._moveEnd(!0)}),this))}}),Control=Class.extend({options:{position:"topright"},initialize:function(options){setOptions(this,options)},getPosition:function(){return this.options.position},setPosition:function(position){var map=this._map;return map&&map.removeControl(this),this.options.position=position,map&&map.addControl(this),this},getContainer:function(){return this._container},addTo:function(map){this.remove(),this._map=map;var container=this._container=this.onAdd(map),pos=this.getPosition(),corner=map._controlCorners[pos];return addClass(container,"leaflet-control"),-1!==pos.indexOf("bottom")?corner.insertBefore(container,corner.firstChild):corner.appendChild(container),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(_remove(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),control=function(options){return new Control(options)};Map.include({addControl:function(control){return control.addTo(this),this},removeControl:function(control){return control.remove(),this},_initControlPos:function(){var corners=this._controlCorners={},l="leaflet-",container=this._controlContainer=create$1("div",l+"control-container",this._container);function createCorner(vSide,hSide){var className=l+vSide+" "+l+hSide;corners[vSide+hSide]=create$1("div",className,container)}createCorner("top","left"),createCorner("top","right"),createCorner("bottom","left"),createCorner("bottom","right")},_clearControlPos:function(){for(var i in this._controlCorners)_remove(this._controlCorners[i]);_remove(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Layers=Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(layerA,layerB,nameA,nameB){return nameA1,this._baseLayersList.style.display=baseLayersPresent?"":"none"),this._separator.style.display=overlaysPresent&&baseLayersPresent?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var obj=this._getLayer(stamp(e.target)),type=obj.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;type&&this._map.fire(type,obj)},_createRadioElement:function(name,checked){var radioHtml='",radioFragment=document.createElement("div");return radioFragment.innerHTML=radioHtml,radioFragment.firstChild},_addItem:function(obj){var input,label=document.createElement("label"),checked=this._map.hasLayer(obj.layer);obj.overlay?((input=document.createElement("input")).type="checkbox",input.className="leaflet-control-layers-selector",input.defaultChecked=checked):input=this._createRadioElement("leaflet-base-layers_"+stamp(this),checked),this._layerControlInputs.push(input),input.layerId=stamp(obj.layer),on(input,"click",this._onInputClick,this);var name=document.createElement("span");name.innerHTML=" "+obj.name;var holder=document.createElement("div");return label.appendChild(holder),holder.appendChild(input),holder.appendChild(name),(obj.overlay?this._overlaysList:this._baseLayersList).appendChild(label),this._checkDisabledLayers(),label},_onInputClick:function(){var input,layer,inputs=this._layerControlInputs,addedLayers=[],removedLayers=[];this._handlingClick=!0;for(var i=inputs.length-1;i>=0;i--)input=inputs[i],layer=this._getLayer(input.layerId).layer,input.checked?addedLayers.push(layer):input.checked||removedLayers.push(layer);for(i=0;i=0;i--)input=inputs[i],layer=this._getLayer(input.layerId).layer,input.disabled=void 0!==layer.options.minZoom&&zoomlayer.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Zoom=Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(map){var zoomName="leaflet-control-zoom",container=create$1("div",zoomName+" leaflet-bar"),options=this.options;return this._zoomInButton=this._createButton(options.zoomInText,options.zoomInTitle,zoomName+"-in",container,this._zoomIn),this._zoomOutButton=this._createButton(options.zoomOutText,options.zoomOutTitle,zoomName+"-out",container,this._zoomOut),this._updateDisabled(),map.on("zoomend zoomlevelschange",this._updateDisabled,this),container},onRemove:function(map){map.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(html,title,className,container,fn){var link=create$1("a",className,container);return link.innerHTML=html,link.href="#",link.title=title,link.setAttribute("role","button"),link.setAttribute("aria-label",title),disableClickPropagation(link),on(link,"click",stop),on(link,"click",fn,this),on(link,"click",this._refocusOnMap,this),link},_updateDisabled:function(){var map=this._map,className="leaflet-disabled";removeClass(this._zoomInButton,className),removeClass(this._zoomOutButton,className),(this._disabled||map._zoom===map.getMinZoom())&&addClass(this._zoomOutButton,className),(this._disabled||map._zoom===map.getMaxZoom())&&addClass(this._zoomInButton,className)}});Map.mergeOptions({zoomControl:!0}),Map.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Zoom,this.addControl(this.zoomControl))}));var Scale=Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(map){var container=create$1("div","leaflet-control-scale"),options=this.options;return this._addScales(options,"leaflet-control-scale-line",container),map.on(options.updateWhenIdle?"moveend":"move",this._update,this),map.whenReady(this._update,this),container},onRemove:function(map){map.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(options,className,container){options.metric&&(this._mScale=create$1("div",className,container)),options.imperial&&(this._iScale=create$1("div",className,container))},_update:function(){var map=this._map,y=map.getSize().y/2,maxMeters=map.distance(map.containerPointToLatLng([0,y]),map.containerPointToLatLng([this.options.maxWidth,y]));this._updateScales(maxMeters)},_updateScales:function(maxMeters){this.options.metric&&maxMeters&&this._updateMetric(maxMeters),this.options.imperial&&maxMeters&&this._updateImperial(maxMeters)},_updateMetric:function(maxMeters){var meters=this._getRoundNum(maxMeters),label=meters<1e3?meters+" m":meters/1e3+" km";this._updateScale(this._mScale,label,meters/maxMeters)},_updateImperial:function(maxMeters){var maxMiles,miles,feet,maxFeet=3.2808399*maxMeters;maxFeet>5280?(maxMiles=maxFeet/5280,miles=this._getRoundNum(maxMiles),this._updateScale(this._iScale,miles+" mi",miles/maxMiles)):(feet=this._getRoundNum(maxFeet),this._updateScale(this._iScale,feet+" ft",feet/maxFeet))},_updateScale:function(scale,text,ratio){scale.style.width=Math.round(this.options.maxWidth*ratio)+"px",scale.innerHTML=text},_getRoundNum:function(num){var pow10=Math.pow(10,(Math.floor(num)+"").length-1),d=num/pow10;return pow10*(d=d>=10?10:d>=5?5:d>=3?3:d>=2?2:1)}}),Attribution=Control.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(options){setOptions(this,options),this._attributions={}},onAdd:function(map){for(var i in map.attributionControl=this,this._container=create$1("div","leaflet-control-attribution"),disableClickPropagation(this._container),map._layers)map._layers[i].getAttribution&&this.addAttribution(map._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(prefix){return this.options.prefix=prefix,this._update(),this},addAttribution:function(text){return text?(this._attributions[text]||(this._attributions[text]=0),this._attributions[text]++,this._update(),this):this},removeAttribution:function(text){return text?(this._attributions[text]&&(this._attributions[text]--,this._update()),this):this},_update:function(){if(this._map){var attribs=[];for(var i in this._attributions)this._attributions[i]&&attribs.push(i);var prefixAndAttribs=[];this.options.prefix&&prefixAndAttribs.push(this.options.prefix),attribs.length&&prefixAndAttribs.push(attribs.join(", ")),this._container.innerHTML=prefixAndAttribs.join(" | ")}}});Map.mergeOptions({attributionControl:!0}),Map.addInitHook((function(){this.options.attributionControl&&(new Attribution).addTo(this)})),Control.Layers=Layers,Control.Zoom=Zoom,Control.Scale=Scale,Control.Attribution=Attribution,control.layers=function(baseLayers,overlays,options){return new Layers(baseLayers,overlays,options)},control.zoom=function(options){return new Zoom(options)},control.scale=function(options){return new Scale(options)},control.attribution=function(options){return new Attribution(options)};var Handler=Class.extend({initialize:function(map){this._map=map},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Handler.addTo=function(map,name){return map.addHandler(name,this),this};var _lastCode,Mixin={Events:Events},START=touch?"touchstart mousedown":"mousedown",END={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Draggable=Evented.extend({options:{clickTolerance:3},initialize:function(element,dragStartTarget,preventOutline$$1,options){setOptions(this,options),this._element=element,this._dragStartTarget=dragStartTarget||element,this._preventOutline=preventOutline$$1},enable:function(){this._enabled||(on(this._dragStartTarget,START,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Draggable._dragging===this&&this.finishDrag(),off(this._dragStartTarget,START,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(!e._simulated&&this._enabled&&(this._moved=!1,!hasClass(this._element,"leaflet-zoom-anim")&&!(Draggable._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(Draggable._dragging=this,this._preventOutline&&preventOutline(this._element),disableImageDrag(),disableTextSelection(),this._moving)))){this.fire("down");var first=e.touches?e.touches[0]:e,sizedParent=getSizedParentNode(this._element);this._startPoint=new Point(first.clientX,first.clientY),this._parentScale=getScale(sizedParent),on(document,MOVE[e.type],this._onMove,this),on(document,END[e.type],this._onUp,this)}},_onMove:function(e){if(!e._simulated&&this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var first=e.touches&&1===e.touches.length?e.touches[0]:e,offset=new Point(first.clientX,first.clientY)._subtract(this._startPoint);(offset.x||offset.y)&&(Math.abs(offset.x)+Math.abs(offset.y)maxSqDist&&(index=i,maxSqDist=sqDist);maxSqDist>sqTolerance&&(markers[index]=1,_simplifyDPStep(points,markers,sqTolerance,first,index),_simplifyDPStep(points,markers,sqTolerance,index,last))}(points,markers,sqTolerance,0,len-1);var i,newPoints=[];for(i=0;isqTolerance&&(reducedPoints.push(points[i]),prev=i);var p1,p2,dx,dy;return prevbounds.max.x&&(code|=2),p.ybounds.max.y&&(code|=8),code}function _sqClosestPointOnSegment(p,p1,p2,sqDist){var t,x=p1.x,y=p1.y,dx=p2.x-x,dy=p2.y-y,dot=dx*dx+dy*dy;return dot>0&&((t=((p.x-x)*dx+(p.y-y)*dy)/dot)>1?(x=p2.x,y=p2.y):t>0&&(x+=dx*t,y+=dy*t)),dx=p.x-x,dy=p.y-y,sqDist?dx*dx+dy*dy:new Point(x,y)}function isFlat(latlngs){return!isArray(latlngs[0])||"object"!==_typeof(latlngs[0][0])&&void 0!==latlngs[0][0]}function _flat(latlngs){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),isFlat(latlngs)}var LineUtil=(Object.freeze||Object)({simplify:simplify,pointToSegmentDistance:pointToSegmentDistance,closestPointOnSegment:function(p,p1,p2){return _sqClosestPointOnSegment(p,p1,p2)},clipSegment:clipSegment,_getEdgeIntersection:_getEdgeIntersection,_getBitCode:_getBitCode,_sqClosestPointOnSegment:_sqClosestPointOnSegment,isFlat:isFlat,_flat:_flat});function clipPolygon(points,bounds,round){var clippedPoints,i,j,k,a,b,len,edge,p,edges=[1,4,2,8];for(i=0,len=points.length;i1e-7;i++)con=e*Math.sin(phi),con=Math.pow((1-con)/(1+con),e/2),phi+=dphi=Math.PI/2-2*Math.atan(ts*con)-phi;return new LatLng(phi*d,point.x*d/r)}},index=(Object.freeze||Object)({LonLat:LonLat,Mercator:Mercator,SphericalMercator:SphericalMercator}),EPSG3395=extend({},Earth,{code:"EPSG:3395",projection:Mercator,transformation:function(){var scale=.5/(Math.PI*Mercator.R);return toTransformation(scale,.5,-scale,.5)}()}),EPSG4326=extend({},Earth,{code:"EPSG:4326",projection:LonLat,transformation:toTransformation(1/180,1,-1/180,.5)}),Simple=extend({},CRS,{projection:LonLat,transformation:toTransformation(1,0,-1,0),scale:function(zoom){return Math.pow(2,zoom)},zoom:function(scale){return Math.log(scale)/Math.LN2},distance:function(latlng1,latlng2){var dx=latlng2.lng-latlng1.lng,dy=latlng2.lat-latlng1.lat;return Math.sqrt(dx*dx+dy*dy)},infinite:!0});CRS.Earth=Earth,CRS.EPSG3395=EPSG3395,CRS.EPSG3857=EPSG3857,CRS.EPSG900913=EPSG900913,CRS.EPSG4326=EPSG4326,CRS.Simple=Simple;var Layer=Evented.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(map){return map.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(obj){return obj&&obj.removeLayer(this),this},getPane:function(name){return this._map.getPane(name?this.options[name]||name:this.options.pane)},addInteractiveTarget:function(targetEl){return this._map._targets[stamp(targetEl)]=this,this},removeInteractiveTarget:function(targetEl){return delete this._map._targets[stamp(targetEl)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var map=e.target;if(map.hasLayer(this)){if(this._map=map,this._zoomAnimated=map._zoomAnimated,this.getEvents){var events=this.getEvents();map.on(events,this),this.once("remove",(function(){map.off(events,this)}),this)}this.onAdd(map),this.getAttribution&&map.attributionControl&&map.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),map.fire("layeradd",{layer:this})}}});Map.include({addLayer:function(layer){if(!layer._layerAdd)throw new Error("The provided object is not a Layer.");var id=stamp(layer);return this._layers[id]?this:(this._layers[id]=layer,layer._mapToAdd=this,layer.beforeAdd&&layer.beforeAdd(this),this.whenReady(layer._layerAdd,layer),this)},removeLayer:function(layer){var id=stamp(layer);return this._layers[id]?(this._loaded&&layer.onRemove(this),layer.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(layer.getAttribution()),delete this._layers[id],this._loaded&&(this.fire("layerremove",{layer:layer}),layer.fire("remove")),layer._map=layer._mapToAdd=null,this):this},hasLayer:function(layer){return!!layer&&stamp(layer)in this._layers},eachLayer:function(method,context){for(var i in this._layers)method.call(context,this._layers[i]);return this},_addLayers:function(layers){for(var i=0,len=(layers=layers?isArray(layers)?layers:[layers]:[]).length;ithis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()halfDist)return ratio=(dist-halfDist)/segDist,this._map.layerPointToLatLng([p2.x-ratio*(p2.x-p1.x),p2.y-ratio*(p2.y-p1.y)])},getBounds:function(){return this._bounds},addLatLng:function(latlng,latlngs){return latlngs=latlngs||this._defaultShape(),latlng=toLatLng(latlng),latlngs.push(latlng),this._bounds.extend(latlng),this.redraw()},_setLatLngs:function(latlngs){this._bounds=new LatLngBounds,this._latlngs=this._convertLatLngs(latlngs)},_defaultShape:function(){return isFlat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(latlngs){for(var result=[],flat=isFlat(latlngs),i=0,len=latlngs.length;i=2&&result[0]instanceof LatLng&&result[0].equals(result[len-1])&&result.pop(),result},_setLatLngs:function(latlngs){Polyline.prototype._setLatLngs.call(this,latlngs),isFlat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return isFlat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var bounds=this._renderer._bounds,w=this.options.weight,p=new Point(w,w);if(bounds=new Bounds(bounds.min.subtract(p),bounds.max.add(p)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(bounds))if(this.options.noClip)this._parts=this._rings;else for(var clipped,i=0,len=this._rings.length;ip.y!=p2.y>p.y&&p.x<(p2.x-p1.x)*(p.y-p1.y)/(p2.y-p1.y)+p1.x&&(inside=!inside);return inside||Polyline.prototype._containsPoint.call(this,p,!0)}}),GeoJSON=FeatureGroup.extend({initialize:function(geojson,options){setOptions(this,options),this._layers={},geojson&&this.addData(geojson)},addData:function(geojson){var i,len,feature,features=isArray(geojson)?geojson:geojson.features;if(features){for(i=0,len=features.length;i0?sources:[vid.src]}else{isArray(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&vid.style.hasOwnProperty("objectFit")&&(vid.style.objectFit="fill"),vid.autoplay=!!this.options.autoplay,vid.loop=!!this.options.loop;for(var i=0;imaxHeight?(style.height=maxHeight+"px",addClass(container,"leaflet-popup-scrolled")):removeClass(container,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var pos=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),anchor=this._getAnchor();setPosition(this._container,pos.add(anchor))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var map=this._map,marginBottom=parseInt(getStyle(this._container,"marginBottom"),10)||0,containerHeight=this._container.offsetHeight+marginBottom,containerWidth=this._containerWidth,layerPos=new Point(this._containerLeft,-containerHeight-this._containerBottom);layerPos._add(getPosition(this._container));var containerPos=map.layerPointToContainerPoint(layerPos),padding=toPoint(this.options.autoPanPadding),paddingTL=toPoint(this.options.autoPanPaddingTopLeft||padding),paddingBR=toPoint(this.options.autoPanPaddingBottomRight||padding),size=map.getSize(),dx=0,dy=0;containerPos.x+containerWidth+paddingBR.x>size.x&&(dx=containerPos.x+containerWidth-size.x+paddingBR.x),containerPos.x-dx-paddingTL.x<0&&(dx=containerPos.x-paddingTL.x),containerPos.y+containerHeight+paddingBR.y>size.y&&(dy=containerPos.y+containerHeight-size.y+paddingBR.y),containerPos.y-dy-paddingTL.y<0&&(dy=containerPos.y-paddingTL.y),(dx||dy)&&map.fire("autopanstart").panBy([dx,dy])}},_onCloseButtonClick:function(e){this._close(),stop(e)},_getAnchor:function(){return toPoint(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Map.mergeOptions({closePopupOnClick:!0}),Map.include({openPopup:function(popup,latlng,options){return popup instanceof Popup||(popup=new Popup(options).setContent(popup)),latlng&&popup.setLatLng(latlng),this.hasLayer(popup)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=popup,this.addLayer(popup))},closePopup:function(popup){return popup&&popup!==this._popup||(popup=this._popup,this._popup=null),popup&&this.removeLayer(popup),this}}),Layer.include({bindPopup:function(content,options){return content instanceof Popup?(setOptions(content,options),this._popup=content,content._source=this):(this._popup&&!options||(this._popup=new Popup(options,this)),this._popup.setContent(content)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(layer,latlng){return this._popup&&this._map&&(latlng=this._popup._prepareOpen(this,layer,latlng),this._map.openPopup(this._popup,latlng)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(target){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(target)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(content){return this._popup&&this._popup.setContent(content),this},getPopup:function(){return this._popup},_openPopup:function(e){var layer=e.layer||e.target;this._popup&&this._map&&(stop(e),layer instanceof Path?this.openPopup(e.layer||e.target,e.latlng):this._map.hasLayer(this._popup)&&this._popup._source===layer?this.closePopup():this.openPopup(layer,e.latlng))},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var Tooltip=DivOverlay.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(map){DivOverlay.prototype.onAdd.call(this,map),this.setOpacity(this.options.opacity),map.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(map){DivOverlay.prototype.onRemove.call(this,map),map.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var events=DivOverlay.prototype.getEvents.call(this);return touch&&!this.options.permanent&&(events.preclick=this._close),events},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var className="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=create$1("div",className)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(pos){var map=this._map,container=this._container,centerPoint=map.latLngToContainerPoint(map.getCenter()),tooltipPoint=map.layerPointToContainerPoint(pos),direction=this.options.direction,tooltipWidth=container.offsetWidth,tooltipHeight=container.offsetHeight,offset=toPoint(this.options.offset),anchor=this._getAnchor();"top"===direction?pos=pos.add(toPoint(-tooltipWidth/2+offset.x,-tooltipHeight+offset.y+anchor.y,!0)):"bottom"===direction?pos=pos.subtract(toPoint(tooltipWidth/2-offset.x,-offset.y,!0)):"center"===direction?pos=pos.subtract(toPoint(tooltipWidth/2+offset.x,tooltipHeight/2-anchor.y+offset.y,!0)):"right"===direction||"auto"===direction&&tooltipPoint.xthis.options.maxZoom||zoomminZoom&&this._retainParent(x2,y2,z2,minZoom))},_retainChildren:function(x,y,z,maxZoom){for(var i=2*x;i<2*x+2;i++)for(var j=2*y;j<2*y+2;j++){var coords=new Point(i,j);coords.z=z+1;var key=this._tileCoordsToKey(coords),tile=this._tiles[key];tile&&tile.active?tile.retain=!0:(tile&&tile.loaded&&(tile.retain=!0),z+1this.options.maxZoom||void 0!==this.options.minZoom&&tileZoom1)this._setView(center,zoom);else{for(var j=tileRange.min.y;j<=tileRange.max.y;j++)for(var i=tileRange.min.x;i<=tileRange.max.x;i++){var coords=new Point(i,j);if(coords.z=this._tileZoom,this._isValidTile(coords)){var tile=this._tiles[this._tileCoordsToKey(coords)];tile?tile.current=!0:queue.push(coords)}}if(queue.sort((function(a,b){return a.distanceTo(tileCenter)-b.distanceTo(tileCenter)})),0!==queue.length){this._loading||(this._loading=!0,this.fire("loading"));var fragment=document.createDocumentFragment();for(i=0;ibounds.max.x)||!crs.wrapLat&&(coords.ybounds.max.y))return!1}if(!this.options.bounds)return!0;var tileBounds=this._tileCoordsToBounds(coords);return toLatLngBounds(this.options.bounds).overlaps(tileBounds)},_keyToBounds:function(key){return this._tileCoordsToBounds(this._keyToTileCoords(key))},_tileCoordsToNwSe:function(coords){var map=this._map,tileSize=this.getTileSize(),nwPoint=coords.scaleBy(tileSize),sePoint=nwPoint.add(tileSize);return[map.unproject(nwPoint,coords.z),map.unproject(sePoint,coords.z)]},_tileCoordsToBounds:function(coords){var bp=this._tileCoordsToNwSe(coords),bounds=new LatLngBounds(bp[0],bp[1]);return this.options.noWrap||(bounds=this._map.wrapLatLngBounds(bounds)),bounds},_tileCoordsToKey:function(coords){return coords.x+":"+coords.y+":"+coords.z},_keyToTileCoords:function(key){var k=key.split(":"),coords=new Point(+k[0],+k[1]);return coords.z=+k[2],coords},_removeTile:function(key){var tile=this._tiles[key];tile&&(_remove(tile.el),delete this._tiles[key],this.fire("tileunload",{tile:tile.el,coords:this._keyToTileCoords(key)}))},_initTile:function(tile){addClass(tile,"leaflet-tile");var tileSize=this.getTileSize();tile.style.width=tileSize.x+"px",tile.style.height=tileSize.y+"px",tile.onselectstart=falseFn,tile.onmousemove=falseFn,ielt9&&this.options.opacity<1&&_setOpacity(tile,this.options.opacity),android&&!android23&&(tile.style.WebkitBackfaceVisibility="hidden")},_addTile:function(coords,container){var tilePos=this._getTilePos(coords),key=this._tileCoordsToKey(coords),tile=this.createTile(this._wrapCoords(coords),bind(this._tileReady,this,coords));this._initTile(tile),this.createTile.length<2&&requestAnimFrame(bind(this._tileReady,this,coords,null,tile)),setPosition(tile,tilePos),this._tiles[key]={el:tile,coords:coords,current:!0},container.appendChild(tile),this.fire("tileloadstart",{tile:tile,coords:coords})},_tileReady:function(coords,err,tile){err&&this.fire("tileerror",{error:err,tile:tile,coords:coords});var key=this._tileCoordsToKey(coords);(tile=this._tiles[key])&&(tile.loaded=+new Date,this._map._fadeAnimated?(_setOpacity(tile.el,0),cancelAnimFrame(this._fadeFrame),this._fadeFrame=requestAnimFrame(this._updateOpacity,this)):(tile.active=!0,this._pruneTiles()),err||(addClass(tile.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:tile.el,coords:coords})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ielt9||!this._map._fadeAnimated?requestAnimFrame(this._pruneTiles,this):setTimeout(bind(this._pruneTiles,this),250)))},_getTilePos:function(coords){return coords.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(coords){var newCoords=new Point(this._wrapX?wrapNum(coords.x,this._wrapX):coords.x,this._wrapY?wrapNum(coords.y,this._wrapY):coords.y);return newCoords.z=coords.z,newCoords},_pxBoundsToTileRange:function(bounds){var tileSize=this.getTileSize();return new Bounds(bounds.min.unscaleBy(tileSize).floor(),bounds.max.unscaleBy(tileSize).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var key in this._tiles)if(!this._tiles[key].loaded)return!1;return!0}}),TileLayer=GridLayer.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(url,options){this._url=url,(options=setOptions(this,options)).detectRetina&&retina&&options.maxZoom>0&&(options.tileSize=Math.floor(options.tileSize/2),options.zoomReverse?(options.zoomOffset--,options.minZoom++):(options.zoomOffset++,options.maxZoom--),options.minZoom=Math.max(0,options.minZoom)),"string"==typeof options.subdomains&&(options.subdomains=options.subdomains.split("")),android||this.on("tileunload",this._onTileRemove)},setUrl:function(url,noRedraw){return this._url===url&&void 0===noRedraw&&(noRedraw=!0),this._url=url,noRedraw||this.redraw(),this},createTile:function(coords,done){var tile=document.createElement("img");return on(tile,"load",bind(this._tileOnLoad,this,done,tile)),on(tile,"error",bind(this._tileOnError,this,done,tile)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(tile.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),tile.alt="",tile.setAttribute("role","presentation"),tile.src=this.getTileUrl(coords),tile},getTileUrl:function(coords){var data={r:retina?"@2x":"",s:this._getSubdomain(coords),x:coords.x,y:coords.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var invertedY=this._globalTileRange.max.y-coords.y;this.options.tms&&(data.y=invertedY),data["-y"]=invertedY}return template(this._url,extend(data,this.options))},_tileOnLoad:function(done,tile){ielt9?setTimeout(bind(done,this,null,tile),0):done(null,tile)},_tileOnError:function(done,tile,e){var errorUrl=this.options.errorTileUrl;errorUrl&&tile.getAttribute("src")!==errorUrl&&(tile.src=errorUrl),done(e,tile)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var zoom=this._tileZoom,maxZoom=this.options.maxZoom;return this.options.zoomReverse&&(zoom=maxZoom-zoom),zoom+this.options.zoomOffset},_getSubdomain:function(tilePoint){var index=Math.abs(tilePoint.x+tilePoint.y)%this.options.subdomains.length;return this.options.subdomains[index]},_abortLoading:function(){var i,tile;for(i in this._tiles)this._tiles[i].coords.z!==this._tileZoom&&((tile=this._tiles[i].el).onload=falseFn,tile.onerror=falseFn,tile.complete||(tile.src=emptyImageUrl,_remove(tile),delete this._tiles[i]))},_removeTile:function(key){var tile=this._tiles[key];if(tile)return androidStock||tile.el.setAttribute("src",emptyImageUrl),GridLayer.prototype._removeTile.call(this,key)},_tileReady:function(coords,err,tile){if(this._map&&(!tile||tile.getAttribute("src")!==emptyImageUrl))return GridLayer.prototype._tileReady.call(this,coords,err,tile)}});function tileLayer(url,options){return new TileLayer(url,options)}var TileLayerWMS=TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(url,options){this._url=url;var wmsParams=extend({},this.defaultWmsParams);for(var i in options)i in this.options||(wmsParams[i]=options[i]);var realRetina=(options=setOptions(this,options)).detectRetina&&retina?2:1,tileSize=this.getTileSize();wmsParams.width=tileSize.x*realRetina,wmsParams.height=tileSize.y*realRetina,this.wmsParams=wmsParams},onAdd:function(map){this._crs=this.options.crs||map.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var projectionKey=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[projectionKey]=this._crs.code,TileLayer.prototype.onAdd.call(this,map)},getTileUrl:function(coords){var tileBounds=this._tileCoordsToNwSe(coords),crs=this._crs,bounds=toBounds(crs.project(tileBounds[0]),crs.project(tileBounds[1])),min=bounds.min,max=bounds.max,bbox=(this._wmsVersion>=1.3&&this._crs===EPSG4326?[min.y,min.x,max.y,max.x]:[min.x,min.y,max.x,max.y]).join(","),url=TileLayer.prototype.getTileUrl.call(this,coords);return url+getParamString(this.wmsParams,url,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+bbox},setParams:function(params,noRedraw){return extend(this.wmsParams,params),noRedraw||this.redraw(),this}});TileLayer.WMS=TileLayerWMS,tileLayer.wms=function(url,options){return new TileLayerWMS(url,options)};var Renderer=Layer.extend({options:{padding:.1,tolerance:0},initialize:function(options){setOptions(this,options),stamp(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&addClass(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 events={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(events.zoomanim=this._onAnimZoom),events},_onAnimZoom:function(ev){this._updateTransform(ev.center,ev.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(center,zoom){var scale=this._map.getZoomScale(zoom,this._zoom),position=getPosition(this._container),viewHalf=this._map.getSize().multiplyBy(.5+this.options.padding),currentCenterPoint=this._map.project(this._center,zoom),centerOffset=this._map.project(center,zoom).subtract(currentCenterPoint),topLeftOffset=viewHalf.multiplyBy(-scale).add(position).add(viewHalf).subtract(centerOffset);any3d?setTransform(this._container,topLeftOffset,scale):setPosition(this._container,topLeftOffset)},_reset:function(){for(var id in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[id]._reset()},_onZoomEnd:function(){for(var id in this._layers)this._layers[id]._project()},_updatePaths:function(){for(var id in this._layers)this._layers[id]._update()},_update:function(){var p=this.options.padding,size=this._map.getSize(),min=this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();this._bounds=new Bounds(min,min.add(size.multiplyBy(1+2*p)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Canvas=Renderer.extend({getEvents:function(){var events=Renderer.prototype.getEvents.call(this);return events.viewprereset=this._onViewPreReset,events},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Renderer.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var container=this._container=document.createElement("canvas");on(container,"mousemove",this._onMouseMove,this),on(container,"click dblclick mousedown mouseup contextmenu",this._onClick,this),on(container,"mouseout",this._handleMouseOut,this),this._ctx=container.getContext("2d")},_destroyContainer:function(){cancelAnimFrame(this._redrawRequest),delete this._ctx,_remove(this._container),off(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var id in this._redrawBounds=null,this._layers)this._layers[id]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Renderer.prototype._update.call(this);var b=this._bounds,container=this._container,size=b.getSize(),m=retina?2:1;setPosition(container,b.min),container.width=m*size.x,container.height=m*size.y,container.style.width=size.x+"px",container.style.height=size.y+"px",retina&&this._ctx.scale(2,2),this._ctx.translate(-b.min.x,-b.min.y),this.fire("update")}},_reset:function(){Renderer.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(layer){this._updateDashArray(layer),this._layers[stamp(layer)]=layer;var order=layer._order={layer:layer,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=order),this._drawLast=order,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(layer){this._requestRedraw(layer)},_removePath:function(layer){var order=layer._order,next=order.next,prev=order.prev;next?next.prev=prev:this._drawLast=prev,prev?prev.next=next:this._drawFirst=next,delete layer._order,delete this._layers[stamp(layer)],this._requestRedraw(layer)},_updatePath:function(layer){this._extendRedrawBounds(layer),layer._project(),layer._update(),this._requestRedraw(layer)},_updateStyle:function(layer){this._updateDashArray(layer),this._requestRedraw(layer)},_updateDashArray:function(layer){if("string"==typeof layer.options.dashArray){var dashValue,i,parts=layer.options.dashArray.split(/[, ]+/),dashArray=[];for(i=0;i')}}catch(e){return function(name){return document.createElement("<"+name+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),vmlMixin={_initContainer:function(){this._container=create$1("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Renderer.prototype._update.call(this),this.fire("update"))},_initPath:function(layer){var container=layer._container=vmlCreate("shape");addClass(container,"leaflet-vml-shape "+(this.options.className||"")),container.coordsize="1 1",layer._path=vmlCreate("path"),container.appendChild(layer._path),this._updateStyle(layer),this._layers[stamp(layer)]=layer},_addPath:function(layer){var container=layer._container;this._container.appendChild(container),layer.options.interactive&&layer.addInteractiveTarget(container)},_removePath:function(layer){var container=layer._container;_remove(container),layer.removeInteractiveTarget(container),delete this._layers[stamp(layer)]},_updateStyle:function(layer){var stroke=layer._stroke,fill=layer._fill,options=layer.options,container=layer._container;container.stroked=!!options.stroke,container.filled=!!options.fill,options.stroke?(stroke||(stroke=layer._stroke=vmlCreate("stroke")),container.appendChild(stroke),stroke.weight=options.weight+"px",stroke.color=options.color,stroke.opacity=options.opacity,options.dashArray?stroke.dashStyle=isArray(options.dashArray)?options.dashArray.join(" "):options.dashArray.replace(/( *, *)/g," "):stroke.dashStyle="",stroke.endcap=options.lineCap.replace("butt","flat"),stroke.joinstyle=options.lineJoin):stroke&&(container.removeChild(stroke),layer._stroke=null),options.fill?(fill||(fill=layer._fill=vmlCreate("fill")),container.appendChild(fill),fill.color=options.fillColor||options.color,fill.opacity=options.fillOpacity):fill&&(container.removeChild(fill),layer._fill=null)},_updateCircle:function(layer){var p=layer._point.round(),r=Math.round(layer._radius),r2=Math.round(layer._radiusY||r);this._setPath(layer,layer._empty()?"M0 0":"AL "+p.x+","+p.y+" "+r+","+r2+" 0,23592600")},_setPath:function(layer,path){layer._path.v=path},_bringToFront:function(layer){toFront(layer._container)},_bringToBack:function(layer){toBack(layer._container)}},create$2=vml?vmlCreate:svgCreate,SVG=Renderer.extend({getEvents:function(){var events=Renderer.prototype.getEvents.call(this);return events.zoomstart=this._onZoomStart,events},_initContainer:function(){this._container=create$2("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=create$2("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){_remove(this._container),off(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Renderer.prototype._update.call(this);var b=this._bounds,size=b.getSize(),container=this._container;this._svgSize&&this._svgSize.equals(size)||(this._svgSize=size,container.setAttribute("width",size.x),container.setAttribute("height",size.y)),setPosition(container,b.min),container.setAttribute("viewBox",[b.min.x,b.min.y,size.x,size.y].join(" ")),this.fire("update")}},_initPath:function(layer){var path=layer._path=create$2("path");layer.options.className&&addClass(path,layer.options.className),layer.options.interactive&&addClass(path,"leaflet-interactive"),this._updateStyle(layer),this._layers[stamp(layer)]=layer},_addPath:function(layer){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(layer._path),layer.addInteractiveTarget(layer._path)},_removePath:function(layer){_remove(layer._path),layer.removeInteractiveTarget(layer._path),delete this._layers[stamp(layer)]},_updatePath:function(layer){layer._project(),layer._update()},_updateStyle:function(layer){var path=layer._path,options=layer.options;path&&(options.stroke?(path.setAttribute("stroke",options.color),path.setAttribute("stroke-opacity",options.opacity),path.setAttribute("stroke-width",options.weight),path.setAttribute("stroke-linecap",options.lineCap),path.setAttribute("stroke-linejoin",options.lineJoin),options.dashArray?path.setAttribute("stroke-dasharray",options.dashArray):path.removeAttribute("stroke-dasharray"),options.dashOffset?path.setAttribute("stroke-dashoffset",options.dashOffset):path.removeAttribute("stroke-dashoffset")):path.setAttribute("stroke","none"),options.fill?(path.setAttribute("fill",options.fillColor||options.color),path.setAttribute("fill-opacity",options.fillOpacity),path.setAttribute("fill-rule",options.fillRule||"evenodd")):path.setAttribute("fill","none"))},_updatePoly:function(layer,closed){this._setPath(layer,pointsToPath(layer._parts,closed))},_updateCircle:function(layer){var p=layer._point,r=Math.max(Math.round(layer._radius),1),arc="a"+r+","+(Math.max(Math.round(layer._radiusY),1)||r)+" 0 1,0 ",d=layer._empty()?"M0 0":"M"+(p.x-r)+","+p.y+arc+2*r+",0 "+arc+2*-r+",0 ";this._setPath(layer,d)},_setPath:function(layer,path){layer._path.setAttribute("d",path)},_bringToFront:function(layer){toFront(layer._path)},_bringToBack:function(layer){toBack(layer._path)}});function svg$1(options){return svg||vml?new SVG(options):null}vml&&SVG.include(vmlMixin),Map.include({getRenderer:function(layer){var renderer=layer.options.renderer||this._getPaneRenderer(layer.options.pane)||this.options.renderer||this._renderer;return renderer||(renderer=this._renderer=this._createRenderer()),this.hasLayer(renderer)||this.addLayer(renderer),renderer},_getPaneRenderer:function(name){if("overlayPane"===name||void 0===name)return!1;var renderer=this._paneRenderers[name];return void 0===renderer&&(renderer=this._createRenderer({pane:name}),this._paneRenderers[name]=renderer),renderer},_createRenderer:function(options){return this.options.preferCanvas&&canvas$1(options)||svg$1(options)}});var Rectangle=Polygon.extend({initialize:function(latLngBounds,options){Polygon.prototype.initialize.call(this,this._boundsToLatLngs(latLngBounds),options)},setBounds:function(latLngBounds){return this.setLatLngs(this._boundsToLatLngs(latLngBounds))},_boundsToLatLngs:function(latLngBounds){return[(latLngBounds=toLatLngBounds(latLngBounds)).getSouthWest(),latLngBounds.getNorthWest(),latLngBounds.getNorthEast(),latLngBounds.getSouthEast()]}});SVG.create=create$2,SVG.pointsToPath=pointsToPath,GeoJSON.geometryToLayer=geometryToLayer,GeoJSON.coordsToLatLng=coordsToLatLng,GeoJSON.coordsToLatLngs=coordsToLatLngs,GeoJSON.latLngToCoords=latLngToCoords,GeoJSON.latLngsToCoords=latLngsToCoords,GeoJSON.getFeature=getFeature,GeoJSON.asFeature=asFeature,Map.mergeOptions({boxZoom:!0});var BoxZoom=Handler.extend({initialize:function(map){this._map=map,this._container=map._container,this._pane=map._panes.overlayPane,this._resetStateTimeout=0,map.on("unload",this._destroy,this)},addHooks:function(){on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){_remove(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),disableTextSelection(),disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(e),on(document,{contextmenu:stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=create$1("div","leaflet-zoom-box",this._container),addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var bounds=new Bounds(this._point,this._startPoint),size=bounds.getSize();setPosition(this._box,bounds.min),this._box.style.width=size.x+"px",this._box.style.height=size.y+"px"},_finish:function(){this._moved&&(_remove(this._box),removeClass(this._container,"leaflet-crosshair")),enableTextSelection(),enableImageDrag(),off(document,{contextmenu:stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(bind(this._resetState,this),0);var bounds=new LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(bounds).fire("boxzoomend",{boxZoomBounds:bounds})}},_onKeyDown:function(e){27===e.keyCode&&this._finish()}});Map.addInitHook("addHandler","boxZoom",BoxZoom),Map.mergeOptions({doubleClickZoom:!0});var DoubleClickZoom=Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var map=this._map,oldZoom=map.getZoom(),delta=map.options.zoomDelta,zoom=e.originalEvent.shiftKey?oldZoom-delta:oldZoom+delta;"center"===map.options.doubleClickZoom?map.setZoom(zoom):map.setZoomAround(e.containerPoint,zoom)}});Map.addInitHook("addHandler","doubleClickZoom",DoubleClickZoom),Map.mergeOptions({dragging:!0,inertia:!android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Drag=Handler.extend({addHooks:function(){if(!this._draggable){var map=this._map;this._draggable=new Draggable(map._mapPane,map._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),map.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),map.on("zoomend",this._onZoomEnd,this),map.whenReady(this._onZoomEnd,this))}addClass(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){removeClass(this._map._container,"leaflet-grab"),removeClass(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 map=this._map;if(map._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var bounds=toLatLngBounds(this._map.options.maxBounds);this._offsetLimit=toBounds(this._map.latLngToContainerPoint(bounds.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(bounds.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;map.fire("movestart").fire("dragstart"),map.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var time=this._lastTime=+new Date,pos=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(pos),this._times.push(time),this._prunePositions(time)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(time){for(;this._positions.length>1&&time-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var pxCenter=this._map.getSize().divideBy(2),pxWorldCenter=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=pxWorldCenter.subtract(pxCenter).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(value,threshold){return value-(value-threshold)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var offset=this._draggable._newPos.subtract(this._draggable._startPos),limit=this._offsetLimit;offset.xlimit.max.x&&(offset.x=this._viscousLimit(offset.x,limit.max.x)),offset.y>limit.max.y&&(offset.y=this._viscousLimit(offset.y,limit.max.y)),this._draggable._newPos=this._draggable._startPos.add(offset)}},_onPreDragWrap:function(){var worldWidth=this._worldWidth,halfWidth=Math.round(worldWidth/2),dx=this._initialWorldOffset,x=this._draggable._newPos.x,newX1=(x-halfWidth+dx)%worldWidth+halfWidth-dx,newX2=(x+halfWidth+dx)%worldWidth-halfWidth-dx,newX=Math.abs(newX1+dx)0?d4:-d4))-zoom;this._delta=0,this._startTime=null,delta&&("center"===map.options.scrollWheelZoom?map.setZoom(zoom+delta):map.setZoomAround(this._lastMousePos,zoom+delta))}});Map.addInitHook("addHandler","scrollWheelZoom",ScrollWheelZoom),Map.mergeOptions({tap:!0,tapTolerance:15});var Tap=Handler.extend({addHooks:function(){on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(e.touches){if(preventDefault(e),this._fireClick=!0,e.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var first=e.touches[0],el=first.target;this._startPos=this._newPos=new Point(first.clientX,first.clientY),el.tagName&&"a"===el.tagName.toLowerCase()&&addClass(el,"leaflet-active"),this._holdTimeout=setTimeout(bind((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",first))}),this),1e3),this._simulateEvent("mousedown",first),on(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(e){if(clearTimeout(this._holdTimeout),off(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&e&&e.changedTouches){var first=e.changedTouches[0],el=first.target;el&&el.tagName&&"a"===el.tagName.toLowerCase()&&removeClass(el,"leaflet-active"),this._simulateEvent("mouseup",first),this._isTapValid()&&this._simulateEvent("click",first)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(e){var first=e.touches[0];this._newPos=new Point(first.clientX,first.clientY),this._simulateEvent("mousemove",first)},_simulateEvent:function(type,e){var simulatedEvent=document.createEvent("MouseEvents");simulatedEvent._simulated=!0,e.target._simulatedClick=!0,simulatedEvent.initMouseEvent(type,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(simulatedEvent)}});touch&&!pointer&&Map.addInitHook("addHandler","tap",Tap),Map.mergeOptions({touchZoom:touch&&!android23,bounceAtZoomLimits:!0});var TouchZoom=Handler.extend({addHooks:function(){addClass(this._map._container,"leaflet-touch-zoom"),on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){removeClass(this._map._container,"leaflet-touch-zoom"),off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var map=this._map;if(e.touches&&2===e.touches.length&&!map._animatingZoom&&!this._zooming){var p1=map.mouseEventToContainerPoint(e.touches[0]),p2=map.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=map.getSize()._divideBy(2),this._startLatLng=map.containerPointToLatLng(this._centerPoint),"center"!==map.options.touchZoom&&(this._pinchStartLatLng=map.containerPointToLatLng(p1.add(p2)._divideBy(2))),this._startDist=p1.distanceTo(p2),this._startZoom=map.getZoom(),this._moved=!1,this._zooming=!0,map._stop(),on(document,"touchmove",this._onTouchMove,this),on(document,"touchend",this._onTouchEnd,this),preventDefault(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var map=this._map,p1=map.mouseEventToContainerPoint(e.touches[0]),p2=map.mouseEventToContainerPoint(e.touches[1]),scale=p1.distanceTo(p2)/this._startDist;if(this._zoom=map.getScaleZoom(scale,this._startZoom),!map.options.bounceAtZoomLimits&&(this._zoommap.getMaxZoom()&&scale>1)&&(this._zoom=map._limitZoom(this._zoom)),"center"===map.options.touchZoom){if(this._center=this._startLatLng,1===scale)return}else{var delta=p1._add(p2)._divideBy(2)._subtract(this._centerPoint);if(1===scale&&0===delta.x&&0===delta.y)return;this._center=map.unproject(map.project(this._pinchStartLatLng,this._zoom).subtract(delta),this._zoom)}this._moved||(map._moveStart(!0,!1),this._moved=!0),cancelAnimFrame(this._animRequest);var moveFn=bind(map._move,map,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=requestAnimFrame(moveFn,this,!0),preventDefault(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,cancelAnimFrame(this._animRequest),off(document,"touchmove",this._onTouchMove),off(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Map.addInitHook("addHandler","touchZoom",TouchZoom),Map.BoxZoom=BoxZoom,Map.DoubleClickZoom=DoubleClickZoom,Map.Drag=Drag,Map.Keyboard=Keyboard,Map.ScrollWheelZoom=ScrollWheelZoom,Map.Tap=Tap,Map.TouchZoom=TouchZoom,Object.freeze=freeze,exports.version="1.6.0",exports.Control=Control,exports.control=control,exports.Browser=Browser,exports.Evented=Evented,exports.Mixin=Mixin,exports.Util=Util,exports.Class=Class,exports.Handler=Handler,exports.extend=extend,exports.bind=bind,exports.stamp=stamp,exports.setOptions=setOptions,exports.DomEvent=DomEvent,exports.DomUtil=DomUtil,exports.PosAnimation=PosAnimation,exports.Draggable=Draggable,exports.LineUtil=LineUtil,exports.PolyUtil=PolyUtil,exports.Point=Point,exports.point=toPoint,exports.Bounds=Bounds,exports.bounds=toBounds,exports.Transformation=Transformation,exports.transformation=toTransformation,exports.Projection=index,exports.LatLng=LatLng,exports.latLng=toLatLng,exports.LatLngBounds=LatLngBounds,exports.latLngBounds=toLatLngBounds,exports.CRS=CRS,exports.GeoJSON=GeoJSON,exports.geoJSON=geoJSON,exports.geoJson=geoJson,exports.Layer=Layer,exports.LayerGroup=LayerGroup,exports.layerGroup=function(layers,options){return new LayerGroup(layers,options)},exports.FeatureGroup=FeatureGroup,exports.featureGroup=function(layers){return new FeatureGroup(layers)},exports.ImageOverlay=ImageOverlay,exports.imageOverlay=function(url,bounds,options){return new ImageOverlay(url,bounds,options)},exports.VideoOverlay=VideoOverlay,exports.videoOverlay=function(video,bounds,options){return new VideoOverlay(video,bounds,options)},exports.SVGOverlay=SVGOverlay,exports.svgOverlay=function(el,bounds,options){return new SVGOverlay(el,bounds,options)},exports.DivOverlay=DivOverlay,exports.Popup=Popup,exports.popup=function(options,source){return new Popup(options,source)},exports.Tooltip=Tooltip,exports.tooltip=function(options,source){return new Tooltip(options,source)},exports.Icon=Icon,exports.icon=function(options){return new Icon(options)},exports.DivIcon=DivIcon,exports.divIcon=function(options){return new DivIcon(options)},exports.Marker=Marker,exports.marker=function(latlng,options){return new Marker(latlng,options)},exports.TileLayer=TileLayer,exports.tileLayer=tileLayer,exports.GridLayer=GridLayer,exports.gridLayer=function(options){return new GridLayer(options)},exports.SVG=SVG,exports.svg=svg$1,exports.Renderer=Renderer,exports.Canvas=Canvas,exports.canvas=canvas$1,exports.Path=Path,exports.CircleMarker=CircleMarker,exports.circleMarker=function(latlng,options){return new CircleMarker(latlng,options)},exports.Circle=Circle,exports.circle=function(latlng,options,legacyOptions){return new Circle(latlng,options,legacyOptions)},exports.Polyline=Polyline,exports.polyline=function(latlngs,options){return new Polyline(latlngs,options)},exports.Polygon=Polygon,exports.polygon=function(latlngs,options){return new Polygon(latlngs,options)},exports.Rectangle=Rectangle,exports.rectangle=function(latLngBounds,options){return new Rectangle(latLngBounds,options)},exports.Map=Map,exports.map=function(id,options){return new Map(id,options)};var oldL=window.L;exports.noConflict=function(){return window.L=oldL,this},window.L=exports},"object"===_typeof(exports)&&void 0!==module?factory(exports):(__WEBPACK_AMD_DEFINE_ARRAY__=[exports],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=factory)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))},,,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";module.exports=function(useSourceMap){var list=[];return list.toString=function(){return this.map((function(item){var content=function(item,useSourceMap){var content=item[1]||"",cssMapping=item[3];if(!cssMapping)return content;if(useSourceMap&&"function"==typeof btoa){var sourceMapping=(sourceMap=cssMapping,base64=btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))),data="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64),"/*# ".concat(data," */")),sourceURLs=cssMapping.sources.map((function(source){return"/*# sourceURL=".concat(cssMapping.sourceRoot).concat(source," */")}));return[content].concat(sourceURLs).concat([sourceMapping]).join("\n")}var sourceMap,base64,data;return[content].join("\n")}(item,useSourceMap);return item[2]?"@media ".concat(item[2],"{").concat(content,"}"):content})).join("")},list.i=function(modules,mediaQuery){"string"==typeof modules&&(modules=[[null,modules,""]]);for(var alreadyImportedModules={},i=0;i=0,i=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(22),o)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",s="object"==_typeof(t),f=e.regeneratorRuntime;if(f)s&&(t.exports=f);else{(f=e.regeneratorRuntime=s?t.exports:{}).wrap=w;var l="suspendedStart",p="suspendedYield",h="executing",y="completed",v={},d={};d[a]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(R([])));g&&g!==r&&o.call(g,a)&&(d=g);var b=j.prototype=x.prototype=Object.create(d);S.prototype=b.constructor=j,j.constructor=S,j[c]=S.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(b),t},f.awrap=function(t){return{__await:t}},_(L.prototype),L.prototype[u]=function(){return this},f.AsyncIterator=L,f.async=function(t,e,n,r){var o=new L(w(t,e,n,r));return f.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},_(b),b[c]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=R,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(c&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function w(t,e,n,r){var o=e&&e.prototype instanceof x?e:x,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===y){if("throw"===o)throw i;return T()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=P(a,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=O(t,e,n);if("normal"===c.type){if(r=n.done?y:p,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=y,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function O(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function x(){}function S(){}function j(){}function _(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function L(t){var e;this._invoke=function(n,r){function i(){return new Promise((function(e,i){!function e(n,r,i,a){var u=O(t[n],t,r);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==_typeof(s)&&o.call(s,"__await")?Promise.resolve(s.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(s).then((function(t){c.value=t,i(c)}),(function(t){return e("throw",t,i,a)}))}a(u.arg)}(n,r,e,i)}))}return e=e?e.then(i,i):i()}}function P(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,P(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=O(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function R(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r=0&&f.splice(e,1)}function d(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=n.nc;r&&(t.attrs.nonce=r)}return m(e,t.attrs),y(t,e),e}function m(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var a=s++;n=c||(c=d(e)),r=O.bind(null,n,a,!1),o=O.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",m(e,t.attrs),y(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=l(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(a),u&&URL.revokeObjectURL(u)}.bind(null,n,e),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=d(e),r=function(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=("undefined"==typeof document?"undefined":_typeof(document)))throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==_typeof(e.attrs)?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return p(n,e),function(t){for(var r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=!(i=f(e).call(this))||"object"!==a(i)&&"function"!=typeof i?p(this):i,h(p(p(n)),v,null),h(p(p(n)),d,null),h(p(p(n)),"_map",null),h(p(p(n)),"_path",null),h(p(p(n)),"_animatedPathId",null),h(p(p(n)),"_animatedPathClass","leaflet-ant-path"),h(p(p(n)),"_reversePathClass","".concat(n._animatedPathClass,"__reverse")),h(p(p(n)),"_hardwareAccClass","hardware-acceleration"),h(p(p(n)),"_defaultOptions",{use:r.polyline,paused:!1,reverse:!1,hardwareAcceleration:!1,renderer:Object(r.svg)({pane:"overlayPane"}),delay:400,dashArray:[10,20],weight:5,opacity:.5,color:"#0000FF",pulseColor:"#FFFFFF"}),r.Util.setOptions(p(p(n)),c({},n._defaultOptions,u)),n._path=t,n._animatedPathId="ant-path-".concat((new Date).getTime()),n._mount(),n}var n,o,w;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,r.FeatureGroup),n=e,w=[{key:m,get:function(){return this}}],(o=[{key:"map",value:function(t){return new(0,this.constructor[Symbol.species])(this._path.map(t),c({},this.options))}},{key:b,value:i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this._path,"t0",1);case 1:case"end":return t.stop()}}),t,this)}))},{key:"_processOptions",value:function(){var t=this.options,e=this._animatedPathClass,n=this._reversePathClass,r=this._hardwareAccClass,o=this._animatedPathId,i=t.reverse,a=t.hardwareAcceleration,u=c({},t),s=c({},t);return s.color=s.pulseColor||t.pulseColor,s.className=[e,o,i?n:"",a?"".concat(e,"__").concat(r):""].join(" "),delete u.dashArray,Array.isArray(s.dashArray)&&(s.dashArray=String(s.dashArray)),{pathOpts:u,pulseOpts:s}}},{key:"_mount",value:function(){var t=this._processOptions(),e=t.pathOpts,n=t.pulseOpts,r=this.options.use;this.addLayer(this[y.main]=r(this._path,e)),this.addLayer(this[y.pulse]=r(this._path,n))}},{key:"_calculateAnimationSpeed",value:function(){var t=this.options,e=this._map,n=this._animatedPathId;if(!t.paused&&e){var r=e.getZoom(),o=document.getElementsByClassName(n),i=1+t.delay/3/r+"s",a=["-webkit-","-moz-","-ms-","-o-",""].map((function(t){return"".concat(t,"animation-duration: ").concat(i)})).join(";");Array.from(o,(function(t){t.style.cssText=a,t.setAttribute("data-animated","true")}))}}},{key:"_pureReverse",value:function(){var t=this[y.pulse].getElement();t&&(this.options.reverse?t.classList.remove(this._reversePathClass):t.classList.add(this._reversePathClass))}},{key:"onAdd",value:function(t){return this._map=t,this._map.on("zoomend",this._calculateAnimationSpeed,this),this._mount(),this._calculateAnimationSpeed(),this}},{key:"onRemove",value:function(t){return this._map&&(this._map.off("zoomend",this._calculateAnimationSpeed,this),this._map=null),t&&t.removeLayer(this[y.main]).removeLayer(this[y.pulse]),this}},{key:"pause",value:function(){if(!this.options.paused){var t=this[y.pulse].getElement();return this.options.paused=!0,t&&(t.removeAttribute("style"),t.setAttribute("data-animated","true")),!0}return!1}},{key:"resume",value:function(){var t=this.options;return!!t.paused&&(t.paused=!1,this._calculateAnimationSpeed(),!0)}},{key:"bringToFront",value:function(){return this[y.main].bringToFront(),this[y.pulse].bringToFront(),this}},{key:"bringToBack",value:function(){return this[y.pulse].bringToBack(),this[y.main].bringToBack(),this}},{key:"removeFrom",value:function(t){return t&&t.hasLayer(this)&&t.removeLayer(this),this}},{key:"setStyle",value:function(t){var e=c({},this.options,t),n=e.paused,r=e.delay,o=e.reverse;n?this.pause():this.resume(),r!==this.options.delay&&(this.options.delay=r||this._defaultOptions.delay,this._calculateAnimationSpeed()),void 0!==o&&o!==this.options.reverse&&this._pureReverse(),this.options=c({},this.options,t);var i=this._processOptions(),a=i.pathOpts,u=i.pulseOpts;return this[y.main].setStyle(a),this[y.pulse].setStyle(u),this}},{key:"reverse",value:function(){return this._pureReverse(),this.options.reverse=!this.options.reverse,this}},{key:"redraw",value:function(){return this[y.main].redraw(),this[y.pulse].redraw(),this}},{key:"addLatLng",value:function(){for(var t,e,n=arguments.length,r=new Array(n),o=0;o0?o(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){t.exports=!n(9)&&!n(5)((function(){return 7!=Object.defineProperty(n(47)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(4),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){t.exports=!1},function(t,e,n){t.exports=!n(5)((function(){return!String(Symbol())}))},function(t,e,n){t.exports=n(15)("native-function-to-string",Function.toString)},function(t,e,n){var r,o,i,a=n(66),u=n(4),c=n(16),s=n(7),f=n(18),l=n(19),p=n(0).WeakMap;if(a){var h=new p,y=h.get,v=h.has,d=h.set;r=function(t,e){return d.call(h,t,e),e},o=function(t){return y.call(h,t)||{}},i=function(t){return v.call(h,t)}}else{var m=f("state");l[m]=!0,r=function(t,e){return c(t,m,e),e},o=function(t){return s(t,m)?t[m]:{}},i=function(t){return s(t,m)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(7),o=n(53),i=n(11),a=n(8);t.exports=function(t,e){for(var n=o(e),u=a.f,c=i.f,s=0;sc;)r(u,n=e[c++])&&(~i(s,n)||s.push(n));return s}},function(t,e,n){e.f=n(10)},function(t,e,n){var r=n(2),o=n(75),i=n(35),a=n(76),u=n(47),c=n(18)("IE_PROTO"),s=function(){},_f=function(){var t,e=u("iframe"),n=i.length;for(e.style.display="none",a.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("