(self.webpackChunk_roots_bud_sage=self.webpackChunk_roots_bud_sage||[]).push([[537],{"../node_modules/leaflet/dist/leaflet-src.js":function(e,t){!function(e){"use strict";Rn="1.9.4";function u(e){var t,n,s,o;for(t=1,s=arguments.length;t<s;t++)for(n in o=arguments[t])e[n]=o[n];return e}xe=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}();function f(e,t){var s,n=Array.prototype.slice;return e.bind?e.bind.apply(e,n.call(arguments,1)):(s=n.call(arguments,2),function(){return e.apply(t,s.length?s.concat(n.call(arguments)):arguments)})}it=0;function l(e){return"_leaflet_id"in e||(e._leaflet_id=++it),e._leaflet_id}function dn(e,t,n){var s,o,i,a;return a=function(){o=!1,s&&(i.apply(n,s),s=!1)},i=function(){o?s=arguments:(e.apply(n,arguments),setTimeout(a,t),o=!0)},i}function ue(e,t,n){var i=t[1],s=t[0],o=i-s;return e===i&&n?e:((e-s)%o+o)%o+s}function b(){return!1}function P(e,t){if(!1===t)return e;var n=10**(0[0]===t?6:t);return Math.round(e*n)/n}function at(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function J(e){return at(e).split(/\s+/)}function m(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?xe(e.options):{}),t)e.options[n]=t[n];return e.options}function fn(e,t,n){var s,o=[];for(s in e)o.push(encodeURIComponent(n?s.toUpperCase():s)+"="+encodeURIComponent(e[s]));return(t&&-1!==t.indexOf("?")?"&":"?")+o.join("&")}_n=/\{ *([\w_ -]+) *\}/g;function Sn(e,t){return e.replace(_n,function(e,n){var s=t[n];if(0[0]===s)throw new Error("No value provided for variable "+e);return"function"==typeof s&&(s=s(t)),s})}M=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function mt(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}pe="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function pt(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}gt=0;function $n(e){var t=+new Date,n=Math.max(0,16-(t-gt));return gt=t+n,window.setTimeout(e,n)}De=window.requestAnimationFrame||pt("RequestAnimationFrame")||$n,bt=window.cancelAnimationFrame||pt("CancelAnimationFrame")||pt("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function w(e,t,n){if(!n||De!==$n)return De.call(window,f(e,t));e.call(t)}function S(e){e&&bt.call(window,e)}qn={__proto__:null,extend:u,create:xe,bind:f,get lastId(){return it},stamp:l,throttle:dn,wrapNum:ue,falseFn:b,formatNum:P,trim:at,splitWords:J,setOptions:m,getParamString:fn,template:Sn,isArray:M,indexOf:mt,emptyImageUrl:pe,requestFn:De,cancelFn:bt,requestAnimFrame:w,cancelAnimFrame:S};function B(){}function ws(e){if("undefined"!=typeof L&&L&&L.Mixin){e=M(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}B.extend=function(e){var o,n=function(){m(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=n.__super__=this.prototype,t=xe(s);for(o in t.constructor=n,n.prototype=t,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(n[o]=this[o]);return e.statics&&u(n,e.statics),e.includes&&(ws(e.includes),u.apply(null,[t].concat(e.includes))),u(t,e),delete t.statics,delete t.includes,t.options&&(t.options=s.options?xe(s.options):{},u(t.options,e.options)),t._initHooks=[],t.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,n=t._initHooks.length;e<n;e++)t._initHooks[e].call(this)}},n},B.include=function(e){var t=this.prototype.options;return u(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},B.mergeOptions=function(e){return u(this.prototype.options,e),this},B.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this},C={on:function(e,t,n){if("object"==typeof e)for(o in e)this._on(o,e[o],t);else for(var o,s=0,i=(e=J(e)).length;s<i;s++)this._on(e[s],t,n);return this},off:function(e,t,n){if(arguments.length)if("object"==typeof e)for(o in e)this._off(o,e[o],t);else{e=J(e);for(var o,i=1===arguments.length,s=0,a=e.length;s<a;s++)i?this._off(e[s]):this._off(e[s],t,n)}else delete this._events;return this},_on:function(e,t,n,s){if("function"==typeof t){if(!1===this._listens(e,t,n)){n===this&&(n=0[0]);var o={fn:t,ctx:n};s&&(o.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(o)}}else console.warn("wrong listener type: "+typeof t)},_off:function(e,t,n){if(this._events&&(s=this._events[e]))if(1!==arguments.length)if("function"==typeof t){var s,o,a,r,i=this._listens(e,t,n);!1!==i&&(r=s[i],this._firingCount&&(r.fn=b,this._events[e]=s=s.slice()),s.splice(i,1))}else console.warn("wrong listener type: "+typeof t);else{if(this._firingCount)for(o=0,a=s.length;o<a;o++)s[o].fn=b;delete this._events[e]}},fire:function(e,t,n){if(!this.listens(e,n))return this;if(i=u({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this}),this._events&&(o=this._events[e],o)){this._firingCount=this._firingCount+1||1;for(var s,o,i,r,a=0,c=o.length;a<c;a++)s=o[a],r=s.fn,s.once&&this.off(e,r,s.ctx),r.call(s.ctx||this,i);this._firingCount--}return n&&this._propagateEvent(i),this},listens:function(e,t,n,s){"string"!=typeof e&&console.warn('"string" type argument expected');var o,a,i=t;if("function"!=typeof t&&(s=!!t,i=0[0],n=0[0]),o=this._events&&this._events[e],o&&o.length&&!1!==this._listens(e,i,n))return!0;if(s)for(a in this._eventParents)if(this._eventParents[a].listens(e,t,n,s))return!0;return!1},_listens:function(e,t,n){if(!this._events)return!1;if(s=this._events[e]||[],!t)return!!s.length;n===this&&(n=0[0]);for(var s,o=0,i=s.length;o<i;o++)if(s[o].fn===t&&s[o].ctx===n)return o;return!1},once:function(e,t,n){if("object"==typeof e)for(o in e)this._on(o,e[o],t,!0);else for(var o,s=0,i=(e=J(e)).length;s<i;s++)this._on(e[s],t,n,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[l(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[l(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,u({layer:e.target,propagatedFrom:e.target},e),!0)}},C.addEventListener=C.on,C.removeEventListener=C.clearAllEventListeners=C.off,C.addOneTimeEventListener=C.once,C.fireEvent=C.fire,C.hasEventListeners=C.listens,re=B.extend(C);function s(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}jt=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};function n(e,t,n){return e instanceof s?e:M(e)?new s(e[0],e[1]):e==null?e:"object"==typeof e&&"x"in e&&"y"in e?new s(e.x,e.y):new s(e,t,n)}function p(e,t){if(e)for(var s=t?[e,t]:e,n=0,o=s.length;n<o;n++)this.extend(s[n])}function x(e,t){return!e||e instanceof p?e:new p(e,t)}function O(e,t){if(e)for(var s=t?[e,t]:e,n=0,o=s.length;n<o;n++)this.extend(s[n])}function y(e,t){return e instanceof O?e:new O(e,t)}function d(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,0[0]!==n&&(this.alt=+n)}function a(e,t,n){return e instanceof d?e:M(e)&&"object"!=typeof e[0]?3===e.length?new d(e[0],e[1],e[2]):2===e.length?new d(e[0],e[1]):null:e==null?e:"object"==typeof e&&"lat"in e?new d(e.lat,"lng"in e?e.lng:e.lon,e.alt):0[0]===t?null:new d(e,t,n)}s.prototype={clone:function(){return new s(this.x,this.y)},add:function(e){return this.clone()._add(n(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(n(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new s(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new s(this.x/e.x,this.y/e.y)},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},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=jt(this.x),this.y=jt(this.y),this},distanceTo:function(e){var t=(e=n(e)).x-this.x,s=e.y-this.y;return(t*t+s*s)**.5},equals:function(e){return(e=n(e)).x===this.x&&e.y===this.y},contains:function(e){return e=n(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+P(this.x)+", "+P(this.y)+")"}},p.prototype={extend:function(e){var t,o;if(!e)return this;if(e instanceof s||"number"==typeof e[0]||"x"in e)t=o=n(e);else if(t=(e=x(e)).min,o=e.max,!t||!o)return this;return this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(o.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(o.y,this.max.y)):(this.min=t.clone(),this.max=o.clone()),this},getCenter:function(e){return n((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return n(this.min.x,this.max.y)},getTopRight:function(){return n(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,o;return(e="number"==typeof e[0]||e instanceof s?n(e):x(e))instanceof p?(t=e.min,o=e.max):t=o=e,t.x>=this.min.x&&o.x<=this.max.x&&t.y>=this.min.y&&o.y<=this.max.y},intersects:function(e){e=x(e);var t=this.min,n=this.max,s=e.min,o=e.max,i=o.x>=t.x&&s.x<=n.x,a=o.y>=t.y&&s.y<=n.y;return i&&a},overlaps:function(e){e=x(e);var t=this.min,n=this.max,s=e.min,o=e.max,i=o.x>t.x&&s.x<n.x,a=o.y>t.y&&s.y<n.y;return i&&a},isValid:function(){return!!this.min&&!!this.max},pad:function(e){var t=this.min,s=this.max,o=Math.abs(t.x-s.x)*e,i=Math.abs(t.y-s.y)*e;return x(n(t.x-o,t.y-i),n(s.x+o,s.y+i))},equals:function(e){return!!e&&(e=x(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},O.prototype={extend:function(e){var t,n,s=this._southWest,o=this._northEast;if(e instanceof d)t=e,n=e;else{if(!(e instanceof O))return e?this.extend(a(e)||y(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return s||o?(s.lat=Math.min(t.lat,s.lat),s.lng=Math.min(t.lng,s.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new d(t.lat,t.lng),this._northEast=new d(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,s=Math.abs(t.lat-n.lat)*e,o=Math.abs(t.lng-n.lng)*e;return new O(new d(t.lat-s,t.lng-o),new d(n.lat+s,n.lng+o))},getCenter:function(){return new d((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 d(this.getNorth(),this.getWest())},getSouthEast:function(){return new d(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(e){e="number"==typeof e[0]||e instanceof d||"lat"in e?a(e):y(e);var t,n,s=this._southWest,o=this._northEast;return e instanceof O?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=s.lat&&n.lat<=o.lat&&t.lng>=s.lng&&n.lng<=o.lng},intersects:function(e){e=y(e);var t=this._southWest,n=this._northEast,s=e.getSouthWest(),o=e.getNorthEast(),i=o.lat>=t.lat&&s.lat<=n.lat,a=o.lng>=t.lng&&s.lng<=n.lng;return i&&a},overlaps:function(e){e=y(e);var t=this._southWest,n=this._northEast,s=e.getSouthWest(),o=e.getNorthEast(),i=o.lat>t.lat&&s.lat<n.lat,a=o.lng>t.lng&&s.lng<n.lng;return i&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=y(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!!this._southWest&&!!this._northEast}},d.prototype={equals:function(e,t){return!!e&&(e=a(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(0[0]===t?1e-9:t))},toString:function(e){return"LatLng("+P(this.lat,e)+", "+P(this.lng,e)+")"},distanceTo:function(e){return K.distance(this,a(e))},wrap:function(){return K.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return y([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new d(this.lat,this.lng,this.alt)}};var Oe,W={latLngToPoint:function(e,t){var n=this.projection.project(e),s=this.scale(t);return this.transformation._transform(n,s)},pointToLatLng:function(e,t){var n=this.scale(t),s=this.transformation.untransform(e,n);return this.projection.unproject(s)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*2**e},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new p(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?ue(e.lng,this.wrapLng,!0):e.lng;return new d(this.wrapLat?ue(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var o,i,t=e.getCenter(),a=this.wrapLatLng(t),n=t.lat-a.lat,s=t.lng-a.lng;return 0===n&&0===s?e:(o=e.getSouthWest(),i=e.getNorthEast(),new O(new d(o.lat-n,o.lng-s),new d(i.lat-n,i.lng-s)))}},K=u({},W,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,a=e.lat*n,r=t.lat*n,s=Math.sin((t.lat-e.lat)*n/2),o=Math.sin((t.lng-e.lng)*n/2),i=s*s+Math.cos(a)*Math.cos(r)*o*o,c=2*Math.atan2(i**.5,(1-i)**.5);return this.R*c}}),Yn=6378137,xt={R:Yn,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,e.lat),-n),o=Math.sin(i*t);return new s(this.R*e.lng*t,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(e){var t=180/Math.PI;return new d((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(Oe=Yn*Math.PI,new p([-Oe,-Oe],[Oe,Oe]))};function Et(e,t,n,s){if(M(e))return this._a=e[0],this._b=e[1],this._c=e[2],void(this._d=e[3]);this._a=e,this._b=t,this._c=n,this._d=s}function me(e,t,n,s){return new Et(e,t,n,s)}Et.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new s((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}},Pe=u({},K,{code:"EPSG:3857",projection:xt,transformation:function(){var e=.5/(Math.PI*xt.R);return me(e,.5,-e,.5)}()}),Zn=u({},Pe,{code:"EPSG:900913"});function Jn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function es(e,n){var s,o,a,r,c,l,i="";for(o=0,a=e.length;o<a;o++){for(s=0,r=(c=e[o]).length;s<r;s++)i+=(s?"L":"M")+(l=c[s]).x+" "+l.y;i+=n?t.svg?"z":"x":""}return i||"M0 0"}var Rn,xe,it,_n,M,pe,gt,De,bt,qn,C,re,jt,Pe,Zn,kt,an,de,gn,T,$e,Jt,A,te,vn,D,Cn,En,E,V,Ee,Le,N,H,X,Te,vt,z,ke,Ln,ge,Fn,ht,ne,G,ut,I,ct,ot,st,nt,tt,et,Je,nn,Ze,Qe,Kt,At=document.documentElement.style,He="ActiveXObject"in window,Ns=He&&!document.addEventListener,ts="msLaunchUri"in navigator&&!("documentMode"in document),St=R("webkit"),Qn=R("android"),Gn=R("android 2")||R("android 3"),js=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ss=Qn&&R("Google")&&js<537&&!("AudioNode"in window),Tt=!!window.opera,Nn=!ts&&R("chrome"),Dn=R("gecko")&&!St&&!Tt&&!He,Vs=!Nn&&R("safari"),bn=R("phantom"),cn="OTransition"in At,Js=0===navigator.platform.indexOf("Win"),on=He&&"transition"in At,Bt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Gn,Gt="MozPerspective"in At,lo=!window.L_DISABLE_3D&&(on||Bt||Gt)&&!cn&&!bn,ye="undefined"!=typeof orientation||R("mobile"),uo=ye&&St,Ls=ye&&Bt,Xt=!window.PointerEvent&&window.MSPointerEvent,tn=!!window.PointerEvent||!!Xt,Wt="ontouchstart"in window||!!window.TouchEvent,Rs=!window.L_NO_TOUCH&&(Wt||tn),Ss=ye&&Tt,ks=ye&&Dn,us=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,is=function(){var e,t=!1;try{e=Object.defineProperty({},"passive",{get:function(){t=!0}}),window.addEventListener("testPassiveEventSupport",b,e),window.removeEventListener("testPassiveEventSupport",b,e)}catch{}return t}(),rs=!!document.createElement("canvas").getContext,Ct=!!document.createElementNS&&!!Jn("svg").createSVGRect,gs=!!Ct&&((kt=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(kt.firstChild&&kt.firstChild.namespaceURI)),bs=!Ct&&function(){try{var e,t=document.createElement("div");return t.innerHTML='<v:shape adj="1"/>',e=t.firstChild,e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch{return!1}}(),ys=0===navigator.platform.indexOf("Mac"),_s=0===navigator.platform.indexOf("Linux");function R(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var t={ie:He,ielt9:Ns,edge:ts,webkit:St,android:Qn,android23:Gn,androidStock:ss,opera:Tt,chrome:Nn,gecko:Dn,safari:Vs,phantom:bn,opera12:cn,win:Js,ie3d:on,webkit3d:Bt,gecko3d:Gt,any3d:lo,mobile:ye,mobileWebkit:uo,mobileWebkit3d:Ls,msPointer:Xt,pointer:tn,touch:Rs,touchNative:Wt,mobileOpera:Ss,mobileGecko:ks,retina:us,passiveEvents:is,canvas:rs,svg:Ct,vml:bs,inlineSvg:gs,mac:ys,linux:_s},Un=t.msPointer?"MSPointerDown":"pointerdown",Bn=t.msPointer?"MSPointerMove":"pointermove",Ut=t.msPointer?"MSPointerUp":"pointerup",Pn=t.msPointer?"MSPointerCancel":"pointercancel",ft={touchstart:Un,touchmove:Bn,touchend:Ut,touchcancel:Pn},pn={touchstart:io,touchmove:Ve,touchend:Ve,touchcancel:Ve},se={},hn=!1;function Gs(e,t,n){return"touchstart"===t&&co(),pn[t]?(n=pn[t].bind(this,n),e.addEventListener(ft[t],n,!1),n):(console.warn("wrong event specified:",t),b)}function Zs(e,t,n){ft[t]?e.removeEventListener(ft[t],n,!1):console.warn("wrong event specified:",t)}function ao(e){se[e.pointerId]=e}function Ys(e){se[e.pointerId]&&(se[e.pointerId]=e)}function Yt(e){delete se[e.pointerId]}function co(){hn||(document.addEventListener(Un,ao,!0),document.addEventListener(Bn,Ys,!0),document.addEventListener(Ut,Yt,!0),document.addEventListener(Pn,Yt,!0),hn=!0)}function Ve(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],se)t.touches.push(se[n]);t.changedTouches=[t],e(t)}}function io(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&_(t),Ve(e,t)}function oo(e){var n,s,t={};for(s in e)n=e[s],t[s]=n&&n.bind?n.bind(e):n;return e=t,t.type="dblclick",t.detail=2,t.isTrusted=!1,t._simulated=!0,t}an=200;function no(e,t){e.addEventListener("dblclick",t);var n,s=0;function o(e){if(1===e.detail){if("mouse"!==e.pointerType&&(!e.sourceCapabilities||e.sourceCapabilities.firesTouchEvents)){var o,i=Qt(e);(!i.some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})||i.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement}))&&(o=Date.now(),o-s<=an?2==++n&&t(oo(e)):n=1,s=o)}}else n=e.detail}return e.addEventListener("click",o),{dblclick:t,simDblclick:o}}function eo(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}var fe,ve,rt,Ke,lt,dt=Fe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),_e=Fe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Mn="webkitTransition"===_e||"OTransition"===_e?_e+"End":"transitionend";function Tn(e){return"string"==typeof e?document.getElementById(e):e}function we(e,t){var s,n=e.style[t]||e.currentStyle&&e.currentStyle[t];return(!n||"auto"===n)&&document.defaultView&&(s=document.defaultView.getComputedStyle(e,null),n=s?s[t]:null),"auto"===n?null:n}function c(e,t,n){var s=document.createElement(e);return s.className=t||"",n&&n.appendChild(s),s}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function Ie(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ie(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function ce(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function yt(e,t){if(0[0]!==e.classList)return e.classList.contains(t);var n=ze(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function i(e,t){if(0[0]!==e.classList)for(var s,o=J(t),n=0,i=o.length;n<i;n++)e.classList.add(o[n]);else yt(e,t)||(s=ze(e),Ot(e,(s?s+" ":"")+t))}function v(e,t){0[0]!==e.classList?e.classList.remove(t):Ot(e,at((" "+ze(e)+" ").replace(" "+t+" "," ")))}function Ot(e,t){0[0]===e.className.baseVal?e.className=t:e.className.baseVal=t}function ze(e){return e.correspondingElement&&(e=e.correspondingElement),0[0]===e.className.baseVal?e.className:e.className.baseVal}function F(e,t){"opacity"in e.style?e.style.opacity=t:"filter"in e.style&&ps(e,t)}function ps(e,t){var n=!1,s="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(s)}catch{if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+s+"(opacity="+t+")"}function Fe(e){for(var n=document.documentElement.style,t=0;t<e.length;t++)if(e[t]in n)return e[t];return!1}function ee(e,n,o){var i=n||new s(0,0);e.style[dt]=(t.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(o?" scale("+o+")":"")}function j(e,n){e._leaflet_pos=n,t.any3d?ee(e,n):(e.style.left=n.x+"px",e.style.top=n.y+"px")}function Q(e){return e._leaflet_pos||new s(0,0)}"onselectstart"in document?(fe=function(){o(window,"selectstart",_)},ve=function(){h(window,"selectstart",_)}):(de=Fe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),fe=function(){if(de){var e=document.documentElement.style;rt=e[de],e[de]="none"}},ve=function(){de&&(document.documentElement.style[de]=rt,rt=0[0])});function Ge(){o(window,"dragstart",_)}function zt(){h(window,"dragstart",_)}function Dt(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(Re(),Ke=e,lt=e.style.outlineStyle,e.style.outlineStyle="none",o(window,"keydown",Re))}function Re(){Ke&&(Ke.style.outlineStyle=lt,Ke=0[0],lt=0[0],h(window,"keydown",Re))}function xn(e){do e=e.parentNode;while(!(e.offsetWidth&&e.offsetHeight||e===document.body))return e}function Rt(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}gn={__proto__:null,TRANSFORM:dt,TRANSITION:_e,TRANSITION_END:Mn,get:Tn,getStyle:we,create:c,remove:g,empty:Ie,toFront:ie,toBack:ce,hasClass:yt,addClass:i,removeClass:v,setClass:Ot,getClass:ze,setOpacity:F,testProp:Fe,setTransform:ee,setPosition:j,getPosition:Q,get disableTextSelection(){return fe},get enableTextSelection(){return ve},disableImageDrag:Ge,enableImageDrag:zt,preventOutline:Dt,restoreOutline:Re,getSizedParentNode:xn,getScale:Rt};function o(e,t,n,s){if(t&&"object"==typeof t)for(i in t)Xe(e,i,t[i],n);else for(var i,o=0,a=(t=J(t)).length;o<a;o++)Xe(e,t[o],n,s);return this}T="_leaflet_events";function h(e,t,n,s){if(1===arguments.length)qt(e),delete e[T];else if(t&&"object"==typeof t)for(i in t)$t(e,i,t[i],n);else if(t=J(t),2===arguments.length)qt(e,function(e){return-1!==mt(t,e)});else for(var i,o=0,a=t.length;o<a;o++)$t(e,t[o],n,s);return this}function qt(e,t){for(n in e[T]){var n,s=n.split(/\d/)[0];t&&!t(s)||$t(e,s,null,null,n)}}$e={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Xe(e,n,s,o){if(a=n+l(s)+(o?"_"+l(o):""),e[T]&&e[T][a])return this;var a,i=function(t){return s.call(o||e,t||window.event)},r=i;!t.touchNative&&t.pointer&&0===n.indexOf("touch")?i=Gs(e,n,i):t.touch&&"dblclick"===n?i=no(e,i):"addEventListener"in e?"touchstart"===n||"touchmove"===n||"wheel"===n||"mousewheel"===n?e.addEventListener($e[n]||n,i,!!t.passiveEvents&&{passive:!1}):"mouseenter"===n||"mouseleave"===n?(i=function(t){t=t||window.event,It(e,t)&&r(t)},e.addEventListener($e[n],i,!1)):e.addEventListener(n,r,!1):e.attachEvent("on"+n,i),e[T]=e[T]||{},e[T][a]=i}function $t(e,n,s,o,i){i=i||n+l(s)+(o?"_"+l(o):"");var a=e[T]&&e[T][i];if(!a)return this;!t.touchNative&&t.pointer&&0===n.indexOf("touch")?Zs(e,n,a):t.touch&&"dblclick"===n?eo(e,a):"removeEventListener"in e?e.removeEventListener($e[n]||n,a,!1):e.detachEvent("on"+n,a),e[T][i]=null}function Y(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Vt(e){return Xe(e,"wheel",Y),this}function je(e){return o(e,"mousedown touchstart dblclick contextmenu",Y),e._leaflet_disable_click=!0,this}function _(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function q(e){return _(e),Y(e),this}function Qt(e){if(e.composedPath)return e.composedPath();for(var n=[],t=e.target;t;)n.push(t),t=t.parentNode;return n}function Zt(e,t){if(!t)return new s(e.clientX,e.clientY);var n=Rt(t),o=n.boundingClientRect;return new s((e.clientX-o.left)/n.x-t.clientLeft,(e.clientY-o.top)/n.y-t.clientTop)}Jt=t.linux&&t.chrome?window.devicePixelRatio:t.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function en(e){return t.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/Jt:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function It(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch{return!1}return n!==e}var ro={__proto__:null,on:o,off:h,stopPropagation:Y,disableScrollPropagation:Vt,disableClickPropagation:je,preventDefault:_,stop:q,getPropagationPath:Qt,getMousePosition:Zt,getWheelDelta:en,isExternalTarget:It,addListener:o,removeListener:h},sn=re.extend({run:function(e,t,n,s){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(s||.5,.2),this._startPos=Q(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=w(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),j(this._el,n),this.fire("step")},_complete:function(){S(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-(1-e)**this._easeOutPower}}),r=re.extend({options:{crs:Pe,center:0[0],zoom:0[0],minZoom:0[0],maxZoom:0[0],layers:[],maxBounds:0[0],renderer:0[0],zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,n){n=m(this,n),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=f(this._onResize,this),this._initEvents(),n.maxBounds&&this.setMaxBounds(n.maxBounds),0[0]!==n.zoom&&(this._zoom=this._limitZoom(n.zoom)),n.center&&0[0]!==n.zoom&&this.setView(a(n.center),n.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=_e&&t.any3d&&!t.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),o(this._proxy,Mn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,n){return t=0[0]===t?this._zoom:this._limitZoom(t),e=this._limitCenter(a(e),t,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(0[0]!==n.animate&&(n.zoom=u({animate:n.animate},n.zoom),n.pan=u({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,n.zoom):this._tryAnimatedPan(e,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t,n.pan&&n.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,n){return e=e||(t.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,n)},zoomOut:function(e,n){return e=e||(t.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,n)},setZoomAround:function(e,t,n){var i=this.getZoomScale(t),o=this.getSize().divideBy(2),a=(e instanceof s?e:this.latLngToContainerPoint(e)).subtract(o).multiplyBy(1-1/i),r=this.containerPointToLatLng(o.add(a));return this.setView(r,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():y(e);var o=n(t.paddingTopLeft||t.padding||[0,0]),i=n(t.paddingBottomRight||t.padding||[0,0]),s=this.getBoundsZoom(e,!1,o.add(i));if((s="number"==typeof t.maxZoom?Math.min(t.maxZoom,s):s)===1/0)return{center:e.getCenter(),zoom:s};var a=i.subtract(o).divideBy(2),r=this.project(e.getSouthWest(),s),c=this.project(e.getNorthEast(),s);return{center:this.unproject(r.add(c).divideBy(2).add(a),s),zoom:s}},fitBounds:function(e,t){if(!(e=y(e)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(t=t||{},!(e=n(e).round()).x&&!e.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new sn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){i(this._mapPane,"leaflet-pan-anim");var s=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,s,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,n,s){if(!1===(s=s||{}).animate||!t.any3d)return this.setView(e,n,s);this._stop();var h=this.project(this.getCenter()),v=this.project(e),g=this.getSize(),l=this._zoom;e=a(e),n=0[0]===n?l:n;var o,i=Math.max(g.x,g.y),m=i*this.getZoomScale(l,n),d=v.distanceTo(h)||1,r=1.42,u=r*r;function p(e){var t=(m*m-i*i+(e?-1:1)*u*u*d*d)/(2*(e?m:i)*u*d),n=(t*t+1)**.5-t;return n<1e-9?-18:Math.log(n)}function f(e){return(Math.exp(e)-Math.exp(-e))/2}function c(e){return(Math.exp(e)+Math.exp(-e))/2}function y(e){return f(e)/c(e)}o=p(0);function _(e){return i*(c(o)/c(o+r*e))}function O(e){return i*(c(o)*y(o+r*e)-f(o))/u}function x(e){return 1-(1-e)**1.5}var C=Date.now(),b=(p(1)-o)/r,E=s.duration?1e3*s.duration:1e3*b*.8;function j(){var t=(Date.now()-C)/E,s=x(t)*b;t<=1?(this._flyToFrame=w(j,this),this._move(this.unproject(h.add(v.subtract(h).multiplyBy(O(s)/d)),l),this.getScaleZoom(i/_(s),l),{flyTo:!0})):this._move(e,n)._moveEnd(!0)}return this._moveStart(!0,s.noMoveStart),j.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return e=y(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),s=this._limitCenter(n,this._zoom,y(e));return n.equals(s)||this.panTo(s,t),this._enforcingBounds=!1,this},panInside:function(e,t){var s,r,l=n((t=t||{}).paddingTopLeft||t.padding||[0,0]),d=n(t.paddingBottomRight||t.padding||[0,0]),i=this.project(this.getCenter()),a=this.project(e),c=this.getPixelBounds(),o=x([c.min.add(l),c.max.subtract(d)]),u=o.getSize();return o.contains(a)||(this._enforcingBounds=!0,r=a.subtract(o.getCenter()),s=o.extend(a).getSize().subtract(u),i.x+=r.x<0?-s.x:s.x,i.y+=r.y<0?-s.y:s.y,this.panTo(this.unproject(i),t),this._enforcingBounds=!1),this},invalidateSize:function(e){if(!this._loaded)return this;e=u({animate:!1,pan:!0},!0===e?{animate:!0}:e),n=this.getSize(),this._sizeChanged=!0,this._lastCenter=null;var n,s=this.getSize(),o=n.divideBy(2).round(),i=s.divideBy(2).round(),t=o.subtract(i);return t.x||t.y?(e.animate&&e.pan?this.panBy(t):(e.pan&&this._rawPanBy(t),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(f(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:s})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=u({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=f(this._handleGeolocationResponse,this),n=f(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,n,e):navigator.geolocation.getCurrentPosition(t,n,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.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: "+n+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var s,o,i,t=new d(e.coords.latitude,e.coords.longitude),a=t.toBounds(2*e.coords.accuracy),n=this._locateOptions;n.setView&&(s=this.getBoundsZoom(a),this.setView(t,n.maxZoom?Math.min(s,n.maxZoom):s)),o={latlng:t,bounds:a,timestamp:e.timestamp};for(i in e.coords)"number"==typeof e.coords[i]&&(o[i]=e.coords[i]);this.fire("locationfound",o)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=0[0],this._containerId=0[0]}var e;for(e in 0[0]!==this._locationWatchId&&this.stopLocate(),this._stop(),g(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(S(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)g(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=c("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new O(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return 0[0]===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return 0[0]===this.options.maxZoom?0[0]===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,s,o){e=y(e),o=n(o||[0,0]);var i=this.getZoom()||0,u=this.getMinZoom(),h=this.getMaxZoom(),m=e.getNorthWest(),f=e.getSouthEast(),r=this.getSize().subtract(o),c=x(this.project(f,i),this.project(m,i)).getSize(),a=t.any3d?this.options.zoomSnap:1,l=r.x/c.x,d=r.y/c.y,p=s?Math.max(l,d):Math.min(l,d);return i=this.getScaleZoom(p,i),a&&(i=Math.round(i/(a/100))*(a/100),i=s?Math.ceil(i/a)*a:Math.floor(i/a)*a),Math.max(u,Math.min(h,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new s(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new p(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(0[0]===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=0[0]===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n,s=this.options.crs;return t=0[0]===t?this._zoom:t,n=s.zoom(e*s.scale(t)),isNaN(n)?1/0:n},project:function(e,t){return t=0[0]===t?this._zoom:t,this.options.crs.latLngToPoint(a(e),t)},unproject:function(e,t){return t=0[0]===t?this._zoom:t,this.options.crs.pointToLatLng(n(e),t)},layerPointToLatLng:function(e){var t=n(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(a(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(a(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(y(e))},distance:function(e,t){return this.options.crs.distance(a(e),a(t))},containerPointToLayerPoint:function(e){return n(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return n(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(n(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(a(e)))},mouseEventToContainerPoint:function(e){return Zt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=Tn(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");o(t,"scroll",this._onScroll,this),this._containerId=l(t)},_initLayout:function(){var e,n=this._container;this._fadeAnimated=this.options.fadeAnimation&&t.any3d,i(n,"leaflet-container"+(t.touch?" leaflet-touch":"")+(t.retina?" leaflet-retina":"")+(t.ielt9?" leaflet-oldie":"")+(t.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),e=we(n,"position"),"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(n.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),j(this._mapPane,new s(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(i(e.markerPane,"leaflet-zoom-hide"),i(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,n){j(this._mapPane,new s(0,0));var o,i=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset"),o=this._zoom!==t,this._moveStart(o,n)._move(e,t)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,s){0[0]===t&&(t=this._zoom);var o=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),s?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return S(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){j(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[l(this._container)]=this;var n=e?h:o;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),t.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){S(this._resizeRequest),this._resizeRequest=w(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var s,o=[],i="mouseout"===t||"mouseover"===t,n=e.target||e.srcElement,a=!1;n;){if((s=this._targets[l(n)])&&("click"===t||"preclick"===t)&&this._draggableMoved(s)){a=!0;break}if(s&&s.listens(t,!0)){if(i&&!It(n,e))break;if(o.push(s),i)break}if(n===this._container)break;n=n.parentNode}return o.length||a||i||!this.listens(t,!0)||(o=[this]),o},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var n,t=e.target||e.srcElement;!this._loaded||t._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(t)||(n=e.type,"mousedown"===n&&Dt(t),this._fireDOMEvent(e,n))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,n){if("click"===e.type&&(r=u({},e),r.type="preclick",this._fireDOMEvent(r,r.type,n)),o=this._findEventTargets(e,t),n){for(var o,i,a,r,c,l=[],s=0;s<n.length;s++)n[s].listens(t,!0)&&l.push(n[s]);o=l.concat(o)}if(o.length){"contextmenu"===t&&_(e),a=o[0],i={originalEvent:e},"keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type&&(c=a.getLatLng&&(!a._radius||a._radius<=10),i.containerPoint=c?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(e),i.layerPoint=this.containerPointToLayerPoint(i.containerPoint),i.latlng=c?a.getLatLng():this.layerPointToLatLng(i.layerPoint));for(s=0;s<o.length;s++)if(o[s].fire(t,i,!0),i.originalEvent._stopped||!1===o[s].options.bubblingMouseEvents&&-1!==mt(this._mouseEvents,t))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return Q(this._mapPane)||new s(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&0[0]!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var s=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(s)},_latLngBoundsToNewLayerBounds:function(e,t,n){var s=this._getNewPixelOrigin(n,t);return x([this.project(e.getSouthWest(),t)._subtract(s),this.project(e.getNorthWest(),t)._subtract(s),this.project(e.getSouthEast(),t)._subtract(s),this.project(e.getNorthEast(),t)._subtract(s)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var s=this.project(e,t),i=this.getSize().divideBy(2),a=new p(s.subtract(i),s.add(i)),o=this._getBoundsOffset(a,n,t);return Math.abs(o.x)<=1&&Math.abs(o.y)<=1?e:this.unproject(s.add(o),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),s=new p(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(s,t))},_getBoundsOffset:function(e,t,n){var o=x(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),i=o.min.subtract(e.min),a=o.max.subtract(e.max);return new s(this._rebound(i.x,-a.x),this._rebound(i.y,-a.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var s=this.getMinZoom(),o=this.getMaxZoom(),n=t.any3d?this.options.zoomSnap:1;return n&&(e=Math.round(e/n)*n),Math.max(s,Math.min(o,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){v(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n)||(this.panBy(n,t),0))},_createAnimProxy:function(){var e=this._proxy=c("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=dt,n=this._proxy.style[t];ee(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){g(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ee(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var s=this.getZoomScale(t),o=this._getCenterOffset(e)._divideBy(1-1/s);return!(!0!==n.animate&&!this.getSize().contains(o)||(w(function(){this._moveStart(!0,n.noMoveStart)._animateZoom(e,t,!0)},this),0))},_animateZoom:function(e,t,n,s){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,i(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,0[0],!0),setTimeout(f(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&v(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,0[0],!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function so(e,t){return new r(e,t)}A=B.extend({options:{position:"topright"},initialize:function(e){m(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),s=this.getPosition(),n=e._controlCorners[s];return i(t,"leaflet-control"),-1!==s.indexOf("bottom")?n.insertBefore(t,n.firstChild):n.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(g(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),te=function(e){return new A(e)},r.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var n=this._controlCorners={},t="leaflet-",s=this._controlContainer=c("div",t+"control-container",this._container);function e(e,o){var i=t+e+" "+t+o;n[e+o]=c("div",i,s)}e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)g(this._controlCorners[e]);g(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var ln=A.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,s){return n<s?-1:s<n?1:0}},initialize:function(e,t,n){for(var s in m(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[s],s);for(s in t)this._addLayer(t[s],s,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return A.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var t=this._getLayer(l(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){i(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(i(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):v(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return v(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var n,s,e="leaflet-control-layers",t=this._container=c("div",e),i=this.options.collapsed;t.setAttribute("aria-haspopup",!0),je(t),Vt(t),n=this._section=c("section",e+"-list"),i&&(this._map.on("click",this.collapse,this),o(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this)),s=this._layersLink=c("a",e+"-toggle",t),s.href="#",s.title="Layers",s.setAttribute("role","button"),o(s,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){_(e),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=c("div",e+"-base",n),this._separator=c("div",e+"-separator",n),this._overlaysList=c("div",e+"-overlays",n),t.appendChild(n)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&l(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(f(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Ie(this._baseLayersList),Ie(this._overlaysList),this._layerControlInputs=[];var e,t,n,s,o=0;for(n=0;n<this._layers.length;n++)t=this._layers[n],this._addItem(t),s=s||t.overlay,e=e||!t.overlay,o+=t.overlay?0:1;return this.options.hideSingleBase&&(e=e&&o>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=s&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(l(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var s='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=s,n.firstChild},_addItem:function(e){var t,n,i,s=document.createElement("label"),a=this._map.hasLayer(e.layer);return e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=a):t=this._createRadioElement("leaflet-base-layers_"+l(this),a),this._layerControlInputs.push(t),t.layerId=l(e.layer),o(t,"click",this._onInputClick,this),i=document.createElement("span"),i.innerHTML=" "+e.name,n=document.createElement("span"),s.appendChild(n),n.appendChild(t),n.appendChild(i),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(s),this._checkDisabledLayers(),s},_onInputClick:function(){if(!this._preventClick){var e,t,o,i=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(e=i.length-1;e>=0;e--)t=i[e],o=this._getLayer(t.layerId).layer,t.checked?n.push(o):t.checked||s.push(o);for(e=0;e<s.length;e++)this._map.hasLayer(s[e])&&this._map.removeLayer(s[e]);for(e=0;e<n.length;e++)this._map.hasLayer(n[e])||this._map.addLayer(n[e]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e,t,s=this._layerControlInputs,o=this._map.getZoom(),n=s.length-1;n>=0;n--)t=s[n],e=this._getLayer(t.layerId).layer,t.disabled=0[0]!==e.options.minZoom&&o<e.options.minZoom||0[0]!==e.options.maxZoom&&o>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t,e=this._section;this._preventClick=!0,o(e,"click",_),this.expand(),t=this,setTimeout(function(){h(e,"click",_),t._preventClick=!1})}}),Qs=function(e,t,n){return new ln(e,t,n)},Ht=A.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var n="leaflet-control-zoom",s=c("div",n+" leaflet-bar"),t=this.options;return this._zoomInButton=this._createButton(t.zoomInText,t.zoomInTitle,n+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(t.zoomOutText,t.zoomOutTitle,n+"-out",s,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),s},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,s,i){var a=c("a",n,s);return a.innerHTML=e,a.href="#",a.title=t,a.setAttribute("role","button"),a.setAttribute("aria-label",t),je(a),o(a,"click",q),o(a,"click",i,this),o(a,"click",this._refocusOnMap,this),a},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";v(this._zoomInButton,t),v(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(i(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(i(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});r.mergeOptions({zoomControl:!0}),r.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ht,this.addControl(this.zoomControl))});var qs=function(e){return new Ht(e)},mn=A.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=c("div",t),s=this.options;return this._addScales(s,t+"-line",n),e.on(s.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=c("div",t,n)),e.imperial&&(this._iScale=c("div",t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var n,s,o,t=3.2808399*e;t>5280?(n=t/5280,s=this._getRoundNum(n),this._updateScale(this._iScale,s+" mi",s/n)):(o=this._getRoundNum(t),this._updateScale(this._iScale,o+" ft",o/t))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var n=10**((Math.floor(e)+"").length-1),t=e/n;return n*(t=t>=10?10:t>=5?5:t>=3?3:t>=2?2:1)}}),Ks=function(e){return new mn(e)},Ws='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Pt=A.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(t.inlineSvg?Ws+" ":"")+"Leaflet</a>"},initialize:function(e){m(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=c("div","leaflet-control-attribution"),je(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e,n,t=[];for(n in this._attributions)this._attributions[n]&&t.push(n);e=[],this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' <span aria-hidden="true">|</span> ')}}});r.mergeOptions({attributionControl:!0}),r.addInitHook(function(){this.options.attributionControl&&(new Pt).addTo(this)}),vn=function(e){return new Pt(e)},A.Layers=ln,A.Zoom=Ht,A.Scale=mn,A.Attribution=Pt,te.layers=Qs,te.zoom=qs,te.scale=Ks,te.attribution=vn,D=B.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}}),D.addTo=function(e,t){return e.addHandler(t,this),this};var $s={Events:C},yn=t.touch?"touchstart mousedown":"mousedown",U=re.extend({options:{clickTolerance:3},initialize:function(e,t,n,s){m(this,s),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(o(this._dragStartTarget,yn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(U._dragging===this&&this.finishDrag(!0),h(this._dragStartTarget,yn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!yt(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)U._dragging===this&&this.finishDrag();else if(!(U._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(U._dragging=this,this._preventOutline&&Dt(this._element),Ge(),fe(),this._moving))){this.fire("down");var t,n=e.touches?e.touches[0]:e,i=xn(this._element);this._startPoint=new s(n.clientX,n.clientY),this._startPos=Q(this._element),this._parentScale=Rt(i),t="mousedown"===e.type,o(document,t?"mousemove":"touchmove",this._onMove,this),o(document,t?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var n=e.touches&&1===e.touches.length?e.touches[0]:e,t=new s(n.clientX,n.clientY)._subtract(this._startPoint);(t.x||t.y)&&(Math.abs(t.x)+Math.abs(t.y)<this.options.clickTolerance||(t.x/=this._parentScale.x,t.y/=this._parentScale.y,_(e),this._moved||(this.fire("dragstart"),this._moved=!0,i(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),i(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(t),this._moving=!0,this._lastEvent=e,this._updatePosition()))}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),j(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){v(document.body,"leaflet-dragging"),this._lastTarget&&(v(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),h(document,"mousemove touchmove",this._onMove,this),h(document,"mouseup touchend touchcancel",this._onUp,this),zt(),ve();var t=this._moved&&this._moving;this._moving=!1,U._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function wn(e,t,n){var s,o,i,a,r,c,l,d,u,h=[1,4,2,8];for(s=0,d=e.length;s<d;s++)e[s]._code=Z(e[s],t);for(l=0;l<4;l++){for(o=h[l],a=[],s=0,u=(d=e.length)-1;s<d;u=s++)r=e[s],c=e[u],r._code&o?c._code&o||((i=Ue(c,r,o,t,n))._code=Z(i,t),a.push(i)):(c._code&o&&((i=Ue(c,r,o,t,n))._code=Z(i,t),a.push(i)),a.push(r));e=a}return e}function On(e,t){if(!e||0===e.length)throw new Error("latlngs not passed");k(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var s,i,r,c,l,d,h,m,f,p,g,v,b,o=a([0,0]),u=y(e);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(o=Lt(e)),d=e.length,c=[];for(s=0;s<d;s++)g=a(e[s]),c.push(t.project(a([g.lat-o.lat,g.lng-o.lng])));for(l=p=m=0,s=0,f=d-1;s<d;f=s++)i=c[s],r=c[f],h=i.y*r.x-r.y*i.x,p+=(i.x+r.x)*h,m+=(i.y+r.y)*h,l+=3*h;return b=0===l?c[0]:[p/l,m/l],v=t.unproject(n(b)),a([v.lat+o.lat,v.lng+o.lng])}function Lt(e){for(var s,o=0,i=0,t=0,n=0;n<e.length;n++)s=a(e[n]),o+=s.lat,i+=s.lng,t++;return a([o/t,i/t])}En={__proto__:null,clipPolygon:wn,polygonCenter:On,centroid:Lt};function kn(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=Ps(e=zs(e,n),n)}function An(e,t,n){return Ae(e,t,n,!0)**.5}function Is(e,t,n){return Ae(e,t,n)}function Ps(e,t){var n,i,s=e.length,o=new(typeof Uint8Array!=0[0]+""?Uint8Array:Array)(s);o[0]=o[s-1]=1,Nt(e,o,t,0,s-1),i=[];for(n=0;n<s;n++)o[n]&&i.push(e[n]);return i}function Nt(e,t,n,s,o){var i,a,c,r=0;for(i=s+1;i<=o-1;i++)(c=Ae(e[i],e[s],e[o],!0))>r&&(a=i,r=c);r>n&&(t[a]=1,Nt(e,t,n,s,a),Nt(e,t,n,a,o))}function zs(e,t){for(var s=[e[0]],n=1,o=0,i=e.length;n<i;n++)Hs(e[n],e[o])>t&&(s.push(e[n]),o=n);return o<i-1&&s.push(e[i-1]),s}function zn(e,t,n,s,o){var r,c,l,i=s?Cn:Z(e,n),a=Z(t,n);for(Cn=a;;){if(!(i|a))return[e,t];if(i&a)return!1;c=Z(r=Ue(e,t,l=i||a,n,o),n),l===i?(e=r,i=c):(t=r,a=c)}}function Ue(e,t,n,o,i){var a,r,c=t.x-e.x,l=t.y-e.y,d=o.min,u=o.max;return 8&n?(a=e.x+c*(u.y-e.y)/l,r=u.y):4&n?(a=e.x+c*(d.y-e.y)/l,r=d.y):2&n?(a=u.x,r=e.y+l*(u.x-e.x)/c):1&n&&(a=d.x,r=e.y+l*(d.x-e.x)/c),new s(a,r,i)}function Z(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function Hs(e,t){var n=t.x-e.x,s=t.y-e.y;return n*n+s*s}function Ae(e,t,n,o){var l,r=t.x,c=t.y,i=n.x-r,a=n.y-c,d=i*i+a*a;return d>0&&((l=((e.x-r)*i+(e.y-c)*a)/d)>1?(r=n.x,c=n.y):l>0&&(r+=i*l,c+=a*l)),i=e.x-r,a=e.y-c,o?i*i+a*a:new s(r,c)}function k(e){return!M(e[0])||"object"!=typeof e[0][0]&&0[0]!==e[0][0]}function Hn(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),k(e)}function In(e,t){if(!e||0===e.length)throw new Error("latlngs not passed");k(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var s,o,i,c,l,d,h,m,f,p,g,v,r=a([0,0]),u=y(e);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(r=Lt(e)),d=e.length,o=[];for(s=0;s<d;s++)p=a(e[s]),o.push(t.project(a([p.lat-r.lat,p.lng-r.lng])));for(s=0,c=0;s<d-1;s++)c+=o[s].distanceTo(o[s+1])/2;if(0===c)m=o[0];else for(s=0,h=0;s<d-1;s++)if(l=o[s],i=o[s+1],(h+=v=l.distanceTo(i))>c){f=(h-c)/v,m=[i.x-f*(i.x-l.x),i.y-f*(i.y-l.y)];break}return g=t.unproject(n(m)),a([g.lat+r.lat,g.lng+r.lng])}var Fs={__proto__:null,simplify:kn,pointToSegmentDistance:An,closestPointOnSegment:Is,clipSegment:zn,_getEdgeIntersection:Ue,_getBitCode:Z,_sqClosestPointOnSegment:Ae,isFlat:k,_flat:Hn,polylineCenter:In},Ft={project:function(e){return new s(e.lng,e.lat)},unproject:function(e){return new d(e.y,e.x)},bounds:new p([-180,-90],[180,90])},Mt={R:6378137,R_MINOR:6356752.314245179,bounds:new p([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var o=Math.PI/180,n=this.R,t=e.lat*o,i=this.R_MINOR/n,a=(1-i*i)**.5,r=a*Math.sin(t),c=Math.tan(Math.PI/4-t/2)/((1-r)/(1+r))**(a/2);return t=-n*Math.log(Math.max(c,1e-10)),new s(e.lng*o*n,t)},unproject:function(e){for(var t,o=180/Math.PI,s=this.R,i=this.R_MINOR/s,a=(1-i*i)**.5,r=Math.exp(-e.y/s),n=Math.PI/2-2*Math.atan(r),c=0,l=.1;c<15&&(l<0?-l:l)>1e-7;c++)t=a*Math.sin(n),t=((1-t)/(1+t))**(a/2),n+=l=Math.PI/2-2*Math.atan(r*t)-n;return new d(n*o,e.x*o/s)}},Cs={__proto__:null,LonLat:Ft,Mercator:Mt,SphericalMercator:xt},xs=u({},K,{code:"EPSG:3395",projection:Mt,transformation:function(){var e=.5/(Math.PI*Mt.R);return me(e,.5,-e,.5)}()}),Kn=u({},K,{code:"EPSG:4326",projection:Ft,transformation:me(1/180,1,-1/180,.5)}),Os=u({},W,{projection:Ft,transformation:me(1,0,-1,0),scale:function(e){return 2**e},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,s=t.lat-e.lat;return(n*n+s*s)**.5},infinite:!0});W.Earth=K,W.EPSG3395=xs,W.EPSG3857=Pe,W.EPSG900913=Zn,W.EPSG4326=Kn,W.Simple=Os,E=re.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[l(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[l(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var n,t=e.target;t.hasLayer(this)&&((this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents)&&(n=this.getEvents(),t.on(n,this),this.once("remove",function(){t.off(n,this)},this)),this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this}))}}),r.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=l(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=l(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return l(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?M(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[l(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=l(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var n,o,e=1/0,t=-1/0,s=this._getZoomSpan();for(o in this._zoomBoundLayers)n=this._zoomBoundLayers[o].options,e=0[0]===n.minZoom?e:Math.min(e,n.minZoom),t=0[0]===n.maxZoom?t:Math.max(t,n.maxZoom);this._layersMaxZoom=t===-1/0?0[0]:t,this._layersMinZoom=e===1/0?0[0]:e,s!==this._getZoomSpan()&&this.fire("zoomlevelschange"),0[0]===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),0[0]===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ae=E.extend({initialize:function(e,t){var n,s;if(m(this,t),this._layers={},e)for(n=0,s=e.length;n<s;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return("number"==typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,s=Array.prototype.slice.call(arguments,1);for(n in this._layers)(t=this._layers[n])[e]&&t[e].apply(t,s);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return l(e)}}),vs=function(e,t){return new ae(e,t)},$=ae.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),ae.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),ae.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e,n,t=new O;for(n in this._layers)e=this._layers[n],t.extend(e.getBounds?e.getBounds():e.getLatLng());return t}}),ms=function(e,t){return new $(e,t)},oe=B.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){m(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n,s=this._getIconUrl(e);if(!s){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}return n=this._createImg(s,t&&"IMG"===t.tagName?t:null),this._setIconStyles(n,e),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(e,t){var s,a,i=this.options,o=i[t+"Size"];"number"==typeof o&&(o=[o,o]),s=n(o),a=n("shadow"===t&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0)),e.className="leaflet-marker-"+t+" "+(i.className||""),a&&(e.style.marginLeft=-a.x+"px",e.style.marginTop=-a.y+"px"),s&&(e.style.width=s.x+"px",e.style.height=s.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return t.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function ls(e){return new oe(e)}var be=oe.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return"string"!=typeof be.imagePath&&(be.imagePath=this._detectIconPath()),(this.options.imagePath||be.imagePath)+oe.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(e,t,n){var s=t.exec(e);return s&&s[n]};return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e,t=c("div","leaflet-default-icon-path",document.body),n=we(t,"background-image")||we(t,"backgroundImage");return document.body.removeChild(t),(n=this._stripUrl(n))||(e=document.querySelector('link[href$="leaflet.css"]'),e?e.href.substring(0,e.href.length-11-1):"")}}),ns=D.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new U(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),i(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&v(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var i,a=this._marker,r=a._map,d=this._marker.options.autoPanSpeed,c=this._marker.options.autoPanPadding,o=Q(a._icon),s=r.getPixelBounds(),l=r.getPixelOrigin(),t=x(s.min._subtract(l).add(c),s.max._subtract(l).subtract(c));t.contains(o)||(i=n((Math.max(t.max.x,o.x)-t.max.x)/(s.max.x-t.max.x)-(Math.min(t.min.x,o.x)-t.min.x)/(s.min.x-t.min.x),(Math.max(t.max.y,o.y)-t.max.y)/(s.max.y-t.max.y)-(Math.min(t.min.y,o.y)-t.min.y)/(s.min.y-t.min.y)).multiplyBy(d),r.panBy(i,{animate:!1}),this._draggable._newPos._add(i),this._draggable._startPos._add(i),j(a._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=w(this._adjustPan.bind(this,e)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(S(this._panRequest),this._panRequest=w(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,s=Q(t._icon),o=t._map.layerPointToLatLng(s);n&&j(n,s),t._latlng=o,e.latlng=o,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){S(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),Ne=E.extend({options:{icon:new be,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){m(this,t),this._latlng=a(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=a(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var n,s,e=this.options,a="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),t=e.icon.createIcon(this._icon),r=!1;t!==this._icon&&(this._icon&&this._removeIcon(),r=!0,e.title&&(t.title=e.title),"IMG"===t.tagName&&(t.alt=e.alt||"")),i(t,a),e.keyboard&&(t.tabIndex="0",t.setAttribute("role","button")),this._icon=t,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&o(t,"focus",this._panOnFocus,this),n=e.icon.createShadow(this._shadow),s=!1,n!==this._shadow&&(this._removeShadow(),s=!0),n&&(i(n,a),n.alt=""),this._shadow=n,e.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),n&&s&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&h(this._icon,"focus",this._panOnFocus,this),g(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&g(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&j(this._icon,e),this._shadow&&j(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(i(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ns)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ns(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&F(this._icon,e),this._shadow&&F(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){if(t=this._map,t){var t,e=this.options.icon.options,o=e.iconSize?n(e.iconSize):n(0,0),s=e.iconAnchor?n(e.iconAnchor):n(0,0);t.panInside(this._latlng,{paddingTopLeft:s,paddingBottomRight:o.subtract(s)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Ds(e,t){return new Ne(e,t)}V=E.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return m(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Ee=V.extend({options:{fill:!0,radius:10},initialize:function(e,t){m(this,t),this._latlng=a(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=a(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return V.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,s=this._radiusY||e,t=this._clickTolerance(),n=[e+t,s+t];this._pxBounds=new p(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function cs(e,t){return new Ee(e,t)}Le=Ee.extend({initialize:function(e,t,n){if("number"==typeof t&&(t=u({},n,{radius:t})),m(this,t),this._latlng=a(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new O(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:V.prototype.setStyle,_project:function(){var a=this._latlng.lng,n=this._latlng.lat,e=this._map,r=e.options.crs;if(r.distance===K.distance){var d,t=Math.PI/180,o=this._mRadius/K.R/t,l=e.project([n+o,a]),u=e.project([n-o,a]),i=l.add(u).divideBy(2),c=e.unproject(i).lat,s=Math.acos((Math.cos(o*t)-Math.sin(n*t)*Math.sin(c*t))/(Math.cos(n*t)*Math.cos(c*t)))/t;(isNaN(s)||0===s)&&(s=o/Math.cos(Math.PI/180*n)),this._point=i.subtract(e.getPixelOrigin()),this._radius=isNaN(s)?0:i.x-e.project([c,a-s]).x,this._radiusY=i.y-l.y}else d=r.unproject(r.project(this._latlng).subtract([this._mRadius,0])),this._point=e.latLngToLayerPoint(this._latlng),this._radius=this._point.x-e.latLngToLayerPoint(d).x;this._updateBounds()}});function ds(e,t,n){return new Le(e,t,n)}H=V.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){m(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var a,r,c,s=1/0,t=null,l=Ae,o=0,d=this._parts.length;o<d;o++)for(var i=this._parts[o],n=1,u=i.length;n<u;n++)a=l(e,r=i[n-1],c=i[n],!0),a<s&&(s=a,t=l(e,r,c));return t&&(t.distance=s**.5),t},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return In(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=a(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new O,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return k(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var n=[],s=k(e),t=0,o=e.length;t<o;t++)s?(n[t]=a(e[t]),this._bounds.extend(n[t])):n[t]=this._convertLatLngs(e[t]);return n},_project:function(){var e=new p;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new s(e,e);this._rawPxBounds&&(this._pxBounds=new p([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var s,o,a=e[0]instanceof d,i=e.length;if(a){for(o=[],s=0;s<i;s++)o[s]=this._map.latLngToLayerPoint(e[s]),n.extend(o[s]);t.push(o)}else for(s=0;s<i;s++)this._projectLatlngs(e[s],t,n)},_clipPoints:function(){var e,t,n,s,o,i,a,c,r=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(r))if(this.options.noClip)this._parts=this._rings;else{n=this._parts;for(s=0,t=0,c=this._rings.length;s<c;s++)for(e=0,a=(i=this._rings[s]).length;e<a-1;e++)(o=zn(i[e],i[e+1],r,e,!0))&&(n[t]=n[t]||[],n[t].push(o[0]),o[1]===i[e+1]&&e!==a-2||(n[t].push(o[1]),t++))}},_simplifyPoints:function(){for(var t=this._parts,n=this.options.smoothFactor,e=0,s=t.length;e<s;e++)t[e]=kn(t[e],n)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,s,o,i,a,r,c=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(s=0,a=this._parts.length;s<a;s++)for(n=0,o=(r=(i=this._parts[s]).length)-1;n<r;o=n++)if((t||0!==n)&&An(e,i[o],i[n])<=c)return!0;return!1}});function hs(e,t){return new H(e,t)}H._flat=Hn,X=H.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return On(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=H.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof d&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){H.prototype._setLatLngs.call(this,e),k(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return k(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t,i,a,e=this._renderer._bounds,n=this.options.weight,o=new s(n,n);if(e=new p(e.min.subtract(o),e.max.add(o)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(t=0,a=this._rings.length;t<a;t++)(i=wn(this._rings[t],e,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,s,o,i,a,c,l,r=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(s=0,c=this._parts.length;s<c;s++)for(o=0,a=(l=(i=this._parts[s]).length)-1;o<l;a=o++)t=i[o],n=i[a],t.y>e.y!=n.y>e.y&&e.x<(n.x-t.x)*(e.y-t.y)/(n.y-t.y)+t.x&&(r=!r);return r||H.prototype._containsPoint.call(this,e,!0)}});function fs(e,t){return new X(e,t)}N=$.extend({initialize:function(e,t){m(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,s,o,a,i=M(e)?e:e.features;if(i){for(o=0,a=i.length;o<a;o++)((s=i[o]).geometries||s.geometry||s.features||s.coordinates)&&this.addData(s);return this}return n=this.options,n.filter&&!n.filter(e)?this:(t=qe(e,n),t?(t.feature=Se(e),t.defaultOptions=t.options,this.resetStyle(t),n.onEachFeature&&n.onEachFeature(e,t),this.addLayer(t)):this)},resetStyle:function(e){return 0[0]===e?this.eachLayer(this.resetStyle,this):(e.options=u({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){e.setStyle&&("function"==typeof t&&(t=t(e.feature)),e.setStyle(t))}});function qe(e,t){var n,o,r,l,d,u,s="Feature"===e.type?e.geometry:e,i=s?s.coordinates:null,a=[],h=t&&t.pointToLayer,c=t&&t.coordsToLatLng||wt;if(!i&&!s)return null;switch(s.type){case"Point":return Xn(h,e,l=c(i),t);case"MultiPoint":for(n=0,o=i.length;n<o;n++)l=c(i[n]),a.push(Xn(h,e,l,t));return new $(a);case"LineString":case"MultiLineString":return r=We(i,"LineString"===s.type?0:1,c),new H(r,t);case"Polygon":case"MultiPolygon":return r=We(i,"Polygon"===s.type?1:2,c),new X(r,t);case"GeometryCollection":for(n=0,o=s.geometries.length;n<o;n++)d=qe({geometry:s.geometries[n],type:"Feature",properties:e.properties},t),d&&a.push(d);return new $(a);case"FeatureCollection":for(n=0,o=s.features.length;n<o;n++)u=qe(s.features[n],t),u&&a.push(u);return new $(a);default:throw new Error("Invalid GeoJSON object.")}}function Xn(e,t,n,s){return e?e(t,n):new Ne(n,s&&s.markersInheritOptions&&s)}function wt(e){return new d(e[1],e[0],e[2])}function We(e,t,n){for(var o,i=[],s=0,a=e.length;s<a;s++)o=t?We(e[s],t-1,n):(n||wt)(e[s]),i.push(o);return i}function _t(e,t){return 0[0]!==(e=a(e)).alt?[P(e.lng,t),P(e.lat,t),P(e.alt,t)]:[P(e.lng,t),P(e.lat,t)]}function Ye(e,t,n,s){for(var o=[],i=0,a=e.length;i<a;i++)o.push(t?Ye(e[i],k(e[i])?0:t-1,n,s):_t(e[i],s));return!t&&n&&o.length>0&&o.push(o[0].slice()),o}function le(e,t){return e.feature?u({},e.feature,{geometry:t}):Se(t)}function Se(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}Te={toGeoJSON:function(e){return le(this,{type:"Point",coordinates:_t(this.getLatLng(),e)})}};function Wn(e,t){return new N(e,t)}Ne.include(Te),Le.include(Te),Ee.include(Te),H.include({toGeoJSON:function(e){var t=!k(this._latlngs);return le(this,{type:(t?"Multi":"")+"LineString",coordinates:Ye(this._latlngs,t?1:0,!1,e)})}}),X.include({toGeoJSON:function(e){var t=!k(this._latlngs),s=t&&!k(this._latlngs[0]),n=Ye(this._latlngs,s?2:t?1:0,!0,e);return t||(n=[n]),le(this,{type:(s?"Multi":"")+"Polygon",coordinates:n})}}),ae.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON(e).geometry.coordinates)}),le(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){if(n=this.feature&&this.feature.geometry&&this.feature.geometry.type,"MultiPoint"===n)return this.toMultiPoint(e);var n,s="GeometryCollection"===n,t=[];return this.eachLayer(function(n){if(n.toGeoJSON){var o,i=n.toGeoJSON(e);s?t.push(i.geometry):(o=Se(i),"FeatureCollection"===o.type?t.push.apply(t,o.features):t.push(o))}}),s?le(this,{geometries:t,type:"GeometryCollection"}):{type:"FeatureCollection",features:t}}});var Es=Wn,Be=E.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=y(t),m(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(i(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){g(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&ie(this._image),this},bringToBack:function(){return this._map&&ce(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=y(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:c("img");i(e,"leaflet-image-layer"),this._zoomAnimated&&i(e,"leaflet-zoom-animated"),this.options.className&&i(e,this.options.className),e.onselectstart=b,e.onmousemove=b,e.onload=f(this.fire,this,"load"),e.onerror=f(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;ee(this._image,n,t)},_reset:function(){var e=this._image,t=new p(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();j(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){F(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&0[0]!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),As=function(e,t,n){return new Be(e,t,n)},Vn=Be.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){if(n="VIDEO"===this._url.tagName,e=this._image=n?this._url:c("video"),i(e,"leaflet-image-layer"),this._zoomAnimated&&i(e,"leaflet-zoom-animated"),this.options.className&&i(e,this.options.className),e.onselectstart=b,e.onmousemove=b,e.onloadeddata=f(this.fire,this,"load"),n){for(var e,t,n,a,s=e.getElementsByTagName("source"),r=[],o=0;o<s.length;o++)r.push(s[o].src);this._url=s.length>0?r:[e.src]}else{M(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(t=0;t<this._url.length;t++)a=c("source"),a.src=this._url[t],e.appendChild(a)}}});function Ms(e,t,n){return new Vn(e,t,n)}vt=Be.extend({_initImage:function(){var e=this._image=this._url;i(e,"leaflet-image-layer"),this._zoomAnimated&&i(e,"leaflet-zoom-animated"),this.options.className&&i(e,this.options.className),e.onselectstart=b,e.onmousemove=b}});function Ts(e,t,n){return new vt(e,t,n)}z=E.extend({options:{interactive:!1,offset:[0,0],className:"",pane:0[0],content:""},initialize:function(e,t){e&&(e instanceof d||M(e))?(this._latlng=a(e),m(this,t)):(m(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&F(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&F(this._container,1),this.bringToFront(),this.options.interactive&&(i(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(F(this._container,0),this._removeTimeout=setTimeout(f(g,0[0],this._container),200)):g(this._container),this.options.interactive&&(v(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=a(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ie(this._container),this},bringToBack:function(){return this._map&&ce(this._container),this},_prepareOpen:function(e){var n,s,t=this._source;if(!t._map)return!1;if(t instanceof $){t=null,n=this._source._layers;for(s in n)if(n[s]._map){t=n[s];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else{if(!t.getBounds)throw new Error("Unable to get source layer LatLng.");e=t.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var o,i,t=this._map.latLngToLayerPoint(this._latlng),e=n(this.options.offset),s=this._getAnchor();this._zoomAnimated?j(this._container,t.add(s)):e=e.add(t).add(s),o=this._containerBottom=-e.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+e.x,this._container.style.bottom=o+"px",this._container.style.left=i+"px"}},_getAnchor:function(){return[0,0]}}),r.include({_initOverlay:function(e,t,n,s){var o=t;return o instanceof e||(o=new e(s).setContent(t)),n&&o.setLatLng(n),o}}),E.include({_initOverlay:function(e,t,n,s){var o=n;return o instanceof e?(m(o,s),o._source=this):(o=t&&!s?t:new e(s,this)).setContent(n),o}}),ke=z.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return!(e=arguments.length?e:this._source._map).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,z.prototype.openOn.call(this,e)},onAdd:function(e){z.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof V||this._source.on("preclick",Y))},onRemove:function(e){z.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof V||this._source.off("preclick",Y))},getEvents:function(){var e=z.prototype.getEvents.call(this);return(0[0]!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var t,e="leaflet-popup",n=this._container=c("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),s=this._wrapper=c("div",e+"-content-wrapper",n);this._contentNode=c("div",e+"-content",s),je(n),Vt(this._contentNode),o(n,"contextmenu",Y),this._tipContainer=c("div",e+"-tip-container",n),this._tip=c("div",e+"-tip",this._tipContainer),this.options.closeButton&&(t=this._closeButton=c("a",e+"-close-button",n),t.setAttribute("role","button"),t.setAttribute("aria-label","Close popup"),t.href="#close",t.innerHTML='<span aria-hidden="true">&#215;</span>',o(t,"click",function(e){_(e),this.close()},this))},_updateLayout:function(){t=this._contentNode,e=t.style,e.width="",e.whiteSpace="nowrap",n=t.offsetWidth,n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var e,t,n,a=t.offsetHeight,s=this.options.maxHeight,o="leaflet-popup-scrolled";s&&a>s?(e.height=s+"px",i(t,o)):v(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();j(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var c=this._map,m=parseInt(we(this._container,"marginBottom"),10)||0,l=this._container.offsetHeight+m,d=this._containerWidth,u=new s(this._containerLeft,-l-this._containerBottom);u._add(Q(this._container));var e=c.layerPointToContainerPoint(u),h=n(this.options.autoPanPadding),i=n(this.options.autoPanPaddingTopLeft||h),a=n(this.options.autoPanPaddingBottomRight||h),r=c.getSize(),t=0,o=0;e.x+d+a.x>r.x&&(t=e.x+d-r.x+a.x),e.x-t-i.x<0&&(t=e.x-i.x),e.y+l+a.y>r.y&&(o=e.y+l-r.y+a.y),e.y-o-i.y<0&&(o=e.y-i.y),(t||o)&&(this.options.keepInView&&(this._autopanning=!0),c.fire("autopanstart").panBy([t,o]))}},_getAnchor:function(){return n(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ln=function(e,t){return new ke(e,t)},r.mergeOptions({closePopupOnClick:!0}),r.include({openPopup:function(e,t,n){return this._initOverlay(ke,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),E.include({bindPopup:function(e,t){return this._popup=this._initOverlay(ke,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof $||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){q(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof V?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}}),ge=z.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){z.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){z.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=z.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=c("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,s,l=this._map,o=this._container,h=l.latLngToContainerPoint(l.getCenter()),m=l.layerPointToContainerPoint(e),a=this.options.direction,c=o.offsetWidth,r=o.offsetHeight,d=n(this.options.offset),u=this._getAnchor();"top"===a?(t=c/2,s=r):"bottom"===a?(t=c/2,s=0):"center"===a?(t=c/2,s=r/2):"right"===a?(t=0,s=r/2):"left"===a?(t=c,s=r/2):m.x<h.x?(a="right",t=0,s=r/2):(a="left",t=c+2*(d.x+u.x),s=r/2),e=e.subtract(n(t,s,!0)).add(d).add(u),v(o,"leaflet-tooltip-right"),v(o,"leaflet-tooltip-left"),v(o,"leaflet-tooltip-top"),v(o,"leaflet-tooltip-bottom"),i(o,"leaflet-tooltip-"+a),j(o,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&F(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return n(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Fn=function(e,t){return new ge(e,t)},r.include({openTooltip:function(e,t,n){return this._initOverlay(ge,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),E.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ge,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){if(e||!this._tooltipHandlersAdded){var n=e?"off":"on",t={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?t.add=this._openTooltip:(t.mouseover=this._openTooltip,t.mouseout=this.closeTooltip,t.click=this._openTooltip,this._map?this._addFocusListeners():t.add=this._addFocusListeners),this._tooltip.options.sticky&&(t.mousemove=this._moveTooltip),this[n](t),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof $||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&(o(t,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),o(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once("moveend",function(){t._openOnceFlag=!1,t._openTooltip(e)})}else this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:0[0])},_moveTooltip:function(e){var t,n,s=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(t=this._map.mouseEventToContainerPoint(e.originalEvent),n=this._map.containerPointToLayerPoint(t),s=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(s)}}),ht=oe.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var o,t=e&&"DIV"===e.tagName?e:document.createElement("div"),s=this.options;return(s.html instanceof Element?(Ie(t),t.appendChild(s.html)):t.innerHTML=!1!==s.html?s.html:"",s.bgPos)&&(o=n(s.bgPos),t.style.backgroundPosition=-o.x+"px "+-o.y+"px"),this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});function os(e){return new ht(e)}oe.Default=be,ne=E.extend({options:{tileSize:256,opacity:1,updateWhenIdle:t.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:0[0],maxNativeZoom:0[0],minNativeZoom:0[0],noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){m(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),g(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=0[0]},bringToFront:function(){return this._map&&(ie(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ce(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=dn(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof s?e:new s(e,e)},_updateZIndex:function(){this._container&&0[0]!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var s,o=this.getPane().children,t=-e(-1/0,1/0),n=0,i=o.length;n<i;n++)s=o[n].style.zIndex,o[n]!==this._container&&s&&(t=e(t,+s));isFinite(t)&&(this.options.zIndex=t+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!t.ielt9){F(this._container,this.options.opacity);var e,n,a,i=+new Date,s=!1,o=!1;for(a in this._tiles)e=this._tiles[a],e.current&&e.loaded&&(n=Math.min(1,(i-e.loaded)/200),F(e.el,n),n<1?s=!0:(e.active?o=!0:this._onOpaqueTile(e),e.active=!0));o&&!this._noPrune&&this._pruneTiles(),s&&(S(this._fadeFrame),this._fadeFrame=w(this._updateOpacity,this))}},_onOpaqueTile:b,_initContainer:function(){this._container||(this._container=c("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e,t,s,n=this._tileZoom,o=this.options.maxZoom;if(0[0]!==n){for(e in this._levels)e=Number(e),this._levels[e].el.children.length||e===n?(this._levels[e].el.style.zIndex=o-Math.abs(n-e),this._onUpdateLevel(e)):(g(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);return t=this._levels[n],s=this._map,t||((t=this._levels[n]={}).el=c("div","leaflet-tile-container leaflet-zoom-animated",this._container),t.el.style.zIndex=o,t.origin=s.project(s.unproject(s.getPixelOrigin()),n).round(),t.zoom=n,this._setZoomTransform(t,s.getCenter(),s.getZoom()),b(t.el.offsetWidth),this._onCreateLevel(t)),this._level=t,t}},_onUpdateLevel:b,_onRemoveLevel:b,_onCreateLevel:b,_pruneTiles:function(){if(this._map){var e,t,n,s=this._map.getZoom();if(s>this.options.maxZoom||s<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(n=this._tiles[t]).retain=n.current;for(t in this._tiles)(n=this._tiles[t]).current&&!n.active&&(e=n.coords,this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)g(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=0[0]},_retainParent:function(e,t,n,o){var i,d,r=Math.floor(e/2),c=Math.floor(t/2),a=n-1,l=new s(+r,+c);return l.z=+a,d=this._tileCoordsToKey(l),i=this._tiles[d],i&&i.active?(i.retain=!0,!0):(i&&i.loaded&&(i.retain=!0),a>o&&this._retainParent(r,c,a,o))},_retainChildren:function(e,t,n,o){for(a=2*e;a<2*e+2;a++)for(r=2*t;r<2*t+2;r++){c=new s(a,r),c.z=n+1;var a,r,c,l=this._tileCoordsToKey(c),i=this._tiles[l];i&&i.active?i.retain=!0:(i&&i.loaded&&(i.retain=!0),n+1<o&&this._retainChildren(a,r,n+1,o))}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return 0[0]!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:0[0]!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,s){var o=Math.round(t),o=0[0]!==this.options.maxZoom&&o>this.options.maxZoom||0[0]!==this.options.minZoom&&o<this.options.minZoom?0[0]:this._clampZoom(o),i=this.options.updateWhenZooming&&o!==this._tileZoom;s&&!i||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),0[0]!==o&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,n,s){var o=this._map.getZoomScale(s,e.zoom),i=e.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(n,s)).round();t.any3d?ee(e.el,i,o):j(e.el,i)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),s=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],s).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],s).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],s).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],s).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=this._map,o=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),i=t.getZoomScale(o,this._tileZoom),n=t.project(e,this._tileZoom).floor(),s=t.getSize().divideBy(2*i);return new p(n.subtract(s),n.add(s))},_update:function(e){if(r=this._map,r&&(d=this._clampZoom(r.getZoom()),0[0]===e&&(e=r.getCenter()),0[0]!==this._tileZoom)){var n,i,r,c,l,d,u,h,f,v=this._getTiledPixelBounds(e),t=this._pxBoundsToTileRange(v),m=t.getCenter(),o=[],a=this.options.keepBuffer,g=new p(t.getBottomLeft().subtract([a,-a]),t.getTopRight().add([a,-a]));if(!(isFinite(t.min.x)&&isFinite(t.min.y)&&isFinite(t.max.x)&&isFinite(t.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(f in this._tiles)c=this._tiles[f].coords,c.z===this._tileZoom&&g.contains(new s(c.x,c.y))||(this._tiles[f].current=!1);if(Math.abs(d-this._tileZoom)>1)this._setView(e,d);else{for(l=t.min.y;l<=t.max.y;l++)for(n=t.min.x;n<=t.max.x;n++)i=new s(n,l),(i.z=this._tileZoom,this._isValidTile(i))&&(u=this._tiles[this._tileCoordsToKey(i)],u?u.current=!0:o.push(i));if(o.sort(function(e,t){return e.distanceTo(m)-t.distanceTo(m)}),0!==o.length){this._loading||(this._loading=!0,this.fire("loading")),h=document.createDocumentFragment();for(n=0;n<o.length;n++)this._addTile(o[n],h);this._level.el.appendChild(h)}}}},_isValidTile:function(e){var t,s,n=this._map.options.crs;return!(!n.infinite&&(t=this._globalTileRange,!n.wrapLng&&(e.x<t.min.x||e.x>t.max.x)||!n.wrapLat&&(e.y<t.min.y||e.y>t.max.y)))&&(!this.options.bounds||(s=this._tileCoordsToBounds(e),y(this.options.bounds).overlaps(s)))},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),s=e.scaleBy(n),o=s.add(n);return[t.unproject(s,e.z),t.unproject(o,e.z)]},_tileCoordsToBounds:function(e){var n=this._tileCoordsToNwSe(e),t=new O(n[0],n[1]);return this.options.noWrap||(t=this._map.wrapLatLngBounds(t)),t},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),n=new s(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(g(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){i(e,"leaflet-tile");var n=this.getTileSize();e.style.width=n.x+"px",e.style.height=n.y+"px",e.onselectstart=b,e.onmousemove=b,t.ielt9&&this.options.opacity<1&&F(e,this.options.opacity)},_addTile:function(e,t){var s=this._getTilePos(e),o=this._tileCoordsToKey(e),n=this.createTile(this._wrapCoords(e),f(this._tileReady,this,e));this._initTile(n),this.createTile.length<2&&w(f(this._tileReady,this,e,null,n)),j(n,s),this._tiles[o]={el:n,coords:e,current:!0},t.appendChild(n),this.fire("tileloadstart",{tile:n,coords:e})},_tileReady:function(e,n,s){n&&this.fire("tileerror",{error:n,tile:s,coords:e});var o=this._tileCoordsToKey(e);(s=this._tiles[o])&&(s.loaded=+new Date,this._map._fadeAnimated?(F(s.el,0),S(this._fadeFrame),this._fadeFrame=w(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),n||(i(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),t.ielt9||!this._map._fadeAnimated?w(this._pruneTiles,this):setTimeout(f(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new s(this._wrapX?ue(e.x,this._wrapX):e.x,this._wrapY?ue(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new p(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Bs(e){return new ne(e)}G=ne.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,n){this._url=e,(n=m(this,n)).detectRetina&&t.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),"string"==typeof n.subdomains&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&0[0]===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return o(n,"load",f(this._tileOnLoad,this,t,n)),o(n,"error",f(this._tileOnError,this,t,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(e),n},getTileUrl:function(e){var s,n={r:t.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(s=this._globalTileRange.max.y-e.y,this.options.tms&&(n.y=s),n["-y"]=s),Sn(this._url,u(n,this.options))},_tileOnLoad:function(e,n){t.ielt9?setTimeout(f(e,this,null,n),0):e(null,n)},_tileOnError:function(e,t,n){var s=this.options.errorTileUrl;s&&t.getAttribute("src")!==s&&(t.src=s),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=b,e.onerror=b,!e.complete)){e.src=pe;var e,t,n=this._tiles[t].coords;g(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",pe),ne.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==pe))return ne.prototype._tileReady.call(this,e,t,n)}});function jn(e,t){return new G(e,t)}ut=G.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,n){this._url=e,s=u({},this.defaultWmsParams);for(o in n)o in this.options||(s[o]=n[o]);var s,o,i=(n=m(this,n)).detectRetina&&t.retina?2:1,a=this.getTileSize();s.width=a.x*i,s.height=a.y*i,this.wmsParams=s},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,G.prototype.onAdd.call(this,e)},getTileUrl:function(e){var s=this._tileCoordsToNwSe(e),o=this._crs,i=x(o.project(s[0]),o.project(s[1])),t=i.min,n=i.max,r=(this._wmsVersion>=1.3&&this._crs===Kn?[t.y,t.x,n.y,n.x]:[t.x,t.y,n.x,n.y]).join(","),a=G.prototype.getTileUrl.call(this,e);return a+fn(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(e,t){return u(this.wmsParams,e),t||this.redraw(),this}});function Us(e,t){return new ut(e,t)}G.WMS=ut,jn.wms=Us,I=E.extend({options:{padding:.1},initialize:function(e){m(this,e),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),i(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,n){var s=this._map.getZoomScale(n,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),a=this._map.project(this._center,n),o=i.multiplyBy(-s).add(a).subtract(this._map._getNewPixelOrigin(e,n));t.any3d?ee(this._container,o,s):j(this._container,o)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new p(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ct=I.extend({options:{tolerance:0},getEvents:function(){var e=I.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){I.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");o(e,"mousemove",this._onMouseMove,this),o(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),o(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){S(this._redrawRequest),delete this._ctx,g(this._container),h(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){I.prototype._update.call(this);var n=this._bounds,e=this._container,s=n.getSize(),o=t.retina?2:1;j(e,n.min),e.width=o*s.x,e.height=o*s.y,e.style.width=s.x+"px",e.style.height=s.y+"px",t.retina&&this._ctx.scale(2,2),this._ctx.translate(-n.min.x,-n.min.y),this.fire("update")}},_reset:function(){I.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[l(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var s=e._order,t=s.next,n=s.prev;t?t.prev=n:this._drawLast=n,n?n.next=t:this._drawFirst=t,delete e._order,delete this._layers[l(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){var t,n,s=e.options.dashArray.split(/[, ]+/),o=[];for(t=0;t<s.length;t++){if(n=Number(s[t]),isNaN(n))return;o.push(n)}e.options._dashArray=o}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||w(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new p,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,e=this._redrawBounds;e?(t=e.getSize(),this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var t,n,s,e=this._redrawBounds;(this._ctx.save(),e)&&(s=e.getSize(),this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,s.x,s.y),this._ctx.clip()),this._drawing=!0;for(t=this._drawFirst;t;t=t.next)n=t.layer,(!e||n._pxBounds&&n._pxBounds.intersects(e))&&n._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,s,i,r,a=e._parts,c=a.length,o=this._ctx;if(c){for(o.beginPath(),n=0;n<c;n++){for(s=0,r=a[n].length;s<r;s++)i=a[n][s],o[s?"lineTo":"moveTo"](i.x,i.y);t&&o.closePath()}this._fillStroke(o,e)}}},_updateCircle:function(e){if(this._drawing&&!e._empty()){var o=e._point,t=this._ctx,s=Math.max(Math.round(e._radius),1),n=(Math.max(Math.round(e._radiusY),1)||s)/s;1!==n&&(t.save(),t.scale(1,n)),t.beginPath(),t.arc(o.x,o.y/n,s,0,2*Math.PI,!1),1!==n&&t.restore(),this._fillStroke(t,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t,s,o=this._map.mouseEventToLayerPoint(e),n=this._drawFirst;n;n=n.next)(t=n.layer).options.interactive&&t._containsPoint(o)&&("click"!==e.type&&"preclick"!==e.type||!this._map._draggableMoved(t))&&(s=t);this._fireEvent(!!s&&[s],e)},_onMouseMove:function(e){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(v(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,o,s=this._drawFirst;s;s=s.next)(o=s.layer).options.interactive&&o._containsPoint(t)&&(n=o);n!==this._hoveredLayer&&(this._handleMouseOut(e),n&&(i(this._container,"leaflet-interactive"),this._fireEvent([n],e,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(f(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){if(t=e._order,t){var t,n=t.next,s=t.prev;n&&(n.prev=s,s?s.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e))}},_bringToBack:function(e){if(t=e._order,t){var t,s=t.next,n=t.prev;n&&(n.next=s,s?s.prev=n:n&&(this._drawLast=n),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e))}}});function un(e){return t.canvas?new ct(e):null}var he=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch{}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Xs={_initContainer:function(){this._container=c("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(I.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=he("shape");i(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=he("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[l(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;g(t),e.removeInteractiveTarget(t),delete this._layers[l(e)]},_updateStyle:function(e){var n=e._stroke,s=e._fill,t=e.options,o=e._container;o.stroked=!!t.stroke,o.filled=!!t.fill,t.stroke?(n||(n=e._stroke=he("stroke")),o.appendChild(n),n.weight=t.weight+"px",n.color=t.color,n.opacity=t.opacity,t.dashArray?n.dashStyle=M(t.dashArray)?t.dashArray.join(" "):t.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=t.lineCap.replace("butt","flat"),n.joinstyle=t.lineJoin):n&&(o.removeChild(n),e._stroke=null),t.fill?(s||(s=e._fill=he("fill")),o.appendChild(s),s.color=t.fillColor||t.color,s.opacity=t.fillOpacity):s&&(o.removeChild(s),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),s=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+s+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){ie(e._container)},_bringToBack:function(e){ce(e._container)}},Me=t.vml?he:Jn,Ce=I.extend({_initContainer:function(){this._container=Me("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Me("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){g(this._container),h(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){I.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),j(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=Me("path");e.options.className&&i(t,e.options.className),e.options.interactive&&i(t,"leaflet-interactive"),this._updateStyle(e),this._layers[l(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){g(e._path),e.removeInteractiveTarget(e._path),delete this._layers[l(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute("stroke",n.color),t.setAttribute("stroke-opacity",n.opacity),t.setAttribute("stroke-width",n.weight),t.setAttribute("stroke-linecap",n.lineCap),t.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?t.setAttribute("stroke-dasharray",n.dashArray):t.removeAttribute("stroke-dasharray"),n.dashOffset?t.setAttribute("stroke-dashoffset",n.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),n.fill?(t.setAttribute("fill",n.fillColor||n.color),t.setAttribute("fill-opacity",n.fillOpacity),t.setAttribute("fill-rule",n.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,es(e._parts,t))},_updateCircle:function(e){var n=e._point,t=Math.max(Math.round(e._radius),1),s="a"+t+","+(Math.max(Math.round(e._radiusY),1)||t)+" 0 1,0 ",o=e._empty()?"M0 0":"M"+(n.x-t)+","+n.y+s+2*t+",0 "+s+2*-t+",0 ";this._setPath(e,o)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){ie(e._path)},_bringToBack:function(e){ce(e._path)}});function rn(e){return t.svg||t.vml?new Ce(e):null}t.vml&&Ce.include(Xs),r.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||0[0]===e)return!1;var t=this._paneRenderers[e];return 0[0]===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&un(e)||rn(e)}}),ot=X.extend({initialize:function(e,t){X.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=y(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function to(e,t){return new ot(e,t)}Ce.create=Me,Ce.pointsToPath=es,N.geometryToLayer=qe,N.coordsToLatLng=wt,N.coordsToLatLngs=We,N.latLngToCoords=_t,N.latLngsToCoords=Ye,N.getFeature=le,N.asFeature=Se,r.mergeOptions({boxZoom:!0}),st=D.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){o(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){h(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){g(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),fe(),Ge(),this._startPoint=this._map.mouseEventToContainerPoint(e),o(document,{contextmenu:q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=c("div","leaflet-zoom-box",this._container),i(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new p(this._point,this._startPoint),n=t.getSize();j(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(g(this._box),v(this._container,"leaflet-crosshair")),ve(),zt(),h(document,{contextmenu:q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(f(this._resetState,this),0);var t=new O(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),r.addInitHook("addHandler","boxZoom",st),r.mergeOptions({doubleClickZoom:!0}),nt=D.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),s=t.options.zoomDelta,o=e.originalEvent.shiftKey?n-s:n+s;"center"===t.options.doubleClickZoom?t.setZoom(o):t.setZoomAround(e.containerPoint,o)}}),r.addInitHook("addHandler","doubleClickZoom",nt),r.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),tt=D.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new U(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}i(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){v(this._map._container,"leaflet-grab"),v(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=y(this._map.options.maxBounds),this._offsetLimit=x(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var n=this._worldWidth,t=Math.round(n/2),e=this._initialWorldOffset,s=this._draggable._newPos.x,o=(s-t+e)%n+t-e,i=(s+t+e)%n-t-e,a=Math.abs(o+e)<Math.abs(i+e)?o:i;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(e){var t=this._map,s=t.options,l=!s.inertia||e.noInertia||this._times.length<2;if(t.fire("dragend",e),l)t.fire("moveend");else{this._prunePositions(+new Date);var d=this._lastPos.subtract(this._positions[0]),u=(this._lastTime-this._times[0])/1e3,o=s.easeLinearity,i=d.multiplyBy(o/u),a=i.distanceTo([0,0]),r=Math.min(s.inertiaMaxSpeed,a),h=i.multiplyBy(r/a),c=r/(s.inertiaDeceleration*o),n=h.multiplyBy(-c/2).round();n.x||n.y?(n=t._limitOffset(n,t.options.maxBounds),w(function(){t.panBy(n,{duration:c,easeLinearity:o,noMoveStart:!0,animate:!0})})):t.fire("moveend")}}}),r.addInitHook("addHandler","dragging",tt),r.mergeOptions({keyboard:!0,keyboardPanDelta:80}),et=D.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),o(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),h(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,s=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(s,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t,n,o=this._panKeys={},s=this.keyCodes;for(t=0,n=s.left.length;t<n;t++)o[s.left[t]]=[-1*e,0];for(t=0,n=s.right.length;t<n;t++)o[s.right[t]]=[e,0];for(t=0,n=s.down.length;t<n;t++)o[s.down[t]]=[0,e];for(t=0,n=s.up.length;t<n;t++)o[s.up[t]]=[0,-1*e]},_setZoomDelta:function(e){var t,n,o=this._zoomKeys={},s=this.keyCodes;for(t=0,n=s.zoomIn.length;t<n;t++)o[s.zoomIn[t]]=e;for(t=0,n=s.zoomOut.length;t<n;t++)o[s.zoomOut[t]]=-e},_addHooks:function(){o(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){h(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var s,i,o=e.keyCode,t=this._map;if(o in this._panKeys)(!t._panAnim||!t._panAnim._inProgress)&&(s=this._panKeys[o],e.shiftKey&&(s=n(s).multiplyBy(3)),t.options.maxBounds&&(s=t._limitOffset(n(s),t.options.maxBounds)),t.options.worldCopyJump?(i=t.wrapLatLng(t.unproject(t.project(t.getCenter()).add(s))),t.panTo(i)):t.panBy(s));else if(o in this._zoomKeys)t.setZoom(t.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[o]);else{if(27!==o||!t._popup||!t._popup.options.closeOnEscapeKey)return;t.closePopup()}q(e)}}}),r.addInitHook("addHandler","keyboard",et),r.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),Je=D.extend({addHooks:function(){o(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){h(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t,n=en(e),s=this._map.options.wheelDebounceTime;this._delta+=n,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date),t=Math.max(s-(+new Date-this._startTime),0),clearTimeout(this._timer),this._timer=setTimeout(f(this._performZoom,this),t),q(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var a=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-(a<0?-a:a))))/Math.LN2,i=n?Math.ceil(o/n)*n:o,s=e._limitZoom(t+(this._delta>0?i:-i))-t;this._delta=0,this._startTime=null,s&&("center"===e.options.scrollWheelZoom?e.setZoom(t+s):e.setZoomAround(this._lastMousePos,t+s))}}),r.addInitHook("addHandler","scrollWheelZoom",Je),nn=600,r.mergeOptions({tapHold:t.touchNative&&t.safari&&t.mobile,tapTolerance:15}),Ze=D.extend({addHooks:function(){o(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){h(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new s(t.clientX,t.clientY),this._holdTimeout=setTimeout(f(function(){this._cancel(),this._isTapValid()&&(o(document,"touchend",_),o(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),nn),o(document,"touchend touchcancel contextmenu",this._cancel,this),o(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){h(document,"touchend",_),h(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),h(document,"touchend touchcancel contextmenu",this._cancel,this),h(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new s(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}}),r.addInitHook("addHandler","tapHold",Ze),r.mergeOptions({touchZoom:t.touch,bounceAtZoomLimits:!0}),Qe=D.extend({addHooks:function(){i(this._map._container,"leaflet-touch-zoom"),o(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){v(this._map._container,"leaflet-touch-zoom"),h(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){if(t=this._map,e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var t,n=t.mouseEventToContainerPoint(e.touches[0]),s=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(s)._divideBy(2))),this._startDist=n.distanceTo(s),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),o(document,"touchmove",this._onTouchMove,this),o(document,"touchend touchcancel",this._onTouchEnd,this),_(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var s,a,t=this._map,o=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]),n=o.distanceTo(i)/this._startDist;if(this._zoom=t.getScaleZoom(n,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&n<1||this._zoom>t.getMaxZoom()&&n>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===n)return}else{if(s=o._add(i)._divideBy(2)._subtract(this._centerPoint),1===n&&0===s.x&&0===s.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),S(this._animRequest),a=f(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},0[0]),this._animRequest=w(a,this,!0),_(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,S(this._animRequest),h(document,"touchmove",this._onTouchMove,this),h(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}}),r.addInitHook("addHandler","touchZoom",Qe),r.BoxZoom=st,r.DoubleClickZoom=nt,r.Drag=tt,r.Keyboard=et,r.ScrollWheelZoom=Je,r.TapHold=Ze,r.TouchZoom=Qe,e.Bounds=p,e.Browser=t,e.CRS=W,e.Canvas=ct,e.Circle=Le,e.CircleMarker=Ee,e.Class=B,e.Control=A,e.DivIcon=ht,e.DivOverlay=z,e.DomEvent=ro,e.DomUtil=gn,e.Draggable=U,e.Evented=re,e.FeatureGroup=$,e.GeoJSON=N,e.GridLayer=ne,e.Handler=D,e.Icon=oe,e.ImageOverlay=Be,e.LatLng=d,e.LatLngBounds=O,e.Layer=E,e.LayerGroup=ae,e.LineUtil=Fs,e.Map=r,e.Marker=Ne,e.Mixin=$s,e.Path=V,e.Point=s,e.PolyUtil=En,e.Polygon=X,e.Polyline=H,e.Popup=ke,e.PosAnimation=sn,e.Projection=Cs,e.Rectangle=ot,e.Renderer=I,e.SVG=Ce,e.SVGOverlay=vt,e.TileLayer=G,e.Tooltip=ge,e.Transformation=Et,e.Util=qn,e.VideoOverlay=Vn,e.bind=f,e.bounds=x,e.canvas=un,e.circle=ds,e.circleMarker=cs,e.control=te,e.divIcon=os,e.extend=u,e.featureGroup=ms,e.geoJSON=Wn,e.geoJson=Es,e.gridLayer=Bs,e.icon=ls,e.imageOverlay=As,e.latLng=a,e.latLngBounds=y,e.layerGroup=vs,e.map=so,e.marker=Ds,e.point=n,e.polygon=fs,e.polyline=hs,e.popup=Ln,e.rectangle=to,e.setOptions=m,e.stamp=l,e.svg=rn,e.svgOverlay=Ts,e.tileLayer=jn,e.tooltip=Fn,e.transformation=me,e.version=Rn,e.videoOverlay=Ms,Kt=window.L,e.noConflict=function(){return window.L=Kt,this},window.L=e}(t)},"./scripts/helpers/block.js":(e,t,n)=>{"use strict";n.d(t,{AE:()=>o,Qc:()=>s});const s=e=>{window.requestAnimationFrame(async function t(){document.body?await e():window.requestAnimationFrame(t)})},o=(e,t)=>{let o,n=[];s(async()=>{if(n=await e(),n){o=new IntersectionObserver(async(e,s)=>{for(const o of e)o.isIntersecting&&(s.unobserve(o.target),n=n.filter(e=>e!==o.target),await t(o.target))},{root:null,rootMargin:"200px 0px 200px 0px",threshold:.01});for(const e of n)o.observe(e)}}),document.addEventListener("ws-loadallsections",()=>{s(async()=>{for(const e of n)o.unobserve(e),await t(e)})})}},"./views/blocks/maps/index.js":(e,t,n)=>{"use strict";var o=n("./scripts/helpers/block.js"),s=n("../node_modules/leaflet/dist/leaflet-src.js");const i=n.p+"images/map-pin.a76324.svg";(0,o.AE)(async()=>Array.from(document.getElementsByClassName("b-maps")),async e=>{const t=e.querySelector("[data-map]");if(!t||!t.dataset.map)return;const n=JSON.parse(atob(t.dataset.map)),o=s.map(t,{center:[n[0].lat,n[0].lng],zoom:15,scrollWheelZoom:!1}),a=new s.Icon({iconUrl:i,iconSize:[80,96],iconAnchor:[40,96]});s.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(o);for(const e of n){const t=s.marker([e.lat,e.lng],{icon:a});e.marker_url&&t.on("click",function(){window.open(e.marker_url,"_blank")}),t.addTo(o),e.marker=t}e.addEventListener("map-tab-change",e=>{const t=n.find(t=>t.id===e.detail.id);t&&o.setView([t.lat,t.lng],15)})})}},e=>{var t="./views/blocks/maps/index.js";e(e.s=t)}])