function ClearFilters(){store("whereClause",null);store("whereMunicipalityClause",null)}function GeoJsonStreetsAndSatelliteMap(n,t,i){this.options=$.extend({},{allowFullscreen:!0,defaultViewIsSatellite:!1},i);this.map=L.map(n);window.globalMap=this;this.options.allowFullscreen&&L.control.fullscreen().addTo(this.map);this.mapDivId=n;this.geoJson=t;this.filteredGeoJson=t;this.markers=null;this.onEachFeature=i.onEachFeature;this.pointToLayer=i.pointToLayer}!function t(n,t,i){function r(u,e){var s,h,o;if(!t[u]){if(!n[u]){if(s="function"==typeof require&&require,!e&&s)return s(u,!0);if(f)return f(u,!0);h=new Error("Cannot find module '"+u+"'");throw h.code="MODULE_NOT_FOUND",h;}o=t[u]={exports:{}};n[u][0].call(o.exports,function(t){var i=n[u][1][t];return r(i?i:t)},o,o.exports,t,n,t,i)}return t[u].exports}for(var f="function"==typeof require&&require,u=0;u<i.length;u++)r(i[u]);return r}({1:[function(n,t){function i(n,t,i){function s(n){return n>=200&&300>n||304===n}function e(){void 0===r.status||s(r.status)?t.call(r,null,r):t.call(r,r,null)}var o=!1,u,r,f;return"undefined"==typeof XMLHttpRequest?t(Error("Browser not supported")):("undefined"==typeof i&&(u=n.match(/^\s*https?:\/\/[^\/]*/),i=u&&u[0]!==location.protocol+"//"+location.domain+(location.port?":"+location.port:"")),r=new window.XMLHttpRequest,!i||"withCredentials"in r||(r=new window.XDomainRequest,f=t,t=function(){if(o)f.apply(this,arguments);else{var n=this,t=arguments;setTimeout(function(){f.apply(n,t)},0)}}),"onload"in r?r.onload=e:r.onreadystatechange=function(){4===r.readyState&&e()},r.onerror=function(n){t.call(this,n||!0,null);t=function(){}},r.onprogress=function(){},r.ontimeout=function(n){t.call(this,n,null);t=function(){}},r.onabort=function(n){t.call(this,n,null);t=function(){}},r.open("GET",n,!0),r.send(null),o=!0,r)}"undefined"!=typeof t&&(t.exports=i)},{}],2:[function(n,t){!function(n,i,r){var o=n.L,u={},f,e;u.version="0.7.2";"object"==typeof t&&"object"==typeof t.exports?t.exports=u:"function"==typeof define&&define.amd&&define(u);u.noConflict=function(){return n.L=o,this};n.L=u;u.Util={extend:function(n){for(var t,r,f=Array.prototype.slice.call(arguments,1),i=0,u=f.length;u>i;i++){r=f[i]||{};for(t in r)r.hasOwnProperty(t)&&(n[t]=r[t])}return n},bind:function(n,t){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return n.apply(t,i||arguments)}},stamp:function(){var t=0,n="_leaflet_id";return function(i){return i[n]=i[n]||++t,i[n]}}(),invokeEach:function(n,t,i){var r,u;if("object"==typeof n){u=Array.prototype.slice.call(arguments,3);for(r in n)t.apply(i,[r,n[r]].concat(u));return!0}return!1},limitExecByInterval:function(n,t,i){var r,u;return function f(){var e=arguments;return r?(u=!0,void 0):(r=!0,setTimeout(function(){r=!1;u&&(f.apply(i,e),u=!1)},t),n.apply(i,e),void 0)}},falseFn:function(){return!1},formatNum:function(n,t){var i=Math.pow(10,t||5);return Math.round(n*i)/i},trim:function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},splitWords:function(n){return u.Util.trim(n).split(/\s+/)},setOptions:function(n,t){return n.options=u.extend({},n.options,t),n.options},getParamString:function(n,t,i){var u=[];for(var r in n)u.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(n[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+u.join("&")},template:function(n,t){return n.replace(/\{ *([\w_]+) *\}/g,function(n,i){var u=t[i];if(u===r)throw new Error("No value provided for variable "+n);return"function"==typeof u&&(u=u(t)),u})},isArray:Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function t(t){for(var r,u=["webkit","moz","o","ms"],i=0;i<u.length&&!r;i++)r=n[u[i]+t];return r}function i(t){var i=+new Date,u=Math.max(0,16-(i-r));return r=i+u,n.setTimeout(t,u)}var r=0,f=n.requestAnimationFrame||t("RequestAnimationFrame")||i,e=n.cancelAnimationFrame||t("CancelAnimationFrame")||t("CancelRequestAnimationFrame")||function(t){n.clearTimeout(t)};u.Util.requestAnimFrame=function(t,r,e,o){return t=u.bind(t,r),e&&f===i?(t(),void 0):f.call(n,t,o)};u.Util.cancelAnimFrame=function(t){t&&e.call(n,t)}}();u.extend=u.Util.extend;u.bind=u.Util.bind;u.stamp=u.Util.stamp;u.setOptions=u.Util.setOptions;u.Class=function(){};u.Class.extend=function(n){var i=function(){this.initialize&&this.initialize.apply(this,arguments);this._initHooks&&this.callInitHooks()},e=function(){},t,r,f;e.prototype=this.prototype;t=new e;t.constructor=i;i.prototype=t;for(r in this)this.hasOwnProperty(r)&&"prototype"!==r&&(i[r]=this[r]);return n.statics&&(u.extend(i,n.statics),delete n.statics),n.includes&&(u.Util.extend.apply(null,[t].concat(n.includes)),delete n.includes),n.options&&t.options&&(n.options=u.extend({},t.options,n.options)),u.extend(t,n),t._initHooks=[],f=this,i.__super__=f.prototype,t.callInitHooks=function(){if(!this._initHooksCalled){f.prototype.callInitHooks&&f.prototype.callInitHooks.call(this);this._initHooksCalled=!0;for(var n=0,i=t._initHooks.length;i>n;n++)t._initHooks[n].call(this)}},i};u.Class.include=function(n){u.extend(this.prototype,n)};u.Class.mergeOptions=function(n){u.extend(this.prototype.options,n)};u.Class.addInitHook=function(n){var t=Array.prototype.slice.call(arguments,1),i="function"==typeof n?n:function(){this[n].apply(this,t)};this.prototype._initHooks=this.prototype._initHooks||[];this.prototype._initHooks.push(i)};f="_leaflet_events";u.Mixin={};u.Mixin.Events={addEventListener:function(n,t,i){if(u.Util.invokeEach(n,this.addEventListener,this,t,i))return this;var o,v,l,e,s,a,h,r=this[f]=this[f]||{},c=i&&i!==this&&u.stamp(i);for(n=u.Util.splitWords(n),o=0,v=n.length;v>o;o++)l={action:t,context:i||this},e=n[o],c?(s=e+"_idx",a=s+"_len",h=r[s]=r[s]||{},h[c]||(h[c]=[],r[a]=(r[a]||0)+1),h[c].push(l)):(r[e]=r[e]||[],r[e].push(l));return this},hasEventListeners:function(n){var t=this[f];return!!t&&(n in t&&t[n].length>0||n+"_idx"in t&&t[n+"_idx_len"]>0)},removeEventListener:function(n,t,i){if(!this[f])return this;if(!n)return this.clearAllEventListeners();if(u.Util.invokeEach(n,this.removeEventListener,this,t,i))return this;var h,y,c,r,e,l,a,s,p,o=this[f],v=i&&i!==this&&u.stamp(i);for(n=u.Util.splitWords(n),h=0,y=n.length;y>h;h++)if(c=n[h],l=c+"_idx",a=l+"_len",s=o[l],t){if(r=v&&s?s[v]:o[c]){for(e=r.length-1;e>=0;e--)r[e].action!==t||i&&r[e].context!==i||(p=r.splice(e,1),p[0].action=u.Util.falseFn);i&&s&&0===r.length&&(delete s[v],o[a]--)}}else delete o[c],delete o[l],delete o[a];return this},clearAllEventListeners:function(){return delete this[f],this},fireEvent:function(n,t){if(!this.hasEventListeners(n))return this;var r,i,e,o,h,c=u.Util.extend({},t,{type:n,target:this}),s=this[f];if(s[n])for(r=s[n].slice(),i=0,e=r.length;e>i;i++)r[i].action.call(r[i].context,c);o=s[n+"_idx"];for(h in o)if(r=o[h].slice())for(i=0,e=r.length;e>i;i++)r[i].action.call(r[i].context,c);return this},addOneTimeEventListener:function(n,t,i){if(u.Util.invokeEach(n,this.addOneTimeEventListener,this,t,i))return this;var r=u.bind(function(){this.removeEventListener(n,t,i).removeEventListener(n,r,i)},this);return this.addEventListener(n,t,i).addEventListener(n,r,i)}};u.Mixin.Events.on=u.Mixin.Events.addEventListener;u.Mixin.Events.off=u.Mixin.Events.removeEventListener;u.Mixin.Events.once=u.Mixin.Events.addOneTimeEventListener;u.Mixin.Events.fire=u.Mixin.Events.fireEvent,function(){var f="ActiveXObject"in n,b=f&&!i.addEventListener,t=navigator.userAgent.toLowerCase(),s=-1!==t.indexOf("webkit"),k=-1!==t.indexOf("chrome"),c=-1!==t.indexOf("phantom"),d=-1!==t.indexOf("android"),l=-1!==t.search("android [23]"),g=-1!==t.indexOf("gecko"),e=typeof orientation!=r+"",a=n.navigator&&n.navigator.msPointerEnabled&&n.navigator.msMaxTouchPoints&&!n.PointerEvent,v=n.PointerEvent&&n.navigator.pointerEnabled&&n.navigator.maxTouchPoints||a,nt="devicePixelRatio"in n&&n.devicePixelRatio>1||"matchMedia"in n&&n.matchMedia("(min-resolution:144dpi)")&&n.matchMedia("(min-resolution:144dpi)").matches,o=i.documentElement,y=f&&"transition"in o.style,h="WebKitCSSMatrix"in n&&"m11"in new n.WebKitCSSMatrix&&!l,p="MozPerspective"in o.style,w="OTransition"in o.style,tt=!n.L_DISABLE_3D&&(y||h||p||w)&&!c,it=!n.L_NO_TOUCH&&!c&&function(){var t="ontouchstart",n,r;return v||t in o?!0:(n=i.createElement("div"),r=!1,n.setAttribute?(n.setAttribute(t,"return;"),"function"==typeof n[t]&&(r=!0),n.removeAttribute(t),n=null,r):!1)}();u.Browser={ie:f,ielt9:b,webkit:s,gecko:g&&!s&&!n.opera&&!f,android:d,android23:l,chrome:k,ie3d:y,webkit3d:h,gecko3d:p,opera3d:w,any3d:tt,mobile:e,mobileWebkit:e&&s,mobileWebkit3d:e&&h,mobileOpera:e&&n.opera,touch:it,msPointer:a,pointer:v,retina:nt}}();u.Point=function(n,t,i){this.x=i?Math.round(n):n;this.y=i?Math.round(t):t};u.Point.prototype={clone:function(){return new u.Point(this.x,this.y)},add:function(n){return this.clone()._add(u.point(n))},_add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.clone()._subtract(u.point(n))},_subtract:function(n){return this.x-=n.x,this.y-=n.y,this},divideBy:function(n){return this.clone()._divideBy(n)},_divideBy:function(n){return this.x/=n,this.y/=n,this},multiplyBy:function(n){return this.clone()._multiplyBy(n)},_multiplyBy:function(n){return this.x*=n,this.y*=n,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(n){n=u.point(n);var t=n.x-this.x,i=n.y-this.y;return Math.sqrt(t*t+i*i)},equals:function(n){return n=u.point(n),n.x===this.x&&n.y===this.y},contains:function(n){return n=u.point(n),Math.abs(n.x)<=Math.abs(this.x)&&Math.abs(n.y)<=Math.abs(this.y)},toString:function(){return"Point("+u.Util.formatNum(this.x)+", "+u.Util.formatNum(this.y)+")"}};u.point=function(n,t,i){return n instanceof u.Point?n:u.Util.isArray(n)?new u.Point(n[0],n[1]):n===r||null===n?n:new u.Point(n,t,i)};u.Bounds=function(n,t){if(n)for(var r=t?[n,t]:n,i=0,u=r.length;u>i;i++)this.extend(r[i])};u.Bounds.prototype={extend:function(n){return n=u.point(n),this.min||this.max?(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=n.clone(),this.max=n.clone()),this},getCenter:function(n){return new u.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,n)},getBottomLeft:function(){return new u.Point(this.min.x,this.max.y)},getTopRight:function(){return new u.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(n){var t,i;return n="number"==typeof n[0]||n instanceof u.Point?u.point(n):u.bounds(n),n instanceof u.Bounds?(t=n.min,i=n.max):t=i=n,t.x>=this.min.x&&i.x<=this.max.x&&t.y>=this.min.y&&i.y<=this.max.y},intersects:function(n){n=u.bounds(n);var t=this.min,i=this.max,r=n.min,f=n.max,e=f.x>=t.x&&r.x<=i.x,o=f.y>=t.y&&r.y<=i.y;return e&&o},isValid:function(){return!(!this.min||!this.max)}};u.bounds=function(n,t){return!n||n instanceof u.Bounds?n:new u.Bounds(n,t)};u.Transformation=function(n,t,i,r){this._a=n;this._b=t;this._c=i;this._d=r};u.Transformation.prototype={transform:function(n,t){return this._transform(n.clone(),t)},_transform:function(n,t){return t=t||1,n.x=t*(this._a*n.x+this._b),n.y=t*(this._c*n.y+this._d),n},untransform:function(n,t){return t=t||1,new u.Point((n.x/t-this._b)/this._a,(n.y/t-this._d)/this._c)}};u.DomUtil={get:function(n){return"string"==typeof n?i.getElementById(n):n},getStyle:function(n,t){var r=n.style[t],u;return(!r&&n.currentStyle&&(r=n.currentStyle[t]),(!r||"auto"===r)&&i.defaultView)&&(u=i.defaultView.getComputedStyle(n,null),r=u?u[t]:null),"auto"===r?null:r},getViewportOffset:function(n){var o,r=0,f=0,t=n,e=i.body,s=i.documentElement;do{if(r+=t.offsetTop||0,f+=t.offsetLeft||0,r+=parseInt(u.DomUtil.getStyle(t,"borderTopWidth"),10)||0,f+=parseInt(u.DomUtil.getStyle(t,"borderLeftWidth"),10)||0,o=u.DomUtil.getStyle(t,"position"),t.offsetParent===e&&"absolute"===o)break;if("fixed"===o){r+=e.scrollTop||s.scrollTop||0;f+=e.scrollLeft||s.scrollLeft||0;break}if("relative"===o&&!t.offsetLeft){var c=u.DomUtil.getStyle(t,"width"),l=u.DomUtil.getStyle(t,"max-width"),h=t.getBoundingClientRect();("none"!==c||"none"!==l)&&(f+=h.left+t.clientLeft);r+=h.top+(e.scrollTop||s.scrollTop||0);break}t=t.offsetParent}while(t);t=n;do{if(t===e)break;r-=t.scrollTop||0;f-=t.scrollLeft||0;t=t.parentNode}while(t);return new u.Point(f,r)},documentIsLtr:function(){return u.DomUtil._docIsLtrCached||(u.DomUtil._docIsLtrCached=!0,u.DomUtil._docIsLtr="ltr"===u.DomUtil.getStyle(i.body,"direction")),u.DomUtil._docIsLtr},create:function(n,t,r){var u=i.createElement(n);return u.className=t,r&&r.appendChild(u),u},hasClass:function(n,t){if(n.classList!==r)return n.classList.contains(t);var i=u.DomUtil._getClass(n);return i.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(i)},addClass:function(n,t){var f;if(n.classList!==r)for(var e=u.Util.splitWords(t),i=0,o=e.length;o>i;i++)n.classList.add(e[i]);else u.DomUtil.hasClass(n,t)||(f=u.DomUtil._getClass(n),u.DomUtil._setClass(n,(f?f+" ":"")+t))},removeClass:function(n,t){n.classList!==r?n.classList.remove(t):u.DomUtil._setClass(n,u.Util.trim((" "+u.DomUtil._getClass(n)+" ").replace(" "+t+" "," ")))},_setClass:function(n,t){n.className.baseVal===r?n.className=t:n.className.baseVal=t},_getClass:function(n){return n.className.baseVal===r?n.className:n.className.baseVal},setOpacity:function(n,t){if("opacity"in n.style)n.style.opacity=t;else if("filter"in n.style){var i=!1,r="DXImageTransform.Microsoft.Alpha";try{i=n.filters.item(r)}catch(u){if(1===t)return}t=Math.round(100*t);i?(i.Enabled=100!==t,i.Opacity=t):n.style.filter+=" progid:"+r+"(opacity="+t+")"}},testProp:function(n){for(var r=i.documentElement.style,t=0;t<n.length;t++)if(n[t]in r)return n[t];return!1},getTranslateString:function(n){var t=u.Browser.webkit3d,i="translate"+(t?"3d":"")+"(",r=(t?",0":"")+")";return i+n.x+"px,"+n.y+"px"+r},getScaleString:function(n,t){var i=u.DomUtil.getTranslateString(t.add(t.multiplyBy(-1*n))),r=" scale("+n+") ";return i+r},setPosition:function(n,t,i){n._leaflet_pos=t;!i&&u.Browser.any3d?n.style[u.DomUtil.TRANSFORM]=u.DomUtil.getTranslateString(t):(n.style.left=t.x+"px",n.style.top=t.y+"px")},getPosition:function(n){return n._leaflet_pos}};u.DomUtil.TRANSFORM=u.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]);u.DomUtil.TRANSITION=u.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);u.DomUtil.TRANSITION_END="webkitTransition"===u.DomUtil.TRANSITION||"OTransition"===u.DomUtil.TRANSITION?u.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in i)u.extend(u.DomUtil,{disableTextSelection:function(){u.DomEvent.on(n,"selectstart",u.DomEvent.preventDefault)},enableTextSelection:function(){u.DomEvent.off(n,"selectstart",u.DomEvent.preventDefault)}});else{var t=u.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);u.extend(u.DomUtil,{disableTextSelection:function(){if(t){var n=i.documentElement.style;this._userSelect=n[t];n[t]="none"}},enableTextSelection:function(){t&&(i.documentElement.style[t]=this._userSelect,delete this._userSelect)}})}u.extend(u.DomUtil,{disableImageDrag:function(){u.DomEvent.on(n,"dragstart",u.DomEvent.preventDefault)},enableImageDrag:function(){u.DomEvent.off(n,"dragstart",u.DomEvent.preventDefault)}})}();u.LatLng=function(n,t,i){if(n=parseFloat(n),t=parseFloat(t),isNaN(n)||isNaN(t))throw new Error("Invalid LatLng object: ("+n+", "+t+")");this.lat=n;this.lng=t;i!==r&&(this.alt=parseFloat(i))};u.extend(u.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9});u.LatLng.prototype={equals:function(n){if(!n)return!1;n=u.latLng(n);var t=Math.max(Math.abs(this.lat-n.lat),Math.abs(this.lng-n.lng));return t<=u.LatLng.MAX_MARGIN},toString:function(n){return"LatLng("+u.Util.formatNum(this.lat,n)+", "+u.Util.formatNum(this.lng,n)+")"},distanceTo:function(n){n=u.latLng(n);var t=u.LatLng.DEG_TO_RAD,e=(n.lat-this.lat)*t,o=(n.lng-this.lng)*t,s=this.lat*t,h=n.lat*t,i=Math.sin(e/2),r=Math.sin(o/2),f=i*i+r*r*Math.cos(s)*Math.cos(h);return 12756274*Math.atan2(Math.sqrt(f),Math.sqrt(1-f))},wrap:function(n,t){var i=this.lng;return n=n||-180,t=t||180,i=(i+t)%(t-n)+(n>i||i===t?t:n),new u.LatLng(this.lat,i)}};u.latLng=function(n,t){return n instanceof u.LatLng?n:u.Util.isArray(n)?"number"==typeof n[0]||"string"==typeof n[0]?new u.LatLng(n[0],n[1],n[2]):null:n===r||null===n?n:"object"==typeof n&&"lat"in n?new u.LatLng(n.lat,"lng"in n?n.lng:n.lon):t===r?null:new u.LatLng(n,t)};u.LatLngBounds=function(n,t){if(n)for(var r=t?[n,t]:n,i=0,u=r.length;u>i;i++)this.extend(r[i])};u.LatLngBounds.prototype={extend:function(n){if(!n)return this;var t=u.latLng(n);return n=null!==t?t:u.latLngBounds(n),n instanceof u.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(n.lat,this._southWest.lat),this._southWest.lng=Math.min(n.lng,this._southWest.lng),this._northEast.lat=Math.max(n.lat,this._northEast.lat),this._northEast.lng=Math.max(n.lng,this._northEast.lng)):(this._southWest=new u.LatLng(n.lat,n.lng),this._northEast=new u.LatLng(n.lat,n.lng)):n instanceof u.LatLngBounds&&(this.extend(n._southWest),this.extend(n._northEast)),this},pad:function(n){var t=this._southWest,i=this._northEast,r=Math.abs(t.lat-i.lat)*n,f=Math.abs(t.lng-i.lng)*n;return new u.LatLngBounds(new u.LatLng(t.lat-r,t.lng-f),new u.LatLng(i.lat+r,i.lng+f))},getCenter:function(){return new u.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new u.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new u.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(n){n="number"==typeof n[0]||n instanceof u.LatLng?u.latLng(n):u.latLngBounds(n);var t,i,r=this._southWest,f=this._northEast;return n instanceof u.LatLngBounds?(t=n.getSouthWest(),i=n.getNorthEast()):t=i=n,t.lat>=r.lat&&i.lat<=f.lat&&t.lng>=r.lng&&i.lng<=f.lng},intersects:function(n){n=u.latLngBounds(n);var t=this._southWest,i=this._northEast,r=n.getSouthWest(),f=n.getNorthEast(),e=f.lat>=t.lat&&r.lat<=i.lat,o=f.lng>=t.lng&&r.lng<=i.lng;return e&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(n){return n?(n=u.latLngBounds(n),this._southWest.equals(n.getSouthWest())&&this._northEast.equals(n.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}};u.latLngBounds=function(n,t){return!n||n instanceof u.LatLngBounds?n:new u.LatLngBounds(n,t)};u.Projection={};u.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(n){var i=u.LatLng.DEG_TO_RAD,r=this.MAX_LATITUDE,f=Math.max(Math.min(r,n.lat),-r),e=n.lng*i,t=f*i;return t=Math.log(Math.tan(Math.PI/4+t/2)),new u.Point(e,t)},unproject:function(n){var t=u.LatLng.RAD_TO_DEG,i=n.x*t,r=(2*Math.atan(Math.exp(n.y))-Math.PI/2)*t;return new u.LatLng(r,i)}};u.Projection.LonLat={project:function(n){return new u.Point(n.lng,n.lat)},unproject:function(n){return new u.LatLng(n.y,n.x)}};u.CRS={latLngToPoint:function(n,t){var i=this.projection.project(n),r=this.scale(t);return this.transformation._transform(i,r)},pointToLatLng:function(n,t){var i=this.scale(t),r=this.transformation.untransform(n,i);return this.projection.unproject(r)},project:function(n){return this.projection.project(n)},scale:function(n){return 256*Math.pow(2,n)},getSize:function(n){var t=this.scale(n);return u.point(t,t)}};u.CRS.Simple=u.extend({},u.CRS,{projection:u.Projection.LonLat,transformation:new u.Transformation(1,0,-1,0),scale:function(n){return Math.pow(2,n)}});u.CRS.EPSG3857=u.extend({},u.CRS,{code:"EPSG:3857",projection:u.Projection.SphericalMercator,transformation:new u.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(n){var t=this.projection.project(n);return t.multiplyBy(6378137)}});u.CRS.EPSG900913=u.extend({},u.CRS.EPSG3857,{code:"EPSG:900913"});u.CRS.EPSG4326=u.extend({},u.CRS,{code:"EPSG:4326",projection:u.Projection.LonLat,transformation:new u.Transformation(1/360,.5,-1/360,.5)});u.Map=u.Class.extend({includes:u.Mixin.Events,options:{crs:u.CRS.EPSG3857,fadeAnimation:u.DomUtil.TRANSITION&&!u.Browser.android23,trackResize:!0,markerZoomAnimation:u.DomUtil.TRANSITION&&u.Browser.any3d},initialize:function(n,t){t=u.setOptions(this,t);this._initContainer(n);this._initLayout();this._onResize=u.bind(this._onResize,this);this._initEvents();t.maxBounds&&this.setMaxBounds(t.maxBounds);t.center&&t.zoom!==r&&this.setView(u.latLng(t.center),t.zoom,{reset:!0});this._handlers=[];this._layers={};this._zoomBoundLayers={};this._tileLayersNum=0;this.callInitHooks();this._addLayers(t.layers)},setView:function(n,t){return t=t===r?this.getZoom():t,this._resetView(u.latLng(n),this._limitZoom(t)),this},setZoom:function(n,t){return this._loaded?this.setView(this.getCenter(),n,{zoom:t}):(this._zoom=this._limitZoom(n),this)},zoomIn:function(n,t){return this.setZoom(this._zoom+(n||1),t)},zoomOut:function(n,t){return this.setZoom(this._zoom-(n||1),t)},setZoomAround:function(n,t,i){var f=this.getZoomScale(t),r=this.getSize().divideBy(2),e=n instanceof u.Point?n:this.latLngToContainerPoint(n),o=e.subtract(r).multiplyBy(1-1/f),s=this.containerPointToLatLng(r.add(o));return this.setView(s,t,{zoom:i})},fitBounds:function(n,t){t=t||{};n=n.getBounds?n.getBounds():u.latLngBounds(n);var r=u.point(t.paddingTopLeft||t.padding||[0,0]),f=u.point(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(n,!1,r.add(f)),e=f.subtract(r).divideBy(2),o=this.project(n.getSouthWest(),i),s=this.project(n.getNorthEast(),i),h=this.unproject(o.add(s).divideBy(2).add(e),i);return i=t&&t.maxZoom?Math.min(t.maxZoom,i):i,this.setView(h,i,t)},fitWorld:function(n){return this.fitBounds([[-90,-180],[90,180]],n)},panTo:function(n,t){return this.setView(n,this._zoom,{pan:t})},panBy:function(n){return this.fire("movestart"),this._rawPanBy(u.point(n)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(n){return n=u.latLngBounds(n),this.options.maxBounds=n,n?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(n,t){var i=this.getCenter(),r=this._limitCenter(i,this._zoom,n);return i.equals(r)?this:this.panTo(r,t)},addLayer:function(n){var t=u.stamp(n);return this._layers[t]?this:(this._layers[t]=n,!n.options||isNaN(n.options.maxZoom)&&isNaN(n.options.minZoom)||(this._zoomBoundLayers[t]=n,this._updateZoomLevels()),this.options.zoomAnimation&&u.TileLayer&&n instanceof u.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,n.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(n),this)},removeLayer:function(n){var t=u.stamp(n);return this._layers[t]?(this._loaded&&n.onRemove(this),delete this._layers[t],this._loaded&&this.fire("layerremove",{layer:n}),this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels()),this.options.zoomAnimation&&u.TileLayer&&n instanceof u.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,n.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(n){return n?u.stamp(n)in this._layers:!1},eachLayer:function(n,t){for(var i in this._layers)n.call(t,this._layers[i]);return this},invalidateSize:function(n){var i;if(!this._loaded)return this;n=u.extend({animate:!1,pan:!0},n===!0?{animate:!0}:n);i=this.getSize();this._sizeChanged=!0;this._initialCenter=null;var r=this.getSize(),f=i.divideBy(2).round(),e=r.divideBy(2).round(),t=f.subtract(e);return t.x||t.y?(n.animate&&n.pan?this.panBy(t):(n.pan&&this._rawPanBy(t),this.fire("move"),n.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(u.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:r})):this},addHandler:function(n,t){if(!t)return this;var i=this[n]=new t(this);return this._handlers.push(i),this.options[n]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload");this._initEvents("off");try{delete this._container._leaflet}catch(n){this._container._leaflet=r}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var n=this.getPixelBounds(),t=this.unproject(n.getBottomLeft()),i=this.unproject(n.getTopRight());return new u.LatLngBounds(t,i)},getMinZoom:function(){return this.options.minZoom===r?this._layersMinZoom===r?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===r?this._layersMaxZoom===r?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(n,t,i){n=u.latLngBounds(n);var f,r=this.getMinZoom()-(t?1:0),s=this.getMaxZoom(),e=this.getSize(),h=n.getNorthWest(),c=n.getSouthEast(),o=!0;i=u.point(i||[0,0]);do r++,f=this.project(c,r).subtract(this.project(h,r)).add(i),o=t?f.x<e.x||f.y<e.y:e.contains(f);while(o&&s>=r);return o&&t?null:t?r:r-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new u.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var n=this._getTopLeftPoint();return new u.Bounds(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(n){var t=this.options.crs;return t.scale(n)/t.scale(this._zoom)},getScaleZoom:function(n){return this._zoom+Math.log(n)/Math.LN2},project:function(n,t){return t=t===r?this._zoom:t,this.options.crs.latLngToPoint(u.latLng(n),t)},unproject:function(n,t){return t=t===r?this._zoom:t,this.options.crs.pointToLatLng(u.point(n),t)},layerPointToLatLng:function(n){var t=u.point(n).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(n){var t=this.project(u.latLng(n))._round();return t._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(n){return u.point(n).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(n){return u.point(n).add(this._getMapPanePos())},containerPointToLatLng:function(n){var t=this.containerPointToLayerPoint(u.point(n));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(n){return this.layerPointToContainerPoint(this.latLngToLayerPoint(u.latLng(n)))},mouseEventToContainerPoint:function(n){return u.DomEvent.getMousePosition(n,this._container)},mouseEventToLayerPoint:function(n){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(n))},mouseEventToLatLng:function(n){return this.layerPointToLatLng(this.mouseEventToLayerPoint(n))},_initContainer:function(n){var t=this._container=u.DomUtil.get(n);if(!t)throw new Error("Map container not found.");if(t._leaflet)throw new Error("Map container is already initialized.");t._leaflet=!0},_initLayout:function(){var t=this._container,n;u.DomUtil.addClass(t,"leaflet-container"+(u.Browser.touch?" leaflet-touch":"")+(u.Browser.retina?" leaflet-retina":"")+(u.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));n=u.DomUtil.getStyle(t,"position");"absolute"!==n&&"relative"!==n&&"fixed"!==n&&(t.style.position="relative");this._initPanes();this._initControlPos&&this._initControlPos()},_initPanes:function(){var n=this._panes={},t;this._mapPane=n.mapPane=this._createPane("leaflet-map-pane",this._container);this._tilePane=n.tilePane=this._createPane("leaflet-tile-pane",this._mapPane);n.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane);n.shadowPane=this._createPane("leaflet-shadow-pane");n.overlayPane=this._createPane("leaflet-overlay-pane");n.markerPane=this._createPane("leaflet-marker-pane");n.popupPane=this._createPane("leaflet-popup-pane");t=" leaflet-zoom-hide";this.options.markerZoomAnimation||(u.DomUtil.addClass(n.markerPane,t),u.DomUtil.addClass(n.shadowPane,t),u.DomUtil.addClass(n.popupPane,t))},_createPane:function(n,t){return u.DomUtil.create("div",n,t||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(n){n=n?u.Util.isArray(n)?n:[n]:[];for(var t=0,i=n.length;i>t;t++)this.addLayer(n[t])},_resetView:function(n,t,i,r){var f=this._zoom!==t,e;r||(this.fire("movestart"),f&&this.fire("zoomstart"));this._zoom=t;this._initialCenter=n;this._initialTopLeftPoint=this._getNewTopLeftPoint(n);i?this._initialTopLeftPoint._add(this._getMapPanePos()):u.DomUtil.setPosition(this._mapPane,new u.Point(0,0));this._tileLayersToLoad=this._tileLayersNum;e=!this._loaded;this._loaded=!0;this.fire("viewreset",{hard:!i});e&&(this.fire("load"),this.eachLayer(this._layerAdd,this));this.fire("move");(f||r)&&this.fire("zoomend");this.fire("moveend",{hard:!i})},_rawPanBy:function(n){u.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(n))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,i=1/0,u=-1/0,f=this._getZoomSpan(),n;for(t in this._zoomBoundLayers)n=this._zoomBoundLayers[t],isNaN(n.options.minZoom)||(i=Math.min(i,n.options.minZoom)),isNaN(n.options.maxZoom)||(u=Math.max(u,n.options.maxZoom));t===r?this._layersMaxZoom=this._layersMinZoom=r:(this._layersMaxZoom=u,this._layersMinZoom=i);f!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.");},_initEvents:function(t){if(u.DomEvent){t=t||"on";u.DomEvent[t](this._container,"click",this._onMouseClick,this);for(var f=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"],i=0,r=f.length;r>i;i++)u.DomEvent[t](this._container,f[i],this._fireMouseEvent,this);this.options.trackResize&&u.DomEvent[t](n,"resize",this._onResize,this)}},_onResize:function(){u.Util.cancelAnimFrame(this._resizeRequest);this._resizeRequest=u.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(n){!this._loaded||!n._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||u.DomEvent._skipped(n)||(this.fire("preclick"),this._fireMouseEvent(n))},_fireMouseEvent:function(n){var t;if(this._loaded&&!u.DomEvent._skipped(n)&&(t=n.type,t="mouseenter"===t?"mouseover":"mouseleave"===t?"mouseout":t,this.hasEventListeners(t))){"contextmenu"===t&&u.DomEvent.preventDefault(n);var i=this.mouseEventToContainerPoint(n),r=this.containerPointToLayerPoint(i),f=this.layerPointToLatLng(r);this.fire(t,{latlng:f,layerPoint:r,containerPoint:i,originalEvent:n})}},_onTileLayerLoad:function(){this._tileLayersToLoad--;this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var n=0,t=this._handlers.length;t>n;n++)this._handlers[n].disable()},whenReady:function(n,t){return this._loaded?n.call(t||this,this):this.on("load",n,t),this},_layerAdd:function(n){n.onAdd(this);this.fire("layeradd",{layer:n})},_getMapPanePos:function(){return u.DomUtil.getPosition(this._mapPane)},_moved:function(){var n=this._getMapPanePos();return n&&!n.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(n,t){var i=this.getSize()._divideBy(2);return this.project(n,t)._subtract(i)._round()},_latLngToNewLayerPoint:function(n,t,i){var r=this._getNewTopLeftPoint(i,t).add(this._getMapPanePos());return this.project(n,t)._subtract(r)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(n){return this.latLngToLayerPoint(n).subtract(this._getCenterLayerPoint())},_limitCenter:function(n,t,i){if(!i)return n;var r=this.project(n,t),f=this.getSize().divideBy(2),e=new u.Bounds(r.subtract(f),r.add(f)),o=this._getBoundsOffset(e,i,t);return this.unproject(r.add(o),t)},_limitOffset:function(n,t){if(!t)return n;var i=this.getPixelBounds(),r=new u.Bounds(i.min.add(n),i.max.add(n));return n.add(this._getBoundsOffset(r,t))},_getBoundsOffset:function(n,t,i){var r=this.project(t.getNorthWest(),i).subtract(n.min),f=this.project(t.getSouthEast(),i).subtract(n.max),e=this._rebound(r.x,-f.x),o=this._rebound(r.y,-f.y);return new u.Point(e,o)},_rebound:function(n,t){return n+t>0?Math.round(n-t)/2:Math.max(0,Math.ceil(n))-Math.max(0,Math.floor(t))},_limitZoom:function(n){var t=this.getMinZoom(),i=this.getMaxZoom();return Math.max(t,Math.min(i,n))}});u.map=function(n,t){return new u.Map(n,t)};u.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.3142451793,R_MAJOR:6378137,project:function(n){var f=u.LatLng.DEG_TO_RAD,e=this.MAX_LATITUDE,c=Math.max(Math.min(e,n.lat),-e),r=this.R_MAJOR,l=this.R_MINOR,a=n.lng*f*r,t=c*f,o=l/r,s=Math.sqrt(1-o*o),i=s*Math.sin(t),h;return i=Math.pow((1-i)/(1+i),.5*s),h=Math.tan(.5*(.5*Math.PI-t))/i,t=-r*Math.log(h),new u.Point(a,t)},unproject:function(n){for(var i,e=u.LatLng.RAD_TO_DEG,r=this.R_MAJOR,c=this.R_MINOR,l=n.x*e/r,o=c/r,s=Math.sqrt(1-o*o),h=Math.exp(-n.y/r),t=Math.PI/2-2*Math.atan(h),a=15,f=.1;Math.abs(f)>1e-7&&--a>0;)i=s*Math.sin(t),f=Math.PI/2-2*Math.atan(h*Math.pow((1-i)/(1+i),.5*s))-t,t+=f;return new u.LatLng(t*e,l)}};u.CRS.EPSG3395=u.extend({},u.CRS,{code:"EPSG:3395",projection:u.Projection.Mercator,transformation:function(){var t=u.Projection.Mercator,i=t.R_MAJOR,n=.5/(Math.PI*i);return new u.Transformation(n,.5,-n,.5)}()});u.TileLayer=u.Class.extend({includes:u.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:u.Browser.mobile,updateWhenIdle:u.Browser.mobile},initialize:function(n,t){t=u.setOptions(this,t);t.detectRetina&&u.Browser.retina&&t.maxZoom>0&&(t.tileSize=Math.floor(t.tileSize/2),t.zoomOffset++,t.minZoom>0&&t.minZoom--,this.options.maxZoom--);t.bounds&&(t.bounds=u.latLngBounds(t.bounds));this._url=n;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(n){this._map=n;this._animated=n._zoomAnimated;this._initContainer();n.on({viewreset:this._reset,moveend:this._update},this);this._animated&&n.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this);this.options.updateWhenIdle||(this._limitedUpdate=u.Util.limitExecByInterval(this._update,150,this),n.on("move",this._limitedUpdate,this));this._reset();this._update()},addTo:function(n){return n.addLayer(this),this},onRemove:function(n){this._container.parentNode.removeChild(this._container);n.off({viewreset:this._reset,moveend:this._update},this);this._animated&&n.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this);this.options.updateWhenIdle||n.off("move",this._limitedUpdate,this);this._container=null;this._map=null},bringToFront:function(){var n=this._map._panes.tilePane;return this._container&&(n.appendChild(this._container),this._setAutoZIndex(n,Math.max)),this},bringToBack:function(){var n=this._map._panes.tilePane;return this._container&&(n.insertBefore(this._container,n.firstChild),this._setAutoZIndex(n,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(n){return this.options.opacity=n,this._map&&this._updateOpacity(),this},setZIndex:function(n){return this.options.zIndex=n,this._updateZIndex(),this},setUrl:function(n,t){return this._url=n,t||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==r&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(n,t){for(var u,f=n.children,r=-t(1/0,-1/0),i=0,e=f.length;e>i;i++)f[i]!==this._container&&(u=parseInt(f[i].style.zIndex,10),isNaN(u)||(r=t(r,u)));this.options.zIndex=this._container.style.zIndex=(isFinite(r)?r:0)+t(1,-1)},_updateOpacity:function(){var n,t=this._tiles;if(u.Browser.ielt9)for(n in t)u.DomUtil.setOpacity(t[n],this.options.opacity);else u.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane,n;this._container||((this._container=u.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated)?(n="leaflet-tile-container",this._bgBuffer=u.DomUtil.create("div",n,this._container),this._tileContainer=u.DomUtil.create("div",n,this._container)):this._tileContainer=this._container,t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity())},_reset:function(n){for(var t in this._tiles)this.fire("tileunload",{tile:this._tiles[t]});this._tiles={};this._tilesToLoad=0;this.options.reuseTiles&&(this._unusedTiles=[]);this._tileContainer.innerHTML="";this._animated&&n&&n.hard&&this._clearBgBuffer();this._initContainer()},_getTileSize:function(){var n=this._map,r=n.getZoom()+this.options.zoomOffset,t=this.options.maxNativeZoom,i=this.options.tileSize;return t&&r>t&&(i=Math.round(n.getZoomScale(r)/n.getZoomScale(t)*i)),i},_update:function(){var n;if(this._map){var t=this._map,i=t.getPixelBounds(),r=t.getZoom(),f=this._getTileSize();r>this.options.maxZoom||r<this.options.minZoom||(n=u.bounds(i.min.divideBy(f)._floor(),i.max.divideBy(f)._floor()),this._addTilesFromCenterOut(n),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(n))}},_addTilesFromCenterOut:function(n){for(var t,o,f=[],h=n.getCenter(),e,s,r=n.min.y;r<=n.max.y;r++)for(t=n.min.x;t<=n.max.x;t++)o=new u.Point(t,r),this._tileShouldBeLoaded(o)&&f.push(o);if(e=f.length,0!==e){for(f.sort(function(n,t){return n.distanceTo(h)-t.distanceTo(h)}),s=i.createDocumentFragment(),this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=e,t=0;e>t;t++)this._addTile(f[t],s);this._tileContainer.appendChild(s)}},_tileShouldBeLoaded:function(n){var t,i;if(n.x+":"+n.y in this._tiles||(t=this.options,!t.continuousWorld&&(i=this._getWrapTileNum(),t.noWrap&&(n.x<0||n.x>=i.x)||n.y<0||n.y>=i.y)))return!1;if(t.bounds){var r=t.tileSize,e=n.multiplyBy(r),o=e.add([r,r]),u=this._map.unproject(e),f=this._map.unproject(o);if(t.continuousWorld||t.noWrap||(u=u.wrap(),f=f.wrap()),!t.bounds.intersects([u,f]))return!1}return!0},_removeOtherTiles:function(n){var t,i,r;for(var u in this._tiles)t=u.split(":"),i=parseInt(t[0],10),r=parseInt(t[1],10),(i<n.min.x||i>n.max.x||r<n.min.y||r>n.max.y)&&this._removeTile(u)},_removeTile:function(n){var t=this._tiles[n];this.fire("tileunload",{tile:t,url:t.src});this.options.reuseTiles?(u.DomUtil.removeClass(t,"leaflet-tile-loaded"),this._unusedTiles.push(t)):t.parentNode===this._tileContainer&&this._tileContainer.removeChild(t);u.Browser.android||(t.onload=null,t.src=u.Util.emptyImageUrl);delete this._tiles[n]},_addTile:function(n,t){var r=this._getTilePos(n),i=this._getTile();u.DomUtil.setPosition(i,r,u.Browser.chrome);this._tiles[n.x+":"+n.y]=i;this._loadTile(i,n);i.parentNode!==this._tileContainer&&t.appendChild(i)},_getZoomForUrl:function(){var n=this.options,t=this._map.getZoom();return n.zoomReverse&&(t=n.maxZoom-t),t+=n.zoomOffset,n.maxNativeZoom?Math.min(t,n.maxNativeZoom):t},_getTilePos:function(n){var t=this._map.getPixelOrigin(),i=this._getTileSize();return n.multiplyBy(i).subtract(t)},getTileUrl:function(n){return u.Util.template(this._url,u.extend({s:this._getSubdomain(n),z:n.z,x:n.x,y:n.y},this.options))},_getWrapTileNum:function(){var n=this._map.options.crs,t=n.getSize(this._map.getZoom());return t.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(n){var t=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(n.x=(n.x%t.x+t.x)%t.x);this.options.tms&&(n.y=t.y-n.y-1);n.z=this._getZoomForUrl()},_getSubdomain:function(n){var t=Math.abs(n.x+n.y)%this.options.subdomains.length;return this.options.subdomains[t]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var n=this._unusedTiles.pop();return this._resetTile(n),n}return this._createTile()},_resetTile:function(){},_createTile:function(){var n=u.DomUtil.create("img","leaflet-tile");return n.style.width=n.style.height=this._getTileSize()+"px",n.galleryimg="no",n.onselectstart=n.onmousemove=u.Util.falseFn,u.Browser.ielt9&&this.options.opacity!==r&&u.DomUtil.setOpacity(n,this.options.opacity),u.Browser.mobileWebkit3d&&(n.style.WebkitBackfaceVisibility="hidden"),n},_loadTile:function(n,t){n._layer=this;n.onload=this._tileOnLoad;n.onerror=this._tileOnError;this._adjustTilePoint(t);n.src=this.getTileUrl(t);this.fire("tileloadstart",{tile:n,url:n.src})},_tileLoaded:function(){this._tilesToLoad--;this._animated&&u.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated");this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(u.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var n=this._layer;this.src!==u.Util.emptyImageUrl&&(u.DomUtil.addClass(this,"leaflet-tile-loaded"),n.fire("tileload",{tile:this,url:this.src}));n._tileLoaded()},_tileOnError:function(){var n=this._layer,t;n.fire("tileerror",{tile:this,url:this.src});t=n.options.errorTileUrl;t&&(this.src=t);n._tileLoaded()}});u.tileLayer=function(n,t){return new u.TileLayer(n,t)};u.TileLayer.WMS=u.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(n,t){var i,f,r;this._url=n;i=u.extend({},this.defaultWmsParams);f=t.tileSize||this.options.tileSize;i.width=i.height=t.detectRetina&&u.Browser.retina?2*f:f;for(r in t)this.options.hasOwnProperty(r)||"crs"===r||(i[r]=t[r]);this.wmsParams=i;u.setOptions(this,t)},onAdd:function(n){this._crs=this.options.crs||n.options.crs;this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code;u.TileLayer.prototype.onAdd.call(this,n)},getTileUrl:function(n){var f=this._map,r=this.options.tileSize,e=n.multiplyBy(r),s=e.add([r,r]),t=this._crs.project(f.unproject(e,n.z)),i=this._crs.project(f.unproject(s,n.z)),h=this._wmsVersion>=1.3&&this._crs===u.CRS.EPSG4326?[i.y,t.x,t.y,i.x].join(","):[t.x,i.y,i.x,t.y].join(","),o=u.Util.template(this._url,{s:this._getSubdomain(n)});return o+u.Util.getParamString(this.wmsParams,o,!0)+"&BBOX="+h},setParams:function(n,t){return u.extend(this.wmsParams,n),t||this.redraw(),this}});u.tileLayer.wms=function(n,t){return new u.TileLayer.WMS(n,t)};u.TileLayer.Canvas=u.TileLayer.extend({options:{async:!1},initialize:function(n){u.setOptions(this,n)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var n in this._tiles)this._redrawTile(this._tiles[n]);return this},_redrawTile:function(n){this.drawTile(n,n._tilePoint,this._map._zoom)},_createTile:function(){var n=u.DomUtil.create("canvas","leaflet-tile");return n.width=n.height=this.options.tileSize,n.onselectstart=n.onmousemove=u.Util.falseFn,n},_loadTile:function(n,t){n._layer=this;n._tilePoint=t;this._redrawTile(n);this.options.async||this.tileDrawn(n)},drawTile:function(){},tileDrawn:function(n){this._tileOnLoad.call(n)}});u.tileLayer.canvas=function(n){return new u.TileLayer.Canvas(n)};u.ImageOverlay=u.Class.extend({includes:u.Mixin.Events,options:{opacity:1},initialize:function(n,t,i){this._url=n;this._bounds=u.latLngBounds(t);u.setOptions(this,i)},onAdd:function(n){this._map=n;this._image||this._initImage();n._panes.overlayPane.appendChild(this._image);n.on("viewreset",this._reset,this);n.options.zoomAnimation&&u.Browser.any3d&&n.on("zoomanim",this._animateZoom,this);this._reset()},onRemove:function(n){n.getPanes().overlayPane.removeChild(this._image);n.off("viewreset",this._reset,this);n.options.zoomAnimation&&n.off("zoomanim",this._animateZoom,this)},addTo:function(n){return n.addLayer(this),this},setOpacity:function(n){return this.options.opacity=n,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var n=this._map._panes.overlayPane;return this._image&&n.insertBefore(this._image,n.firstChild),this},setUrl:function(n){this._url=n;this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=u.DomUtil.create("img","leaflet-image-layer");this._map.options.zoomAnimation&&u.Browser.any3d?u.DomUtil.addClass(this._image,"leaflet-zoom-animated"):u.DomUtil.addClass(this._image,"leaflet-zoom-hide");this._updateOpacity();u.extend(this._image,{galleryimg:"no",onselectstart:u.Util.falseFn,onmousemove:u.Util.falseFn,onload:u.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(n){var t=this._map,f=this._image,i=t.getZoomScale(n.zoom),e=this._bounds.getNorthWest(),o=this._bounds.getSouthEast(),r=t._latLngToNewLayerPoint(e,n.zoom,n.center),s=t._latLngToNewLayerPoint(o,n.zoom,n.center)._subtract(r),h=r._add(s._multiplyBy(.5*(1-1/i)));f.style[u.DomUtil.TRANSFORM]=u.DomUtil.getTranslateString(h)+" scale("+i+") "},_reset:function(){var n=this._image,t=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(t);u.DomUtil.setPosition(n,t);n.style.width=i.x+"px";n.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){u.DomUtil.setOpacity(this._image,this.options.opacity)}});u.imageOverlay=function(n,t,i){return new u.ImageOverlay(n,t,i)};u.Icon=u.Class.extend({options:{className:""},initialize:function(n){u.setOptions(this,n)},createIcon:function(n){return this._createIcon("icon",n)},createShadow:function(n){return this._createIcon("shadow",n)},_createIcon:function(n,t){var i=this._getIconUrl(n),r;if(!i){if("icon"===n)throw new Error("iconUrl not set in Icon options (see the docs).");return null}return r=t&&"IMG"===t.tagName?this._createImg(i,t):this._createImg(i),this._setIconStyles(r,n),r},_setIconStyles:function(n,t){var i,r=this.options,f=u.point(r[t+"Size"]);i="shadow"===t?u.point(r.shadowAnchor||r.iconAnchor):u.point(r.iconAnchor);!i&&f&&(i=f.divideBy(2,!0));n.className="leaflet-marker-"+t+" "+r.className;i&&(n.style.marginLeft=-i.x+"px",n.style.marginTop=-i.y+"px");f&&(n.style.width=f.x+"px",n.style.height=f.y+"px")},_createImg:function(n,t){return t=t||i.createElement("img"),t.src=n,t},_getIconUrl:function(n){return u.Browser.retina&&this.options[n+"RetinaUrl"]?this.options[n+"RetinaUrl"]:this.options[n+"Url"]}});u.icon=function(n){return new u.Icon(n)};u.Icon.Default=u.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(n){var i=n+"Url",t;if(this.options[i])return this.options[i];if(u.Browser.retina&&"icon"===n&&(n+="-2x"),t=u.Icon.Default.imagePath,!t)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return t+"/marker-"+n+".png"}});u.Icon.Default.imagePath=function(){for(var t,o,r,f=i.getElementsByTagName("script"),e=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/,n=0,u=f.length;u>n;n++)if(t=f[n].src,o=t.match(e))return r=t.split(e)[0],(r?r+"/":"")+"images"}();u.Marker=u.Class.extend({includes:u.Mixin.Events,options:{icon:new u.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(n,t){u.setOptions(this,t);this._latlng=u.latLng(n)},onAdd:function(n){this._map=n;n.on("viewreset",this.update,this);this._initIcon();this.update();this.fire("add");n.options.zoomAnimation&&n.options.markerZoomAnimation&&n.on("zoomanim",this._animateZoom,this)},addTo:function(n){return n.addLayer(this),this},onRemove:function(n){this.dragging&&this.dragging.disable();this._removeIcon();this._removeShadow();this.fire("remove");n.off({viewreset:this.update,zoomanim:this._animateZoom},this);this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(n){return this._latlng=u.latLng(n),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(n){return this.options.zIndexOffset=n,this.update(),this},setIcon:function(n){return this.options.icon=n,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){if(this._icon){var n=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(n)}return this},_initIcon:function(){var n=this.options,e=this._map,h=e.options.zoomAnimation&&e.options.markerZoomAnimation,o=h?"leaflet-zoom-animated":"leaflet-zoom-hide",t=n.icon.createIcon(this._icon),s=!1,i,r,f;t!==this._icon&&(this._icon&&this._removeIcon(),s=!0,n.title&&(t.title=n.title),n.alt&&(t.alt=n.alt));u.DomUtil.addClass(t,o);n.keyboard&&(t.tabIndex="0");this._icon=t;this._initInteraction();n.riseOnHover&&u.DomEvent.on(t,"mouseover",this._bringToFront,this).on(t,"mouseout",this._resetZIndex,this);i=n.icon.createShadow(this._shadow);r=!1;i!==this._shadow&&(this._removeShadow(),r=!0);i&&u.DomUtil.addClass(i,o);this._shadow=i;n.opacity<1&&this._updateOpacity();f=this._map._panes;s&&f.markerPane.appendChild(this._icon);i&&r&&f.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&u.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex);this._map._panes.markerPane.removeChild(this._icon);this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow);this._shadow=null},_setPos:function(n){u.DomUtil.setPosition(this._icon,n);this._shadow&&u.DomUtil.setPosition(this._shadow,n);this._zIndex=n.y+this.options.zIndexOffset;this._resetZIndex()},_updateZIndex:function(n){this._icon.style.zIndex=this._zIndex+n},_animateZoom:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center).round();this._setPos(t)},_initInteraction:function(){var n,i,t;if(this.options.clickable){for(n=this._icon,i=["dblclick","mousedown","mouseover","mouseout","contextmenu"],u.DomUtil.addClass(n,"leaflet-clickable"),u.DomEvent.on(n,"click",this._onMouseClick,this),u.DomEvent.on(n,"keypress",this._onKeyPress,this),t=0;t<i.length;t++)u.DomEvent.on(n,i[t],this._fireMouseEvent,this);u.Handler.MarkerDrag&&(this.dragging=new u.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(n){var t=this.dragging&&this.dragging.moved();(this.hasEventListeners(n.type)||t)&&u.DomEvent.stopPropagation(n);t||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(n.type,{originalEvent:n,latlng:this._latlng})},_onKeyPress:function(n){13===n.keyCode&&this.fire("click",{originalEvent:n,latlng:this._latlng})},_fireMouseEvent:function(n){this.fire(n.type,{originalEvent:n,latlng:this._latlng});"contextmenu"===n.type&&this.hasEventListeners(n.type)&&u.DomEvent.preventDefault(n);"mousedown"!==n.type?u.DomEvent.stopPropagation(n):u.DomEvent.preventDefault(n)},setOpacity:function(n){return this.options.opacity=n,this._map&&this._updateOpacity(),this},_updateOpacity:function(){u.DomUtil.setOpacity(this._icon,this.options.opacity);this._shadow&&u.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}});u.marker=function(n,t){return new u.Marker(n,t)};u.DivIcon=u.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(n){var r=n&&"DIV"===n.tagName?n:i.createElement("div"),t=this.options;return r.innerHTML=t.html!==!1?t.html:"",t.bgPos&&(r.style.backgroundPosition=-t.bgPos.x+"px "+-t.bgPos.y+"px"),this._setIconStyles(r,"icon"),r},createShadow:function(){return null}});u.divIcon=function(n){return new u.DivIcon(n)};u.Map.mergeOptions({closePopupOnClick:!0});u.Popup=u.Class.extend({includes:u.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(n,t){u.setOptions(this,n);this._source=t;this._animated=u.Browser.any3d&&this.options.zoomAnimation;this._isOpen=!1},onAdd:function(n){this._map=n;this._container||this._initLayout();var t=n.options.fadeAnimation;t&&u.DomUtil.setOpacity(this._container,0);n._panes.popupPane.appendChild(this._container);n.on(this._getEvents(),this);this.update();t&&u.DomUtil.setOpacity(this._container,1);this.fire("open");n.fire("popupopen",{popup:this});this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(n){return n.addLayer(this),this},openOn:function(n){return n.openPopup(this),this},onRemove:function(n){n._panes.popupPane.removeChild(this._container);u.Util.falseFn(this._container.offsetWidth);n.off(this._getEvents(),this);n.options.fadeAnimation&&u.DomUtil.setOpacity(this._container,0);this._map=null;this.fire("close");n.fire("popupclose",{popup:this});this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(n){return this._latlng=u.latLng(n),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(n){return this._content=n,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var n={viewreset:this._updatePosition};return this._animated&&(n.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(n.preclick=this._close),this.options.keepInView&&(n.moveend=this._adjustPan),n},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,n="leaflet-popup",f=n+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),r=this._container=u.DomUtil.create("div",f),i;this.options.closeButton&&(t=this._closeButton=u.DomUtil.create("a",n+"-close-button",r),t.href="#close",t.innerHTML="&#215;",u.DomEvent.disableClickPropagation(t),u.DomEvent.on(t,"click",this._onCloseButtonClick,this));i=this._wrapper=u.DomUtil.create("div",n+"-content-wrapper",r);u.DomEvent.disableClickPropagation(i);this._contentNode=u.DomUtil.create("div",n+"-content",i);u.DomEvent.disableScrollPropagation(this._contentNode);u.DomEvent.on(i,"contextmenu",u.DomEvent.stopPropagation);this._tipContainer=u.DomUtil.create("div",n+"-tip-container",r);this._tip=u.DomUtil.create("div",n+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var i=this._contentNode,n=i.style,t;n.width="";n.whiteSpace="nowrap";t=i.offsetWidth;t=Math.min(t,this.options.maxWidth);t=Math.max(t,this.options.minWidth);n.width=t+1+"px";n.whiteSpace="";n.height="";var e=i.offsetHeight,r=this.options.maxHeight,f="leaflet-popup-scrolled";r&&e>r?(n.height=r+"px",u.DomUtil.addClass(i,f)):u.DomUtil.removeClass(i,f);this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var n=this._map.latLngToLayerPoint(this._latlng),t=this._animated,i=u.point(this.options.offset);t&&u.DomUtil.setPosition(this._container,n);this._containerBottom=-i.y-(t?0:n.y);this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(t?0:n.x);this._container.style.bottom=this._containerBottom+"px";this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(n){var t=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center);u.DomUtil.setPosition(this._container,t)},_adjustPan:function(){if(this.options.autoPan){var o=this._map,s=this._container.offsetHeight,h=this._containerWidth,c=new u.Point(this._containerLeft,-s-this._containerBottom);this._animated&&c._add(u.DomUtil.getPosition(this._container));var n=o.layerPointToContainerPoint(c),l=u.point(this.options.autoPanPadding),r=u.point(this.options.autoPanPaddingTopLeft||l),f=u.point(this.options.autoPanPaddingBottomRight||l),e=o.getSize(),t=0,i=0;n.x+h+f.x>e.x&&(t=n.x+h-e.x+f.x);n.x-t-r.x<0&&(t=n.x-r.x);n.y+s+f.y>e.y&&(i=n.y+s-e.y+f.y);n.y-i-r.y<0&&(i=n.y-r.y);(t||i)&&o.fire("autopanstart").panBy([t,i])}},_onCloseButtonClick:function(n){this._close();u.DomEvent.stop(n)}});u.popup=function(n,t){return new u.Popup(n,t)};u.Map.include({openPopup:function(n,t,i){if(this.closePopup(),!(n instanceof u.Popup)){var r=n;n=new u.Popup(i).setLatLng(t).setContent(r)}return n._isOpen=!0,this._popup=n,this.addLayer(n)},closePopup:function(n){return n&&n!==this._popup||(n=this._popup,this._popup=null),n&&(this.removeLayer(n),n._isOpen=!1),this}});u.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(n,t){var i=u.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(u.Popup.prototype.options.offset),t&&t.offset&&(i=i.add(t.offset)),t=u.extend({offset:i},t),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),n instanceof u.Popup?(u.setOptions(n,t),this._popup=n):this._popup=new u.Popup(t,this).setContent(n),this},setPopupContent:function(n){return this._popup&&this._popup.setContent(n),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(n){this._popup.setLatLng(n.latlng)}});u.LayerGroup=u.Class.extend({initialize:function(n){this._layers={};var t,i;if(n)for(t=0,i=n.length;i>t;t++)this.addLayer(n[t])},addLayer:function(n){var t=this.getLayerId(n);return this._layers[t]=n,this._map&&this._map.addLayer(n),this},removeLayer:function(n){var t=n in this._layers?n:this.getLayerId(n);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(n){return n?n in this._layers||this.getLayerId(n)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(n){var i,t,r=Array.prototype.slice.call(arguments,1);for(i in this._layers)t=this._layers[i],t[n]&&t[n].apply(t,r);return this},onAdd:function(n){this._map=n;this.eachLayer(n.addLayer,n)},onRemove:function(n){this.eachLayer(n.removeLayer,n);this._map=null},addTo:function(n){return n.addLayer(this),this},eachLayer:function(n,t){for(var i in this._layers)n.call(t,this._layers[i]);return this},getLayer:function(n){return this._layers[n]},getLayers:function(){var n=[];for(var t in this._layers)n.push(this._layers[t]);return n},setZIndex:function(n){return this.invoke("setZIndex",n)},getLayerId:function(n){return u.stamp(n)}});u.layerGroup=function(n){return new u.LayerGroup(n)};u.FeatureGroup=u.LayerGroup.extend({includes:u.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(n){return this.hasLayer(n)?this:("on"in n&&n.on(u.FeatureGroup.EVENTS,this._propagateEvent,this),u.LayerGroup.prototype.addLayer.call(this,n),this._popupContent&&n.bindPopup&&n.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:n}))},removeLayer:function(n){return this.hasLayer(n)?(n in this._layers&&(n=this._layers[n]),n.off(u.FeatureGroup.EVENTS,this._propagateEvent,this),u.LayerGroup.prototype.removeLayer.call(this,n),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:n})):this},bindPopup:function(n,t){return this._popupContent=n,this._popupOptions=t,this.invoke("bindPopup",n,t)},openPopup:function(n){for(var t in this._layers){this._layers[t].openPopup(n);break}return this},setStyle:function(n){return this.invoke("setStyle",n)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var n=new u.LatLngBounds;return this.eachLayer(function(t){n.extend(t instanceof u.Marker?t.getLatLng():t.getBounds())}),n},_propagateEvent:function(n){n=u.extend({layer:n.target,target:this},n);this.fire(n.type,n)}});u.featureGroup=function(n){return new u.FeatureGroup(n)};u.Path=u.Class.extend({includes:[u.Mixin.Events],statics:{CLIP_PADDING:function(){var t=u.Browser.mobile?1280:2e3,i=(t/Math.max(n.outerWidth,n.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(n){u.setOptions(this,n)},onAdd:function(n){this._map=n;this._container||(this._initElements(),this._initEvents());this.projectLatlngs();this._updatePath();this._container&&this._map._pathRoot.appendChild(this._container);this.fire("add");n.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(n){return n.addLayer(this),this},onRemove:function(n){n._pathRoot.removeChild(this._container);this.fire("remove");this._map=null;u.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null);n.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(n){return u.setOptions(this,n),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}});u.Map.include({_updatePathViewport:function(){var n=u.Path.CLIP_PADDING,t=this.getSize(),r=u.DomUtil.getPosition(this._mapPane),i=r.multiplyBy(-1)._subtract(t.multiplyBy(n)._round()),f=i.add(t.multiplyBy(1+2*n)._round());this._pathViewport=new u.Bounds(i,f)}});u.Path.SVG_NS="http://www.w3.org/2000/svg";u.Browser.svg=!(!i.createElementNS||!i.createElementNS(u.Path.SVG_NS,"svg").createSVGRect);u.Path=u.Path.extend({statics:{SVG:u.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,n=this._container;return n&&t.lastChild!==n&&t.appendChild(n),this},bringToBack:function(){var t=this._map._pathRoot,n=this._container,i=t.firstChild;return n&&i!==n&&t.insertBefore(n,i),this},getPathString:function(){},_createElement:function(n){return i.createElementNS(u.Path.SVG_NS,n)},_initElements:function(){this._map._initPathRoot();this._initPath();this._initStyle()},_initPath:function(){this._container=this._createElement("g");this._path=this._createElement("path");this.options.className&&u.DomUtil.addClass(this._path,this.options.className);this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round"));this.options.fill&&this._path.setAttribute("fill-rule","evenodd");this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents);this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none");this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none");this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var n=this.getPathString();n||(n="M0 0");this._path.setAttribute("d",n)},_initEvents:function(){if(this.options.clickable){(u.Browser.svg||!u.Browser.vml)&&u.DomUtil.addClass(this._path,"leaflet-clickable");u.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],n=0;n<t.length;n++)u.DomEvent.on(this._container,t[n],this._fireMouseEvent,this)}},_onMouseClick:function(n){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(n)},_fireMouseEvent:function(n){if(this.hasEventListeners(n.type)){var t=this._map,i=t.mouseEventToContainerPoint(n),r=t.containerPointToLayerPoint(i),f=t.layerPointToLatLng(r);this.fire(n.type,{latlng:f,layerPoint:r,containerPoint:i,originalEvent:n});"contextmenu"===n.type&&u.DomEvent.preventDefault(n);"mousemove"!==n.type&&u.DomEvent.stopPropagation(n)}}});u.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=u.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&u.Browser.any3d?(u.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):u.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(n){var t=this.getZoomScale(n.zoom),i=this._getCenterOffset(n.center)._multiplyBy(-t)._add(this._pathViewport.min);this._pathRoot.style[u.DomUtil.TRANSFORM]=u.DomUtil.getTranslateString(i)+" scale("+t+") ";this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var i=this._pathViewport,t=i.min,r=i.max,f=r.x-t.x,e=r.y-t.y,n=this._pathRoot,o=this._panes.overlayPane;u.Browser.mobileWebkit&&o.removeChild(n);u.DomUtil.setPosition(n,t);n.setAttribute("width",f);n.setAttribute("height",e);n.setAttribute("viewBox",[t.x,t.y,f,e].join(" "));u.Browser.mobileWebkit&&o.appendChild(n)}}});u.Path.include({bindPopup:function(n,t){return n instanceof u.Popup?this._popup=n:((!this._popup||t)&&(this._popup=new u.Popup(t,this)),this._popup.setContent(n)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(n){return this._popup&&(n=n||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:n})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(n){this._popup.setLatLng(n.latlng);this._map.openPopup(this._popup)}});u.Browser.vml=!u.Browser.svg&&function(){var t,n;try{return t=i.createElement("div"),t.innerHTML='<v:shape adj="1"/>',n=t.firstChild,n.style.behavior="url(#default#VML)",n&&"object"==typeof n.adj}catch(r){return!1}}();u.Path=u.Browser.svg||!u.Browser.vml?u.Path:u.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return i.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(n){return i.createElement("<lvml:"+n+' class="lvml">')}}catch(n){return function(n){return i.createElement("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var n=this._container=this._createElement("shape");u.DomUtil.addClass(n,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:""));this.options.clickable&&u.DomUtil.addClass(n,"leaflet-clickable");n.coordsize="1 1";this._path=this._createElement("path");n.appendChild(this._path);this._map._pathRoot.appendChild(n)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,i=this._fill,n=this.options,r=this._container;r.stroked=n.stroke;r.filled=n.fill;n.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",r.appendChild(t)),t.weight=n.weight+"px",t.color=n.color,t.opacity=n.opacity,t.dashStyle=n.dashArray?u.Util.isArray(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):"",n.lineCap&&(t.endcap=n.lineCap.replace("butt","flat")),n.lineJoin&&(t.joinstyle=n.lineJoin)):t&&(r.removeChild(t),this._stroke=null);n.fill?(i||(i=this._fill=this._createElement("fill"),r.appendChild(i)),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(r.removeChild(i),this._fill=null)},_updatePath:function(){var n=this._container.style;n.display="none";this._path.v=this.getPathString()+" ";n.display=""}});u.Map.include(u.Browser.svg||!u.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var n=this._pathRoot=i.createElement("div");n.className="leaflet-vml-container";this._panes.overlayPane.appendChild(n);this.on("moveend",this._updatePathViewport);this._updatePathViewport()}}});u.Browser.canvas=function(){return!!i.createElement("canvas").getContext}();u.Path=u.Path.SVG&&!n.L_PREFER_CANVAS||!u.Browser.canvas?u.Path:u.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(n){return u.setOptions(this,n),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(n){n.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this);this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this));this._requestUpdate();this.fire("remove");this._map=null},_requestUpdate:function(){this._map&&!u.Path._updateRequest&&(u.Path._updateRequest=u.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){u.Path._updateRequest=null;this.fire("moveend")},_initElements:function(){this._map._initPathRoot();this._ctx=this._map._canvasCtx},_updateStyle:function(){var n=this.options;n.stroke&&(this._ctx.lineWidth=n.weight,this._ctx.strokeStyle=n.color);n.fill&&(this._ctx.fillStyle=n.fillColor||n.color)},_drawPath:function(){var n,t,r,f,i,e;for(this._ctx.beginPath(),n=0,r=this._parts.length;r>n;n++){for(t=0,f=this._parts[n].length;f>t;t++)i=this._parts[n][t],e=(0===t?"move":"line")+"To",this._ctx[e](i.x,i.y);this instanceof u.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var n=this._ctx,t=this.options;this._drawPath();n.save();this._updateStyle();t.fill&&(n.globalAlpha=t.fillOpacity,n.fill());t.stroke&&(n.globalAlpha=t.opacity,n.stroke());n.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(n){this._containsPoint(n.layerPoint)&&this.fire("click",n)},_onMouseMove:function(n){this._map&&!this._map._animatingZoom&&(this._containsPoint(n.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",n)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",n)))}});u.Map.include(u.Path.SVG&&!n.L_PREFER_CANVAS||!u.Browser.canvas?{}:{_initPathRoot:function(){var t,n=this._pathRoot;n||(n=this._pathRoot=i.createElement("canvas"),n.style.position="absolute",t=this._canvasCtx=n.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(n),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var i=this._pathViewport,n=i.min,r=i.max.subtract(n),t=this._pathRoot;u.DomUtil.setPosition(t,n);t.width=r.x;t.height=r.y;t.getContext("2d").translate(-n.x,-n.y)}}});u.LineUtil={simplify:function(n,t){if(!t||!n.length)return n.slice();var i=t*t;return n=this._reducePoints(n,i),n=this._simplifyDP(n,i)},pointToSegmentDistance:function(n,t,i){return Math.sqrt(this._sqClosestPointOnSegment(n,t,i,!0))},closestPointOnSegment:function(n,t,i){return this._sqClosestPointOnSegment(n,t,i)},_simplifyDP:function(n,t){var u=n.length,o=typeof Uint8Array!=r+""?Uint8Array:Array,f=new o(u),i,e;for(f[0]=f[u-1]=1,this._simplifyDPStep(n,f,t,0,u-1),e=[],i=0;u>i;i++)f[i]&&e.push(n[i]);return e},_simplifyDPStep:function(n,t,i,r,u){for(var e,o,s=0,f=r+1;u-1>=f;f++)o=this._sqClosestPointOnSegment(n[f],n[r],n[u],!0),o>s&&(e=f,s=o);s>i&&(t[e]=1,this._simplifyDPStep(n,t,i,r,e),this._simplifyDPStep(n,t,i,e,u))},_reducePoints:function(n,t){for(var r=[n[0]],i=1,u=0,f=n.length;f>i;i++)this._sqDist(n[i],n[u])>t&&(r.push(n[i]),u=i);return f-1>u&&r.push(n[f-1]),r},clipSegment:function(n,t,i,r){var o,e,s,u=r?this._lastCode:this._getBitCode(n,i),f=this._getBitCode(t,i);for(this._lastCode=f;;){if(!(u|f))return[n,t];if(u&f)return!1;o=u||f;e=this._getEdgeIntersection(n,t,o,i);s=this._getBitCode(e,i);o===u?(n=e,u=s):(t=e,f=s)}},_getEdgeIntersection:function(n,t,i,r){var f=t.x-n.x,e=t.y-n.y,o=r.min,s=r.max;return 8&i?new u.Point(n.x+f*(s.y-n.y)/e,s.y):4&i?new u.Point(n.x+f*(o.y-n.y)/e,o.y):2&i?new u.Point(s.x,n.y+e*(s.x-n.x)/f):1&i?new u.Point(o.x,n.y+e*(o.x-n.x)/f):void 0},_getBitCode:function(n,t){var i=0;return n.x<t.min.x?i|=1:n.x>t.max.x&&(i|=2),n.y<t.min.y?i|=4:n.y>t.max.y&&(i|=8),i},_sqDist:function(n,t){var i=t.x-n.x,r=t.y-n.y;return i*i+r*r},_sqClosestPointOnSegment:function(n,t,i,r){var h,o=t.x,s=t.y,f=i.x-o,e=i.y-s,c=f*f+e*e;return c>0&&(h=((n.x-o)*f+(n.y-s)*e)/c,h>1?(o=i.x,s=i.y):h>0&&(o+=f*h,s+=e*h)),f=n.x-o,e=n.y-s,r?f*f+e*e:new u.Point(o,s)}};u.Polyline=u.Path.extend({initialize:function(n,t){u.Path.prototype.initialize.call(this,t);this._latlngs=this._convertLatLngs(n)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var n=0,t=this._latlngs.length;t>n;n++)this._originalPoints[n]=this._map.latLngToLayerPoint(this._latlngs[n])},getPathString:function(){for(var n=0,i=this._parts.length,t="";i>n;n++)t+=this._getPathPartStr(this._parts[n]);return t},getLatLngs:function(){return this._latlngs},setLatLngs:function(n){return this._latlngs=this._convertLatLngs(n),this.redraw()},addLatLng:function(n){return this._latlngs.push(u.latLng(n)),this.redraw()},spliceLatLngs:function(){var n=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),n},closestLayerPoint:function(n){for(var h,r,f,e=1/0,c=this._parts,t=null,o=0,l=c.length;l>o;o++)for(var s=c[o],i=1,a=s.length;a>i;i++)r=s[i-1],f=s[i],h=u.LineUtil._sqClosestPointOnSegment(n,r,f,!0),e>h&&(e=h,t=u.LineUtil._sqClosestPointOnSegment(n,r,f));return t&&(t.distance=Math.sqrt(e)),t},getBounds:function(){return new u.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(n,t){for(var f=t?n:[],i=0,r=n.length;r>i;i++){if(u.Util.isArray(n[i])&&"number"!=typeof n[i][0])return;f[i]=u.latLng(n[i])}return f},_initEvents:function(){u.Path.prototype._initEvents.call(this)},_getPathPartStr:function(n){for(var t,f=u.Path.VML,i=0,e=n.length,r="";e>i;i++)t=n[i],f&&t._round(),r+=(i?"L":"M")+t.x+" "+t.y;return r},_clipPoints:function(){var n,t,i,r=this._originalPoints,e=r.length;if(this.options.noClip)return this._parts=[r],void 0;this._parts=[];var f=this._parts,o=this._map._pathViewport,s=u.LineUtil;for(n=0,t=0;e-1>n;n++)i=s.clipSegment(r[n],r[n+1],o,n),i&&(f[t]=f[t]||[],f[t].push(i[0]),(i[1]!==r[n+1]||n===e-2)&&(f[t].push(i[1]),t++))},_simplifyPoints:function(){for(var t=this._parts,i=u.LineUtil,n=0,r=t.length;r>n;n++)t[n]=i.simplify(t[n],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),u.Path.prototype._updatePath.call(this))}});u.polyline=function(n,t){return new u.Polyline(n,t)};u.PolyUtil={};u.PolyUtil.clipPolygon=function(n,t){for(var e,a,l,o,s,f,r,v=[1,4,2,8],c=u.LineUtil,i=0,h=n.length;h>i;i++)n[i]._code=c._getBitCode(n[i],t);for(l=0;4>l;l++){for(f=v[l],e=[],i=0,h=n.length,a=h-1;h>i;a=i++)o=n[i],s=n[a],o._code&f?s._code&f||(r=c._getEdgeIntersection(s,o,f,t),r._code=c._getBitCode(r,t),e.push(r)):(s._code&f&&(r=c._getEdgeIntersection(s,o,f,t),r._code=c._getBitCode(r,t),e.push(r)),e.push(o));n=e}return n};u.Polygon=u.Polyline.extend({options:{fill:!0},initialize:function(n,t){u.Polyline.prototype.initialize.call(this,n,t);this._initWithHoles(n)},_initWithHoles:function(n){var t,r,i;if(n&&u.Util.isArray(n[0])&&"number"!=typeof n[0][0])for(this._latlngs=this._convertLatLngs(n[0]),this._holes=n.slice(1),t=0,r=this._holes.length;r>t;t++)i=this._holes[t]=this._convertLatLngs(this._holes[t]),i[0].equals(i[i.length-1])&&i.pop();n=this._latlngs;n.length>=2&&n[0].equals(n[n.length-1])&&n.pop()},projectLatlngs:function(){if(u.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes)for(var t,r,n=0,i=this._holes.length;i>n;n++)for(this._holePoints[n]=[],t=0,r=this._holes[n].length;r>t;t++)this._holePoints[n][t]=this._map.latLngToLayerPoint(this._holes[n][t])},setLatLngs:function(n){return n&&u.Util.isArray(n[0])&&"number"!=typeof n[0][0]?(this._initWithHoles(n),this.redraw()):u.Polyline.prototype.setLatLngs.call(this,n)},_clipPoints:function(){var f=this._originalPoints,i=[],n,r,t;if(this._parts=[f].concat(this._holePoints),!this.options.noClip){for(n=0,r=this._parts.length;r>n;n++)t=u.PolyUtil.clipPolygon(this._parts[n],this._map._pathViewport),t.length&&i.push(t);this._parts=i}},_getPathPartStr:function(n){var t=u.Polyline.prototype._getPathPartStr.call(this,n);return t+(u.Browser.svg?"z":"x")}});u.polygon=function(n,t){return new u.Polygon(n,t)},function(){function n(n){return u.FeatureGroup.extend({initialize:function(n,t){this._layers={};this._options=t;this.setLatLngs(n)},setLatLngs:function(t){var i=0,r=t.length;for(this.eachLayer(function(n){r>i?n.setLatLngs(t[i++]):this.removeLayer(n)},this);r>i;)this.addLayer(new n(t[i++],this._options));return this},getLatLngs:function(){var n=[];return this.eachLayer(function(t){n.push(t.getLatLngs())}),n}})}u.MultiPolyline=n(u.Polyline);u.MultiPolygon=n(u.Polygon);u.multiPolyline=function(n,t){return new u.MultiPolyline(n,t)};u.multiPolygon=function(n,t){return new u.MultiPolygon(n,t)}}();u.Rectangle=u.Polygon.extend({initialize:function(n,t){u.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(n),t)},setBounds:function(n){this.setLatLngs(this._boundsToLatLngs(n))},_boundsToLatLngs:function(n){return n=u.latLngBounds(n),[n.getSouthWest(),n.getNorthWest(),n.getNorthEast(),n.getSouthEast()]}});u.rectangle=function(n,t){return new u.Rectangle(n,t)};u.Circle=u.Path.extend({initialize:function(n,t,i){u.Path.prototype.initialize.call(this,i);this._latlng=u.latLng(n);this._mRadius=t},options:{fill:!0},setLatLng:function(n){return this._latlng=u.latLng(n),this.redraw()},setRadius:function(n){return this._mRadius=n,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),n=this._latlng,i=this._map.latLngToLayerPoint([n.lat,n.lng-t]);this._point=this._map.latLngToLayerPoint(n);this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),i=this._mRadius/40075017*360,n=this._latlng;return new u.LatLngBounds([n.lat-i,n.lng-t],[n.lat+i,n.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,n=this._radius;return this._checkIfEmpty()?"":u.Browser.svg?"M"+t.x+","+(t.y-n)+"A"+n+","+n+",0,1,1,"+(t.x-.1)+","+(t.y-n)+" z":(t._round(),n=Math.round(n),"AL "+t.x+","+t.y+" "+n+","+n+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(u.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var n=this._map._pathViewport,t=this._radius,i=this._point;return i.x-t>n.max.x||i.y-t>n.max.y||i.x+t<n.min.x||i.y+t<n.min.y}});u.circle=function(n,t,i){return new u.Circle(n,t,i)};u.CircleMarker=u.Circle.extend({options:{radius:10,weight:2},initialize:function(n,t){u.Circle.prototype.initialize.call(this,n,null,t);this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){u.Circle.prototype._updateStyle.call(this);this.setRadius(this.options.radius)},setLatLng:function(n){return u.Circle.prototype.setLatLng.call(this,n),this._popup&&this._popup._isOpen&&this._popup.setLatLng(n),this},setRadius:function(n){return this.options.radius=this._radius=n,this.redraw()},getRadius:function(){return this._radius}});u.circleMarker=function(n,t){return new u.CircleMarker(n,t)};u.Polyline.include(u.Path.CANVAS?{_containsPoint:function(n,t){var r,i,e,s,o,h,f,c=this.options.weight/2;for(u.Browser.touch&&(c+=10),r=0,s=this._parts.length;s>r;r++)for(f=this._parts[r],i=0,o=f.length,e=o-1;o>i;e=i++)if((t||0!==i)&&(h=u.LineUtil.pointToSegmentDistance(n,f[e],f[i]),c>=h))return!0;return!1}}:{});u.Polygon.include(u.Path.CANVAS?{_containsPoint:function(n){var i,t,r,f,e,o,c,s,h=!1;if(u.Polyline.prototype._containsPoint.call(this,n,!0))return!0;for(f=0,c=this._parts.length;c>f;f++)for(i=this._parts[f],e=0,s=i.length,o=s-1;s>e;o=e++)t=i[e],r=i[o],t.y>n.y!=r.y>n.y&&n.x<(r.x-t.x)*(n.y-t.y)/(r.y-t.y)+t.x&&(h=!h);return h}}:{});u.Circle.include(u.Path.CANVAS?{_drawPath:function(){var n=this._point;this._ctx.beginPath();this._ctx.arc(n.x,n.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(n){var t=this._point,i=this.options.stroke?this.options.weight/2:0;return n.distanceTo(t)<=this._radius+i}}:{});u.CircleMarker.include(u.Path.CANVAS?{_updateStyle:function(){u.Path.prototype._updateStyle.call(this)}}:{});u.GeoJSON=u.FeatureGroup.extend({initialize:function(n,t){u.setOptions(this,t);this._layers={};n&&this.addData(n)},addData:function(n){var r,o,f,e=u.Util.isArray(n)?n:n.features,t,i;if(e){for(r=0,o=e.length;o>r;r++)f=e[r],(f.geometries||f.geometry||f.features||f.coordinates)&&this.addData(e[r]);return this}return t=this.options,!t.filter||t.filter(n)?(i=u.GeoJSON.geometryToLayer(n,t.pointToLayer,t.coordsToLatLng,t),i.feature=u.GeoJSON.asFeature(n),i.defaultOptions=i.options,this.resetStyle(i),t.onEachFeature&&t.onEachFeature(n,i),this.addLayer(i)):void 0},resetStyle:function(n){var t=this.options.style;t&&(u.Util.extend(n.options,n.defaultOptions),this._setLayerStyle(n,t))},setStyle:function(n){this.eachLayer(function(t){this._setLayerStyle(t,n)},this)},_setLayerStyle:function(n,t){"function"==typeof t&&(t=t(n.feature));n.setStyle&&n.setStyle(t)}});u.extend(u.GeoJSON,{geometryToLayer:function(n,t,i,r){var s,e,o,h,c="Feature"===n.type?n.geometry:n,f=c.coordinates,l=[];switch(i=i||this.coordsToLatLng,c.type){case"Point":return s=i(f),t?t(n,s):new u.Marker(s);case"MultiPoint":for(o=0,h=f.length;h>o;o++)s=i(f[o]),l.push(t?t(n,s):new u.Marker(s));return new u.FeatureGroup(l);case"LineString":return e=this.coordsToLatLngs(f,0,i),new u.Polyline(e,r);case"Polygon":if(2===f.length&&!f[1].length)throw new Error("Invalid GeoJSON object.");return e=this.coordsToLatLngs(f,1,i),new u.Polygon(e,r);case"MultiLineString":return e=this.coordsToLatLngs(f,1,i),new u.MultiPolyline(e,r);case"MultiPolygon":return e=this.coordsToLatLngs(f,2,i),new u.MultiPolygon(e,r);case"GeometryCollection":for(o=0,h=c.geometries.length;h>o;o++)l.push(this.geometryToLayer({geometry:c.geometries[o],type:"Feature",properties:n.properties},t,i,r));return new u.FeatureGroup(l);default:throw new Error("Invalid GeoJSON object.");}},coordsToLatLng:function(n){return new u.LatLng(n[1],n[0],n[2])},coordsToLatLngs:function(n,t,i){for(var u,e=[],r=0,f=n.length;f>r;r++)u=t?this.coordsToLatLngs(n[r],t-1,i):(i||this.coordsToLatLng)(n[r]),e.push(u);return e},latLngToCoords:function(n){var t=[n.lng,n.lat];return n.alt!==r&&t.push(n.alt),t},latLngsToCoords:function(n){for(var i=[],t=0,r=n.length;r>t;t++)i.push(u.GeoJSON.latLngToCoords(n[t]));return i},getFeature:function(n,t){return n.feature?u.extend({},n.feature,{geometry:t}):u.GeoJSON.asFeature(t)},asFeature:function(n){return"Feature"===n.type?n:{type:"Feature",properties:{},geometry:n}}});e={toGeoJSON:function(){return u.GeoJSON.getFeature(this,{type:"Point",coordinates:u.GeoJSON.latLngToCoords(this.getLatLng())})}};u.Marker.include(e);u.Circle.include(e);u.CircleMarker.include(e);u.Polyline.include({toGeoJSON:function(){return u.GeoJSON.getFeature(this,{type:"LineString",coordinates:u.GeoJSON.latLngsToCoords(this.getLatLngs())})}});u.Polygon.include({toGeoJSON:function(){var n,r,t,i=[u.GeoJSON.latLngsToCoords(this.getLatLngs())];if(i[0].push(i[0][0]),this._holes)for(n=0,r=this._holes.length;r>n;n++)t=u.GeoJSON.latLngsToCoords(this._holes[n]),t.push(t[0]),i.push(t);return u.GeoJSON.getFeature(this,{type:"Polygon",coordinates:i})}}),function(){function n(n){return function(){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON().geometry.coordinates)}),u.GeoJSON.getFeature(this,{type:n,coordinates:t})}}u.MultiPolyline.include({toGeoJSON:n("MultiLineString")});u.MultiPolygon.include({toGeoJSON:n("MultiPolygon")});u.LayerGroup.include({toGeoJSON:function(){var i,t=this.feature&&this.feature.geometry,r=[],f;return t&&"MultiPoint"===t.type?n("MultiPoint").call(this):(f=t&&"GeometryCollection"===t.type,this.eachLayer(function(n){n.toGeoJSON&&(i=n.toGeoJSON(),r.push(f?i.geometry:u.GeoJSON.asFeature(i)))}),f?u.GeoJSON.getFeature(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r})}})}();u.geoJson=function(n,t){return new u.GeoJSON(n,t)};u.DomEvent={addListener:function(n,t,i,r){var f,e,s,o=u.stamp(i),h="_leaflet_"+t+o;return n[h]?this:(f=function(t){return i.call(r||n,t||u.DomEvent._getEvent())},u.Browser.pointer&&0===t.indexOf("touch")?this.addPointerListener(n,t,f,o):(u.Browser.touch&&"dblclick"===t&&this.addDoubleTapListener&&this.addDoubleTapListener(n,f,o),"addEventListener"in n?"mousewheel"===t?(n.addEventListener("DOMMouseScroll",f,!1),n.addEventListener(t,f,!1)):"mouseenter"===t||"mouseleave"===t?(e=f,s="mouseenter"===t?"mouseover":"mouseout",f=function(t){if(u.DomEvent._checkMouse(n,t))return e(t)},n.addEventListener(s,f,!1)):"click"===t&&u.Browser.android?(e=f,f=function(n){return u.DomEvent._filterClick(n,e)},n.addEventListener(t,f,!1)):n.addEventListener(t,f,!1):"attachEvent"in n&&n.attachEvent("on"+t,f),n[h]=f,this))},removeListener:function(n,t,i){var f=u.stamp(i),e="_leaflet_"+t+f,r=n[e];return r?(u.Browser.pointer&&0===t.indexOf("touch")?this.removePointerListener(n,t,f):u.Browser.touch&&"dblclick"===t&&this.removeDoubleTapListener?this.removeDoubleTapListener(n,f):"removeEventListener"in n?"mousewheel"===t?(n.removeEventListener("DOMMouseScroll",r,!1),n.removeEventListener(t,r,!1)):"mouseenter"===t||"mouseleave"===t?n.removeEventListener("mouseenter"===t?"mouseover":"mouseout",r,!1):n.removeEventListener(t,r,!1):"detachEvent"in n&&n.detachEvent("on"+t,r),n[e]=null,this):this},stopPropagation:function(n){return n.stopPropagation?n.stopPropagation():n.cancelBubble=!0,u.DomEvent._skipped(n),this},disableScrollPropagation:function(n){var t=u.DomEvent.stopPropagation;return u.DomEvent.on(n,"mousewheel",t).on(n,"MozMousePixelScroll",t)},disableClickPropagation:function(n){for(var i=u.DomEvent.stopPropagation,t=u.Draggable.START.length-1;t>=0;t--)u.DomEvent.on(n,u.Draggable.START[t],i);return u.DomEvent.on(n,"click",u.DomEvent._fakeStop).on(n,"dblclick",i)},preventDefault:function(n){return n.preventDefault?n.preventDefault():n.returnValue=!1,this},stop:function(n){return u.DomEvent.preventDefault(n).stopPropagation(n)},getMousePosition:function(n,t){if(!t)return new u.Point(n.clientX,n.clientY);var i=t.getBoundingClientRect();return new u.Point(n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop)},getWheelDelta:function(n){var t=0;return n.wheelDelta&&(t=n.wheelDelta/120),n.detail&&(t=-n.detail/3),t},_skipEvents:{},_fakeStop:function(n){u.DomEvent._skipEvents[n.type]=!0},_skipped:function(n){var t=this._skipEvents[n.type];return this._skipEvents[n.type]=!1,t},_checkMouse:function(n,t){var i=t.relatedTarget;if(!i)return!0;try{for(;i&&i!==n;)i=i.parentNode}catch(r){return!1}return i!==n},_getEvent:function(){var t=n.event,i;if(!t)for(i=arguments.callee.caller;i&&(t=i.arguments[0],!t||n.Event!==t.constructor);)i=i.caller;return t},_filterClick:function(n,t){var r=n.timeStamp||n.originalEvent.timeStamp,i=u.DomEvent._lastClick&&r-u.DomEvent._lastClick;return i&&i>100&&500>i||n.target._simulatedClick&&!n._simulated?(u.DomEvent.stop(n),void 0):(u.DomEvent._lastClick=r,t(n))}};u.DomEvent.on=u.DomEvent.addListener;u.DomEvent.off=u.DomEvent.removeListener;u.Draggable=u.Class.extend({includes:u.Mixin.Events,statics:{START:u.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(n,t){this._element=n;this._dragStartTarget=t||n},enable:function(){if(!this._enabled){for(var n=u.Draggable.START.length-1;n>=0;n--)u.DomEvent.on(this._dragStartTarget,u.Draggable.START[n],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var n=u.Draggable.START.length-1;n>=0;n--)u.DomEvent.off(this._dragStartTarget,u.Draggable.START[n],this._onDown,this);this._enabled=!1;this._moved=!1}},_onDown:function(n){if(this._moved=!1,!(n.shiftKey||1!==n.which&&1!==n.button&&!n.touches||(u.DomEvent.stopPropagation(n),u.Draggable._disabled||(u.DomUtil.disableImageDrag(),u.DomUtil.disableTextSelection(),this._moving)))){var t=n.touches?n.touches[0]:n;this._startPoint=new u.Point(t.clientX,t.clientY);this._startPos=this._newPos=u.DomUtil.getPosition(this._element);u.DomEvent.on(i,u.Draggable.MOVE[n.type],this._onMove,this).on(i,u.Draggable.END[n.type],this._onUp,this)}},_onMove:function(n){if(n.touches&&n.touches.length>1)return this._moved=!0,void 0;var r=n.touches&&1===n.touches.length?n.touches[0]:n,f=new u.Point(r.clientX,r.clientY),t=f.subtract(this._startPoint);(t.x||t.y)&&(u.Browser.touch&&Math.abs(t.x)+Math.abs(t.y)<3||(u.DomEvent.preventDefault(n),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=u.DomUtil.getPosition(this._element).subtract(t),u.DomUtil.addClass(i.body,"leaflet-dragging"),this._lastTarget=n.target||n.srcElement,u.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(t),this._moving=!0,u.Util.cancelAnimFrame(this._animRequest),this._animRequest=u.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag");u.DomUtil.setPosition(this._element,this._newPos);this.fire("drag")},_onUp:function(){u.DomUtil.removeClass(i.body,"leaflet-dragging");this._lastTarget&&(u.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var n in u.Draggable.MOVE)u.DomEvent.off(i,u.Draggable.MOVE[n],this._onMove).off(i,u.Draggable.END[n],this._onUp);u.DomUtil.enableImageDrag();u.DomUtil.enableTextSelection();this._moved&&this._moving&&(u.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)}));this._moving=!1}});u.Handler=u.Class.extend({initialize:function(n){this._map=n},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}});u.Map.mergeOptions({dragging:!0,inertia:!u.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:u.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1});u.Map.Drag=u.Handler.extend({addHooks:function(){if(!this._draggable){var n=this._map;this._draggable=new u.Draggable(n._mapPane,n._container);this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this);n.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),n.on("viewreset",this._onViewReset,this),n.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var n=this._map;n._panAnim&&n._panAnim.stop();n.fire("movestart").fire("dragstart");n.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var n=this._lastTime=+new Date,t=this._lastPos=this._draggable._newPos;this._positions.push(t);this._times.push(n);n-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var n=this._map.getSize()._divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(n).x;this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var i=this._worldWidth,t=Math.round(i/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,u=(r-t+n)%i+t-n,f=(r+t+n)%i-t-n,e=Math.abs(u+n)<Math.abs(f+n)?u:f;this._draggable._newPos.x=e},_onDragEnd:function(n){var t=this._map,i=t.options,e=+new Date-this._lastTime,l=!i.inertia||e>i.inertiaThreshold||!this._positions[0];if(t.fire("dragend",n),l)t.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),v=(this._lastTime+e-this._times[0])/1e3,f=i.easeLinearity,o=a.multiplyBy(f/v),s=o.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,s),y=o.multiplyBy(h/s),c=h/(i.inertiaDeceleration*f),r=y.multiplyBy(-c/2).round();r.x&&r.y?(r=t._limitOffset(r,t.options.maxBounds),u.Util.requestAnimFrame(function(){t.panBy(r,{duration:c,easeLinearity:f,noMoveStart:!0})})):t.fire("moveend")}}});u.Map.addInitHook("addHandler","dragging",u.Map.Drag);u.Map.mergeOptions({doubleClickZoom:!0});u.Map.DoubleClickZoom=u.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(n){var t=this._map,i=t.getZoom()+(n.originalEvent.shiftKey?-1:1);"center"===t.options.doubleClickZoom?t.setZoom(i):t.setZoomAround(n.containerPoint,i)}});u.Map.addInitHook("addHandler","doubleClickZoom",u.Map.DoubleClickZoom);u.Map.mergeOptions({scrollWheelZoom:!0});u.Map.ScrollWheelZoom=u.Handler.extend({addHooks:function(){u.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this);u.DomEvent.on(this._map._container,"MozMousePixelScroll",u.DomEvent.preventDefault);this._delta=0},removeHooks:function(){u.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll);u.DomEvent.off(this._map._container,"MozMousePixelScroll",u.DomEvent.preventDefault)},_onWheelScroll:function(n){var i=u.DomEvent.getWheelDelta(n),t;this._delta+=i;this._lastMousePos=this._map.mouseEventToContainerPoint(n);this._startTime||(this._startTime=+new Date);t=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer);this._timer=setTimeout(u.bind(this._performZoom,this),t);u.DomEvent.preventDefault(n);u.DomEvent.stopPropagation(n)},_performZoom:function(){var t=this._map,n=this._delta,i=t.getZoom();n=n>0?Math.ceil(n):Math.floor(n);n=Math.max(Math.min(n,4),-4);n=t._limitZoom(i+n)-i;this._delta=0;this._startTime=null;n&&("center"===t.options.scrollWheelZoom?t.setZoom(i+n):t.setZoomAround(this._lastMousePos,i+n))}});u.Map.addInitHook("addHandler","scrollWheelZoom",u.Map.ScrollWheelZoom);u.extend(u.DomEvent,{_touchstart:u.Browser.msPointer?"MSPointerDown":u.Browser.pointer?"pointerdown":"touchstart",_touchend:u.Browser.msPointer?"MSPointerUp":u.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(n,t,r){function c(n){var i,t,r;(u.Browser.pointer?(e.push(n.pointerId),i=e.length):i=n.touches.length,i>1)||(t=Date.now(),r=t-(s||t),f=n.touches?n.touches[0]:n,l=r>0&&p>=r,s=t)}function o(n){var r,i,o,h;if(u.Browser.pointer){if(r=e.indexOf(n.pointerId),-1===r)return;e.splice(r,1)}if(l){if(u.Browser.pointer){o={};for(h in f)i=f[h],o[h]="function"==typeof i?i.bind(f):i;f=o}f.type="dblclick";t(f);s=null}}var s,f,l=!1,p=250,a="_leaflet_",v=this._touchstart,y=this._touchend,e=[],h;return n[a+v+r]=c,n[a+y+r]=o,h=u.Browser.pointer?i.documentElement:n,n.addEventListener(v,c,!1),h.addEventListener(y,o,!1),u.Browser.pointer&&h.addEventListener(u.DomEvent.POINTER_CANCEL,o,!1),this},removeDoubleTapListener:function(n,t){var r="_leaflet_";return n.removeEventListener(this._touchstart,n[r+this._touchstart+t],!1),(u.Browser.pointer?i.documentElement:n).removeEventListener(this._touchend,n[r+this._touchend+t],!1),u.Browser.pointer&&i.documentElement.removeEventListener(u.DomEvent.POINTER_CANCEL,n[r+this._touchend+t],!1),this}});u.extend(u.DomEvent,{POINTER_DOWN:u.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:u.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:u.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:u.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(n,t,i,r){switch(t){case"touchstart":return this.addPointerListenerStart(n,t,i,r);case"touchend":return this.addPointerListenerEnd(n,t,i,r);case"touchmove":return this.addPointerListenerMove(n,t,i,r);default:throw"Unknown touch event type";}},addPointerListenerStart:function(n,t,r,f){var e=this._pointers,s=function(n){u.DomEvent.preventDefault(n);for(var i=!1,t=0;t<e.length;t++)if(e[t].pointerId===n.pointerId){i=!0;break}i||e.push(n);n.touches=e.slice();n.changedTouches=[n];r(n)},o;return(n["_leaflet_touchstart"+f]=s,n.addEventListener(this.POINTER_DOWN,s,!1),this._pointerDocumentListener)||(o=function(n){for(var t=0;t<e.length;t++)if(e[t].pointerId===n.pointerId){e.splice(t,1);break}},i.documentElement.addEventListener(this.POINTER_UP,o,!1),i.documentElement.addEventListener(this.POINTER_CANCEL,o,!1),this._pointerDocumentListener=!0),this},addPointerListenerMove:function(n,t,i,r){function f(n){if(n.pointerType!==n.MSPOINTER_TYPE_MOUSE&&"mouse"!==n.pointerType||0!==n.buttons){for(var t=0;t<u.length;t++)if(u[t].pointerId===n.pointerId){u[t]=n;break}n.touches=u.slice();n.changedTouches=[n];i(n)}}var u=this._pointers;return n["_leaflet_touchmove"+r]=f,n.addEventListener(this.POINTER_MOVE,f,!1),this},addPointerListenerEnd:function(n,t,i,r){var u=this._pointers,f=function(n){for(var t=0;t<u.length;t++)if(u[t].pointerId===n.pointerId){u.splice(t,1);break}n.touches=u.slice();n.changedTouches=[n];i(n)};return n["_leaflet_touchend"+r]=f,n.addEventListener(this.POINTER_UP,f,!1),n.addEventListener(this.POINTER_CANCEL,f,!1),this},removePointerListener:function(n,t,i){var r=n["_leaflet_"+t+i];switch(t){case"touchstart":n.removeEventListener(this.POINTER_DOWN,r,!1);break;case"touchmove":n.removeEventListener(this.POINTER_MOVE,r,!1);break;case"touchend":n.removeEventListener(this.POINTER_UP,r,!1);n.removeEventListener(this.POINTER_CANCEL,r,!1)}return this}});u.Map.mergeOptions({touchZoom:u.Browser.touch&&!u.Browser.android23,bounceAtZoomLimits:!0});u.Map.TouchZoom=u.Handler.extend({addHooks:function(){u.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){u.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(n){var t=this._map;if(n.touches&&2===n.touches.length&&!t._animatingZoom&&!this._zooming){var r=t.mouseEventToLayerPoint(n.touches[0]),f=t.mouseEventToLayerPoint(n.touches[1]),e=t._getCenterLayerPoint();this._startCenter=r.add(f)._divideBy(2);this._startDist=r.distanceTo(f);this._moved=!1;this._zooming=!0;this._centerOffset=e.subtract(this._startCenter);t._panAnim&&t._panAnim.stop();u.DomEvent.on(i,"touchmove",this._onTouchMove,this).on(i,"touchend",this._onTouchEnd,this);u.DomEvent.preventDefault(n)}},_onTouchMove:function(n){var t=this._map,i,r;n.touches&&2===n.touches.length&&this._zooming&&(i=t.mouseEventToLayerPoint(n.touches[0]),r=t.mouseEventToLayerPoint(n.touches[1]),this._scale=i.distanceTo(r)/this._startDist,this._delta=i._add(r)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(t.options.bounceAtZoomLimits||!(t.getZoom()===t.getMinZoom()&&this._scale<1||t.getZoom()===t.getMaxZoom()&&this._scale>1))&&(this._moved||(u.DomUtil.addClass(t._mapPane,"leaflet-touching"),t.fire("movestart").fire("zoomstart"),this._moved=!0),u.Util.cancelAnimFrame(this._animRequest),this._animRequest=u.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),u.DomEvent.preventDefault(n)))},_updateOnMove:function(){var n=this._map,t=this._getScaleOrigin(),i=n.layerPointToLatLng(t),r=n.getScaleZoom(this._scale);n._animateZoom(i,r,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){var n;if(!this._moved||!this._zooming)return this._zooming=!1,void 0;n=this._map;this._zooming=!1;u.DomUtil.removeClass(n._mapPane,"leaflet-touching");u.Util.cancelAnimFrame(this._animRequest);u.DomEvent.off(i,"touchmove",this._onTouchMove).off(i,"touchend",this._onTouchEnd);var r=this._getScaleOrigin(),o=n.layerPointToLatLng(r),f=n.getZoom(),t=n.getScaleZoom(this._scale)-f,s=t>0?Math.ceil(t):Math.floor(t),e=n._limitZoom(f+s),h=n.getZoomScale(e)/this._scale;n._animateZoom(o,e,r,h)},_getScaleOrigin:function(){var n=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(n)}});u.Map.addInitHook("addHandler","touchZoom",u.Map.TouchZoom);u.Map.mergeOptions({tap:!0,tapTolerance:15});u.Map.Tap=u.Handler.extend({addHooks:function(){u.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){u.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(n){if(n.touches){if(u.DomEvent.preventDefault(n),this._fireClick=!0,n.touches.length>1)return this._fireClick=!1,clearTimeout(this._holdTimeout),void 0;var t=n.touches[0],r=t.target;this._startPos=this._newPos=new u.Point(t.clientX,t.clientY);r.tagName&&"a"===r.tagName.toLowerCase()&&u.DomUtil.addClass(r,"leaflet-active");this._holdTimeout=setTimeout(u.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",t))},this),1e3);u.DomEvent.on(i,"touchmove",this._onMove,this).on(i,"touchend",this._onUp,this)}},_onUp:function(n){if(clearTimeout(this._holdTimeout),u.DomEvent.off(i,"touchmove",this._onMove,this).off(i,"touchend",this._onUp,this),this._fireClick&&n&&n.changedTouches){var r=n.changedTouches[0],t=r.target;t&&t.tagName&&"a"===t.tagName.toLowerCase()&&u.DomUtil.removeClass(t,"leaflet-active");this._isTapValid()&&this._simulateEvent("click",r)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(n){var t=n.touches[0];this._newPos=new u.Point(t.clientX,t.clientY)},_simulateEvent:function(t,r){var u=i.createEvent("MouseEvents");u._simulated=!0;r.target._simulatedClick=!0;u.initMouseEvent(t,!0,!0,n,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null);r.target.dispatchEvent(u)}});u.Browser.touch&&!u.Browser.pointer&&u.Map.addInitHook("addHandler","tap",u.Map.Tap);u.Map.mergeOptions({boxZoom:!0});u.Map.BoxZoom=u.Handler.extend({initialize:function(n){this._map=n;this._container=n._container;this._pane=n._panes.overlayPane;this._moved=!1},addHooks:function(){u.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){u.DomEvent.off(this._container,"mousedown",this._onMouseDown);this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(n){return this._moved=!1,!n.shiftKey||1!==n.which&&1!==n.button?!1:(u.DomUtil.disableTextSelection(),u.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(n),u.DomEvent.on(i,"mousemove",this._onMouseMove,this).on(i,"mouseup",this._onMouseUp,this).on(i,"keydown",this._onKeyDown,this),void 0)},_onMouseMove:function(n){this._moved||(this._box=u.DomUtil.create("div","leaflet-zoom-box",this._pane),u.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var t=this._startLayerPoint,i=this._box,r=this._map.mouseEventToLayerPoint(n),f=r.subtract(t),e=new u.Point(Math.min(r.x,t.x),Math.min(r.y,t.y));u.DomUtil.setPosition(i,e);this._moved=!0;i.style.width=Math.max(0,Math.abs(f.x)-4)+"px";i.style.height=Math.max(0,Math.abs(f.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor="");u.DomUtil.enableTextSelection();u.DomUtil.enableImageDrag();u.DomEvent.off(i,"mousemove",this._onMouseMove).off(i,"mouseup",this._onMouseUp).off(i,"keydown",this._onKeyDown)},_onMouseUp:function(n){var t,i,r;this._finish();t=this._map;i=t.mouseEventToLayerPoint(n);this._startLayerPoint.equals(i)||(r=new u.LatLngBounds(t.layerPointToLatLng(this._startLayerPoint),t.layerPointToLatLng(i)),t.fitBounds(r),t.fire("boxzoomend",{boxZoomBounds:r}))},_onKeyDown:function(n){27===n.keyCode&&this._finish()}});u.Map.addInitHook("addHandler","boxZoom",u.Map.BoxZoom);u.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1});u.Map.Keyboard=u.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(n){this._map=n;this._setPanOffset(n.options.keyboardPanOffset);this._setZoomOffset(n.options.keyboardZoomOffset)},addHooks:function(){var n=this._map._container;-1===n.tabIndex&&(n.tabIndex="0");u.DomEvent.on(n,"focus",this._onFocus,this).on(n,"blur",this._onBlur,this).on(n,"mousedown",this._onMouseDown,this);this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var n=this._map._container;u.DomEvent.off(n,"focus",this._onFocus,this).off(n,"blur",this._onBlur,this).off(n,"mousedown",this._onMouseDown,this);this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var t=i.body,r=i.documentElement,u=t.scrollTop||r.scrollTop,f=t.scrollLeft||r.scrollLeft;this._map._container.focus();n.scrollTo(f,u)}},_onFocus:function(){this._focused=!0;this._map.fire("focus")},_onBlur:function(){this._focused=!1;this._map.fire("blur")},_setPanOffset:function(n){for(var u=this._panKeys={},r=this.keyCodes,t=0,i=r.left.length;i>t;t++)u[r.left[t]]=[-1*n,0];for(t=0,i=r.right.length;i>t;t++)u[r.right[t]]=[n,0];for(t=0,i=r.down.length;i>t;t++)u[r.down[t]]=[0,n];for(t=0,i=r.up.length;i>t;t++)u[r.up[t]]=[0,-1*n]},_setZoomOffset:function(n){for(var u=this._zoomKeys={},r=this.keyCodes,t=0,i=r.zoomIn.length;i>t;t++)u[r.zoomIn[t]]=n;for(t=0,i=r.zoomOut.length;i>t;t++)u[r.zoomOut[t]]=-n},_addHooks:function(){u.DomEvent.on(i,"keydown",this._onKeyDown,this)},_removeHooks:function(){u.DomEvent.off(i,"keydown",this._onKeyDown,this)},_onKeyDown:function(n){var i=n.keyCode,t=this._map;if(i in this._panKeys){if(t._panAnim&&t._panAnim._inProgress)return;t.panBy(this._panKeys[i]);t.options.maxBounds&&t.panInsideBounds(t.options.maxBounds)}else{if(!(i in this._zoomKeys))return;t.setZoom(t.getZoom()+this._zoomKeys[i])}u.DomEvent.stop(n)}});u.Map.addInitHook("addHandler","keyboard",u.Map.Keyboard);u.Handler.MarkerDrag=u.Handler.extend({initialize:function(n){this._marker=n},addHooks:function(){var n=this._marker._icon;this._draggable||(this._draggable=new u.Draggable(n,n));this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this);this._draggable.enable();u.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this);this._draggable.disable();u.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var n=this._marker,t=n._shadow,i=u.DomUtil.getPosition(n._icon),r=n._map.layerPointToLatLng(i);t&&u.DomUtil.setPosition(t,i);n._latlng=r;n.fire("move",{latlng:r}).fire("drag")},_onDragEnd:function(n){this._marker.fire("moveend").fire("dragend",n)}});u.Control=u.Class.extend({options:{position:"topright"},initialize:function(n){u.setOptions(this,n)},getPosition:function(){return this.options.position},setPosition:function(n){var t=this._map;return t&&t.removeControl(this),this.options.position=n,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(n){this._map=n;var t=this._container=this.onAdd(n),r=this.getPosition(),i=n._controlCorners[r];return u.DomUtil.addClass(t,"leaflet-control"),-1!==r.indexOf("bottom")?i.insertBefore(t,i.firstChild):i.appendChild(t),this},removeFrom:function(n){var t=this.getPosition(),i=n._controlCorners[t];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(n),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}});u.control=function(n){return new u.Control(n)};u.Map.include({addControl:function(n){return n.addTo(this),this},removeControl:function(n){return n.removeFrom(this),this},_initControlPos:function(){function n(n,f){var e=t+n+" "+t+f;i[n+f]=u.DomUtil.create("div",e,r)}var i=this._controlCorners={},t="leaflet-",r=this._controlContainer=u.DomUtil.create("div",t+"control-container",this._container);n("top","left");n("top","right");n("bottom","left");n("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}});u.Control.Zoom=u.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(n){var t="leaflet-control-zoom",i=u.DomUtil.create("div",t+" leaflet-bar");return this._map=n,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,t+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,t+"-out",i,this._zoomOut,this),this._updateDisabled(),n.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(n){n.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(n){this._map.zoomIn(n.shiftKey?3:1)},_zoomOut:function(n){this._map.zoomOut(n.shiftKey?3:1)},_createButton:function(n,t,i,r,f,e){var o=u.DomUtil.create("a",i,r),s;return o.innerHTML=n,o.href="#",o.title=t,s=u.DomEvent.stopPropagation,u.DomEvent.on(o,"click",s).on(o,"mousedown",s).on(o,"dblclick",s).on(o,"click",u.DomEvent.preventDefault).on(o,"click",f,e).on(o,"click",this._refocusOnMap,e),o},_updateDisabled:function(){var n=this._map,t="leaflet-disabled";u.DomUtil.removeClass(this._zoomInButton,t);u.DomUtil.removeClass(this._zoomOutButton,t);n._zoom===n.getMinZoom()&&u.DomUtil.addClass(this._zoomOutButton,t);n._zoom===n.getMaxZoom()&&u.DomUtil.addClass(this._zoomInButton,t)}});u.Map.mergeOptions({zoomControl:!0});u.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new u.Control.Zoom,this.addControl(this.zoomControl))});u.control.zoom=function(n){return new u.Control.Zoom(n)};u.Control.Attribution=u.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet<\/a>'},initialize:function(n){u.setOptions(this,n);this._attributions={}},onAdd:function(n){this._container=u.DomUtil.create("div","leaflet-control-attribution");u.DomEvent.disableClickPropagation(this._container);for(var t in n._layers)n._layers[t].getAttribution&&this.addAttribution(n._layers[t].getAttribution());return n.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(n){n.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(n){return this.options.prefix=n,this._update(),this},addAttribution:function(n){if(n)return(this._attributions[n]||(this._attributions[n]=0),this._attributions[n]++,this._update(),this)},removeAttribution:function(n){if(n)return(this._attributions[n]&&(this._attributions[n]--,this._update()),this)},_update:function(){var n,i,t;if(this._map){n=[];for(i in this._attributions)this._attributions[i]&&n.push(i);t=[];this.options.prefix&&t.push(this.options.prefix);n.length&&t.push(n.join(", "));this._container.innerHTML=t.join(" | ")}},_onLayerAdd:function(n){n.layer.getAttribution&&this.addAttribution(n.layer.getAttribution())},_onLayerRemove:function(n){n.layer.getAttribution&&this.removeAttribution(n.layer.getAttribution())}});u.Map.mergeOptions({attributionControl:!0});u.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new u.Control.Attribution).addTo(this))});u.control.attribution=function(n){return new u.Control.Attribution(n)};u.Control.Scale=u.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(n){this._map=n;var t="leaflet-control-scale",i=u.DomUtil.create("div",t),r=this.options;return this._addScales(r,t,i),n.on(r.updateWhenIdle?"moveend":"move",this._update,this),n.whenReady(this._update,this),i},onRemove:function(n){n.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(n,t,i){n.metric&&(this._mScale=u.DomUtil.create("div",t+"-line",i));n.imperial&&(this._iScale=u.DomUtil.create("div",t+"-line",i))},_update:function(){var n=this._map.getBounds(),u=n.getCenter().lat,f=6378137*Math.PI*Math.cos(u*Math.PI/180),e=f*(n.getNorthEast().lng-n.getSouthWest().lng)/180,t=this._map.getSize(),i=this.options,r=0;t.x>0&&(r=e*(i.maxWidth/t.x));this._updateScales(i,r)},_updateScales:function(n,t){n.metric&&t&&this._updateMetric(t);n.imperial&&t&&this._updateImperial(t)},_updateMetric:function(n){var t=this._getRoundNum(n);this._mScale.style.width=this._getScaleWidth(t/n)+"px";this._mScale.innerHTML=1e3>t?t+" m":t/1e3+" km"},_updateImperial:function(n){var r,u,f,t=3.2808399*n,i=this._iScale;t>5280?(r=t/5280,u=this._getRoundNum(r),i.style.width=this._getScaleWidth(u/r)+"px",i.innerHTML=u+" mi"):(f=this._getRoundNum(t),i.style.width=this._getScaleWidth(f/t)+"px",i.innerHTML=f+" ft")},_getScaleWidth:function(n){return Math.round(this.options.maxWidth*n)-10},_getRoundNum:function(n){var i=Math.pow(10,(Math.floor(n)+"").length-1),t=n/i;return t=t>=10?10:t>=5?5:t>=3?3:t>=2?2:1,i*t}});u.control.scale=function(n){return new u.Control.Scale(n)};u.Control.Layers=u.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(n,t,i){u.setOptions(this,i);this._layers={};this._lastZIndex=0;this._handlingClick=!1;for(var r in n)this._addLayer(n[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(n){return this._initLayout(),this._update(),n.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(n){n.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(n,t){return this._addLayer(n,t),this._update(),this},addOverlay:function(n,t){return this._addLayer(n,t,!0),this._update(),this},removeLayer:function(n){var t=u.stamp(n);return delete this._layers[t],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",n=this._container=u.DomUtil.create("div",t),i,r;n.setAttribute("aria-haspopup",!0);u.Browser.touch?u.DomEvent.on(n,"click",u.DomEvent.stopPropagation):u.DomEvent.disableClickPropagation(n).disableScrollPropagation(n);i=this._form=u.DomUtil.create("form",t+"-list");this.options.collapsed?(u.Browser.android||u.DomEvent.on(n,"mouseover",this._expand,this).on(n,"mouseout",this._collapse,this),r=this._layersLink=u.DomUtil.create("a",t+"-toggle",n),r.href="#",r.title="Layers",u.Browser.touch?u.DomEvent.on(r,"click",u.DomEvent.stop).on(r,"click",this._expand,this):u.DomEvent.on(r,"focus",this._expand,this),u.DomEvent.on(i,"click",function(){setTimeout(u.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)):this._expand();this._baseLayersList=u.DomUtil.create("div",t+"-base",i);this._separator=u.DomUtil.create("div",t+"-separator",i);this._overlaysList=u.DomUtil.create("div",t+"-overlays",i);n.appendChild(i)},_addLayer:function(n,t,i){var r=u.stamp(n);this._layers[r]={layer:n,name:t,overlay:i};this.options.autoZIndex&&n.setZIndex&&(this._lastZIndex++,n.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="";this._overlaysList.innerHTML="";var r,n,t=!1,i=!1;for(r in this._layers)n=this._layers[r],this._addItem(n),i=i||n.overlay,t=t||!n.overlay;this._separator.style.display=i&&t?"":"none"}},_onLayerChange:function(n){var t=this._layers[u.stamp(n.layer)],i;t&&(this._handlingClick||this._update(),i=t.overlay?"layeradd"===n.type?"overlayadd":"overlayremove":"layeradd"===n.type?"baselayerchange":null,i&&this._map.fire(i,t))},_createRadioElement:function(n,t){var r='<input type="radio" class="leaflet-control-layers-selector" name="'+n+'"',u;return t&&(r+=' checked="checked"'),r+="/>",u=i.createElement("div"),u.innerHTML=r,u.firstChild},_addItem:function(n){var t,r=i.createElement("label"),e=this._map.hasLayer(n.layer),f,o;return n.overlay?(t=i.createElement("input"),t.type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=e):t=this._createRadioElement("leaflet-base-layers",e),t.layerId=u.stamp(n.layer),u.DomEvent.on(t,"click",this._onInputClick,this),f=i.createElement("span"),f.innerHTML=" "+n.name,r.appendChild(t),r.appendChild(f),o=n.overlay?this._overlaysList:this._baseLayersList,o.appendChild(r),r},_onInputClick:function(){var t,i,n,r=this._form.getElementsByTagName("input"),u=r.length;for(this._handlingClick=!0,t=0;u>t;t++)i=r[t],n=this._layers[i.layerId],i.checked&&!this._map.hasLayer(n.layer)?this._map.addLayer(n.layer):!i.checked&&this._map.hasLayer(n.layer)&&this._map.removeLayer(n.layer);this._handlingClick=!1;this._refocusOnMap()},_expand:function(){u.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}});u.control.layers=function(n,t,i){return new u.Control.Layers(n,t,i)};u.PosAnimation=u.Class.extend({includes:u.Mixin.Events,run:function(n,t,i,r){this.stop();this._el=n;this._inProgress=!0;this._newPos=t;this.fire("start");n.style[u.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(r||.5)+",1)";u.DomEvent.on(n,u.DomUtil.TRANSITION_END,this._onTransitionEnd,this);u.DomUtil.setPosition(n,t);u.Util.falseFn(n.offsetWidth);this._stepTimer=setInterval(u.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(u.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),u.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var n=this._getPos();return n?(this._el._leaflet_pos=n,this.fire("step"),void 0):(this._onTransitionEnd(),void 0)},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var i,r,t,e=this._el,f=n.getComputedStyle(e);if(u.Browser.any3d){if(t=f[u.DomUtil.TRANSFORM].match(this._transformRe),!t)return;i=parseFloat(t[1]);r=parseFloat(t[2])}else i=parseFloat(f.left),r=parseFloat(f.top);return new u.Point(i,r,!0)},_onTransitionEnd:function(){u.DomEvent.off(this._el,u.DomUtil.TRANSITION_END,this._onTransitionEnd,this);this._inProgress&&(this._inProgress=!1,this._el.style[u.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}});u.Map.include({setView:function(n,t,i){if(t=t===r?this._zoom:this._limitZoom(t),n=this._limitCenter(u.latLng(n),t,this.options.maxBounds),i=i||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==r&&(i.zoom=u.extend({animate:i.animate},i.zoom),i.pan=u.extend({animate:i.animate},i.pan));var f=this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(n,t,i.zoom):this._tryAnimatedPan(n,i.pan);if(f)return clearTimeout(this._sizeTimer),this}return this._resetView(n,t),this},panBy:function(n,t){if(n=u.point(n).round(),t=t||{},!n.x&&!n.y)return this;if(this._panAnim||(this._panAnim=new u.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),t.animate!==!1){u.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(n);this._panAnim.run(this._mapPane,i,t.duration||.25,t.easeLinearity)}else this._rawPanBy(n),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){u.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim");this.fire("moveend")},_tryAnimatedPan:function(n,t){var i=this._getCenterOffset(n)._floor();return(t&&t.animate)===!0||this.getSize().contains(i)?(this.panBy(i,t),!0):!1}});u.PosAnimation=u.DomUtil.TRANSITION?u.PosAnimation:u.PosAnimation.extend({run:function(n,t,i,r){this.stop();this._el=n;this._inProgress=!0;this._duration=i||.25;this._easeOutPower=1/Math.max(r||.5,.2);this._startPos=u.DomUtil.getPosition(n);this._offset=t.subtract(this._startPos);this._startTime=+new Date;this.fire("start");this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=u.Util.requestAnimFrame(this._animate,this);this._step()},_step:function(){var n=+new Date-this._startTime,t=1e3*this._duration;t>n?this._runFrame(this._easeOut(n/t)):(this._runFrame(1),this._complete())},_runFrame:function(n){var t=this._startPos.add(this._offset.multiplyBy(n));u.DomUtil.setPosition(this._el,t);this.fire("step")},_complete:function(){u.Util.cancelAnimFrame(this._animId);this._inProgress=!1;this.fire("end")},_easeOut:function(n){return 1-Math.pow(1-n,this._easeOutPower)}});u.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4});u.DomUtil.TRANSITION&&u.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&u.DomUtil.TRANSITION&&u.Browser.any3d&&!u.Browser.android23&&!u.Browser.mobileOpera;this._zoomAnimated&&u.DomEvent.on(this._mapPane,u.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)});u.Map.include(u.DomUtil.TRANSITION?{_catchTransitionEnd:function(n){this._animatingZoom&&n.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(n,t,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),u=this._getCenterOffset(n)._divideBy(1-1/r),f=this._getCenterLayerPoint()._add(u);return i.animate===!0||this.getSize().contains(u)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(n,t,f,r,null,!0),!0):!1},_animateZoom:function(n,t,i,r,f,e,o){o||(this._animatingZoom=!0);u.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim");this._animateToCenter=n;this._animateToZoom=t;u.Draggable&&(u.Draggable._disabled=!0);u.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:n,zoom:t,origin:i,scale:r,delta:f,backwards:e})},this)},_onZoomTransitionEnd:function(){this._animatingZoom=!1;u.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim");this._resetView(this._animateToCenter,this._animateToZoom,!0,!0);u.Draggable&&(u.Draggable._disabled=!1)}}:{});u.TileLayer.include({_animateZoom:function(n){this._animating||(this._animating=!0,this._prepareBgBuffer());var t=this._bgBuffer,i=u.DomUtil.TRANSFORM,r=n.delta?u.DomUtil.getTranslateString(n.delta):t.style[i],f=u.DomUtil.getScaleString(n.scale,n.origin);t.style[i]=n.backwards?f+" "+r:r+" "+f},_endZoomAnim:function(){var n=this._tileContainer,t=this._bgBuffer;n.style.visibility="";n.parentNode.appendChild(n);u.Util.falseFn(t.offsetWidth);this._animating=!1},_clearBgBuffer:function(){var n=this._map;!n||n._animatingZoom||n.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[u.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,n=this._bgBuffer,i=this._getLoadedTilesPercentage(n),r=this._getLoadedTilesPercentage(t);return n&&i>.5&&.5>r?(t.style.visibility="hidden",this._stopLoadingImages(t),void 0):(n.style.visibility="hidden",n.style[u.DomUtil.TRANSFORM]="",this._tileContainer=n,n=this._bgBuffer=t,this._stopLoadingImages(n),clearTimeout(this._clearBgBufferTimer),void 0)},_getLoadedTilesPercentage:function(n){for(var r=n.getElementsByTagName("img"),u=0,t=0,i=r.length;i>t;t++)r[t].complete&&u++;return u/i},_stopLoadingImages:function(n){for(var t,f=Array.prototype.slice.call(n.getElementsByTagName("img")),i=0,r=f.length;r>i;i++)t=f[i],t.complete||(t.onload=u.Util.falseFn,t.onerror=u.Util.falseFn,t.src=u.Util.emptyImageUrl,t.parentNode.removeChild(t))}});u.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(n){if(n=this._locateOptions=u.extend(this._defaultLocateOptions,n),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=u.bind(this._handleGeolocationResponse,this),i=u.bind(this._handleGeolocationError,this);return n.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,i,n):navigator.geolocation.getCurrentPosition(t,i,n),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(n){var t=n.code,i=n.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld();this.fire("locationerror",{code:t,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(n){var t=n.coords.latitude,r=n.coords.longitude,o=new u.LatLng(t,r),f=180*n.coords.accuracy/40075017,s=f/Math.cos(u.LatLng.DEG_TO_RAD*t),h=u.latLngBounds([t-f,r-s],[t+f,r+s]),c=this._locateOptions,l,e,i;c.setView&&(l=Math.min(this.getBoundsZoom(h),c.maxZoom),this.setView(o,l));e={latlng:o,bounds:h,timestamp:n.timestamp};for(i in n.coords)"number"==typeof n.coords[i]&&(e[i]=n.coords[i]);this.fire("locationfound",e)}})}(window,document)},{}],3:[function(n,t,i){!function(n,t){if("object"==typeof i&&i)t(i);else{var r={};t(r);"function"==typeof define&&define.amd?define(r):n.Mustache=r}}(this,function(n){function a(n,t){return tt.call(n,t)}function v(n){return!a(d,n)}function u(n){return"function"==typeof n}function o(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function y(n){return String(n).replace(/[&<>"'\/]/g,function(n){return rt[n]})}function f(n){this.string=n;this.tail=n;this.pos=0}function t(n,t){this.view=null==n?{}:n;this.parent=t;this._cache={".":this.view}}function i(){this.clearCache()}function e(t,i,r,f){function w(n){return i.render(n,r)}for(var a,y,p,h,c,o,s="",v=0,b=t.length;b>v;++v)switch(h=t[v],c=h[1],h[0]){case"#":if(o=r.lookup(c),"object"==typeof o||"string"==typeof o)if(l(o))for(a=0,y=o.length;y>a;++a)s+=e(h[4],i,r.push(o[a]),f);else o&&(s+=e(h[4],i,r.push(o),f));else u(o)?(p=null==f?null:f.slice(h[3],h[5]),o=o.call(r.view,p,w),null!=o&&(s+=o)):o&&(s+=e(h[4],i,r,f));break;case"^":o=r.lookup(c);(!o||l(o)&&0===o.length)&&(s+=e(h[4],i,r,f));break;case">":o=i.getPartial(c);u(o)&&(s+=o(r));break;case"&":o=r.lookup(c);null!=o&&(s+=o);break;case"name":o=r.lookup(c);null!=o&&(s+=n.escape(o));break;case"text":s+=c}return s}function p(n){for(var e,t,u=[],r=u,i=[],f=0,o=n.length;o>f;++f)switch(t=n[f],t[0]){case"#":case"^":i.push(t);r.push(t);r=t[4]=[];break;case"/":e=i.pop();e[5]=t[2];r=i.length>0?i[i.length-1][4]:u;break;default:r.push(t)}return u}function w(n){for(var t,i,u=[],r=0,f=n.length;f>r;++r)t=n[r],t&&("text"===t[0]&&i&&"text"===i[0]?(i[1]+=t[1],i[3]=t[3]):(i=t,u.push(t)));return u}function s(n){return[new RegExp(o(n[0])+"\\s*"),new RegExp("\\s*"+o(n[1]))]}function b(t,i){function st(){if(et&&!it)for(;tt.length;)delete b[tt.pop()];else tt=[];et=!1;it=!1}var rt,ot;if(t=t||"",i=i||n.tags,"string"==typeof i&&(i=i.split(h)),2!==i.length)throw new Error("Invalid tags: "+i.join(", "));for(var l,u,e,d,ut,y,a=s(i),r=new f(t),ft=[],b=[],tt=[],et=!1,it=!1;!r.eos();){if(l=r.pos,e=r.scanUntil(a[0]))for(rt=0,ot=e.length;ot>rt;++rt)d=e.charAt(rt),v(d)?tt.push(b.length):it=!0,b.push(["text",d,l,l+1]),l+=1,"\n"==d&&st();if(!r.scan(a[0]))break;if(et=!0,u=r.scan(nt)||"name",r.scan(k),"="===u?(e=r.scanUntil(c),r.scan(c),r.scanUntil(a[1])):"{"===u?(e=r.scanUntil(new RegExp("\\s*"+o("}"+i[1]))),r.scan(g),r.scanUntil(a[1]),u="&"):e=r.scanUntil(a[1]),!r.scan(a[1]))throw new Error("Unclosed tag at "+r.pos);if(ut=[u,e,l,r.pos],b.push(ut),"#"===u||"^"===u)ft.push(ut);else if("/"===u){if(y=ft.pop(),!y)throw new Error('Unopened section "'+e+'" at '+l);if(y[1]!==e)throw new Error('Unclosed section "'+y[1]+'" at '+l);}else if("name"===u||"{"===u||"&"===u)it=!0;else if("="===u){if(i=e.split(h),2!==i.length)throw new Error("Invalid tags at "+l+": "+i.join(", "));a=s(i)}}if(y=ft.pop())throw new Error('Unclosed section "'+y[1]+'" at '+r.pos);return p(w(b))}var k=/\s*/,h=/\s+/,d=/\S/,c=/\s*=/,g=/\s*\}/,nt=/#|\^|\/|>|\{|&|=|!/,tt=RegExp.prototype.test,it=Object.prototype.toString,l=Array.isArray||function(n){return"[object Array]"===it.call(n)},rt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},r;f.prototype.eos=function(){return""===this.tail};f.prototype.scan=function(n){var i=this.tail.match(n),t;return i&&0===i.index?(t=i[0],this.tail=this.tail.substring(t.length),this.pos+=t.length,t):""};f.prototype.scanUntil=function(n){var t,i=this.tail.search(n);switch(i){case-1:t=this.tail;this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,i);this.tail=this.tail.substring(i)}return this.pos+=t.length,t};t.make=function(n){return n instanceof t?n:new t(n)};t.prototype.push=function(n){return new t(n,this)};t.prototype.lookup=function(n){var t,i,r,f;if(n in this._cache)t=this._cache[n];else{for(i=this;i;){if(n.indexOf(".")>0)for(t=i.view,r=n.split("."),f=0;null!=t&&f<r.length;)t=t[r[f++]];else t=i.view[n];if(null!=t)break;i=i.parent}this._cache[n]=t}return u(t)&&(t=t.call(this.view)),t};i.prototype.clearCache=function(){this._cache={};this._partialCache={}};i.prototype.compile=function(t,i){var r=this._cache[t],u;return r||(u=n.parse(t,i),r=this._cache[t]=this.compileTokens(u,t)),r};i.prototype.compilePartial=function(n,t,i){var r=this.compile(t,i);return this._partialCache[n]=r,r};i.prototype.getPartial=function(n){return n in this._partialCache||!this._loadPartial||this.compilePartial(n,this._loadPartial(n)),this._partialCache[n]};i.prototype.compileTokens=function(n,i){var r=this;return function(f,o){if(o)if(u(o))r._loadPartial=o;else for(var s in o)r.compilePartial(s,o[s]);return e(n,r,t.make(f),i)}};i.prototype.render=function(n,t,i){return this.compile(n)(t,i)};n.name="mustache.js";n.version="0.7.3";n.tags=["{{","}}"];n.Scanner=f;n.Context=t;n.Writer=i;n.parse=b;n.escape=y;r=new i;n.clearCache=function(){return r.clearCache()};n.compile=function(n,t){return r.compile(n,t)};n.compilePartial=function(n,t,i){return r.compilePartial(n,t,i)};n.compileTokens=function(n,t){return r.compileTokens(n,t)};n.render=function(n,t,i){return r.render(n,t,i)};n.to_html=function(t,i,r,f){var e=n.render(t,i,r);return u(f)?(f(e),void 0):e}})},{}],4:[function(n,t){function i(n){"use strict";return/^https?/.test(n.getScheme())?n.toString():/^mailto?/.test(n.getScheme())?n.toString():"data"==n.getScheme()&&/^image/.test(n.getPath())?n.toString():void 0}function r(n){return n}var u=n("./sanitizer-bundle.js");t.exports=function(n){return n?u(n,i,r):""}},{"./sanitizer-bundle.js":5}],5:[function(n,t){var f=function(){function u(i){var r=(""+i).match(p);return r?new n(t(r[1]),t(r[2]),t(r[3]),t(r[4]),t(r[5]),t(r[6]),t(r[7])):null}function l(t,r,u,f,h,l,a){var v=new n(i(t,e),i(r,e),o(u),f>0?f.toString():null,i(h,c),null,o(a));return l&&("string"==typeof l?v.setRawQuery(l.replace(/[^?&=0-9A-Za-z_\-~.%]/g,s)):v.setAllParameters(l)),v}function o(n){return"string"==typeof n?encodeURIComponent(n):null}function i(n,t){return"string"==typeof n?encodeURI(n).replace(t,s):null}function s(n){var t=n.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(t>>4&15)+"0123456789ABCDEF".charAt(15&t)}function a(n){return n.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/")}function r(n){if(null===n)return null;for(var i,t=a(n),r=y;(i=t.replace(r,"$1"))!=t;t=i);return t}function h(n,t){var e=n.clone(),i=t.hasScheme(),o,u,s,h;return i?e.setRawScheme(t.getRawScheme()):i=t.hasCredentials(),i?e.setRawCredentials(t.getRawCredentials()):i=t.hasDomain(),i?e.setRawDomain(t.getRawDomain()):i=t.hasPort(),o=t.getRawPath(),u=r(o),i?(e.setPort(t.getPort()),u=u&&u.replace(f,"")):(i=!!o)?47!==u.charCodeAt(0)&&(s=r(e.getRawPath()||"").replace(f,""),h=s.lastIndexOf("/")+1,u=r((h?s.substring(0,h):"")+r(o)).replace(f,"")):(u=u&&u.replace(f,""),u!==o&&e.setRawPath(u)),i?e.setRawPath(u):i=t.hasQuery(),i?e.setRawQuery(t.getRawQuery()):i=t.hasFragment(),i&&e.setRawFragment(t.getRawFragment()),e}function n(n,t,i,r,u,f,e){this.scheme_=n;this.credentials_=t;this.domain_=i;this.port_=r;this.path_=u;this.query_=f;this.fragment_=e;this.paramCache_=null}function t(n){return"string"==typeof n&&n.length>0?n:null}var v=new RegExp("(/|^)(?:[^./][^/]*|\\.{2,}(?:[^./][^/]*)|\\.{3,}[^/]*)/\\.\\.(?:/|$)"),y=new RegExp(v),f=/^(?:\.\.\/)*(?:\.\.$)?/;n.prototype.toString=function(){var n=[];return null!==this.scheme_&&n.push(this.scheme_,":"),null!==this.domain_&&(n.push("//"),null!==this.credentials_&&n.push(this.credentials_,"@"),n.push(this.domain_),null!==this.port_&&n.push(":",this.port_.toString())),null!==this.path_&&n.push(this.path_),null!==this.query_&&n.push("?",this.query_),null!==this.fragment_&&n.push("#",this.fragment_),n.join("")};n.prototype.clone=function(){return new n(this.scheme_,this.credentials_,this.domain_,this.port_,this.path_,this.query_,this.fragment_)};n.prototype.getScheme=function(){return this.scheme_&&decodeURIComponent(this.scheme_).toLowerCase()};n.prototype.getRawScheme=function(){return this.scheme_};n.prototype.setScheme=function(n){return this.scheme_=i(n,e),this};n.prototype.setRawScheme=function(n){return this.scheme_=n?n:null,this};n.prototype.hasScheme=function(){return null!==this.scheme_};n.prototype.getCredentials=function(){return this.credentials_&&decodeURIComponent(this.credentials_)};n.prototype.getRawCredentials=function(){return this.credentials_};n.prototype.setCredentials=function(n){return this.credentials_=i(n,e),this};n.prototype.setRawCredentials=function(n){return this.credentials_=n?n:null,this};n.prototype.hasCredentials=function(){return null!==this.credentials_};n.prototype.getDomain=function(){return this.domain_&&decodeURIComponent(this.domain_)};n.prototype.getRawDomain=function(){return this.domain_};n.prototype.setDomain=function(n){return this.setRawDomain(n&&encodeURIComponent(n))};n.prototype.setRawDomain=function(n){return this.domain_=n?n:null,this.setRawPath(this.path_)};n.prototype.hasDomain=function(){return null!==this.domain_};n.prototype.getPort=function(){return this.port_&&decodeURIComponent(this.port_)};n.prototype.setPort=function(n){if(n){if(n=Number(n),n!==(65535&n))throw new Error("Bad port number "+n);this.port_=""+n}else this.port_=null;return this};n.prototype.hasPort=function(){return null!==this.port_};n.prototype.getPath=function(){return this.path_&&decodeURIComponent(this.path_)};n.prototype.getRawPath=function(){return this.path_};n.prototype.setPath=function(n){return this.setRawPath(i(n,c))};n.prototype.setRawPath=function(n){return n?(n=String(n),this.path_=!this.domain_||/^\//.test(n)?n:"/"+n):this.path_=null,this};n.prototype.hasPath=function(){return null!==this.path_};n.prototype.getQuery=function(){return this.query_&&decodeURIComponent(this.query_).replace(/\+/g," ")};n.prototype.getRawQuery=function(){return this.query_};n.prototype.setQuery=function(n){return this.paramCache_=null,this.query_=o(n),this};n.prototype.setRawQuery=function(n){return this.paramCache_=null,this.query_=n?n:null,this};n.prototype.hasQuery=function(){return null!==this.query_};n.prototype.setAllParameters=function(n){var r,u,i,t;if("object"==typeof n&&!(n instanceof Array)&&(n instanceof Object||"[object Array]"!==Object.prototype.toString.call(n))){r=[];u=-1;for(i in n)t=n[i],"string"==typeof t&&(r[++u]=i,r[++u]=t);n=r}this.paramCache_=null;for(var f=[],o="",e=0;e<n.length;)i=n[e++],t=n[e++],f.push(o,encodeURIComponent(i.toString())),o="&",t&&f.push("=",encodeURIComponent(t.toString()));return this.query_=f.join(""),this};n.prototype.checkParameterCache_=function(){var n,r;if(!this.paramCache_)if(n=this.query_,n){for(var u=n.split(/[&\?]/),t=[],f=-1,i=0;i<u.length;++i)r=u[i].match(/^([^=]*)(?:=(.*))?$/),t[++f]=decodeURIComponent(r[1]).replace(/\+/g," "),t[++f]=decodeURIComponent(r[2]||"").replace(/\+/g," ");this.paramCache_=t}else this.paramCache_=[]};n.prototype.setParameterValues=function(n,t){"string"==typeof t&&(t=[t]);this.checkParameterCache_();for(var r=0,u=this.paramCache_,f=[],i=0;i<u.length;i+=2)n===u[i]?r<t.length&&f.push(n,t[r++]):f.push(u[i],u[i+1]);for(;r<t.length;)f.push(n,t[r++]);return this.setAllParameters(f),this};n.prototype.removeParameter=function(n){return this.setParameterValues(n,[])};n.prototype.getAllParameters=function(){return this.checkParameterCache_(),this.paramCache_.slice(0,this.paramCache_.length)};n.prototype.getParameterValues=function(n){this.checkParameterCache_();for(var i=[],t=0;t<this.paramCache_.length;t+=2)n===this.paramCache_[t]&&i.push(this.paramCache_[t+1]);return i};n.prototype.getParameterMap=function(){var n,t,i,r;for(this.checkParameterCache_(),n={},t=0;t<this.paramCache_.length;t+=2)i=this.paramCache_[t++],r=this.paramCache_[t++],i in n?n[i].push(r):n[i]=[r];return n};n.prototype.getParameterValue=function(n){this.checkParameterCache_();for(var t=0;t<this.paramCache_.length;t+=2)if(n===this.paramCache_[t])return this.paramCache_[t+1];return null};n.prototype.getFragment=function(){return this.fragment_&&decodeURIComponent(this.fragment_)};n.prototype.getRawFragment=function(){return this.fragment_};n.prototype.setFragment=function(n){return this.fragment_=n?encodeURIComponent(n):null,this};n.prototype.setRawFragment=function(n){return this.fragment_=n?n:null,this};n.prototype.hasFragment=function(){return null!==this.fragment_};var p=new RegExp("^(?:([^:/?#]+):)?(?://(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),e=/[#\/\?@]/g,c=/[\#\?]/g;return n.parse=u,n.create=l,n.resolve=h,n.collapse_dots=r,n.utils={mimeTypeOf:function(n){var t=u(n);return/\.html$/.test(t.getPath())?"text/html":"application/javascript"},resolve:function(n,t){return n?h(u(n),u(t)).toString():""+t}},n}(),i={},r,u;if(i.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13},i.atype=i.atype,i.ATTRIBS={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::onreset":2,"*::onscroll":2,"*::onselect":2,"*::onsubmit":2,"*::onunload":2,"*::spellcheck":0,"*::style":3,"*::title":0,"*::translate":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"audio::controls":0,"audio::loop":0,"audio::mediagroup":5,"audio::muted":0,"audio::preload":0,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"command::checked":0,"command::command":5,"command::disabled":0,"command::icon":1,"command::label":0,"command::radiogroup":0,"command::type":0,"data::value":0,"del::cite":1,"del::datetime":0,"details::open":0,"dir::compact":0,"div::align":0,"dl::compact":0,"fieldset::disabled":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::novalidate":0,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::inputmode":0,"input::ismap":0,"input::list":5,"input::max":0,"input::maxlength":0,"input::min":0,"input::multiple":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::placeholder":0,"input::readonly":0,"input::required":0,"input::size":0,"input::src":1,"input::step":0,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"menu::label":0,"menu::type":0,"meter::high":0,"meter::low":0,"meter::max":0,"meter::min":0,"meter::value":0,"ol::compact":0,"ol::reversed":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"output::for":6,"output::name":8,"p::align":0,"pre::width":0,"progress::max":0,"progress::min":0,"progress::value":0,"q::cite":1,"select::autocomplete":0,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::required":0,"select::size":0,"select::tabindex":0,"source::type":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::autocomplete":0,"textarea::cols":0,"textarea::disabled":0,"textarea::inputmode":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::placeholder":0,"textarea::readonly":0,"textarea::required":0,"textarea::rows":0,"textarea::tabindex":0,"textarea::wrap":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::width":0},i.ATTRIBS=i.ATTRIBS,i.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256},i.eflags=i.eflags,i.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:4,img:2,input:2,ins:0,isindex:274,kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,"var":0,video:0,wbr:2},i.ELEMENTS=i.ELEMENTS,i.ELEMENT_DOM_INTERFACES={a:"HTMLAnchorElement",abbr:"HTMLElement",acronym:"HTMLElement",address:"HTMLElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLBaseFontElement",bdi:"HTMLElement",bdo:"HTMLElement",big:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",center:"HTMLElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",command:"HTMLCommandElement",data:"HTMLElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"},i.ELEMENT_DOM_INTERFACES=i.ELEMENT_DOM_INTERFACES,i.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},i.ueffects=i.ueffects,i.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1},i.URIEFFECTS=i.URIEFFECTS,i.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},i.ltypes=i.ltypes,i.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1},i.LOADERTYPES=i.LOADERTYPES,"i"!=="I".toLowerCase())throw"I/i problem";r=function(n){function ot(n){var t,i;return o.hasOwnProperty(n)?o[n]:(t=n.match(kt),t)?String.fromCharCode(parseInt(t[1],10)):(t=n.match(dt))?String.fromCharCode(parseInt(t[1],16)):s&&gt.test(n)?(s.innerHTML="&"+n+";",i=s.textContent,o[n]=i,i):"&"+n+";"}function st(n,t){return ot(t)}function ht(n){return n.replace(ni,"")}function c(n){return n.replace(ti,st)}function l(n){return(""+n).replace(ri,"&amp;").replace(ut,"&lt;").replace(ft,"&gt;").replace(fi,"&#34;")}function a(n){return n.replace(ui,"&amp;$1").replace(ut,"&lt;").replace(ft,"&gt;")}function v(n){var t={cdata:n.cdata||n.cdata,comment:n.comment||n.comment,endDoc:n.endDoc||n.endDoc,endTag:n.endTag||n.endTag,pcdata:n.pcdata||n.pcdata,rcdata:n.rcdata||n.rcdata,startDoc:n.startDoc||n.startDoc,startTag:n.startTag||n.startTag};return function(n,i){return ct(n,t,i)}}function ct(n,t,i){var r=lt(n);y(t,r,0,{noMoreGT:!1,noMoreEndComments:!1},i)}function i(n,t,i,r,u){return function(){y(n,t,i,r,u)}}function y(t,u,f,e,o){var a,h,v,s,c,y,l,w,k,b;try{for(t.startDoc&&0==f&&t.startDoc(o),s=f,c=u.length;c>s;){y=u[s++];l=u[s];switch(y){case"&":ii.test(l)?(t.pcdata&&t.pcdata("&"+l,o,r,i(t,u,s,e,o)),s++):t.pcdata&&t.pcdata("&amp;",o,r,i(t,u,s,e,o));break;case"<\/":(a=/^([-\w:]+)[^\'\"]*/.exec(l))?a[0].length===l.length&&">"===u[s+1]?(s+=2,v=a[1].toLowerCase(),t.endTag&&t.endTag(v,o,r,i(t,u,s,e,o))):s=at(u,s,t,o,r,e):t.pcdata&&t.pcdata("&lt;/",o,r,i(t,u,s,e,o));break;case"<":(a=/^([-\w:]+)\s*\/?/.exec(l))?a[0].length===l.length&&">"===u[s+1]?(s+=2,v=a[1].toLowerCase(),t.startTag&&t.startTag(v,[],o,r,i(t,u,s,e,o)),w=n.ELEMENTS[v],w&et&&(k={name:v,next:s,eflags:w},s=p(u,k,t,o,r,e))):s=vt(u,s,t,o,r,e):t.pcdata&&t.pcdata("&lt;",o,r,i(t,u,s,e,o));break;case"<!--":if(!e.noMoreEndComments){for(h=s+1;c>h&&(">"!==u[h]||!/--$/.test(u[h-1]));h++);c>h?(t.comment&&(b=u.slice(s,h).join(""),t.comment(b.substr(0,b.length-2),o,r,i(t,u,h+1,e,o))),s=h+1):e.noMoreEndComments=!0}e.noMoreEndComments&&t.pcdata&&t.pcdata("&lt;!--",o,r,i(t,u,s,e,o));break;case"<!":if(/^\w/.test(l)){if(!e.noMoreGT){for(h=s+1;c>h&&">"!==u[h];h++);c>h?s=h+1:e.noMoreGT=!0}e.noMoreGT&&t.pcdata&&t.pcdata("&lt;!",o,r,i(t,u,s,e,o))}else t.pcdata&&t.pcdata("&lt;!",o,r,i(t,u,s,e,o));break;case"<?":if(!e.noMoreGT){for(h=s+1;c>h&&">"!==u[h];h++);c>h?s=h+1:e.noMoreGT=!0}e.noMoreGT&&t.pcdata&&t.pcdata("&lt;?",o,r,i(t,u,s,e,o));break;case">":t.pcdata&&t.pcdata("&gt;",o,r,i(t,u,s,e,o));break;case"":break;default:t.pcdata&&t.pcdata(y,o,r,i(t,u,s,e,o))}}t.endDoc&&t.endDoc(o)}catch(d){if(d!==r)throw d;}}function lt(n){var u=/(<\/|<\!--|<[!?]|[&<>])/g,t,i,r;if(n+="",oi)return n.split(u);for(i=[],r=0;null!==(t=u.exec(n));)i.push(n.substring(r,t.index)),i.push(t[0]),r=t.index+t[0].length;return i.push(n.substring(r)),i}function at(n,t,r,u,f,e){var o=w(n,t);return o?(r.endTag&&r.endTag(o.name,u,f,i(r,n,t,e,u)),o.next):n.length}function vt(n,t,r,u,f,e){var o=w(n,t);return o?(r.startTag&&r.startTag(o.name,o.attrs,u,f,i(r,n,o.next,e,u)),o.eflags&et?p(n,o,r,u,f,e):o.next):n.length}function p(t,r,u,f,e,o){var l=t.length,c;h.hasOwnProperty(r.name)||(h[r.name]=new RegExp("^"+r.name+"(?:[\\s\\/]|$)","i"));for(var v=h[r.name],y=r.next,s=r.next+1;l>s&&("<\/"!==t[s-1]||!v.test(t[s]));s++);if(l>s&&(s-=1),c=t.slice(y,s).join(""),r.eflags&n.eflags.CDATA)u.cdata&&u.cdata(c,f,e,i(u,t,s,o,f));else{if(!(r.eflags&n.eflags.RCDATA))throw new Error("bug");u.rcdata&&u.rcdata(a(c),f,e,i(u,t,s,o,f))}return s}function w(t,i){var r=/^([-\w:]+)/.exec(t[i]),e={},s,l,a;e.name=r[1].toLowerCase();e.eflags=n.ELEMENTS[e.name];for(var f=t[i].substr(r[0].length),u=i+1,o=t.length;o>u&&">"!==t[u];u++)f+=t[u];if(u>=o)return void 0;for(s=[];""!==f;)if(r=ei.exec(f)){if(r[4]&&!r[5]||r[6]&&!r[7]){for(var v=r[4]||r[6],h=!1,c=[f,t[u++]];o>u;u++){if(h){if(">"===t[u])break}else 0<=t[u].indexOf(v)&&(h=!0);c.push(t[u])}if(u>=o)break;f=c.join("");continue}l=r[1].toLowerCase();a=r[2]?yt(r[3]):"";s.push(l,a);f=f.substr(r[0].length)}else f=f.replace(/^[\s\S][^a-z\s]*/,"");return e.attrs=s,e.next=u+1,e}function yt(n){var t=n.charCodeAt(0);return(34===t||39===t)&&(n=n.substr(1,n.length-2)),c(ht(n))}function b(t){var i,r,u=function(n,t){r||t.push(n)};return v({startDoc:function(){i=[];r=!1},startTag:function(u,f,e){var s,h,y,o,c,a,p,w,v;if(!r&&n.ELEMENTS.hasOwnProperty(u)&&(s=n.ELEMENTS[u],!(s&n.eflags.FOLDABLE))){if(h=t(u,f),!h)return r=!(s&n.eflags.EMPTY),void 0;if("object"!=typeof h)throw new Error("tagPolicy did not return object (old API?)");if(!("attribs"in h))throw new Error("tagPolicy gave no attribs");for(f=h.attribs,("tagName"in h?(o=h.tagName,y=n.ELEMENTS[o]):(o=u,y=s),s&n.eflags.OPTIONAL_ENDTAG)&&(c=i[i.length-1],c&&c.orig===u&&(c.rep!==o||u!==o)&&e.push("<\/",c.rep,">")),s&n.eflags.EMPTY||i.push({orig:u,rep:o}),e.push("<",o),a=0,p=f.length;p>a;a+=2)w=f[a],v=f[a+1],null!==v&&void 0!==v&&e.push(" ",w,'="',l(v),'"');e.push(">");s&n.eflags.EMPTY&&!(y&n.eflags.EMPTY)&&e.push("<\/",o,">")}},endTag:function(t,u){var e,f,o,s,h;if(r)return r=!1,void 0;if(n.ELEMENTS.hasOwnProperty(t)&&(e=n.ELEMENTS[t],!(e&(n.eflags.EMPTY|n.eflags.FOLDABLE)))){if(e&n.eflags.OPTIONAL_ENDTAG)for(f=i.length;--f>=0;){if(o=i[f].orig,o===t)break;if(!(n.ELEMENTS[o]&n.eflags.OPTIONAL_ENDTAG))return}else for(f=i.length;--f>=0&&i[f].orig!==t;);if(0>f)return;for(s=i.length;--s>f;)h=i[s].rep,n.ELEMENTS[h]&n.eflags.OPTIONAL_ENDTAG||u.push("<\/",h,">");f<i.length&&(t=i[f].rep);i.length=f;u.push("<\/",t,">")}},pcdata:u,rcdata:u,cdata:u,endDoc:function(n){for(;i.length;i.length--)n.push("<\/",i[i.length-1].rep,">")}})}function k(n,t,i,r,u){var e,o;if(!u)return null;try{if(e=f.parse(""+n),e&&(!e.hasScheme()||si.test(e.getScheme())))return o=u(e,t,i,r),o?o.toString():null}catch(s){return null}return null}function u(n,t,i,r,u){if(i||n(t+" removed",{change:"removed",tagName:t}),r!==u){var f="changed";r&&!u?f="removed":!r&&u&&(f="added");n(t+"."+i+" "+f,{change:f,tagName:t,attribName:i,oldValue:r,newValue:u})}}function d(n,t,i){var r;return r=t+"::"+i,n.hasOwnProperty(r)?n[r]:(r="*::"+i,n.hasOwnProperty(r)?n[r]:void 0)}function pt(t,i){return d(n.LOADERTYPES,t,i)}function wt(t,i){return d(n.URIEFFECTS,t,i)}function g(t,i,r,f,o){for(var v,l=0;l<i.length;l+=2){var a,h=i[l],s=i[l+1],c=s,y=null;if(a=t+"::"+h,(n.ATTRIBS.hasOwnProperty(a)||(a="*::"+h,n.ATTRIBS.hasOwnProperty(a)))&&(y=n.ATTRIBS[a]),null!==y)switch(y){case n.atype.NONE:break;case n.atype.SCRIPT:s=null;o&&u(o,t,h,c,s);break;case n.atype.STYLE:if("undefined"==typeof e){s=null;o&&u(o,t,h,c,s);break}v=[];e(s,{declaration:function(t,i){var u=t.toLowerCase(),f=rt[u];f&&(it(u,f,i,r?function(t){return k(t,n.ueffects.SAME_DOCUMENT,n.ltypes.SANDBOXED,{TYPE:"CSS",CSS_PROP:u},r)}:null),v.push(t+": "+i.join(" ")))}});s=v.length>0?v.join(" ; "):null;o&&u(o,t,h,c,s);break;case n.atype.ID:case n.atype.IDREF:case n.atype.IDREFS:case n.atype.GLOBAL_NAME:case n.atype.LOCAL_NAME:case n.atype.CLASSES:s=f?f(s):s;o&&u(o,t,h,c,s);break;case n.atype.URI:s=k(s,wt(t,h),pt(t,h),{TYPE:"MARKUP",XML_ATTR:h,XML_TAG:t},r);o&&u(o,t,h,c,s);break;case n.atype.URI_FRAGMENT:s&&"#"===s.charAt(0)?(s=s.substring(1),s=f?f(s):s,null!==s&&void 0!==s&&(s="#"+s)):s=null;o&&u(o,t,h,c,s);break;default:s=null;o&&u(o,t,h,c,s)}else s=null,o&&u(o,t,h,c,s);i[l+1]=s}return i}function nt(t,i,r){return function(f,e){return n.ELEMENTS[f]&n.eflags.UNSAFE?(r&&u(r,f,void 0,void 0,void 0),void 0):{attribs:g(f,e,t,i,r)}}}function tt(n,t){var i=[];return b(t)(n,i),i.join("")}function bt(n,t,i,r){var u=nt(t,i,r);return tt(n,u)}var e,it,rt;"undefined"!=typeof window&&(e=window.parseCssDeclarations,it=window.sanitizeCssProperty,rt=window.cssSchema);var o={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},kt=/^#(\d+)$/,dt=/^#x([0-9A-Fa-f]+)$/,gt=/^[A-Za-z][A-za-z0-9]+$/,s="undefined"!=typeof window&&window.document?window.document.createElement("textarea"):null,ni=/\0/g,ti=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ii=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,ri=/&/g,ui=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,ut=/[<]/g,ft=/>/g,fi=/\"/g,ei=new RegExp("^\\s*([-.:\\w]+)(?:\\s*(=)\\s*((\")[^\"]*(\"|$)|(')[^']*('|$)|(?=[a-z][-\\w]*\\s*=)|[^\"'\\s]*))?","i"),oi=3==="a,b".split(/(,)/).length,et=n.eflags.CDATA|n.eflags.RCDATA,r={},h={},si=/^(?:https?|mailto|data)$/i,t={};return t.escapeAttrib=t.escapeAttrib=l,t.makeHtmlSanitizer=t.makeHtmlSanitizer=b,t.makeSaxParser=t.makeSaxParser=v,t.makeTagPolicy=t.makeTagPolicy=nt,t.normalizeRCData=t.normalizeRCData=a,t.sanitize=t.sanitize=bt,t.sanitizeAttribs=t.sanitizeAttribs=g,t.sanitizeWithPolicy=t.sanitizeWithPolicy=tt,t.unescapeEntities=t.unescapeEntities=c,t}(i);u=r.sanitize;i.ATTRIBS["*::style"]=0;i.ELEMENTS.style=0;i.ATTRIBS["a::target"]=0;i.ELEMENTS.video=0;i.ATTRIBS["video::src"]=0;i.ATTRIBS["video::poster"]=0;i.ATTRIBS["video::controls"]=0;i.ELEMENTS.audio=0;i.ATTRIBS["audio::src"]=0;i.ATTRIBS["video::autoplay"]=0;i.ATTRIBS["video::controls"]=0;"undefined"!=typeof t&&(t.exports=u)},{}],6:[function(n,t){t.exports={author:"Mapbox",name:"mapbox.js",description:"mapbox javascript api",version:"2.1.5",homepage:"http://mapbox.com/",repository:{type:"git",url:"git://github.com/mapbox/mapbox.js.git"},main:"src/index.js",dependencies:{leaflet:"0.7.3",mustache:"0.7.3",corslite:"0.0.6","sanitize-caja":"0.1.2"},scripts:{test:"jshint src/*.js && mocha-phantomjs test/index.html"},devDependencies:{"leaflet-hash":"0.2.1","leaflet-fullscreen":"0.0.4","uglify-js":"2.4.8",mocha:"1.17.1","expect.js":"0.3.1",sinon:"1.10.2","mocha-phantomjs":"3.1.6",happen:"0.1.3",browserify:"^6.3.2",jshint:"2.4.4","clean-css":"~2.0.7",minimist:"0.0.5",marked:"~0.3.0"},optionalDependencies:{},engines:{node:"*"}}},{}],7:[function(n,t){"use strict";t.exports={HTTP_URL:"http://a.tiles.mapbox.com/v4",HTTPS_URL:"https://a.tiles.mapbox.com/v4",FORCE_HTTPS:!1,REQUIRE_ACCESS_TOKEN:!0}},{}],8:[function(n,t){"use strict";var i=n("./util"),e=n("./url"),o=n("./request"),r=n("./marker"),u=n("./simplestyle"),f=L.FeatureGroup.extend({options:{filter:function(){return!0},sanitizer:n("sanitize-caja"),style:u.style,popupOptions:{closeButton:!1}},initialize:function(n,t){L.setOptions(this,t);this._layers={};"string"==typeof n?i.idUrl(n,this):n&&"object"==typeof n&&this.setGeoJSON(n)},setGeoJSON:function(n){return this._geojson=n,this.clearLayers(),this._initialize(n),this},getGeoJSON:function(){return this._geojson},loadURL:function(n){return this._request&&"abort"in this._request&&this._request.abort(),this._request=o(n,L.bind(function(t,r){this._request=null;t&&"abort"!==t.type?(i.log("could not load features at "+n),this.fire("error",{error:t})):r&&(this.setGeoJSON(r),this.fire("ready"))},this)),this},loadID:function(n){return this.loadURL(e("/"+n+"/features.json",this.options.accessToken))},setFilter:function(n){return this.options.filter=n,this._geojson&&(this.clearLayers(),this._initialize(this._geojson)),this},getFilter:function(){return this.options.filter},_initialize:function(n){var t,e,i=L.Util.isArray(n)?n:n.features;if(i)for(t=0,e=i.length;e>t;t++)(i[t].geometries||i[t].geometry||i[t].features)&&this._initialize(i[t]);else if(this.options.filter(n)){var s={accessToken:this.options.accessToken},f=L.GeoJSON.geometryToLayer(n,function(n,t){return r.style(n,t,s)}),o=r.createPopup(n,this.options.sanitizer);"setStyle"in f&&f.setStyle(u.style(n));f.feature=n;o&&f.bindPopup(o,this.options.popupOptions);this.addLayer(f)}}});t.exports.FeatureLayer=f;t.exports.featureLayer=function(n,t){return new f(n,t)}},{"./marker":22,"./request":23,"./simplestyle":25,"./url":27,"./util":28,"sanitize-caja":4}],9:[function(n,t){"use strict";var i=n("./util"),u=n("./url"),r=n("./request");t.exports=function(n,t){var f={};return i.strict(n,"string"),-1===n.indexOf("/")&&(n=u("/geocode/"+n+"/{query}.json",t&&t.accessToken)),f.getURL=function(){return n},f.queryURL=function(n){if("string"!=typeof n){for(var i=[],t=0;t<n.length;t++)i[t]=encodeURIComponent(n[t]);return L.Util.template(f.getURL(),{query:i.join(";")})}return L.Util.template(f.getURL(),{query:encodeURIComponent(n)})},f.query=function(n,t){return i.strict(t,"function"),r(f.queryURL(n),function(n,r){if(r&&(r.length||r.features)){var u={results:r};r.features&&r.features.length&&(u.latlng=[r.features[0].center[1],r.features[0].center[0]],r.features[0].bbox&&(u.bounds=r.features[0].bbox,u.lbounds=i.lbounds(u.bounds)));t(null,u)}else t(n||!0)}),f},f.reverseQuery=function(n,t){function o(n){return void 0!==n.lat&&void 0!==n.lng?n.lng+","+n.lat:void 0!==n.lat&&void 0!==n.lon?n.lon+","+n.lat:n[0]+","+n[1]}var u="",i,e;if(n.length&&n[0].length){for(i=0,e=[];i<n.length;i++)e.push(o(n[i]));u=e.join(";")}else u=o(n);return r(f.queryURL(u),function(n,i){t(n,i)}),f},f}},{"./request":23,"./url":27,"./util":28}],10:[function(n,t){"use strict";var r=n("./geocoder"),u=n("./util"),i=L.Control.extend({includes:L.Mixin.Events,options:{position:"topleft",pointZoom:16,keepOpen:!1,autocomplete:!1},initialize:function(n,t){L.Util.setOptions(this,t);this.setURL(n);this._updateSubmit=L.bind(this._updateSubmit,this);this._updateAutocomplete=L.bind(this._updateAutocomplete,this);this._chooseResult=L.bind(this._chooseResult,this)},setURL:function(n){return this.geocoder=r(n,{accessToken:this.options.accessToken}),this},getURL:function(){return this.geocoder.getURL()},setID:function(n){return this.setURL(n)},setTileJSON:function(n){return this.setURL(n.geocoder)},_toggle:function(n){n&&L.DomEvent.stop(n);L.DomUtil.hasClass(this._container,"active")?(L.DomUtil.removeClass(this._container,"active"),this._results.innerHTML="",this._input.blur()):(L.DomUtil.addClass(this._container,"active"),this._input.focus(),this._input.select())},_closeIfOpen:function(){L.DomUtil.hasClass(this._container,"active")&&!this.options.keepOpen&&(L.DomUtil.removeClass(this._container,"active"),this._results.innerHTML="",this._input.blur())},onAdd:function(n){var t=L.DomUtil.create("div","leaflet-control-mapbox-geocoder leaflet-bar leaflet-control"),r=L.DomUtil.create("a","leaflet-control-mapbox-geocoder-toggle mapbox-icon mapbox-icon-geocoder",t),f=L.DomUtil.create("div","leaflet-control-mapbox-geocoder-results",t),e=L.DomUtil.create("div","leaflet-control-mapbox-geocoder-wrap",t),u=L.DomUtil.create("form","leaflet-control-mapbox-geocoder-form",e),i=L.DomUtil.create("input","",u);return r.href="#",r.innerHTML="&nbsp;",i.type="text",i.setAttribute("placeholder","Search"),L.DomEvent.addListener(u,"submit",this._geocode,this),L.DomEvent.addListener(i,"keyup",this._autocomplete,this),L.DomEvent.disableClickPropagation(t),this._map=n,this._results=f,this._input=i,this._form=u,this.options.keepOpen?L.DomUtil.addClass(t,"active"):(this._map.on("click",this._closeIfOpen,this),L.DomEvent.addListener(r,"click",this._toggle,this)),t},_updateSubmit:function(n,t){if(L.DomUtil.removeClass(this._container,"searching"),this._results.innerHTML="",n||!t)this.fire("error",{error:n});else{var i=[];t.results&&t.results.features&&(i=t.results.features);1===i.length?(this.fire("autoselect",{feature:i[0]}),this.fire("found",{results:t.results}),this._chooseResult(i[0]),this._closeIfOpen()):i.length>1?(this.fire("found",{results:t.results}),this._displayResults(i)):this._displayResults(i)}},_updateAutocomplete:function(n,t){if(this._results.innerHTML="",n||!t)this.fire("error",{error:n});else{var i=[];t.results&&t.results.features&&(i=t.results.features);i.length&&this.fire("found",{results:t.results});this._displayResults(i)}},_displayResults:function(n){for(var r,u,t,e,o,i=0,f=Math.min(n.length,5);f>i;i++)r=n[i],u=r.place_name,u.length&&(t=L.DomUtil.create("a","",this._results),e="innerText"in t?"innerText":"textContent",t[e]=u,t.href="#",L.bind(function(n){L.DomEvent.addListener(t,"click",function(t){this._chooseResult(n);L.DomEvent.stop(t);this.fire("select",{feature:n})},this)},this)(r));n.length>5&&(o=L.DomUtil.create("span","",this._results),o.innerHTML="Top 5 of "+n.length+"  results")},_chooseResult:function(n){n.bbox?this._map.fitBounds(u.lbounds(n.bbox)):n.center&&this._map.setView([n.center[1],n.center[0]],void 0===this._map.getZoom()?this.options.pointZoom:Math.max(this._map.getZoom(),this.options.pointZoom))},_geocode:function(n){return L.DomEvent.preventDefault(n),""===this._input.value?this._updateSubmit():(L.DomUtil.addClass(this._container,"searching"),this.geocoder.query(this._input.value,this._updateSubmit),void 0)},_autocomplete:function(){if(this.options.autocomplete)return""===this._input.value?this._updateAutocomplete():(this.geocoder.query(this._input.value,this._updateAutocomplete),void 0)}});t.exports.GeocoderControl=i;t.exports.geocoderControl=function(n,t){return new i(n,t)}},{"./geocoder":9,"./util":28}],11:[function(n,t){"use strict";function i(n){return n>=93&&n--,n>=35&&n--,n-32}t.exports=function(n){return function(t,r){if(n){var u=i(n.grid[r].charCodeAt(t)),f=n.keys[u];return n.data[f]}}}},{}],12:[function(n,t){"use strict";var i=n("./util"),u=n("mustache"),r=L.Control.extend({options:{pinnable:!0,follow:!1,sanitizer:n("sanitize-caja"),touchTeaser:!0,location:!0},_currentContent:"",_pinned:!1,initialize:function(n,t){L.Util.setOptions(this,t);i.strict_instance(n,L.Class,"L.mapbox.gridLayer");this._layer=n},setTemplate:function(n){return i.strict(n,"string"),this.options.template=n,this},_template:function(n,t){var i,r;if(t&&(i=this.options.template||this._layer.getTileJSON().template,i))return r={},r["__"+n+"__"]=!0,this.options.sanitizer(u.to_html(i,L.extend(r,t)))},_show:function(n,t){n!==this._currentContent&&(this._currentContent=n,this.options.follow?(this._popup.setContent(n).setLatLng(t.latLng),this._map._popup!==this._popup&&this._popup.openOn(this._map)):(this._container.style.display="block",this._contentWrapper.innerHTML=n))},hide:function(){return this._pinned=!1,this._currentContent="",this._map.closePopup(),this._container.style.display="none",this._contentWrapper.innerHTML="",L.DomUtil.removeClass(this._container,"closable"),this},_mouseover:function(n){if(n.data?L.DomUtil.addClass(this._map._container,"map-clickable"):L.DomUtil.removeClass(this._map._container,"map-clickable"),!this._pinned){var t=this._template("teaser",n.data);t?this._show(t,n):this.hide()}},_mousemove:function(n){this._pinned||this.options.follow&&this._popup.setLatLng(n.latLng)},_navigateTo:function(n){window.top.location.href=n},_click:function(n){var i=this._template("location",n.data),t;if(this.options.location&&i&&0===i.search(/^https?:/))return this._navigateTo(this._template("location",n.data));this.options.pinnable&&(t=this._template("full",n.data),!t&&this.options.touchTeaser&&L.Browser.touch&&(t=this._template("teaser",n.data)),t?(L.DomUtil.addClass(this._container,"closable"),this._pinned=!0,this._show(t,n)):this._pinned&&(L.DomUtil.removeClass(this._container,"closable"),this._pinned=!1,this.hide()))},_onPopupClose:function(){this._currentContent=null;this._pinned=!1},_createClosebutton:function(n,t){var i=L.DomUtil.create("a","close",n);return i.innerHTML="close",i.href="#",i.title="close",L.DomEvent.on(i,"click",L.DomEvent.stopPropagation).on(i,"mousedown",L.DomEvent.stopPropagation).on(i,"dblclick",L.DomEvent.stopPropagation).on(i,"click",L.DomEvent.preventDefault).on(i,"click",t,this),i},onAdd:function(n){this._map=n;var t=L.DomUtil.create("div","leaflet-control-grid map-tooltip"),i=L.DomUtil.create("div","map-tooltip-content");return t.style.display="none",this._createClosebutton(t,this.hide),t.appendChild(i),this._contentWrapper=i,this._popup=new L.Popup({autoPan:!1,closeOnClick:!1}),n.on("popupclose",this._onPopupClose,this),L.DomEvent.disableClickPropagation(t).addListener(t,"mousewheel",L.DomEvent.stopPropagation),this._layer.on("mouseover",this._mouseover,this).on("mousemove",this._mousemove,this).on("click",this._click,this),t},onRemove:function(n){n.off("popupclose",this._onPopupClose,this);this._layer.off("mouseover",this._mouseover,this).off("mousemove",this._mousemove,this).off("click",this._click,this)}});t.exports.GridControl=r;t.exports.gridControl=function(n,t){return new r(n,t)}},{"./util":28,mustache:3,"sanitize-caja":4}],13:[function(n,t){"use strict";var i=n("./util"),u=n("./request"),f=n("./grid"),r=L.Class.extend({includes:[L.Mixin.Events,n("./load_tilejson")],options:{template:function(){return""}},_mouseOn:null,_tilejson:{},_cache:{},initialize:function(n,t){L.Util.setOptions(this,t);this._loadTileJSON(n)},_setTileJSON:function(n){return i.strict(n,"object"),L.extend(this.options,{grids:n.grids,minZoom:n.minzoom,maxZoom:n.maxzoom,bounds:n.bounds&&i.lbounds(n.bounds)}),this._tilejson=n,this._cache={},this._update(),this},getTileJSON:function(){return this._tilejson},active:function(){return!!(this._map&&this.options.grids&&this.options.grids.length)},addTo:function(n){return n.addLayer(this),this},onAdd:function(n){this._map=n;this._update();this._map.on("click",this._click,this).on("mousemove",this._move,this).on("moveend",this._update,this)},onRemove:function(){this._map.off("click",this._click,this).off("mousemove",this._move,this).off("moveend",this._update,this)},getData:function(n,t){if(this.active()){var r=this._map,u=r.project(n.wrap()),i=256,s=4,f=Math.floor(u.x/i),e=Math.floor(u.y/i),o=r.options.crs.scale(r.getZoom())/i;return f=(f+o)%o,e=(e+o)%o,this._getTile(r.getZoom(),f,e,function(n){var r=Math.floor((u.x-f*i)/s),o=Math.floor((u.y-e*i)/s);t(n(r,o))}),this}},_click:function(n){this.getData(n.latlng,L.bind(function(t){this.fire("click",{latLng:n.latlng,data:t})},this))},_move:function(n){this.getData(n.latlng,L.bind(function(t){t!==this._mouseOn?(this._mouseOn&&this.fire("mouseout",{latLng:n.latlng,data:this._mouseOn}),this.fire("mouseover",{latLng:n.latlng,data:t}),this._mouseOn=t):this.fire("mousemove",{latLng:n.latlng,data:t})},this))},_getTileURL:function(n){var t=this.options.grids,i=(n.x+n.y)%t.length,r=t[i];return L.Util.template(r,n)},_update:function(){var r;if(this.active()){var e=this._map.getPixelBounds(),t=this._map.getZoom(),u=256;if(!(t>this.options.maxZoom||t<this.options.minZoom))for(var i=L.bounds(e.min.divideBy(u)._floor(),e.max.divideBy(u)._floor()),n=this._map.options.crs.scale(t)/u,f=i.min.x;f<=i.max.x;f++)for(r=i.min.y;r<=i.max.y;r++)this._getTile(t,(f%n+n)%n,(r%n+n)%n)}},_getTile:function(n,t,i,r){var e=n+"_"+t+"_"+i,o=L.point(t,i);if(o.z=n,this._tileShouldBeLoaded(o)){if(e in this._cache)return r?("function"==typeof this._cache[e]?r(this._cache[e]):this._cache[e].push(r),void 0):void 0;this._cache[e]=[];r&&this._cache[e].push(r);u(this._getTileURL(o),L.bind(function(n,t){var r=this._cache[e],i;for(this._cache[e]=f(t),i=0;i<r.length;++i)r[i](this._cache[e])},this))}},_tileShouldBeLoaded:function(n){if(n.z>this.options.maxZoom||n.z<this.options.minZoom)return!1;if(this.options.bounds){var t=256,i=n.multiplyBy(t),r=i.add(new L.Point(t,t)),u=this._map.unproject(i),f=this._map.unproject(r),e=new L.LatLngBounds([u,f]);if(!this.options.bounds.intersects(e))return!1}return!0}});t.exports.GridLayer=r;t.exports.gridLayer=function(n,t){return new r(n,t)}},{"./grid":11,"./load_tilejson":18,"./request":23,"./util":28}],14:[function(n){n("./leaflet");n("./mapbox")},{"./leaflet":16,"./mapbox":20}],15:[function(n,t){"use strict";var i=L.Control.extend({options:{position:"bottomright",sanitizer:n("sanitize-caja")},initialize:function(n){L.setOptions(this,n);this._info={}},onAdd:function(n){var t,i;this._container=L.DomUtil.create("div","mapbox-control-info mapbox-small");this._content=L.DomUtil.create("div","map-info-container",this._container);t=L.DomUtil.create("a","mapbox-info-toggle mapbox-icon mapbox-icon-info",this._container);t.href="#";L.DomEvent.addListener(t,"click",this._showInfo,this);L.DomEvent.disableClickPropagation(this._container);for(i in n._layers)n._layers[i].getAttribution&&this.addInfo(n._layers[i].getAttribution());return n.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(n){n.off("layeradd",this._onLayerAdd,this).off("layerremove",this._onLayerRemove,this)},addInfo:function(n){return n?(this._info[n]||(this._info[n]=0),this._info[n]=!0,this._update()):this},removeInfo:function(n){return n?(this._info[n]&&(this._info[n]=!1),this._update()):this},_showInfo:function(n){return L.DomEvent.preventDefault(n),this._active===!0?this._hidecontent():(L.DomUtil.addClass(this._container,"active"),this._active=!0,this._update(),void 0)},_hidecontent:function(){this._content.innerHTML="";this._active=!1;L.DomUtil.removeClass(this._container,"active")},_update:function(){var t,i,n;if(!this._map)return this;this._content.innerHTML="";t="none";i=[];for(n in this._info)this._info.hasOwnProperty(n)&&this._info[n]&&(i.push(this.options.sanitizer(n)),t="block");return this._content.innerHTML+=i.join(" | "),this._container.style.display=t,this},_onLayerAdd:function(n){n.layer.getAttribution&&n.layer.getAttribution()?this.addInfo(n.layer.getAttribution()):"on"in n.layer&&n.layer.getAttribution&&n.layer.on("ready",L.bind(function(){this.addInfo(n.layer.getAttribution())},this))},_onLayerRemove:function(n){n.layer.getAttribution&&this.removeInfo(n.layer.getAttribution())}});t.exports.InfoControl=i;t.exports.infoControl=function(n){return new i(n)}},{"sanitize-caja":4}],16:[function(n){window.L=n("leaflet/dist/leaflet-src")},{"leaflet/dist/leaflet-src":2}],17:[function(n,t){"use strict";var i=L.Control.extend({options:{position:"bottomright",sanitizer:n("sanitize-caja")},initialize:function(n){L.setOptions(this,n);this._legends={}},onAdd:function(){return this._container=L.DomUtil.create("div","map-legends wax-legends"),L.DomEvent.disableClickPropagation(this._container),this._update(),this._container},addLegend:function(n){return n?(this._legends[n]||(this._legends[n]=0),this._legends[n]++,this._update()):this},removeLegend:function(n){return n?(this._legends[n]&&this._legends[n]--,this._update()):this},_update:function(){var t,n,i;if(!this._map)return this;this._container.innerHTML="";t="none";for(n in this._legends)this._legends.hasOwnProperty(n)&&this._legends[n]&&(i=L.DomUtil.create("div","map-legend wax-legend",this._container),i.innerHTML=this.options.sanitizer(n),t="block");return this._container.style.display=t,this}});t.exports.LegendControl=i;t.exports.legendControl=function(n){return new i(n)}},{"sanitize-caja":4}],18:[function(n,t){"use strict";var i=n("./request"),r=n("./url"),u=n("./util");t.exports={_loadTileJSON:function(n){"string"==typeof n?(n=r.tileJSON(n,this.options&&this.options.accessToken),i(n,L.bind(function(t,i){t?(u.log("could not load TileJSON at "+n),this.fire("error",{error:t})):i&&(this._setTileJSON(i),this.fire("ready"))},this))):n&&"object"==typeof n&&this._setTileJSON(n)}}},{"./request":23,"./url":27,"./util":28}],19:[function(n,t){"use strict";function i(n,t){return!t||n.accessToken?n:L.extend({accessToken:t},n)}var u=(n("./util"),n("./tile_layer").tileLayer),f=n("./feature_layer").featureLayer,e=n("./grid_layer").gridLayer,o=n("./grid_control").gridControl,s=n("./info_control").infoControl,h=n("./share_control").shareControl,c=n("./legend_control").legendControl,l=n("./mapbox_logo").mapboxLogoControl,r=L.Map.extend({includes:[n("./load_tilejson")],options:{tileLayer:{},featureLayer:{},gridLayer:{},legendControl:{},gridControl:{},infoControl:!1,shareControl:!1},_tilejson:{},initialize:function(n,t,r){L.Map.prototype.initialize.call(this,n,L.extend({},L.Map.prototype.options,r));this.attributionControl&&this.attributionControl.setPrefix("");this.options.tileLayer&&(this.tileLayer=u(void 0,i(this.options.tileLayer,this.options.accessToken)),this.addLayer(this.tileLayer));this.options.featureLayer&&(this.featureLayer=f(void 0,i(this.options.featureLayer,this.options.accessToken)),this.addLayer(this.featureLayer));this.options.gridLayer&&(this.gridLayer=e(void 0,i(this.options.gridLayer,this.options.accessToken)),this.addLayer(this.gridLayer));this.options.gridLayer&&this.options.gridControl&&(this.gridControl=o(this.gridLayer,this.options.gridControl),this.addControl(this.gridControl));this.options.infoControl&&(this.infoControl=s(this.options.infoControl),this.addControl(this.infoControl));this.options.legendControl&&(this.legendControl=c(this.options.legendControl),this.addControl(this.legendControl));this.options.shareControl&&(this.shareControl=h(void 0,i(this.options.shareControl,this.options.accessToken)),this.addControl(this.shareControl));this._mapboxLogoControl=l(this.options.mapboxLogoControl);this.addControl(this._mapboxLogoControl);this._loadTileJSON(t)},addLayer:function(n){return"on"in n&&n.on("ready",L.bind(function(){this._updateLayer(n)},this)),L.Map.prototype.addLayer.call(this,n)},_setTileJSON:function(n){return this._tilejson=n,this._initialize(n),this},getTileJSON:function(){return this._tilejson},_initialize:function(n){if(this.tileLayer&&(this.tileLayer._setTileJSON(n),this._updateLayer(this.tileLayer)),this.featureLayer&&!this.featureLayer.getGeoJSON()&&n.data&&n.data[0]&&this.featureLayer.loadURL(n.data[0]),this.gridLayer&&(this.gridLayer._setTileJSON(n),this._updateLayer(this.gridLayer)),this.infoControl&&n.attribution&&this.infoControl.addInfo(n.attribution),this.legendControl&&n.legend&&this.legendControl.addLegend(n.legend),this.shareControl&&this.shareControl._setTileJSON(n),this._mapboxLogoControl._setTileJSON(n),!this._loaded&&n.center){var t=void 0!==this.getZoom()?this.getZoom():n.center[2],i=L.latLng(n.center[1],n.center[0]);this.setView(i,t)}},_editLink:function(){var n;if(this._controlContainer.getElementsByClassName&&(n=this._controlContainer.getElementsByClassName("mapbox-improve-map"),n.length&&this._loaded))for(var i=this.getCenter().wrap(),r=this._tilejson||{},u=r.id||"",t=0;t<n.length;t++)n[t].href=n[t].href.split("#")[0]+"#"+u+"/"+i.lng.toFixed(3)+"/"+i.lat.toFixed(3)+"/"+this.getZoom()},_updateLayer:function(n){n.options&&(this.infoControl&&this._loaded&&this.infoControl.addInfo(n.options.infoControl),this.attributionControl&&this._loaded&&n.getAttribution&&this.attributionControl.addAttribution(n.getAttribution()),this.on("moveend",this._editLink,this),L.stamp(n)in this._zoomBoundLayers||!n.options.maxZoom&&!n.options.minZoom||(this._zoomBoundLayers[L.stamp(n)]=n),this._editLink(),this._updateZoomLevels())}});t.exports.Map=r;t.exports.map=function(n,t,i){return new r(n,t,i)}},{"./feature_layer":8,"./grid_control":12,"./grid_layer":13,"./info_control":15,"./legend_control":17,"./load_tilejson":18,"./mapbox_logo":21,"./share_control":24,"./tile_layer":26,"./util":28}],20:[function(n,t){"use strict";var i=n("./geocoder_control"),r=n("./grid_control"),u=n("./feature_layer"),f=n("./legend_control"),e=n("./share_control"),o=n("./tile_layer"),s=n("./info_control"),h=n("./map"),c=n("./grid_layer");L.mapbox=t.exports={VERSION:n("../package.json").version,geocoder:n("./geocoder"),marker:n("./marker"),simplestyle:n("./simplestyle"),tileLayer:o.tileLayer,TileLayer:o.TileLayer,infoControl:s.infoControl,InfoControl:s.InfoControl,shareControl:e.shareControl,ShareControl:e.ShareControl,legendControl:f.legendControl,LegendControl:f.LegendControl,geocoderControl:i.geocoderControl,GeocoderControl:i.GeocoderControl,gridControl:r.gridControl,GridControl:r.GridControl,gridLayer:c.gridLayer,GridLayer:c.GridLayer,featureLayer:u.featureLayer,FeatureLayer:u.FeatureLayer,map:h.map,Map:h.Map,config:n("./config"),sanitize:n("sanitize-caja"),template:n("mustache").to_html};window.L.Icon.Default.imagePath=("https:"==document.location.protocol||"http:"==document.location.protocol?"":"https:")+"//api.tiles.mapbox.com/mapbox.js/v"+n("../package.json").version+"/images"},{"../package.json":6,"./config":7,"./feature_layer":8,"./geocoder":9,"./geocoder_control":10,"./grid_control":12,"./grid_layer":13,"./info_control":15,"./legend_control":17,"./map":19,"./marker":22,"./share_control":24,"./simplestyle":25,"./tile_layer":26,mustache:3,"sanitize-caja":4}],21:[function(n,t){"use strict";var i=L.Control.extend({options:{position:"bottomleft"},initialize:function(n){L.setOptions(this,n)},onAdd:function(){return this._container=L.DomUtil.create("div","mapbox-logo"),this._container},_setTileJSON:function(n){n.mapbox_logo&&L.DomUtil.addClass(this._container,"mapbox-logo-true")}});t.exports.MapboxLogoControl=i;t.exports.mapboxLogoControl=function(n){return new i(n)}},{}],22:[function(n,t){"use strict";function i(n,t){n=n||{};var r={small:[20,50],medium:[30,70],large:[35,90]},i=n["marker-size"]||"medium",u="marker-symbol"in n&&""!==n["marker-symbol"]?"-"+n["marker-symbol"]:"",f=(n["marker-color"]||"7e7e7e").replace("#","");return L.icon({iconUrl:e("/marker/pin-"+i.charAt(0)+u+"+"+f+(L.Browser.retina?"@2x":"")+".png",t&&t.accessToken),iconSize:r[i],iconAnchor:[r[i][0]/2,r[i][1]/2],popupAnchor:[0,-r[i][1]/2]})}function u(n,t,u){return L.marker(t,{icon:i(n.properties,u),title:o.strip_tags(r(n.properties&&n.properties.title||""))})}function f(n,t){if(!n||!n.properties)return"";var i="";return n.properties.title&&(i+='<div class="marker-title">'+n.properties.title+"<\/div>"),n.properties.description&&(i+='<div class="marker-description">'+n.properties.description+"<\/div>"),(t||r)(i)}var e=n("./url"),o=n("./util"),r=n("sanitize-caja");t.exports={icon:i,style:u,createPopup:f}},{"./url":27,"./util":28,"sanitize-caja":4}],23:[function(n,t){"use strict";var r=n("corslite"),i=n("./util").strict,u=n("./config"),f=/^(https?:)?(?=\/\/(.|api)\.tiles\.mapbox\.com\/)/;t.exports=function(n,t){function e(n,i){!n&&i&&(i=JSON.parse(i.responseText));t(n,i)}return i(n,"string"),i(t,"function"),n=n.replace(f,function(n,t){return"withCredentials"in new window.XMLHttpRequest?"https:"===t||"https:"===document.location.protocol||u.FORCE_HTTPS?"https:":"http:":document.location.protocol}),r(n,e)}},{"./config":7,"./util":28,corslite:1}],24:[function(n,t){"use strict";var i=n("./url"),r=L.Control.extend({includes:[n("./load_tilejson")],options:{position:"topleft",url:""},initialize:function(n,t){L.setOptions(this,t);this._loadTileJSON(n)},_setTileJSON:function(n){this._tilejson=n},onAdd:function(n){this._map=n;var t=L.DomUtil.create("div","leaflet-control-mapbox-share leaflet-bar"),i=L.DomUtil.create("a","mapbox-share mapbox-icon mapbox-icon-share",t);return i.href="#",this._modal=L.DomUtil.create("div","mapbox-modal",this._map._container),this._mask=L.DomUtil.create("div","mapbox-modal-mask",this._modal),this._content=L.DomUtil.create("div","mapbox-modal-content",this._modal),L.DomEvent.addListener(i,"click",this._shareClick,this),L.DomEvent.disableClickPropagation(t),this._map.on("mousedown",this._clickOut,this),t},_clickOut:function(n){if(this._sharing)return(L.DomEvent.preventDefault(n),L.DomUtil.removeClass(this._modal,"active"),this._content.innerHTML="",this._sharing=null,void 0)},_shareClick:function(n){var r,e,f;if(L.DomEvent.stop(n),this._sharing)return this._clickOut(n);var t=this._tilejson||this._map._tilejson||{},u=encodeURIComponent(this.options.url||t.webpage||window.location),o=encodeURIComponent(t.name),s=i("/"+t.id+"/"+this._map.getCenter().lng+","+this._map.getCenter().lat+","+this._map.getZoom()+"/600x600.png",this.options.accessToken),h=i("/"+t.id+".html",this.options.accessToken),c="//twitter.com/intent/tweet?status="+o+" "+u,l="//www.facebook.com/sharer.php?u="+u+"&t="+encodeURIComponent(t.name),a="//www.pinterest.com/pin/create/button/?url="+u+"&media="+s+"&description="+t.name,v="<h3>Share this map<\/h3><div class='mapbox-share-buttons'><a class='mapbox-button mapbox-button-icon mapbox-icon-facebook' target='_blank' href='{{facebook}}'>Facebook<\/a><a class='mapbox-button mapbox-button-icon mapbox-icon-twitter' target='_blank' href='{{twitter}}'>Twitter<\/a><a class='mapbox-button mapbox-button-icon mapbox-icon-pinterest' target='_blank' href='{{pinterest}}'>Pinterest<\/a><\/div>".replace("{{twitter}}",c).replace("{{facebook}}",l).replace("{{pinterest}}",a),y='<iframe width="100%" height="500px" frameBorder="0" src="{{embed}}"><\/iframe>'.replace("{{embed}}",h);L.DomUtil.addClass(this._modal,"active");this._sharing=L.DomUtil.create("div","mapbox-modal-body",this._content);this._sharing.innerHTML=v;r=L.DomUtil.create("input","mapbox-embed",this._sharing);r.type="text";r.value=y;e=L.DomUtil.create("label","mapbox-embed-description",this._sharing);e.innerHTML="Copy and paste this <strong>HTML code<\/strong> into documents to embed this map on web pages.";f=L.DomUtil.create("a","leaflet-popup-close-button",this._sharing);f.href="#";L.DomEvent.disableClickPropagation(this._sharing);L.DomEvent.addListener(f,"click",this._clickOut,this);L.DomEvent.addListener(r,"click",function(n){n.target.focus();n.target.select()})}});t.exports.ShareControl=r;t.exports.shareControl=function(n,t){return new r(n,t)}},{"./load_tilejson":18,"./url":27}],25:[function(n,t){"use strict";function u(n,t){var r={};for(var i in t)r[i]=void 0===n[i]?t[i]:n[i];return r}function f(n){for(var r={},t=0;t<i.length;t++)r[i[t][1]]=n[i[t][0]];return r}function e(n){return f(u(n.properties||{},r))}var r={stroke:"#555555","stroke-width":2,"stroke-opacity":1,fill:"#555555","fill-opacity":.5},i=[["stroke","color"],["stroke-width","weight"],["stroke-opacity","opacity"],["fill","fillColor"],["fill-opacity","fillOpacity"]];t.exports={style:e,defaults:r}},{}],26:[function(n,t){"use strict";var i=n("./util"),r=L.TileLayer.extend({includes:[n("./load_tilejson")],options:{format:"png"},formats:["png","png32","png64","png128","png256","jpg70","jpg80","jpg90"],scalePrefix:"@2x.",initialize:function(n,t){L.TileLayer.prototype.initialize.call(this,void 0,t);this._tilejson={};t&&t.format&&i.strict_oneof(t.format,this.formats);this._loadTileJSON(n)},setFormat:function(n){return i.strict(n,"string"),this.options.format=n,this.redraw(),this},setUrl:null,_setTileJSON:function(n){return i.strict(n,"object"),L.extend(this.options,{tiles:n.tiles,attribution:n.attribution,minZoom:n.minzoom||0,maxZoom:n.maxzoom||18,tms:"tms"===n.scheme,bounds:n.bounds&&i.lbounds(n.bounds)}),this._tilejson=n,this.redraw(),this},getTileJSON:function(){return this._tilejson},getTileUrl:function(n){var i=this.options.tiles,r=Math.floor(Math.abs(n.x+n.y)%i.length),u=i[r],t=L.Util.template(u,n);return t?t.replace(".png",(L.Browser.retina?this.scalePrefix:".")+this.options.format):t},_update:function(){this.options.tiles&&L.TileLayer.prototype._update.call(this)}});t.exports.TileLayer=r;t.exports.tileLayer=function(n,t){return new r(n,t)}},{"./load_tilejson":18,"./util":28}],27:[function(n,t){"use strict";var i=n("./config"),r=n("../package.json").version;t.exports=function(n,t){if(t=t||L.mapbox.accessToken,!t&&i.REQUIRE_ACCESS_TOKEN)throw new Error("An API access token is required to use Mapbox.js. See https://www.mapbox.com/mapbox.js/api/v"+r+"/api-access-tokens/");var u="https:"===document.location.protocol||i.FORCE_HTTPS?i.HTTPS_URL:i.HTTP_URL;if(u+=n,u+=-1!==u.indexOf("?")?"&access_token=":"?access_token=",i.REQUIRE_ACCESS_TOKEN){if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox.js, not a secret access token (sk.*). See https://www.mapbox.com/mapbox.js/api/v"+r+"/api-access-tokens/");u+=t}return u};t.exports.tileJSON=function(n,i){if(-1!==n.indexOf("/"))return n;var r=t.exports("/"+n+".json",i);return 0===r.indexOf("https")&&(r+="&secure"),r}},{"../package.json":6,"./config":7}],28:[function(n,t){"use strict";function i(n,t){if(!t||!t.length)return!1;for(var i=0;i<t.length;i++)if(t[i]==n)return!0;return!1}t.exports={idUrl:function(n,t){-1==n.indexOf("/")?t.loadID(n):t.loadURL(n)},log:function(n){"object"==typeof console&&"function"==typeof console.error&&console.error(n)},strict:function(n,t){if(typeof n!==t)throw new Error("Invalid argument: "+t+" expected");},strict_instance:function(n,t,i){if(!(n instanceof t))throw new Error("Invalid argument: "+i+" expected");},strict_oneof:function(n,t){if(!i(n,t))throw new Error("Invalid argument: "+n+" given, valid values are "+t.join(", "));},strip_tags:function(n){return n.replace(/<[^<]+>/g,"")},lbounds:function(n){return new L.LatLngBounds([[n[1],n[0]],[n[3],n[2]]])}}},{}]},{},[14]);L.Control.Fullscreen=L.Control.extend({options:{position:"topleft",title:{"false":"View Fullscreen","true":"Exit Fullscreen"}},onAdd:function(n){var t=L.DomUtil.create("div","leaflet-control-fullscreen leaflet-bar leaflet-control");this.link=L.DomUtil.create("a","leaflet-control-fullscreen-button leaflet-bar-part",t);this.link.href="#";this._map=n;this._map.on("fullscreenchange",this._toggleTitle,this);this._toggleTitle();L.DomEvent.on(this.link,"click",this._click,this);return t},_click:function(n){L.DomEvent.stopPropagation(n);L.DomEvent.preventDefault(n);this._map.toggleFullscreen()},_toggleTitle:function(){this.link.title=this.options.title[this._map.isFullscreen()]}});L.Map.include({isFullscreen:function(){return this._isFullscreen||!1},toggleFullscreen:function(){var n=this.getContainer();this.isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():(L.DomUtil.removeClass(n,"leaflet-pseudo-fullscreen"),this._toggleFullscreenClass(),this.invalidateSize(),this._isFullscreen=!1,this.fire("fullscreenchange")):n.requestFullscreen?n.requestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):(L.DomUtil.addClass(n,"leaflet-pseudo-fullscreen"),this._toggleFullscreenClass(),this.invalidateSize(),this._isFullscreen=!0,this.fire("fullscreenchange"))},_toggleFullscreenClass:function(){var n=this.getContainer();this.isFullscreen()?L.DomUtil.removeClass(n,"leaflet-fullscreen-on"):L.DomUtil.addClass(n,"leaflet-fullscreen-on")},_onFullscreenChange:function(){var n=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;this._toggleFullscreenClass();n===this.getContainer()?(this._isFullscreen=!0,this.fire("fullscreenchange")):this._isFullscreen&&(this._isFullscreen=!1,this.fire("fullscreenchange"))}});L.Map.mergeOptions({fullscreenControl:!1});L.Map.addInitHook(function(){this.options.fullscreenControl&&(this.fullscreenControl=new L.Control.Fullscreen,this.addControl(this.fullscreenControl));var n;if("onfullscreenchange"in document?n="fullscreenchange":"onmozfullscreenchange"in document?n="mozfullscreenchange":"onwebkitfullscreenchange"in document&&(n="webkitfullscreenchange"),n){this.whenReady(function(){L.DomEvent.on(document,n,this._onFullscreenChange,this)});this.on("unload",function(){L.DomEvent.off(document,n,this._onFullscreenChange)})}});L.control.fullscreen=function(n){return new L.Control.Fullscreen(n)};!function(n,t){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(n){L.Util.setOptions(this,n);this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction);this._featureGroup=L.featureGroup();this._featureGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this);this._nonPointGroup=L.featureGroup();this._nonPointGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this);this._inZoomAnimation=0;this._needsClustering=[];this._needsRemoving=[];this._currentShownBounds=null;this._queue=[]},addLayer:function(n){var i,r,t,u;if(n instanceof L.LayerGroup){i=[];for(r in n._layers)i.push(n._layers[r]);return this.addLayers(i)}if(!n.getLatLng)return this._nonPointGroup.addLayer(n),this;if(!this._map)return this._needsClustering.push(n),this;if(this.hasLayer(n))return this;if(this._unspiderfy&&this._unspiderfy(),this._addLayer(n,this._maxZoom),t=n,u=this._map.getZoom(),n.__parent)for(;t.__parent._zoom>=u;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(n,t):this._animationAddLayerNonAnimated(n,t)),this},removeLayer:function(n){var t,i;if(n instanceof L.LayerGroup){t=[];for(i in n._layers)t.push(n._layers[i]);return this.removeLayers(t)}return n.getLatLng?this._map?n.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(n)),this._removeLayer(n,!0),this._featureGroup.hasLayer(n)&&(this._featureGroup.removeLayer(n),n.setOpacity&&n.setOpacity(1)),this):this:(!this._arraySplice(this._needsClustering,n)&&this.hasLayer(n)&&this._needsRemoving.push(n),this):(this._nonPointGroup.removeLayer(n),this)},addLayers:function(n){var u,r,f,t,h=this._featureGroup,e=this._nonPointGroup,c=this.options.chunkedLoading,l=this.options.chunkInterval,o=this.options.chunkProgress;if(this._map){var i=0,a=(new Date).getTime(),s=L.bind(function(){for(var f,r,v,u=(new Date).getTime();i<n.length;i++){if(c&&0==i%200&&(f=(new Date).getTime()-u,f>l))break;(t=n[i],t.getLatLng)?!this.hasLayer(t)&&(this._addLayer(t,this._maxZoom),t.__parent&&2===t.__parent.getChildCount())&&(r=t.__parent.getAllChildMarkers(),v=r[0]===t?r[1]:r[0],h.removeLayer(v)):e.addLayer(t)}o&&o(i,n.length,(new Date).getTime()-a);i===n.length?(this._featureGroup.eachLayer(function(n){n instanceof L.MarkerCluster&&n._iconNeedsUpdate&&n._updateIcon()}),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(s,this.options.chunkDelay)},this);s()}else{for(u=[],r=0,f=n.length;f>r;r++)t=n[r],t.getLatLng?this.hasLayer(t)||u.push(t):e.addLayer(t);this._needsClustering=this._needsClustering.concat(u)}return this},removeLayers:function(n){var i,r,t,u=this._featureGroup,f=this._nonPointGroup;if(!this._map){for(i=0,r=n.length;r>i;i++)t=n[i],this._arraySplice(this._needsClustering,t),f.removeLayer(t);return this}for(i=0,r=n.length;r>i;i++)t=n[i],t.__parent?(this._removeLayer(t,!0,!0),u.hasLayer(t)&&(u.removeLayer(t),t.setOpacity&&t.setOpacity(1))):f.removeLayer(t);return this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),u.eachLayer(function(n){n instanceof L.MarkerCluster&&n._updateIcon()}),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(n){delete n.__parent}),this._map&&this._generateInitialClusters(),this},getBounds:function(){var n=new L.LatLngBounds,t;for(this._topClusterLevel&&n.extend(this._topClusterLevel._bounds),t=this._needsClustering.length-1;t>=0;t--)n.extend(this._needsClustering[t].getLatLng());return n.extend(this._nonPointGroup.getBounds()),n},eachLayer:function(n,t){var i,r=this._needsClustering.slice();for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),i=r.length-1;i>=0;i--)n.call(t,r[i]);this._nonPointGroup.eachLayer(n,t)},getLayers:function(){var n=[];return this.eachLayer(function(t){n.push(t)}),n},getLayer:function(n){var t=null;return this.eachLayer(function(i){L.stamp(i)===n&&(t=i)}),t},hasLayer:function(n){if(!n)return!1;for(var i=this._needsClustering,t=i.length-1;t>=0;t--)if(i[t]===n)return!0;for(i=this._needsRemoving,t=i.length-1;t>=0;t--)if(i[t]===n)return!1;return!(!n.__parent||n.__parent._group!==this)||this._nonPointGroup.hasLayer(n)},zoomToShowLayer:function(n,t){var i=function(){if((n._icon||n.__parent._icon)&&!this._inZoomAnimation)if(this._map.off("moveend",i,this),this.off("animationend",i,this),n._icon)t();else if(n.__parent._icon){var r=function(){this.off("spiderfied",r,this);t()};this.on("spiderfied",r,this);n.__parent.spiderfy()}},r;n._icon&&this._map.getBounds().contains(n.getLatLng())?t():n.__parent._zoom<this._map.getZoom()?(this._map.on("moveend",i,this),this._map.panTo(n.getLatLng())):(r=function(){this._map.off("movestart",r,this);r=null},this._map.on("movestart",r,this),this._map.on("moveend",i,this),this.on("animationend",i,this),n.__parent.zoomToBounds(),r&&i.call(this))},onAdd:function(n){this._map=n;var t,i,r;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.onAdd(n),this._nonPointGroup.onAdd(n),this._gridClusters||this._generateInitialClusters(),t=0,i=this._needsRemoving.length;i>t;t++)r=this._needsRemoving[t],this._removeLayer(r,!0);this._needsRemoving=[];this._zoom=this._map.getZoom();this._currentShownBounds=this._getExpandedVisibleBounds();this._map.on("zoomend",this._zoomEnd,this);this._map.on("moveend",this._moveEnd,this);this._spiderfierOnAdd&&this._spiderfierOnAdd();this._bindEvents();i=this._needsClustering;this._needsClustering=[];this.addLayers(i)},onRemove:function(n){n.off("zoomend",this._zoomEnd,this);n.off("moveend",this._moveEnd,this);this._unbindEvents();this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","");this._spiderfierOnRemove&&this._spiderfierOnRemove();this._hideCoverage();this._featureGroup.onRemove(n);this._nonPointGroup.onRemove(n);this._featureGroup.clearLayers();this._map=null},getVisibleParent:function(n){for(var t=n;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(n,t){for(var i=n.length-1;i>=0;i--)if(n[i]===t)return n.splice(i,1),!0},_removeLayer:function(n,t,i){var c=this._gridClusters,o=this._gridUnclustered,s=this._featureGroup,e=this._map,f,u,r,h;if(t)for(f=this._maxZoom;f>=0&&o[f].removeObject(n,e.project(n.getLatLng(),f));f--);for(r=n.__parent,h=r._markers,this._arraySplice(h,n);r&&(r._childCount--,!(r._zoom<0));)t&&r._childCount<=1?(u=r._markers[0]===n?r._markers[1]:r._markers[0],c[r._zoom].removeObject(r,e.project(r._cLatLng,r._zoom)),o[r._zoom].addObject(u,e.project(u.getLatLng(),r._zoom)),this._arraySplice(r.__parent._childClusters,r),r.__parent._markers.push(u),u.__parent=r.__parent,r._icon&&(s.removeLayer(r),i||s.addLayer(u))):(r._recalculateBounds(),i&&r._icon||r._updateIcon()),r=r.__parent;delete n.__parent},_isOrIsParent:function(n,t){for(;t;){if(n===t)return!0;t=t.parentNode}return!1},_propagateEvent:function(n){if(n.layer instanceof L.MarkerCluster){if(n.originalEvent&&this._isOrIsParent(n.layer._icon,n.originalEvent.relatedTarget))return;n.type="cluster"+n.type}this.fire(n.type,n)},_defaultIconCreateFunction:function(n){var t=n.getChildCount(),i=" marker-cluster-";return i+=10>t?"small":100>t?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"<\/span><\/div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var n=this._map,t=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,r=this.options.zoomToBoundsOnClick;(t||r)&&this.on("clusterclick",this._zoomOrSpiderfy,this);i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),n.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(n){var t=this._map;t.getMaxZoom()===t.getZoom()?this.options.spiderfyOnMaxZoom&&n.layer.spiderfy():this.options.zoomToBoundsOnClick&&n.layer.zoomToBounds();n.originalEvent&&13===n.originalEvent.keyCode&&t._container.focus()},_showCoverage:function(n){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),n.layer.getChildCount()>2&&n.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(n.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var n=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,r=this._map;(n||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this);t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),r.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=this._map._zoom,this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var n=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,n);this._topClusterLevel._recursivelyAddChildrenToMap(null,this._map._zoom,n);this._currentShownBounds=n}},_generateInitialClusters:function(){var t=this._map.getMaxZoom(),i=this.options.maxClusterRadius,r=i,n;for("function"!=typeof i&&(r=function(){return i}),this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={},n=t;n>=0;n--)this._gridClusters[n]=new L.DistanceGrid(r(n)),this._gridUnclustered[n]=new L.DistanceGrid(r(n));this._topClusterLevel=new L.MarkerCluster(this,-1)},_addLayer:function(n,t){var e,r,s=this._gridClusters,h=this._gridUnclustered,i,o,u,f;for(this.options.singleMarkerMode&&(n.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[n]}}));t>=0;t--){if(e=this._map.project(n.getLatLng(),t),i=s[t].getNearObject(e),i)return i._addChild(n),n.__parent=i,void 0;if(i=h[t].getNearObject(e)){for(o=i.__parent,o&&this._removeLayer(i,!1),u=new L.MarkerCluster(this,t,i,n),s[t].addObject(u,this._map.project(u._cLatLng,t)),i.__parent=u,n.__parent=u,f=u,r=t-1;r>o._zoom;r--)f=new L.MarkerCluster(this,r,f),s[r].addObject(f,this._map.project(i.getLatLng(),r));for(o._addChild(f),r=t;r>=0&&h[r].removeObject(i,this._map.project(i.getLatLng(),r));r--);return}h[t].addObject(n,e)}this._topClusterLevel._addChild(n);n.__parent=this._topClusterLevel},_enqueue:function(n){this._queue.push(n);this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var n=0;n<this._queue.length;n++)this._queue[n].call(this);this._queue.length=0;clearTimeout(this._queueTimeout);this._queueTimeout=null},_mergeSplitClusters:function(){this._processQueue();this._zoom<this._map._zoom&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,this._map._zoom)):this._zoom>this._map._zoom?(this._animationStart(),this._animationZoomOut(this._zoom,this._map._zoom)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(!this.options.removeOutsideVisibleBounds)return this.getBounds();var f=this._map,i=f.getBounds(),n=i._southWest,t=i._northEast,r=L.Browser.mobile?0:Math.abs(n.lat-t.lat),u=L.Browser.mobile?0:Math.abs(n.lng-t.lng);return new L.LatLngBounds(new L.LatLng(n.lat-r,n.lng-u,!0),new L.LatLng(t.lat+r,t.lng+u,!0))},_animationAddLayerNonAnimated:function(n,t){if(t===n)this._featureGroup.addLayer(n);else if(2===t._childCount){t._addToMap();var i=t.getAllChildMarkers();this._featureGroup.removeLayer(i[0]);this._featureGroup.removeLayer(i[1])}else t._updateIcon()}});L.MarkerClusterGroup.include(L.DomUtil.TRANSITION?{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim";this._inZoomAnimation++},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""));this._inZoomAnimation--;this.fire("animationend")},_animationZoomIn:function(n,t){var r,i=this._getExpandedVisibleBounds(),u=this._featureGroup;this._topClusterLevel._recursively(i,n,0,function(f){var e,o=f._latlng,s=f._markers;for(i.contains(o)||(o=null),f._isSingleParent()&&n+1===t?(u.removeLayer(f),f._recursivelyAddChildrenToMap(null,t,i)):(f.setOpacity(0),f._recursivelyAddChildrenToMap(o,t,i)),r=s.length-1;r>=0;r--)e=s[r],i.contains(e._latlng)||u.removeLayer(e)});this._forceLayout();this._topClusterLevel._recursivelyBecomeVisible(i,t);u.eachLayer(function(n){n instanceof L.MarkerCluster||!n._icon||n.setOpacity(1)});this._topClusterLevel._recursively(i,n,t,function(n){n._recursivelyRestoreChildPositions(t)});this._enqueue(function(){this._topClusterLevel._recursively(i,n,0,function(n){u.removeLayer(n);n.setOpacity(1)});this._animationEnd()})},_animationZoomOut:function(n,t){this._animationZoomOutSingle(this._topClusterLevel,n-1,t);this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds());this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,n,this._getExpandedVisibleBounds())},_animationZoomOutSingle:function(n,t,i){var r=this._getExpandedVisibleBounds(),u;n._recursivelyAnimateChildrenInAndAddSelfToMap(r,t+1,i);u=this;this._forceLayout();n._recursivelyBecomeVisible(r,i);this._enqueue(function(){if(1===n._childCount){var f=n._markers[0];f.setLatLng(f.getLatLng());f.setOpacity&&f.setOpacity(1)}else n._recursively(r,i,0,function(n){n._recursivelyRemoveChildrenFromMap(r,t+1)});u._animationEnd()})},_animationAddLayer:function(n,t){var i=this,r=this._featureGroup;r.addLayer(n);t!==n&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),n._setPos(this._map.latLngToLayerPoint(t.getLatLng())),n.setOpacity(0),this._enqueue(function(){r.removeLayer(n);n.setOpacity(1);i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(t,this._map.getMaxZoom(),this._map.getZoom())))},_forceLayout:function(){L.Util.falseFn(t.body.offsetWidth)}}:{_animationStart:function(){},_animationZoomIn:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,n);this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds());this.fire("animationend")},_animationZoomOut:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,n);this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds());this.fire("animationend")},_animationAddLayer:function(n,t){this._animationAddLayerNonAnimated(n,t)}});L.markerClusterGroup=function(n){return new L.MarkerClusterGroup(n)};L.MarkerCluster=L.Marker.extend({initialize:function(n,t,i,r){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this});this._group=n;this._zoom=t;this._markers=[];this._childClusters=[];this._childCount=0;this._iconNeedsUpdate=!0;this._bounds=new L.LatLngBounds;i&&this._addChild(i);r&&this._addChild(r)},getAllChildMarkers:function(n){var t,i;for(n=n||[],t=this._childClusters.length-1;t>=0;t--)this._childClusters[t].getAllChildMarkers(n);for(i=this._markers.length-1;i>=0;i--)n.push(this._markers[i]);return n},getChildCount:function(){return this._childCount},zoomToBounds:function(){for(var r,n,t=this._childClusters.slice(),f=this._group._map,u=f.getBoundsZoom(this._bounds),i=this._zoom+1,e=f.getZoom();t.length>0&&u>i;){for(i++,r=[],n=0;n<t.length;n++)r=r.concat(t[n]._childClusters);t=r}u>i?this._group._map.setView(this._latlng,i):e>=u?this._group._map.setView(this._latlng,e+1):this._group._map.fitBounds(this._bounds)},getBounds:function(){var n=new L.LatLngBounds;return n.extend(this._bounds),n},_updateIcon:function(){this._iconNeedsUpdate=!0;this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(n,t){this._iconNeedsUpdate=!0;this._expandBounds(n);n instanceof L.MarkerCluster?(t||(this._childClusters.push(n),n.__parent=this),this._childCount+=n._childCount):(t||this._markers.push(n),this._childCount++);this.__parent&&this.__parent._addChild(n,!0)},_expandBounds:function(n){var i,t=n._wLatLng||n._latlng,r;n instanceof L.MarkerCluster?(this._bounds.extend(n._bounds),i=n._childCount):(this._bounds.extend(t),i=1);this._cLatLng||(this._cLatLng=n._cLatLng||t);r=this._childCount+i;this._wLatLng?(this._wLatLng.lat=(t.lat*i+this._wLatLng.lat*this._childCount)/r,this._wLatLng.lng=(t.lng*i+this._wLatLng.lng*this._childCount)/r):this._latlng=this._wLatLng=new L.LatLng(t.lat,t.lng)},_addToMap:function(n){n&&(this._backupLatlng=this._latlng,this.setLatLng(n));this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(n,t,i){this._recursively(n,0,i-1,function(n){for(var r,u=n._markers,i=u.length-1;i>=0;i--)r=u[i],r._icon&&(r._setPos(t),r.setOpacity(0))},function(n){for(var r,u=n._childClusters,i=u.length-1;i>=0;i--)r=u[i],r._icon&&(r._setPos(t),r.setOpacity(0))})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(n,t,i){this._recursively(n,i,0,function(r){r._recursivelyAnimateChildrenIn(n,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),t);r._isSingleParent()&&t-1===i?(r.setOpacity(1),r._recursivelyRemoveChildrenFromMap(n,t)):r.setOpacity(0);r._addToMap()})},_recursivelyBecomeVisible:function(n,t){this._recursively(n,0,t,null,function(n){n.setOpacity(1)})},_recursivelyAddChildrenToMap:function(n,t,i){this._recursively(i,-1,t,function(r){var f,u;if(t!==r._zoom)for(f=r._markers.length-1;f>=0;f--)u=r._markers[f],i.contains(u._latlng)&&(n&&(u._backupLatlng=u.getLatLng(),u.setLatLng(n),u.setOpacity&&u.setOpacity(0)),r._group._featureGroup.addLayer(u))},function(t){t._addToMap(n)})},_recursivelyRestoreChildPositions:function(n){for(var t,r,u,i=this._markers.length-1;i>=0;i--)t=this._markers[i],t._backupLatlng&&(t.setLatLng(t._backupLatlng),delete t._backupLatlng);if(n-1===this._zoom)for(r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._restorePosition();else for(u=this._childClusters.length-1;u>=0;u--)this._childClusters[u]._recursivelyRestoreChildPositions(n)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(n,t,i){var r,u;this._recursively(n,-1,t-1,function(n){for(u=n._markers.length-1;u>=0;u--)r=n._markers[u],i&&i.contains(r._latlng)||(n._group._featureGroup.removeLayer(r),r.setOpacity&&r.setOpacity(1))},function(n){for(u=n._childClusters.length-1;u>=0;u--)r=n._childClusters[u],i&&i.contains(r._latlng)||(n._group._featureGroup.removeLayer(r),r.setOpacity&&r.setOpacity(1))})},_recursively:function(n,t,i,r,u){var f,e,o=this._childClusters,s=this._zoom;if(t>s)for(f=o.length-1;f>=0;f--)e=o[f],n.intersects(e._bounds)&&e._recursively(n,t,i,r,u);else if(r&&r(this),u&&this._zoom===i&&u(this),i>s)for(f=o.length-1;f>=0;f--)e=o[f],n.intersects(e._bounds)&&e._recursively(n,t,i,r,u)},_recalculateBounds:function(){var n,t=this._markers,i=this._childClusters;for(this._bounds=new L.LatLngBounds,delete this._wLatLng,n=t.length-1;n>=0;n--)this._expandBounds(t[n]);for(n=i.length-1;n>=0;n--)this._expandBounds(i[n])},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.DistanceGrid=function(n){this._cellSize=n;this._sqCellSize=n*n;this._grid={};this._objectPoint={}};L.DistanceGrid.prototype={addObject:function(n,t){var i=this._getCoord(t.x),r=this._getCoord(t.y),u=this._grid,f=u[r]=u[r]||{},e=f[i]=f[i]||[],o=L.Util.stamp(n);this._objectPoint[o]=t;e.push(n)},updateObject:function(n,t){this.removeObject(n);this.addObject(n,t)},removeObject:function(n,t){var i,r,u=this._getCoord(t.x),o=this._getCoord(t.y),s=this._grid,f=s[o]=s[o]||{},e=f[u]=f[u]||[];for(delete this._objectPoint[L.Util.stamp(n)],i=0,r=e.length;r>i;i++)if(e[i]===n)return e.splice(i,1),1===r&&delete f[u],!0},eachObject:function(n,t){var e,o,i,r,u,f,s,h=this._grid;for(e in h){u=h[e];for(o in u)for(f=u[o],i=0,r=f.length;r>i;i++)s=n.call(t,f[i]),s&&(i--,r--)}},getNearObject:function(n){for(var i,r,o,u,s,f,e,h=this._getCoord(n.x),c=this._getCoord(n.y),v=this._objectPoint,l=this._sqCellSize,a=null,t=c-1;c+1>=t;t++)if(o=this._grid[t])for(i=h-1;h+1>=i;i++)if(u=o[i])for(r=0,s=u.length;s>r;r++)f=u[r],e=this._sqDist(v[L.Util.stamp(f)],n),l>e&&(l=e,a=f);return a},_getCoord:function(n){return Math.floor(n/this._cellSize)},_sqDist:function(n,t){var i=t.x-n.x,r=t.y-n.y;return i*i+r*r}},function(){L.QuickHull={getDistant:function(n,t){var i=t[1].lat-t[0].lat,r=t[0].lng-t[1].lng;return r*(n.lat-t[0].lat)+i*(n.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(n,t){for(var r,u,f=0,e=null,o=[],i=t.length-1;i>=0;i--)r=t[i],u=this.getDistant(r,n),u>0&&(o.push(r),u>f&&(f=u,e=r));return{maxPoint:e,newPoints:o}},buildConvexHull:function(n,t){var r=[],i=this.findMostDistantPointFromBaseLine(n,t);return i.maxPoint?(r=r.concat(this.buildConvexHull([n[0],i.maxPoint],i.newPoints)),r=r.concat(this.buildConvexHull([i.maxPoint,n[1]],i.newPoints))):[n[0]]},getConvexHull:function(n){for(var r=!1,u=!1,f=null,e=null,t,i=n.length-1;i>=0;i--)t=n[i],(r===!1||t.lat>r)&&(f=t,r=t.lat),(u===!1||t.lat<u)&&(e=t,u=t.lat);return[].concat(this.buildConvexHull([e,f],n),this.buildConvexHull([f,e],n))}}}();L.MarkerCluster.include({getConvexHull:function(){for(var t,i=this.getAllChildMarkers(),r=[],n=i.length-1;n>=0;n--)t=i[n].getLatLng(),r.push(t);return L.QuickHull.getConvexHull(r)}});L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,n=this.getAllChildMarkers(),r=this._group,u=r._map,i=u.latLngToLayerPoint(this._latlng);this._group._unspiderfy();this._group._spiderfied=this;n.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(n.length,i):(i.y+=10,t=this._generatePointsCircle(n.length,i));this._animationSpiderfy(n,t)}},unspiderfy:function(n){this._group._inZoomAnimation||(this._animationUnspiderfy(n),this._group._spiderfied=null)},_generatePointsCircle:function(n,t){var i,r,e=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+n),f=e/this._2PI,o=this._2PI/n,u=[];for(u.length=n,i=n-1;i>=0;i--)r=this._circleStartAngle+i*o,u[i]=new L.Point(t.x+f*Math.cos(r),t.y+f*Math.sin(r))._round();return u},_generatePointsSpiral:function(n,t){var i,r=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthStart,e=this._group.options.spiderfyDistanceMultiplier*this._spiralFootSeparation,o=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthFactor,u=0,f=[];for(f.length=n,i=n-1;i>=0;i--)u+=e/r+.0005*i,f[i]=new L.Point(t.x+r*Math.cos(u),t.y+r*Math.sin(u))._round(),r+=this._2PI*o/u;return f},_noanimationUnspiderfy:function(){var n,t,i=this._group,u=i._map,f=i._featureGroup,r=this.getAllChildMarkers();for(this.setOpacity(1),t=r.length-1;t>=0;t--)n=r[t],f.removeLayer(n),n._preSpiderfyLatlng&&(n.setLatLng(n._preSpiderfyLatlng),delete n._preSpiderfyLatlng),n.setZIndexOffset&&n.setZIndexOffset(0),n._spiderLeg&&(u.removeLayer(n._spiderLeg),delete n._spiderLeg);i._spiderfied=null}});L.MarkerCluster.include(L.DomUtil.TRANSITION?{SVG_ANIMATION:function(){return t.createElementNS("http://www.w3.org/2000/svg","animate").toString().indexOf("SVGAnimate")>-1}(),_animationSpiderfy:function(n,i){for(var r,e,h,a=this,o=this._group,c=o._map,v=o._featureGroup,p=c.latLngToLayerPoint(this._latlng),y,l,s,u,f=n.length-1;f>=0;f--)r=n[f],r.setOpacity?(r.setZIndexOffset(1e6),r.setOpacity(0),v.addLayer(r),r._setPos(p)):v.addLayer(r);for(o._forceLayout(),o._animationStart(),y=L.Path.SVG?0:.3,l=L.Path.SVG_NS,f=n.length-1;f>=0;f--)(h=c.layerPointToLatLng(i[f]),r=n[f],r._preSpiderfyLatlng=r._latlng,r.setLatLng(h),r.setOpacity&&r.setOpacity(1),e=new L.Polyline([a._latlng,h],{weight:1.5,color:"#222",opacity:y}),c.addLayer(e),r._spiderLeg=e,L.Path.SVG&&this.SVG_ANIMATION)&&(s=e._path.getTotalLength(),e._path.setAttribute("stroke-dasharray",s+","+s),u=t.createElementNS(l,"animate"),u.setAttribute("attributeName","stroke-dashoffset"),u.setAttribute("begin","indefinite"),u.setAttribute("from",s),u.setAttribute("to",0),u.setAttribute("dur",.25),e._path.appendChild(u),u.beginElement(),u=t.createElementNS(l,"animate"),u.setAttribute("attributeName","stroke-opacity"),u.setAttribute("attributeName","stroke-opacity"),u.setAttribute("begin","indefinite"),u.setAttribute("from",0),u.setAttribute("to",.5),u.setAttribute("dur",.25),e._path.appendChild(u),u.beginElement());if(a.setOpacity(.3),L.Path.SVG)for(this._group._forceLayout(),f=n.length-1;f>=0;f--)r=n[f]._spiderLeg,r.options.opacity=.5,r._path.setAttribute("stroke-opacity",.5);setTimeout(function(){o._animationEnd();o.fire("spiderfied")},200)},_animationUnspiderfy:function(n){var t,i,r,f=this._group,e=f._map,o=f._featureGroup,s=n?e._latLngToNewLayerPoint(this._latlng,n.zoom,n.center):e.latLngToLayerPoint(this._latlng),u=this.getAllChildMarkers(),h=L.Path.SVG&&this.SVG_ANIMATION;for(f._animationStart(),this.setOpacity(1),i=u.length-1;i>=0;i--)t=u[i],t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,t.setOpacity?(t._setPos(s),t.setOpacity(0)):o.removeLayer(t),h&&(r=t._spiderLeg._path.childNodes[0],r.setAttribute("to",r.getAttribute("from")),r.setAttribute("from",0),r.beginElement(),r=t._spiderLeg._path.childNodes[1],r.setAttribute("from",.5),r.setAttribute("to",0),r.setAttribute("stroke-opacity",0),r.beginElement(),t._spiderLeg._path.setAttribute("stroke-opacity",0)));setTimeout(function(){var n=0;for(i=u.length-1;i>=0;i--)t=u[i],t._spiderLeg&&n++;for(i=u.length-1;i>=0;i--)t=u[i],t._spiderLeg&&(t.setOpacity&&(t.setOpacity(1),t.setZIndexOffset(0)),n>1&&o.removeLayer(t),e.removeLayer(t._spiderLeg),delete t._spiderLeg);f._animationEnd()},200)}}:{_animationSpiderfy:function(n,t){for(var i,u,f,e=this._group,o=e._map,s=e._featureGroup,r=n.length-1;r>=0;r--)f=o.layerPointToLatLng(t[r]),i=n[r],i._preSpiderfyLatlng=i._latlng,i.setLatLng(f),i.setZIndexOffset&&i.setZIndexOffset(1e6),s.addLayer(i),u=new L.Polyline([this._latlng,f],{weight:1.5,color:"#222"}),o.addLayer(u),i._spiderLeg=u;this.setOpacity(.3);e.fire("spiderfied")},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}});L.MarkerClusterGroup.include({_spiderfied:null,_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this);this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this);this._map.on("zoomend",this._noanimationUnspiderfy,this);L.Path.SVG&&!L.Browser.touch&&this._map._initPathRoot()},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this);this._map.off("zoomstart",this._unspiderfyZoomStart,this);this._map.off("zoomanim",this._unspiderfyZoomAnim,this);this._unspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(n){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(n))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(n){this._spiderfied&&this._spiderfied.unspiderfy(n)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(n){n._spiderLeg&&(this._featureGroup.removeLayer(n),n.setOpacity(1),n.setZIndexOffset(0),this._map.removeLayer(n._spiderLeg),delete n._spiderLeg)}})}(window,document),function(){"use strict";L.MakiMarkers={icons:["airfield","airport","alcohol-shop","america-football","art-gallery","bakery","bank","bar","baseball","basketball","beer","bicycle","building","bus","cafe","camera","campsite","car","cemetery","chemist","cinema","circle-stroked","circle","city","clothing-store","college","commercial","cricket","cross","dam","danger","disability","dog-park","embassy","emergency-telephone","entrance","farm","fast-food","ferry","fire-station","fuel","garden","golf","grocery","hairdresser","harbor","heart","heliport","hospital","industrial","land-use","laundry","library","lighthouse","lodging","logging","london-underground","marker-stroked","marker","minefield","mobilephone","monument","museum","music","oil-well","park2","park","parking-garage","parking","pharmacy","pitch","place-of-worship","playground","police","polling-place","post","prison","rail-above","rail-light","rail-metro","rail-underground","rail","religious-christian","religious-jewish","religious-muslim","restaurant","roadblock","rocket","school","scooter","shop","skiing","slaughterhouse","soccer","square-stroked","square","star-stroked","star","suitcase","swimming","telephone","tennis","theatre","toilets","town-hall","town","triangle-stroked","triangle","village","warehouse","waste-basket","water","wetland","zoo"],defaultColor:"#0a0",defaultIcon:"circle-stroked",defaultSize:"m",apiUrl:"https://api.tiles.mapbox.com/v3/marker/",smallOptions:{iconSize:[20,50],popupAnchor:[0,-20]},mediumOptions:{iconSize:[30,70],popupAnchor:[0,-30]},largeOptions:{iconSize:[36,90],popupAnchor:[0,-40]}};L.MakiMarkers.Icon=L.Icon.extend({options:{icon:L.MakiMarkers.defaultIcon,color:L.MakiMarkers.defaultColor,size:L.MakiMarkers.defaultSize,shadowAnchor:null,shadowSize:null,shadowUrl:null,className:"maki-marker"},initialize:function(n){var t;n=L.setOptions(this,n);switch(n.size){case"s":L.extend(n,L.MakiMarkers.smallOptions);break;case"l":L.extend(n,L.MakiMarkers.largeOptions);break;default:n.size="m";L.extend(n,L.MakiMarkers.mediumOptions)}t="pin-"+n.size;n.icon!==null&&(t+="-"+n.icon);n.color!==null&&(n.color.charAt(0)==="#"&&(n.color=n.color.substr(1)),t+="+"+n.color);n.iconUrl=""+L.MakiMarkers.apiUrl+t+".png";n.iconRetinaUrl=L.MakiMarkers.apiUrl+t+"@2x.png"}});L.MakiMarkers.icon=function(n){return new L.MakiMarkers.Icon(n)}}();GeoJsonStreetsAndSatelliteMap.prototype.Initialize=function(){L.mapbox.accessToken=this.options.mapboxAccessToken;var n={Streets:L.mapbox.tileLayer(this.options.streetsTileLayerId,{minZoom:1,maxZoom:17}),Satellite:L.mapbox.tileLayer(this.options.satelliteTileLayerId,{minZoom:1,maxZoom:17})};return this.options.defaultViewIsSatellite?n.Satellite.addTo(this.map):n.Streets.addTo(this.map),this.UpdateProjectCounts(),L.control.layers(n).addTo(this.map),$("#"+this.mapDivId).trigger("onInitialized",this),this};GeoJsonStreetsAndSatelliteMap.prototype.RenderMap=function(){var n,t;return this.markers&&this.markers!==undefined||(this.markers=L.markerClusterGroup({maxClusterRadius:35})),this.markers.clearLayers(),this.filteredGeoJson=this.filteredGeoJson.filter(function(n){return n==null?!1:!0}),this.filteredGeoJson.length>0?(n=Enumerable.From(this.filteredGeoJson).Where("$.geometry != null && $.geometry.coordinates != null").ToArray(),n.length>0?(t=this.onEachFeature&&this.pointToLayer?L.geoJson(n,{onEachFeature:this.onEachFeature,pointToLayer:this.pointToLayer,style:this.style}):this.onEachFeature?L.geoJson(n,{onEachFeature:this.onEachFeature,style:this.style}):this.pointToLayer?L.geoJson(n,{pointToLayer:this.pointToLayer,style:this.style}):L.geoJson(n,{style:this.style}),this.markers.addLayer(t),this.map.addLayer(this.markers),this.map.fitBounds(this.markers.getBounds(),{padding:[70,70]})):this.FocusAlberta()):this.FocusAlberta(),this};GeoJsonStreetsAndSatelliteMap.prototype.FocusAlberta=function(){this.map.setView([53.55014,-113.46871],6)};GeoJsonStreetsAndSatelliteMap.prototype.UpdateMapData=function(n,t){var i=Enumerable.From(this.geoJson).Where(n),r;return t!=null&&t.length>0&&(r=t.split("|"),i=i.Where(function(n){for(var i=!1,t=0;t<r.length;t++)if($.inArray(r[t],n.properties.municipalities)>-1){i=!0;break}if(i)return n})),this.filteredGeoJson=i.ToArray(),this.UpdateProjectCounts(),this};GeoJsonStreetsAndSatelliteMap.prototype.UpdateProjectCounts=function(){if($("#project-count").text(this.geoJson.length),$("#project-filter-count").length){$("#project-filter-count").text(this.filteredGeoJson.length);var n=Enumerable.From(this.filteredGeoJson).Sum("parseFloat($.properties.cost)");$("#project-filter-value").text(formatBudgetDisplay(n))}return $("#checkAll").attr("checked",!1),this};GeoJsonStreetsAndSatelliteMap.prototype.ResetMapView=function(){var n=$("#map"),t=n.height(),i=n.width();return t=t>=400?i*.75:i,n.height(t),this.USE_MY_LOCATION||this.filteredGeoJson.length>0&&this.map.fitBounds(this.markers.getBounds(),{padding:[70,70]}),this.USE_MY_LOCATION=!1,this.map.invalidateSize(),this};GeoJsonStreetsAndSatelliteMap.prototype.zoom=function(n,t,i){i||(i=13);this.map.setView([n,t],i)};GeoJsonStreetsAndSatelliteMap.prototype.style=function(n){return n.geometry&&n.geometry.type!="Point"?$("#is-xs,#is-sm,#is-md").is(":visible")?{color:n.properties.color,weight:10,dashArray:"12",opacity:.7,lineCap:"round"}:{color:n.properties.color,weight:5,dashArray:"10",linecap:"round",opacity:.7,smoothFactor:1}:$("#is-xs,#is-sm,#is-md").is(":visible")?{markerColor:n.properties.color,weight:10,dashArray:"12",opacity:.7,lineCap:"round"}:{color:n.properties.color,weight:5,dashArray:"10",linecap:"round",opacity:.7,smoothFactor:1}};GeoJsonStreetsAndSatelliteMap.prototype.AddMagicSuggestControls=function(n){this.magicSuggestControls=$.extend({},n)}