6 lines
134 KiB
JavaScript
6 lines
134 KiB
JavaScript
/* @preserve
|
|
* Leaflet 2.0.0-alpha.1, a JS library for interactive maps. https://leafletjs.com
|
|
* (c) 2010-2025 Volodymyr Agafonkin, (c) 2010-2011 CloudMade
|
|
*/
|
|
((t,e)=>{"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})})(this,function(t){let I=0;function r(t){return"_leaflet_id"in t||(t._leaflet_id=++I),t._leaflet_id}function j(e,i,s){let o,n;function a(){o=!1,n&&(t.apply(s,n),n=!1)}function t(...t){o?n=t:(e.apply(s,t),setTimeout(a,i),o=!0)}return t}function D(t,e,i){var s=e[1],e=e[0],o=s-e;return t===s&&i?t:((t-e)%o+o)%o+e}function n(){return!1}function i(t,e){return!1===e?t:(e=10**(void 0===e?6:e),Math.round(t*e)/e)}function h(t){return t.trim().split(/\s+/)}function l(t,e){for(var i in Object.hasOwn(t,"options")||(t.options=t.options?Object.create(t.options):{}),e)Object.hasOwn(e,i)&&(t.options[i]=e[i]);return t.options}let R=/\{ *([\w_ -]+) *\}/g;function N(t,s){return t.replace(R,(t,e)=>{let i=s[e];if(void 0===i)throw new Error("No value provided for variable "+t);return i="function"==typeof i?i(s):i})}let F="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",W={__proto__:null,emptyImageUrl:F,falseFn:n,formatNum:i,get lastId(){return I},setOptions:l,splitWords:h,stamp:r,template:N,throttle:j,wrapNum:D};class H{static extend({statics:t,includes:e,...i}){var s=class extends this{},o=(Object.setPrototypeOf(s,this),this.prototype),n=s.prototype;if(t&&Object.assign(s,t),Array.isArray(e))for(var a of e)Object.assign(n,a);else e&&Object.assign(n,e);return Object.assign(n,i),n.options&&(n.options=o.options?Object.create(o.options):{},Object.assign(n.options,i.options)),n._initHooks=[],s}static include(t){var e=this.prototype.options;return Object.assign(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this}static setDefaultOptions(t){return l(this.prototype,t),this}static mergeOptions(t){return this.prototype.options??={},Object.assign(this.prototype.options,t),this}static addInitHook(t,...e){var i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks??=[],this.prototype._initHooks.push(i),this}constructor(...t){this._initHooksCalled=!1,l(this),this.initialize&&this.initialize(...t),this.callInitHooks()}initialize(){}callInitHooks(){if(!this._initHooksCalled){var e,i=[];let t=this;for(;null!==(t=Object.getPrototypeOf(t));)i.push(t);i.reverse();for(e of i)for(var s of e._initHooks??[])s.call(this);this._initHooksCalled=!0}}}class q extends H{on(t,e,i){if("object"==typeof t)for(var[s,o]of Object.entries(t))this._on(s,o,e);else for(var n of h(t))this._on(n,e,i);return this}off(t,e,i){if(arguments.length)if("object"==typeof t)for(var[s,o]of Object.entries(t))this._off(s,o,e);else{var n,a=1===arguments.length;for(n of h(t))a?this._off(n):this._off(n,e,i)}else delete this._events;return this}_on(t,e,i,s){"function"!=typeof e?console.warn("wrong listener type: "+typeof e):!1===this._listens(t,e,i)&&(e={fn:e,ctx:i=i===this?void 0:i},s&&(e.once=!0),this._events??={},this._events[t]??=[],this._events[t].push(e))}_off(e,i,s){if(this._events){let t=this._events[e];if(t)if(1===arguments.length){if(this._firingCount)for(var o of t)o.fn=n;delete this._events[e]}else"function"!=typeof i?console.warn("wrong listener type: "+typeof i):!1!==(i=this._listens(e,i,s))&&(s=t[i],this._firingCount&&(s.fn=n,this._events[e]=t=t.slice()),t.splice(i,1))}}fire(t,e,i){if(this.listens(t,i)){var s={...e,type:t,target:this,sourceTarget:e?.sourceTarget||this};if(this._events){e=this._events[t];if(e){this._firingCount=this._firingCount+1||1;for(var o of e){var n=o.fn;o.once&&this.off(t,n,o.ctx),n.call(o.ctx||this,s)}this._firingCount--}}i&&this._propagateEvent(s)}return this}listens(t,e,i,s){"string"!=typeof t&&console.warn('"string" type argument expected');let o=e;if("function"!=typeof e&&(s=!!e,i=o=void 0),this._events?.[t]?.length&&!1!==this._listens(t,o,i))return!0;if(s)for(var n of Object.values(this._eventParents??{}))if(n.listens(t,e,i,s))return!0;return!1}_listens(t,e,i){if(!this._events)return!1;t=this._events[t]??[];if(!e)return!!t.length;i===this&&(i=void 0);t=t.findIndex(t=>t.fn===e&&t.ctx===i);return-1!==t&&t}once(t,e,i){if("object"==typeof t)for(var[s,o]of Object.entries(t))this._on(s,o,e,!0);else for(var n of h(t))this._on(n,e,i,!0);return this}addEventParent(t){return this._eventParents??={},this._eventParents[r(t)]=t,this}removeEventParent(t){return this._eventParents&&delete this._eventParents[r(t)],this}_propagateEvent(t){for(var e of Object.values(this._eventParents??{}))e.fire(t.type,{propagatedFrom:t.target,...t},!0)}}class g{constructor(t,e,i){if(!g.validate(t,e))throw new Error(`Invalid Point object: (${t}, ${e})`);let s,o;if(t instanceof g)return t;o=Array.isArray(t)?(s=t[0],t[1]):"object"==typeof t&&"x"in t&&"y"in t?(s=t.x,t.y):(s=t,e),this.x=i?Math.round(s):s,this.y=i?Math.round(o):o}static validate(t,e){return!!(t instanceof g||Array.isArray(t))||!!(t&&"object"==typeof t&&"x"in t&&"y"in t)||!(!t&&0!==t||!e&&0!==e)}clone(){var t=new g(0,0);return t.x=this.x,t.y=this.y,t}add(t){return this.clone()._add(new g(t))}_add(t){return this.x+=t.x,this.y+=t.y,this}subtract(t){return this.clone()._subtract(new g(t))}_subtract(t){return this.x-=t.x,this.y-=t.y,this}divideBy(t){return this.clone()._divideBy(t)}_divideBy(t){return this.x/=t,this.y/=t,this}multiplyBy(t){return this.clone()._multiplyBy(t)}_multiplyBy(t){return this.x*=t,this.y*=t,this}scaleBy(t){return new g(this.x*t.x,this.y*t.y)}unscaleBy(t){return new g(this.x/t.x,this.y/t.y)}round(){return this.clone()._round()}_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}floor(){return this.clone()._floor()}_floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.clone()._ceil()}_ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}trunc(){return this.clone()._trunc()}_trunc(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}distanceTo(t){var e=(t=new g(t)).x-this.x,t=t.y-this.y;return Math.sqrt(e*e+t*t)}equals(t){return(t=new g(t)).x===this.x&&t.y===this.y}contains(t){return t=new g(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}toString(){return`Point(${i(this.x)}, ${i(this.y)})`}}class u{constructor(t,e){if(t){if(t instanceof u)return t;var i;for(i of e?[t,e]:t)this.extend(i)}}extend(t){let e,i;if(t){if(t instanceof g||"number"==typeof t[0]||"x"in t)e=i=new g(t);else if(t=new u(t),e=t.min,i=t.max,!e||!i)return this;this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone())}return this}getCenter(t){return new g((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)}getBottomLeft(){return new g(this.min.x,this.max.y)}getTopRight(){return new g(this.max.x,this.min.y)}getTopLeft(){return this.min}getBottomRight(){return this.max}getSize(){return this.max.subtract(this.min)}contains(t){let e,i;return(t=new("number"==typeof t[0]||t instanceof g?g:u)(t))instanceof u?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y}intersects(t){t=new u(t);var e=this.min,i=this.max,s=t.min,t=t.max,o=t.x>=e.x&&s.x<=i.x,e=e.y<=t.y&&s.y<=i.y;return o&&e}overlaps(t){t=new u(t);var e=this.min,i=this.max,s=t.min,t=t.max,o=t.x>e.x&&s.x<i.x,e=e.y<t.y&&s.y<i.y;return o&&e}isValid(){return!(!this.min||!this.max)}pad(t){var e=this.min,i=this.max,s=Math.abs(e.x-i.x)*t,t=Math.abs(e.y-i.y)*t;return new u(new g(e.x-s,e.y-t),new g(i.x+s,i.y+t))}equals(t){return!!t&&(t=new u(t),this.min.equals(t.getTopLeft()))&&this.max.equals(t.getBottomRight())}}class f{constructor(t,e){if(t){if(t instanceof f)return t;var i;for(i of e?[t,e]:t)this.extend(i)}}extend(t){var e=this._southWest,i=this._northEast;let s,o;if(t instanceof w)s=t,o=t;else{if(!(t instanceof f))return t?w.validate(t)?this.extend(new w(t)):this.extend(new f(t)):this;if(s=t._southWest,o=t._northEast,!s||!o)return this}return e||i?(e.lat=Math.min(s.lat,e.lat),e.lng=Math.min(s.lng,e.lng),i.lat=Math.max(o.lat,i.lat),i.lng=Math.max(o.lng,i.lng)):(this._southWest=new w(s.lat,s.lng),this._northEast=new w(o.lat,o.lng)),this}pad(t){var e=this._southWest,i=this._northEast,s=Math.abs(e.lat-i.lat)*t,t=Math.abs(e.lng-i.lng)*t;return new f(new w(e.lat-s,e.lng-t),new w(i.lat+s,i.lng+t))}getCenter(){return new w((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)}getSouthWest(){return this._southWest}getNorthEast(){return this._northEast}getNorthWest(){return new w(this.getNorth(),this.getWest())}getSouthEast(){return new w(this.getSouth(),this.getEast())}getWest(){return this._southWest.lng}getSouth(){return this._southWest.lat}getEast(){return this._northEast.lng}getNorth(){return this._northEast.lat}contains(t){t=new(w.validate(t)?w:f)(t);var e=this._southWest,i=this._northEast;let s,o;return t instanceof f?(s=t.getSouthWest(),o=t.getNorthEast()):s=o=t,s.lat>=e.lat&&o.lat<=i.lat&&s.lng>=e.lng&&o.lng<=i.lng}intersects(t){t=new f(t);var e=this._southWest,i=this._northEast,s=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>=e.lat&&s.lat<=i.lat,t=t.lng>=e.lng&&s.lng<=i.lng;return o&&t}overlaps(t){t=new f(t);var e=this._southWest,i=this._northEast,s=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>e.lat&&s.lat<i.lat,t=t.lng>e.lng&&s.lng<i.lng;return o&&t}toBBoxString(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")}equals(t,e){return!!t&&(t=new f(t),this._southWest.equals(t.getSouthWest(),e))&&this._northEast.equals(t.getNorthEast(),e)}isValid(){return!(!this._southWest||!this._northEast)}}class w{constructor(t,e,i){if(!w.validate(t,e,i))throw new Error(`Invalid LatLng object: (${t}, ${e})`);let s,o,n;if(t instanceof w)return t;Array.isArray(t)&&"object"!=typeof t[0]?3===t.length?(s=t[0],o=t[1],n=t[2]):2===t.length&&(s=t[0],o=t[1]):n="object"==typeof t&&"lat"in t?(s=t.lat,o="lng"in t?t.lng:t.lon,t.alt):(s=t,o=e,i),this.lat=+s,this.lng=+o,void 0!==n&&(this.alt=+n)}static validate(t,e,i){return t instanceof w||"object"==typeof t&&"lat"in t||(t&&Array.isArray(t)&&"object"!=typeof t[0]?3===t.length||2===t.length:!(!t&&0!==t||!e&&0!==e))}equals(t,e){return!!t&&(t=new w(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(e??1e-9))}toString(t){return`LatLng(${i(this.lat,t)}, ${i(this.lng,t)})`}distanceTo(t){return d.distance(this,new w(t))}wrap(){return d.wrapLatLng(this)}toBounds(t){var t=180*t/40075017,e=t/Math.cos(Math.PI/180*this.lat);return new f([this.lat-t,this.lng-e],[this.lat+t,this.lng+e])}clone(){var t=new w(0,0);return t.lat=this.lat,t.lng=this.lng,t.alt=this.alt,t}}class e{static projection=void 0;static transformation=void 0;static latLngToPoint(t,e){t=this.projection.project(t),e=this.scale(e);return this.transformation._transform(t,e)}static pointToLatLng(t,e){e=this.scale(e),t=this.transformation.untransform(t,e);return this.projection.unproject(t)}static project(t){return this.projection.project(t)}static unproject(t){return this.projection.unproject(t)}static scale(t){return 256*2**t}static zoom(t){return Math.log(t/256)/Math.LN2}static getProjectedBounds(t){var e,i;return this.infinite?null:(i=this.projection.bounds,t=this.scale(t),e=this.transformation.transform(i.min,t),i=this.transformation.transform(i.max,t),new u(e,i))}static infinite=!1;static wrapLatLng(t){t=new w(t);var e=this.wrapLng?D(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?D(t.lat,this.wrapLat,!0):t.lat,t=t.alt;return new w(i,e,t)}static wrapLatLngBounds(t){var e=(t=new f(t)).getCenter(),i=this.wrapLatLng(e),s=e.lat-i.lat,e=e.lng-i.lng;return 0==s&&0==e?t:(i=t.getSouthWest(),t=t.getNorthEast(),i=new w(i.lat-s,i.lng-e),s=new w(t.lat-s,t.lng-e),new f(i,s))}}class d extends e{static wrapLng=[-180,180];static R=6371e3;static distance(t,e){var i=Math.PI/180,s=t.lat*i,o=e.lat*i,n=Math.sin((e.lat-t.lat)*i/2),e=Math.sin((e.lng-t.lng)*i/2),t=n*n+Math.cos(s)*Math.cos(o)*e*e,i=2*Math.atan2(Math.sqrt(t),Math.sqrt(1-t));return this.R*i}}let U=6378137,V={R:U,MAX_LATITUDE:85.0511287798,project(t){t=new w(t);var e=Math.PI/180,i=this.MAX_LATITUDE,i=Math.max(Math.min(i,t.lat),-i),i=Math.sin(i*e);return new g(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject(t){t=new g(t);var e=180/Math.PI;return new w((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(s=U*Math.PI,new u([-s,-s],[s,s]))};class G{constructor(t,e,i,s){Array.isArray(t)?(this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3]):(this._a=t,this._b=e,this._c=i,this._d=s)}transform(t,e){return this._transform(t.clone(),e)}_transform(t,e){return t.x=(e||=1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t}untransform(t,e){return e||=1,new g((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}}class K extends d{static code="EPSG:3857";static projection=V;static transformation=(s=.5/(Math.PI*V.R),new G(s,.5,-s,.5))}class Y extends K{static code="EPSG:900913"}var s=Q("chrome"),o=!s&&Q("safari"),$="undefined"!=typeof orientation||Q("mobile"),X="undefined"!=typeof window&&!!window.PointerEvent,J="undefined"!=typeof window&&("ontouchstart"in window||!!window.TouchEvent);function Q(t){return"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t)}var _={chrome:s,safari:o,mobile:$,pointer:X,touch:J||X,touchNative:J,retina:"undefined"!=typeof window&&void 0!==window.devicePixelRatio&&1<window.devicePixelRatio,mac:"undefined"!=typeof navigator&&void 0!==navigator.platform&&navigator.platform.startsWith("Mac"),linux:"undefined"!=typeof navigator&&void 0!==navigator.platform&&navigator.platform.startsWith("Linux")};let tt=200;function et(t,e){t.addEventListener("dblclick",e);let i=0,s;function o(t){var e;1!==t.detail?s=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||(e=kt(t)).some(t=>t instanceof HTMLLabelElement&&t.attributes.for)&&!e.some(t=>t instanceof HTMLInputElement||t instanceof HTMLSelectElement)||((e=Date.now())-i<=tt?2===++s&&t.target.dispatchEvent((t=>{let e={bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed,detail:2,view:t.view,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget,region:t.region},i;return i=new(t instanceof PointerEvent?(e={...e,pointerId:t.pointerId,width:t.width,height:t.height,pressure:t.pressure,tangentialPressure:t.tangentialPressure,tiltX:t.tiltX,tiltY:t.tiltY,twist:t.twist,pointerType:t.pointerType,isPrimary:t.isPrimary},PointerEvent):MouseEvent)("dblclick",e)})(t)):s=1,i=e)}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function it(t){return"string"==typeof t?document.getElementById(t):t}function a(t,e,i){t=document.createElement(t);return t.className=e??"",i?.appendChild(t),t}function st(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ot(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function p(t,e,i){e=e??new g(0,0);t.style.transform=`translate3d(${e.x}px,${e.y}px,0)`+(i?` scale(${i})`:"")}let nt=new WeakMap;function c(t,e){nt.set(t,e),p(t,e)}function m(t){return nt.get(t)??new g(0,0)}let at="undefined"==typeof document?{}:document.documentElement.style,rt=["userSelect","WebkitUserSelect"].find(t=>t in at),ht;function lt(){var t=at[rt];"none"!==t&&(ht=t,at[rt]="none")}function dt(){void 0!==ht&&(at[rt]=ht,ht=void 0)}function _t(){v(window,"dragstart",L)}function pt(){x(window,"dragstart",L)}let ct,ut;function mt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(gt(),ct=t,ut=t.style.outlineStyle,t.style.outlineStyle="none",v(window,"keydown",gt))}function gt(){ct&&(ct.style.outlineStyle=ut,ct=void 0,ut=void 0,x(window,"keydown",gt))}function ft(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function vt(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}let yt={__proto__:null,create:a,disableImageDrag:_t,disableTextSelection:lt,enableImageDrag:pt,enableTextSelection:dt,get:it,getPosition:m,getScale:vt,getSizedParentNode:ft,preventOutline:mt,restoreOutline:gt,setPosition:c,setTransform:p,toBack:ot,toFront:st},xt=new Map,wt=!1;function bt(){wt||(wt=!0,document.addEventListener("pointerdown",Lt,{capture:!0}),document.addEventListener("pointermove",Pt,{capture:!0}),document.addEventListener("pointerup",Tt,{capture:!0}),document.addEventListener("pointercancel",Tt,{capture:!0}),xt=new Map)}function Lt(t){xt.set(t.pointerId,t)}function Pt(t){xt.has(t.pointerId)&&xt.set(t.pointerId,t)}function Tt(t){xt.delete(t.pointerId)}function zt(){return[...xt.values()]}s={__proto__:null,cleanupPointers:function(){xt.clear()},disablePointerDetection:function(){document.removeEventListener("pointerdown",Lt,{capture:!0}),document.removeEventListener("pointermove",Pt,{capture:!0}),document.removeEventListener("pointerup",Tt,{capture:!0}),document.removeEventListener("pointercancel",Tt,{capture:!0}),wt=!1},enablePointerDetection:bt,getPointers:zt};function v(t,e,i,s){if(e&&"object"==typeof e)for(var[o,n]of Object.entries(e))Ot(t,o,n,i);else for(var a of h(e))Ot(t,a,i,s);return this}let y="_leaflet_events";function x(t,e,i,s){if(1===arguments.length)Mt(t),delete t[y];else if(e&&"object"==typeof e)for(var[o,n]of Object.entries(e))Ct(t,o,n,i);else if(e=h(e),2===arguments.length)Mt(t,t=>e.includes(t));else for(var a of e)Ct(t,a,i,s);return this}function Mt(t,e){for(var i of Object.keys(t[y]??{})){var s=i.split(/\d/)[0];e&&!e(s)||Ct(t,s,null,null,i)}}let Zt={pointerenter:"pointerover",pointerleave:"pointerout",wheel:"undefined"!=typeof window&&!("onwheel"in window)&&"mousewheel"};function Ot(i,s,o,n){var a=s+r(o)+(n?"_"+r(n):"");if(!i[y]||!i[y][a]){let t=function(t){return o.call(n||i,t||window.event)},e=t;_.touch&&"dblclick"===s?t=et(i,t):"addEventListener"in i?"wheel"===s||"mousewheel"===s?i.addEventListener(Zt[s]||s,t,{passive:!1}):"pointerenter"===s||"pointerleave"===s?(t=function(t){t??=window.event,Dt(i,t)&&e(t)},i.addEventListener(Zt[s],t,!1)):i.addEventListener(s,e,!1):i.attachEvent("on"+s,t),i[y]??={},i[y][a]=t}}function Ct(t,e,i,s,o){o??=e+r(i)+(s?"_"+r(s):"");var n,i=t[y]&&t[y][o];i&&(_.touch&&"dblclick"===e?(s=i,(n=t).removeEventListener("dblclick",s.dblclick),n.removeEventListener("click",s.simDblclick)):"removeEventListener"in t?t.removeEventListener(Zt[e]||e,i,!1):t.detachEvent("on"+e,i),t[y][o]=null)}function b(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function St(t){return Ot(t,"wheel",b),this}function At(t){return v(t,"pointerdown dblclick contextmenu",b),t._leaflet_disable_click=!0,this}function L(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Et(t){return L(t),b(t),this}function kt(t){return t.composedPath()}function Bt(t,e){var i,s;return e?(s=(i=vt(e)).boundingClientRect,new g((t.clientX-s.left)/i.x-e.clientLeft,(t.clientY-s.top)/i.y-e.clientTop)):new g(t.clientX,t.clientY)}function It(){var t=window.devicePixelRatio;return _.linux&&_.chrome?t:_.mac?3*t:0<t?2*t:1}function jt(t){return t.deltaY&&0===t.deltaMode?-t.deltaY/It():t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:(t.deltaX||t.deltaZ,0)}function Dt(t,e){let i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var Rt={__proto__:null,PointerEvents:s,disableClickPropagation:At,disableScrollPropagation:St,getPointerPosition:Bt,getPropagationPath:kt,getWheelDelta:jt,getWheelPxFactor:It,isExternalTarget:Dt,off:x,on:v,preventDefault:L,stop:Et,stopPropagation:b};class Nt extends q{run(t,e,i,s){this.stop(),this._el=t,this._inProgress=!0,this._duration=i??.25,this._easeOutPower=1/Math.max(s??.5,.2),this._startPos=m(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()}stop(){this._inProgress&&(this._step(!0),this._complete())}_animate(){this._animId=requestAnimationFrame(this._animate.bind(this)),this._step()}_step(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())}_runFrame(t,e){t=this._startPos.add(this._offset.multiplyBy(t));e&&t._round(),c(this._el,t),this.fire("step")}_complete(){cancelAnimationFrame(this._animId),this._inProgress=!1,this.fire("end")}_easeOut(t){return 1-(1-t)**this._easeOutPower}}o=class Map extends q{static{this.setDefaultOptions({crs:K,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0})}initialize(t,e){e=l(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(new w(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=this.options.zoomAnimation,this._zoomAnimated&&this._createAnimProxy(),this._addLayers(this.options.layers)}setView(t,e,i){if((e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(new w(t),e,this.options.maxBounds),i??={},this._stop(),this._loaded&&!i.reset&&!0!==i)&&(void 0!==i.animate&&(i.zoom={animate:i.animate,...i.zoom},i.pan={animate:i.animate,duration:i.duration,...i.pan}),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,e,i.pan?.noMoveStart),this}setZoom(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)}zoomIn(t,e){return t??=this.options.zoomDelta,this.setZoom(this._zoom+t,e)}zoomOut(t,e){return t??=this.options.zoomDelta,this.setZoom(this._zoom-t,e)}setZoomAround(t,e,i){var s=this.getZoomScale(e),o=this.getSize().divideBy(2),t=(t instanceof g?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/s),s=this.containerPointToLatLng(o.add(t));return this.setView(s,e,{zoom:i})}_getBoundsCenterZoom(t,e){e??={},t=t.getBounds?t.getBounds():new f(t);var i=new g(e.paddingTopLeft||e.padding||[0,0]),s=new g(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(s));return(o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0?{center:t.getCenter(),zoom:o}:(e=s.subtract(i).divideBy(2),s=this.project(t.getSouthWest(),o),i=this.project(t.getNorthEast(),o),{center:this.unproject(s.add(i).divideBy(2).add(e),o),zoom:o})}fitBounds(t,e){if((t=new f(t)).isValid())return t=this._getBoundsCenterZoom(t,e),this.setView(t.center,t.zoom,e);throw new Error("Bounds are not valid.")}fitWorld(t){return this.fitBounds([[-90,-180],[90,180]],t)}panTo(t,e){return this.setView(t,this._zoom,{pan:e})}panBy(t,e){var i;return e??={},(t=new g(t).round()).x||t.y?(!0===e.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new Nt,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate?(this._mapPane.classList.add("leaflet-pan-anim"),i=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend")}flyTo(i,s,t){if(!1===(t??={}).animate)return this.setView(i,s,t);this._stop();let o=this.project(this.getCenter()),n=this.project(i),e=this.getSize(),a=this._zoom,r=(i=new w(i),s=void 0===s?a:this._limitZoom(s),Math.max(e.x,e.y)),h=r*this.getZoomScale(a,s),l=n.distanceTo(o)||1,d=1.42,_=d*d;function p(t){var e=t?-1:1,t=t?h:r,e=(h*h-r*r+e*_*_*l*l)/(2*t*_*l),t=Math.sqrt(e*e+1)-e;return t<1e-9?-18:Math.log(t)}function c(t){return(Math.exp(t)-Math.exp(-t))/2}function u(t){return(Math.exp(t)+Math.exp(-t))/2}let m=p(0);function g(t){return r*(u(m)*(c(t=m+d*t)/u(t))-c(m))/_}let f=Date.now(),v=(p(1)-m)/d,y=t.duration?1e3*t.duration:1e3*v*.8,x=()=>{var t=(Date.now()-f)/y,e=(1-(1-t)**1.5)*v;t<=1?(this._flyToFrame=requestAnimationFrame(x),this._move(this.unproject(o.add(n.subtract(o).multiplyBy(g(e)/l)),a),this.getScaleZoom(r/(t=e,r*(u(m)/u(m+d*t))),a),{flyTo:!0})):this._move(i,s)._moveEnd(!0)};return this._moveStart(!0,t.noMoveStart),x(),this}flyToBounds(t,e){t=this._getBoundsCenterZoom(t,e);return this.flyTo(t.center,t.zoom,e)}setMaxBounds(t){return t=new f(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)}setMinZoom(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this}setMaxZoom(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this}panInsideBounds(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,new f(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this}panInside(t,e){e??={};var i=new g(e.paddingTopLeft||e.padding||[0,0]),s=new g(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),t=this.project(t),n=this.getPixelBounds(),i=new u([n.min.add(i),n.max.subtract(s)]),n=i.getSize();return i.contains(t)||(this._enforcingBounds=!0,s=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(n),o.x+=s.x<0?-i.x:i.x,o.y+=s.y<0?-i.y:i.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1),this}invalidateSize(t){if(!this._loaded)return this;t={animate:!1,pan:!0,...!0===t?{animate:!0}:t};var e=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),s=e.divideBy(2).round(),o=i.divideBy(2).round(),s=s.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(this.fire.bind(this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this}stop(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()}locate(t){var e,i;return t=this._locateOptions={timeout:1e4,watch:!1,...t},"geolocation"in navigator?(e=this._handleGeolocationResponse.bind(this),i=this._handleGeolocationError.bind(this),t.watch?(void 0!==this._locationWatchId&&navigator.geolocation.clearWatch(this._locationWatchId),this._locationWatchId=navigator.geolocation.watchPosition(e,i,t)):navigator.geolocation.getCurrentPosition(e,i,t)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this}stopLocate(){return navigator.geolocation?.clearWatch?.(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this}_handleGeolocationError(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:`Geolocation error: ${t}.`}))}_handleGeolocationResponse(t){if(this._container._leaflet_id){var e,i,s=t.coords.latitude,o=t.coords.longitude,s=new w(s,o),o=s.toBounds(2*t.coords.accuracy),n=this._locateOptions,a=(n.setView&&(e=this.getBoundsZoom(o),this.setView(s,n.maxZoom?Math.min(e,n.maxZoom):e)),{latlng:s,bounds:o,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(a[i]=t.coords[i]);this.fire("locationfound",a)}}addHandler(t,e){return e&&(e=this[t]=new e(this),this._handlers.push(e),this.options[t])&&e.enable(),this}remove(){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");delete this._container._leaflet_id,delete this._containerId,void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),this._mapPane.remove(),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(cancelAnimationFrame(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),clearTimeout(this._transitionEndTimer),clearTimeout(this._sizeTimer),this._loaded&&this.fire("unload"),this._destroyAnimProxy();for(var t of Object.values(this._layers))t.remove();for(var e of Object.values(this._panes))e.remove();return this._layers={},this._panes={},delete this._mapPane,delete this._renderer,this}createPane(t,e){e=a("div","leaflet-pane"+(t?` leaflet-${t.replace("Pane","")}-pane`:""),e||this._mapPane);return t&&(this._panes[t]=e),e}getCenter(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())}getZoom(){return this._zoom}getBounds(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),t=this.unproject(t.getTopRight());return new f(e,t)}getMinZoom(){return this.options.minZoom??this._layersMinZoom??0}getMaxZoom(){return this.options.maxZoom??this._layersMaxZoom??1/0}getBoundsZoom(t,e,i){t=new f(t),i=new g(i??[0,0]);let s=this.getZoom()??0;var o=this.getMinZoom(),n=this.getMaxZoom(),a=t.getNorthWest(),t=t.getSouthEast(),i=this.getSize().subtract(i),t=new u(this.project(t,s),this.project(a,s)).getSize(),a=this.options.zoomSnap,r=i.x/t.x,i=i.y/t.y,t=e?Math.max(r,i):Math.min(r,i);return s=this.getScaleZoom(t,s),a&&(s=Math.round(s/(a/100))*(a/100),s=e?Math.ceil(s/a)*a:Math.floor(s/a)*a),Math.max(o,Math.min(n,s))}getSize(){return this._size&&!this._sizeChanged||(this._size=new g(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()}getPixelBounds(t,e){t=this._getTopLeftPoint(t,e);return new u(t,t.add(this.getSize()))}getPixelOrigin(){return this._checkIfLoaded(),this._pixelOrigin}getPixelWorldBounds(t){return this.options.crs.getProjectedBounds(t??this.getZoom())}getPane(t){return"string"==typeof t?this._panes[t]:t}getPanes(){return this._panes}getContainer(){return this._container}getZoomScale(t,e){var i=this.options.crs;return e??=this._zoom,i.scale(t)/i.scale(e)}getScaleZoom(t,e){var i=this.options.crs,t=(e??=this._zoom,i.zoom(t*i.scale(e)));return isNaN(t)?1/0:t}project(t,e){return e??=this._zoom,this.options.crs.latLngToPoint(new w(t),e)}unproject(t,e){return e??=this._zoom,this.options.crs.pointToLatLng(new g(t),e)}layerPointToLatLng(t){t=new g(t).add(this.getPixelOrigin());return this.unproject(t)}latLngToLayerPoint(t){return this.project(new w(t))._round()._subtract(this.getPixelOrigin())}wrapLatLng(t){return this.options.crs.wrapLatLng(new w(t))}wrapLatLngBounds(t){return this.options.crs.wrapLatLngBounds(new f(t))}distance(t,e){return this.options.crs.distance(new w(t),new w(e))}containerPointToLayerPoint(t){return new g(t).subtract(this._getMapPanePos())}layerPointToContainerPoint(t){return new g(t).add(this._getMapPanePos())}containerPointToLatLng(t){t=this.containerPointToLayerPoint(new g(t));return this.layerPointToLatLng(t)}latLngToContainerPoint(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(new w(t)))}pointerEventToContainerPoint(t){return Bt(t,this._container)}pointerEventToLayerPoint(t){return this.containerPointToLayerPoint(this.pointerEventToContainerPoint(t))}pointerEventToLatLng(t){return this.layerPointToLatLng(this.pointerEventToLayerPoint(t))}_initContainer(t){t=this._container=it(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");v(t,"scroll",this._onScroll,this),this._containerId=r(t),bt()}_initLayout(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation,["leaflet-container","leaflet-touch"]),e=(_.retina&&e.push("leaflet-retina"),_.safari&&e.push("leaflet-safari"),this._fadeAnimated&&e.push("leaflet-fade-anim"),t.classList.add(...e),getComputedStyle(t)).position;"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()}_initPanes(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),c(this._mapPane,new g(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t.markerPane.classList.add("leaflet-zoom-hide"),t.shadowPane.classList.add("leaflet-zoom-hide"))}_resetView(t,e,i){c(this._mapPane,new g(0,0));var s=!this._loaded,o=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),s&&this.fire("load")}_moveStart(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this}_move(t,e,i,s){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),s?i?.pinch&&this.fire("zoom",i):((o||i?.pinch)&&this.fire("zoom",i),this.fire("move",i)),this}_moveEnd(t){return t&&this.fire("zoomend"),this.fire("moveend")}_stop(){return cancelAnimationFrame(this._flyToFrame),this._panAnim?.stop(),this}_rawPanBy(t){c(this._mapPane,this._getMapPanePos().subtract(t))}_getZoomSpan(){return this.getMaxZoom()-this.getMinZoom()}_panInsideMaxBounds(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)}_checkIfLoaded(){if(!this._loaded)throw new Error("Set map center and zoom first.")}_initEvents(t){this._targets={},(t?x:v)((this._targets[r(this._container)]=this)._container,"click dblclick pointerdown pointerup pointerover pointerout pointermove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&(t?this._resizeObserver.disconnect():(this._resizeObserver||(this._resizeObserver=new ResizeObserver(this._onResize.bind(this))),this._resizeObserver.observe(this._container))),this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)}_onResize(){cancelAnimationFrame(this._resizeRequest),this._resizeRequest=requestAnimationFrame(()=>{this.invalidateSize({debounceMoveend:!0})})}_onScroll(){this._container.scrollTop=0,this._container.scrollLeft=0}_onMoveEnd(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}_findEventTargets(t,e){let i=[],s,o=t.target||t.srcElement,n=!1;for(var a="pointerout"===e||"pointerover"===e;o;){if((s=this._targets[r(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(s)){n=!0;break}if(s&&s.listens(e,!0)){if(a&&!Dt(o,t))break;if(i.push(s),a)break}if(o===this._container)break;o=o.parentNode}return i=i.length||n||a||!this.listens(e,!0)?i:[this]}_isClickDisabled(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click||!t.parentNode)return!0;t=t.parentNode}}_handleDOMEvent(t){var e,i=t.target??t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("pointerdown"===(e=t.type)&&mt(i),this._fireDOMEvent(t,e))}static _pointerEvents=["click","dblclick","pointerover","pointerout","contextmenu"];_fireDOMEvent(t,e,i){"click"===e&&this._fireDOMEvent(t,"preclick",i);let s=this._findEventTargets(t,e);if(i&&(i=i.filter(t=>t.listens(e,!0)),s=i.concat(s)),s.length){"contextmenu"===e&&L(t);var o,n,i=s[0],a={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(o=i.getLatLng&&(!i._radius||i._radius<=10),a.containerPoint=o?this.latLngToContainerPoint(i.getLatLng()):this.pointerEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=o?i.getLatLng():this.layerPointToLatLng(a.layerPoint));for(n of s)if(n.fire(e,a,!0),a.originalEvent._stopped||!1===n.options.bubblingPointerEvents&&Map._pointerEvents.includes(e))return}}_draggableMoved(t){return(t=t.dragging?.enabled()?t:this).dragging?.moved()||this.boxZoom?.moved()}_clearHandlers(){for(var t of this._handlers)t.disable()}whenReady(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this}_getMapPanePos(){return m(this._mapPane)}_moved(){var t=this._getMapPanePos();return t&&!t.equals([0,0])}_getTopLeftPoint(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())}_getNewPixelOrigin(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()}_latLngToNewLayerPoint(t,e,i){i=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(i)}_latLngBoundsToNewLayerBounds(t,e,i){i=this._getNewPixelOrigin(i,e);return new u([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])}_getCenterLayerPoint(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))}_getCenterOffset(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())}_limitCenter(t,e,i){var s,o;return!i||(s=this.project(t,e),o=this.getSize().divideBy(2),o=new u(s.subtract(o),s.add(o)),o=this._getBoundsOffset(o,i,e),Math.abs(o.x)<=1&&Math.abs(o.y)<=1)?t:this.unproject(s.add(o),e)}_limitOffset(t,e){var i;return e?(i=this.getPixelBounds(),i=new u(i.min.add(t),i.max.add(t)),t.add(this._getBoundsOffset(i,e))):t}_getBoundsOffset(t,e,i){e=new u(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),i=e.min.subtract(t.min),e=e.max.subtract(t.max),t=this._rebound(i.x,-e.x),i=this._rebound(i.y,-e.y);return new g(t,i)}_rebound(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))}_limitZoom(t){var e=this.getMinZoom(),i=this.getMaxZoom(),s=this.options.zoomSnap;return s&&(t=Math.round(t/s)*s),Math.max(e,Math.min(i,t))}_onPanTransitionStep(){this.fire("move")}_onPanTransitionEnd(){this._mapPane.classList.remove("leaflet-pan-anim"),this.fire("moveend")}_tryAnimatedPan(t,e){t=this._getCenterOffset(t)._trunc();return!(!0!==e?.animate&&!this.getSize().contains(t)||(this.panBy(t,e),0))}_createAnimProxy(){this._proxy=a("div","leaflet-proxy leaflet-zoom-animated"),this._panes.mapPane.appendChild(this._proxy),this.on("zoomanim",this._animateProxyZoom,this),this.on("load moveend",this._animMoveEnd,this),v(this._proxy,"transitionend",this._catchTransitionEnd,this)}_animateProxyZoom(t){var e=this._proxy.style.transform;p(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style.transform&&this._animatingZoom&&this._onZoomTransitionEnd()}_animMoveEnd(){var t=this.getCenter(),e=this.getZoom();p(this._proxy,this.project(t,e),this.getZoomScale(e,1))}_destroyAnimProxy(){this._proxy&&(x(this._proxy,"transitionend",this._catchTransitionEnd,this),this._proxy.remove(),this.off("zoomanim",this._animateProxyZoom,this),this.off("load moveend",this._animMoveEnd,this),delete this._proxy)}_catchTransitionEnd(t){this._animatingZoom&&t.propertyName.includes("transform")&&this._onZoomTransitionEnd()}_nothingToAnimate(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length}_tryAnimatedZoom(t,e,i){if(!this._animatingZoom){if(i??={},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var s=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/s);if(!0!==i.animate&&!this.getSize().contains(s))return!1;requestAnimationFrame(()=>{this._moveStart(!0,i.noMoveStart??!1)._animateZoom(t,e,!0)})}return!0}_animateZoom(t,e,i,s){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,this._mapPane.classList.add("leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._transitionEndTimer=setTimeout(this._onZoomTransitionEnd.bind(this),250))}_onZoomTransitionEnd(){this._animatingZoom&&(this._mapPane?.classList.remove("leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}},$=o;class P extends H{static{this.setDefaultOptions({position:"topright"})}initialize(t){l(this,t)}getPosition(){return this.options.position}setPosition(t){var e=this._map;return e?.removeControl(this),this.options.position=t,e?.addControl(this),this}getContainer(){return this._container}addTo(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),t=t._controlCorners[i];return e.classList.add("leaflet-control"),i.includes("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this}remove(){return this._map&&(this._container.remove(),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this}_refocusOnMap(t){this._map&&t&&(0!==t.screenX||0!==t.screenY)&&this._map.getContainer().focus()}}o.include({addControl(t){return t.addTo(this),this},removeControl(t){return t.remove(),this},_initControlPos(){let s=this._controlCorners={},o="leaflet-",n=this._controlContainer=a("div",o+"control-container",this._container);function t(t,e){var i=o+t+" "+o+e;s[t+e]=a("div",i,n)}t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos(){for(var t of Object.values(this._controlCorners))t.remove();this._controlContainer.remove(),delete this._controlCorners,delete this._controlContainer}});class Ft extends P{static{this.setDefaultOptions({collapsed:!0,collapseDelay:0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction(t,e,i,s){return i<s?-1:s<i?1:0}})}initialize(t,e,i){l(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var[s,o]of Object.entries(t??{}))this._addLayer(o,s);for(var[n,a]of Object.entries(e??{}))this._addLayer(a,n,!0)}onAdd(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e of this._layers)e.layer.on("add remove",this._onLayerChange,this);return this.options.collapsed||t.on("resize",this._expandIfNotCollapsed,this),this._container}addTo(t){return P.prototype.addTo.call(this,t),this._expandIfNotCollapsed()}onRemove(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t of this._layers)t.layer.off("add remove",this._onLayerChange,this);this._map.off("resize",this._expandIfNotCollapsed,this)}addBaseLayer(t,e){return this._addLayer(t,e),this._map?this._update():this}addOverlay(t,e){return this._addLayer(t,e,!0),this._map?this._update():this}removeLayer(t){t.off("add remove",this._onLayerChange,this);t=this._getLayer(r(t));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this}expand(){clearTimeout(this._collapseDelayTimeout),this._container.classList.add("leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(this._section.classList.add("leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):this._section.classList.remove("leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this}collapse(t){if(!t||"pointerleave"!==t.type&&"pointerout"!==t.type||"touch"!==t.pointerType){if(0<this.options.collapseDelay)return this._collapseDelayTimeout=setTimeout(()=>{this._container.classList.remove("leaflet-control-layers-expanded")},this.options.collapseDelay),this;this._container.classList.remove("leaflet-control-layers-expanded")}return this}_initLayout(){var t="leaflet-control-layers",e=this._container=a("div",t),i=this.options.collapsed,s=(At(e),St(e),this._section=a("fieldset",t+"-list")),o=(i&&(this._map.on("click",this.collapse,this),v(e,{pointerenter:this._expandSafely,pointerleave:this.collapse},this)),this._layersLink=a("a",t+"-toggle",e));o.href="#",o.title="Layers",o.setAttribute("role","button"),v(o,{keydown(t){"Enter"===t.code&&this._expandSafely()},click(t){L(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=a("div",t+"-base",s),this._separator=a("div",t+"-separator",s),this._overlaysList=a("div",t+"-overlays",s),e.appendChild(s)}_getLayer(t){for(var e of this._layers)if(e&&r(e.layer)===t)return e}_addLayer(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort((t,e)=>this.options.sortFunction(t.layer,e.layer,t.name,e.name)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()}_update(){if(this._container){this._baseLayersList.replaceChildren(),this._overlaysList.replaceChildren(),this._layerControlInputs=[];let t,e,i=0;for(var s of this._layers)this._addItem(s),e||=s.overlay,t||=!s.overlay,i+=s.overlay?0:1;this.options.hideSingleBase&&(t=t&&1<i,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none"}return this}_onLayerChange(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target)),t=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;t&&this._map.fire(t,e)}_addItem(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),s=document.createElement("input"),i=(s.type=t.overlay?"checkbox":"radio",s.className="leaflet-control-layers-selector",s.defaultChecked=i,t.overlay||(s.name="leaflet-base-layers_"+r(this)),this._layerControlInputs.push(s),s.layerId=r(t.layer),v(s,"click",this._onInputClick,this),document.createElement("span")),o=(i.innerHTML=" "+t.name,document.createElement("span"));return e.appendChild(o),o.appendChild(s),o.appendChild(i),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e}_onInputClick(t){if(!this._preventClick){var e,i,s,o=this._layerControlInputs,n=[],a=[];this._handlingClick=!0;for(e of o){var r=this._getLayer(e.layerId).layer;(e.checked?n:(e.checked,a)).push(r)}for(i of a)this._map.hasLayer(i)&&this._map.removeLayer(i);for(s of n)this._map.hasLayer(s)||this._map.addLayer(s);this._handlingClick=!1,this._refocusOnMap(t)}}_checkDisabledLayers(){var t,e=this._layerControlInputs,i=this._map.getZoom();for(t of e){var s=this._getLayer(t.layerId).layer;t.disabled=void 0!==s.options.minZoom&&i<s.options.minZoom||void 0!==s.options.maxZoom&&i>s.options.maxZoom}}_expandIfNotCollapsed(){return this._map&&!this.options.collapsed&&this.expand(),this}_expandSafely(){let t=this._section;this._preventClick=!0,v(t,"click",L),this.expand(),setTimeout(()=>{x(t,"click",L),this._preventClick=!1})}}class Wt extends P{static{this.setDefaultOptions({position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"})}onAdd(t){var e="leaflet-control-zoom",i=a("div",e+" leaflet-bar"),s=this.options;return this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i}onRemove(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)}disable(){return this._disabled=!0,this._updateDisabled(),this}enable(){return this._disabled=!1,this._updateDisabled(),this}_zoomIn(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))}_zoomOut(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}_createButton(t,e,i,s,o){i=a("a",i,s);return i.innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),At(i),v(i,"click",Et),v(i,"click",o,this),v(i,"click",this._refocusOnMap,this),i}_updateDisabled(){var t=this._map,e="leaflet-disabled";this._zoomInButton.classList.remove(e),this._zoomOutButton.classList.remove(e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(this._zoomOutButton.classList.add(e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(this._zoomInButton.classList.add(e),this._zoomInButton.setAttribute("aria-disabled","true"))}}o.mergeOptions({zoomControl:!0}),o.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Wt,this.addControl(this.zoomControl))});class Ht extends P{static{this.setDefaultOptions({position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1})}onAdd(t){var e="leaflet-control-scale",i=a("div",e),s=this.options;return this._addScales(s,e+"-line",i),t.on(s.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i}onRemove(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)}_addScales(t,e,i){t.metric&&(this._mScale=a("div",e,i)),t.imperial&&(this._iScale=a("div",e,i))}_update(){var t=this._map,e=t.getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)}_updateScales(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)}_updateMetric(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)}_updateImperial(t){var e,i,t=3.2808399*t;5280<t?(i=this._getRoundNum(e=t/5280),this._updateScale(this._iScale,i+" mi",i/e)):(i=this._getRoundNum(t),this._updateScale(this._iScale,i+" ft",i/t))}_updateScale(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e}_getRoundNum(t){var e=10**((""+Math.floor(t)).length-1),t=t/e;return e*(10<=t?10:5<=t?5:3<=t?3:2<=t?2:1)}}class qt extends P{static{this.setDefaultOptions({position:"bottomright",prefix:'<a target="_blank" href="https://leafletjs.com" title="A JavaScript library for interactive maps"><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>Leaflet</a>'})}initialize(t){l(this,t),this._attributions={}}onAdd(t){(t.attributionControl=this)._container=a("div","leaflet-control-attribution"),At(this._container);for(var e of Object.values(t._layers))e.getAttribution&&this.addAttribution(e.getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container}onRemove(t){t.off("layeradd",this._addAttribution,this)}_addAttribution(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",()=>this.removeAttribution(t.layer.getAttribution())))}setPrefix(t){return this.options.prefix=t,this._update(),this}addAttribution(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this}removeAttribution(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this}_update(){var t,e;this._map&&(t=Object.keys(this._attributions).filter(t=>this._attributions[t]),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> '))}}o.mergeOptions({attributionControl:!0}),o.addInitHook(function(){this.options.attributionControl&&(new qt).addTo(this)}),P.Layers=Ft,P.Zoom=Wt,P.Scale=Ht,P.Attribution=qt;class T extends H{initialize(t){this._map=t}enable(){return this._enabled||(this._enabled=!0,this.addHooks()),this}disable(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this}enabled(){return!!this._enabled}}T.addTo=function(t,e){return t.addHandler(e,this),this};class z extends q{static{this.setDefaultOptions({clickTolerance:3})}initialize(t,e,i,s){l(this,s),this._element=t,this._dragStartTarget=e??t,this._preventOutline=i}enable(){this._enabled||(v(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!0)}disable(){this._enabled&&(z._dragging===this&&this.finishDrag(!0),x(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!1,this._moved=!1)}_onDown(t){var e;this._moved=!1,this._element.classList.contains("leaflet-zoom-anim")||(1!==zt().length?z._dragging===this&&this.finishDrag():z._dragging||t.shiftKey||0!==t.button&&"touch"!==t.pointerType||((z._dragging=this)._preventOutline&&mt(this._element),_t(),lt(),this._moving)||(this.fire("down"),e=ft(this._element),this._startPoint=new g(t.clientX,t.clientY),this._startPos=m(this._element),this._parentScale=vt(e),v(document,"pointermove",this._onMove,this),v(document,"pointerup pointercancel",this._onUp,this)))}_onMove(t){var e;1<zt().length?this._moved=!0:!(e=new g(t.clientX,t.clientY)._subtract(this._startPoint)).x&&!e.y||Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,t.cancelable&&L(t),this._moved||(this.fire("dragstart"),this._moved=!0,document.body.classList.add("leaflet-dragging"),this._lastTarget=t.target??t.srcElement,this._lastTarget.classList.add("leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition())}_updatePosition(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),c(this._element,this._newPos),this.fire("drag",t)}_onUp(){this.finishDrag()}finishDrag(t){document.body.classList.remove("leaflet-dragging"),this._lastTarget&&(this._lastTarget.classList.remove("leaflet-drag-target"),this._lastTarget=null),x(document,"pointermove",this._onMove,this),x(document,"pointerup pointercancel",this._onUp,this),pt(),dt();var e=this._moved&&this._moving;this._moving=!1,z._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}}function Ut(t,e,i){let s,o,n,a,r,h,l,d,_;var p=[1,4,2,8];for(o=0,l=t.length;o<l;o++)t[o]._code=Qt(t[o],e);for(a=0;a<4;a++){for(d=p[a],s=[],o=0,l=t.length,n=l-1;o<l;n=o++)r=t[o],h=t[n],r._code&d?h._code&d||((_=Jt(h,r,d,e,i))._code=Qt(_,e),s.push(_)):(h._code&d&&((_=Jt(h,r,d,e,i))._code=Qt(_,e),s.push(_)),s.push(r));t=s}return t}function Vt(t,e){let i,s,o,n,a,r,h,l,d;if(!t||0===t.length)throw new Error("latlngs not passed");M(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);let _=new w([0,0]);var p=new f(t),c=(p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(_=Gt(t)),t.length),u=[];for(i=0;i<c;i++){var m=new w(t[i]);u.push(e.project(new w([m.lat-_.lat,m.lng-_.lng])))}for(r=h=l=0,i=0,s=c-1;i<c;s=i++)o=u[i],n=u[s],a=o.y*n.x-n.y*o.x,h+=(o.x+n.x)*a,l+=(o.y+n.y)*a,r+=3*a;d=0===r?u[0]:[h/r,l/r];p=e.unproject(new g(d));return new w([p.lat+_.lat,p.lng+_.lng])}function Gt(t){let e=0,i=0,s=0;for(var o of t){o=new w(o);e+=o.lat,i+=o.lng,s++}return new w([e/s,i/s])}X={__proto__:null,centroid:Gt,clipPolygon:Ut,polygonCenter:Vt};function Kt(i,s){if(s&&i.length){s=s*s;{var o=i=((e,i)=>{let s=[e[0]],o=0;for(let t=1;t<e.length;t++)((t,e)=>{var i=e.x-t.x;return i*i+(e=e.y-t.y)*e})(e[t],e[o])>i&&(s.push(e[t]),o=t);return o<e.length-1&&s.push(e[e.length-1]),s})(i,s),n=o.length,a=new Uint8Array(n);a[0]=a[n-1]=1,function t(e,i,s,o,n){let a=0,r,h,l;for(h=o+1;h<=n-1;h++)(l=te(e[h],e[o],e[n],!0))>a&&(r=h,a=l);a>s&&(i[r]=1,t(e,i,s,o,r),t(e,i,s,r,n))}(o,a,s,0,n-1);let t,e=[];for(t=0;t<n;t++)a[t]&&e.push(o[t]);return e}}return i.slice()}function Yt(t,e,i){return Math.sqrt(te(t,e,i,!0))}let $t;function Xt(t,e,i,s,o){let n=s?$t:Qt(t,i),a=Qt(e,i),r,h,l;for($t=a;;){if(!(n|a))return[t,e];if(n&a)return!1;l=Qt(h=Jt(t,e,r=n||a,i,o),i),r===n?(t=h,n=l):(e=h,a=l)}}function Jt(t,e,i,s,o){var n=e.x-t.x,e=e.y-t.y,a=s.min,s=s.max;let r,h;return 8&i?(r=t.x+n*(s.y-t.y)/e,h=s.y):4&i?(r=t.x+n*(a.y-t.y)/e,h=a.y):2&i?(r=s.x,h=t.y+e*(s.x-t.x)/n):1&i&&(r=a.x,h=t.y+e*(a.x-t.x)/n),new g(r,h,o)}function Qt(t,e){let i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function te(t,e,i,s){let o=e.x,n=e.y,a=i.x-o,r=i.y-n,h;e=a*a+r*r;return 0<e&&(1<(h=((t.x-o)*a+(t.y-n)*r)/e)?(o=i.x,n=i.y):0<h&&(o+=a*h,n+=r*h)),a=t.x-o,r=t.y-n,s?a*a+r*r:new g(o,n)}function M(t){return!Array.isArray(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ee(t,e){let i,s,o,n,a,r,h,l;if(!t||0===t.length)throw new Error("latlngs not passed");M(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);let d=new w([0,0]);var _=new f(t),p=(_.getNorthWest().distanceTo(_.getSouthWest())*_.getNorthEast().distanceTo(_.getNorthWest())<1700&&(d=Gt(t)),t.length),c=[];for(i=0;i<p;i++){var u=new w(t[i]);c.push(e.project(new w([u.lat-d.lat,u.lng-d.lng])))}for(i=0,s=0;i<p-1;i++)s+=c[i].distanceTo(c[i+1])/2;if(0===s)l=c[0];else for(i=0,n=0;i<p-1;i++)if(a=c[i],r=c[i+1],o=a.distanceTo(r),(n+=o)>s){h=(n-s)/o,l=[r.x-h*(r.x-a.x),r.y-h*(r.y-a.y)];break}_=e.unproject(new g(l));return new w([_.lat+d.lat,_.lng+d.lng])}J={__proto__:null,_getBitCode:Qt,_getEdgeIntersection:Jt,_sqClosestPointOnSegment:te,clipSegment:Xt,closestPointOnSegment:function(t,e,i){return te(t,e,i)},isFlat:M,pointToSegmentDistance:Yt,polylineCenter:ee,simplify:Kt},s={project(t){return t=new w(t),new g(t.lng,t.lat)},unproject(t){return t=new g(t),new w(t.y,t.x)},bounds:new u([-180,-90],[180,90])};let ie={R:6378137,R_MINOR:6356752.314245179,bounds:new u([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project(t){t=new w(t);var e=Math.PI/180,i=this.R,s=this.R_MINOR/i,s=Math.sqrt(1-s*s),o=t.lat*e,n=s*Math.sin(o),n=Math.tan(Math.PI/4-o/2)/((1-n)/(1+n))**(s/2),o=-i*Math.log(Math.max(n,1e-10));return new g(t.lng*e*i,o)},unproject(t){t=new g(t);var e=180/Math.PI,i=this.R,s=this.R_MINOR/i,o=Math.sqrt(1-s*s),n=Math.exp(-t.y/i);let a=Math.PI/2-2*Math.atan(n);for(let t=0,e=.1,i;t<15&&1e-7<Math.abs(e);t++)i=o*Math.sin(a),e=Math.PI/2-2*Math.atan(n*((1-i)/(1+i))**(o/2))-a,a+=e;return new w(a*e,t.x*e/i)}},se={__proto__:null,LonLat:s,Mercator:ie,SphericalMercator:V};class oe extends d{static code="EPSG:3395";static projection=ie;static transformation=(E=.5/(Math.PI*ie.R),new G(E,.5,-E,.5))}class ne extends d{static code="EPSG:4326";static projection=s;static transformation=new G(1/180,1,-1/180,.5)}class ae extends e{static projection=s;static transformation=new G(1,0,-1,0);static scale(t){return 2**t}static zoom(t){return Math.log(t)/Math.LN2}static distance(t,e){var i=e.lng-t.lng,e=e.lat-t.lat;return Math.sqrt(i*i+e*e)}static infinite=!0}e.Earth=d,e.EPSG3395=oe,e.EPSG3857=K,e.EPSG900913=Y,e.EPSG4326=ne,e.Simple=ae;class Z extends q{static{this.setDefaultOptions({pane:"overlayPane",attribution:null,bubblingPointerEvents:!0})}addTo(t){return t.addLayer(this),this}remove(){return this.removeFrom(this._map||this._mapToAdd)}removeFrom(t){return t?.removeLayer(this),this}getPane(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)}addInteractiveTarget(t){return this._map._targets[r(t)]=this}removeInteractiveTarget(t){return delete this._map._targets[r(t)],this}getAttribution(){return this.options.attribution}_layerAdd(t){let e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){let t=this.getEvents();e.on(t,this),this.once("remove",()=>e.off(t,this))}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}}o.include({addLayer(t){var e;if(t._layerAdd)return e=r(t),this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this;throw new Error("The provided object is not a Layer.")},removeLayer(t){var e=r(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer(t){return r(t)in this._layers},eachLayer(t,e){for(var i of Object.values(this._layers))t.call(e,i);return this},_addLayers(t){for(var e of t=t?Array.isArray(t)?t:[t]:[])this.addLayer(e)},_addZoomLimit(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit(t){t=r(t);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels(){let t=1/0,e=-1/0;var i,s=this._getZoomSpan();for(i of Object.values(this._zoomBoundLayers)){var o=i.options;t=Math.min(t,o.minZoom??1/0),e=Math.max(e,o.maxZoom??-1/0)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,s!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});class re extends Z{initialize(t,e){l(this,e),this._layers={};for(var i of t??[])this.addLayer(i)}addLayer(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map?.addLayer(t),this}removeLayer(t){t=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this}hasLayer(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers}clearLayers(){return this.eachLayer(this.removeLayer,this)}invoke(t,...e){for(var i of Object.values(this._layers))i[t]?.apply(i,e);return this}onAdd(t){this.eachLayer(t.addLayer,t)}onRemove(t){this.eachLayer(t.removeLayer,t)}eachLayer(t,e){for(var i of Object.values(this._layers))t.call(e,i);return this}getLayer(t){return this._layers[t]}getLayers(){var t=[];return this.eachLayer(t.push,t),t}setZIndex(t){return this.invoke("setZIndex",t)}getLayerId(t){return r(t)}}class O extends re{addLayer(t){return this.hasLayer(t)?this:(t.addEventParent(this),re.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))}removeLayer(t){return this.hasLayer(t)?((t=t in this._layers?this._layers[t]:t).removeEventParent(this),re.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this}setStyle(t){return this.invoke("setStyle",t)}bringToFront(){return this.invoke("bringToFront")}bringToBack(){return this.invoke("bringToBack")}getBounds(){var t,e=new f;for(t of Object.values(this._layers))e.extend(t.getBounds?t.getBounds():t.getLatLng());return e}}class he extends H{static{this.setDefaultOptions({popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1})}initialize(t){l(this,t)}createIcon(t){return this._createIcon("icon",t)}createShadow(t){return this._createIcon("shadow",t)}_createIcon(t,e){var i=this._getIconUrl(t);if(i)return i=this._createImg(i,e&&"IMG"===e.tagName?e:null),this._setIconStyles(i,t),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i;if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}_setIconStyles(t,e){var i=this.options;let s=i[e+"Size"];"number"==typeof s&&(s=[s,s]);var o=g.validate(s)&&new g(s),n="shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0),n=g.validate(n)&&new g(n);t.className=`leaflet-marker-${e} `+(i.className||""),n&&(t.style.marginLeft=-n.x+"px",t.style.marginTop=-n.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")}_createImg(t,e){return(e??=document.createElement("img")).src=t,e}_getIconUrl(t){return _.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}class le extends he{static{this.setDefaultOptions({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(t){le.imagePath||(le.imagePath=this._detectIconPath());t=he.prototype._getIconUrl.call(this,t);return t?(this.options.imagePath||le.imagePath)+t:null}_stripUrl(t){function e(t,e,i){return(e=e.exec(t))&&e[i]}return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)}_detectIconPath(){var t=a("div","leaflet-default-icon-path",document.body),e=this._stripUrl(getComputedStyle(t).backgroundImage);return document.body.removeChild(t),e||((t=document.querySelector('link[href$="leaflet.css"]'))?t.href.substring(0,t.href.length-"leaflet.css".length-1):"")}}class de extends T{initialize(t){this._marker=t}addHooks(){var t=this._marker._icon;this._draggable||(this._draggable=new z(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),t.classList.add("leaflet-marker-draggable")}removeHooks(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon?.classList.remove("leaflet-marker-draggable")}moved(){return this._draggable?._moved}_adjustPan(t){var e=this._marker,i=e._map,s=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,n=m(e._icon),a=i.getPixelBounds(),r=i.getPixelOrigin(),r=new u(a.min._subtract(r).add(o),a.max._subtract(r).subtract(o));r.contains(n)||(o=new g((Math.max(r.max.x,n.x)-r.max.x)/(a.max.x-r.max.x)-(Math.min(r.min.x,n.x)-r.min.x)/(a.min.x-r.min.x),(Math.max(r.max.y,n.y)-r.max.y)/(a.max.y-r.max.y)-(Math.min(r.min.y,n.y)-r.min.y)/(a.min.y-r.min.y)).multiplyBy(s),i.panBy(o,{animate:!1}),this._draggable._newPos._add(o),this._draggable._startPos._add(o),c(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,t)))}_onDragStart(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup?.(),this._marker.fire("movestart").fire("dragstart")}_onPreDrag(t){this._marker.options.autoPan&&(cancelAnimationFrame(this._panRequest),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,t)))}_onDrag(t){var e=this._marker,i=e._shadow,s=m(e._icon),o=e._map.layerPointToLatLng(s);i&&c(i,s),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)}_onDragEnd(t){cancelAnimationFrame(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}class _e extends Z{static{this.setDefaultOptions({icon:new le,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingPointerEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10})}initialize(t,e){l(this,e),this._latlng=new w(t)}onAdd(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()}onRemove(t){this.dragging?.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()}getEvents(){return{zoom:this.update,viewreset:this.update}}getLatLng(){return this._latlng}setLatLng(t){var e=this._latlng;return this._latlng=new w(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})}setZIndexOffset(t){return this.options.zIndexOffset=t,this.update()}getIcon(){return this.options.icon}setIcon(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this}getElement(){return this._icon}update(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this}_initIcon(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon);let s=!1;i!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(i.title=t.title),"IMG"===i.tagName)&&(i.alt=t.alt??""),i.classList.add(e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({pointerover:this._bringToFront,pointerout:this._resetZIndex}),this.options.autoPanOnFocus&&v(i,"focus",this._panOnFocus,this);i=t.icon.createShadow(this._shadow);let o=!1;i!==this._shadow&&(this._removeShadow(),o=!0),i&&(i.classList.add(e),i.alt=""),this._shadow=i,t.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)}_removeIcon(){this.options.riseOnHover&&this.off({pointerover:this._bringToFront,pointerout:this._resetZIndex}),this.options.autoPanOnFocus&&x(this._icon,"focus",this._panOnFocus,this),this._icon.remove(),this.removeInteractiveTarget(this._icon),this._icon=null}_removeShadow(){this._shadow?.remove(),this._shadow=null}_setPos(t){this._icon&&c(this._icon,t),this._shadow&&c(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()}_updateZIndex(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)}_animateZoom(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(t)}_initInteraction(){if(this.options.interactive&&(this._icon.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._icon),de)){let t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new de(this),t&&this.dragging.enable()}}setOpacity(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this}_updateOpacity(){var t=this.options.opacity;this._icon&&(this._icon.style.opacity=t),this._shadow&&(this._shadow.style.opacity=t)}_bringToFront(){this._updateZIndex(this.options.riseOffset)}_resetZIndex(){this._updateZIndex(0)}_panOnFocus(){var t,e,i=this._map;i&&(t=(e=this.options.icon.options).iconSize?new g(e.iconSize):new g(0,0),e=e.iconAnchor?new g(e.iconAnchor):new g(0,0),i.panInside(this._latlng,{paddingTopLeft:e,paddingBottomRight:t.subtract(e)}))}_getPopupAnchor(){return this.options.icon.options.popupAnchor}_getTooltipAnchor(){return this.options.icon.options.tooltipAnchor}}class C extends Z{static{this.setDefaultOptions({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,bubblingPointerEvents:!0})}beforeAdd(t){this._renderer=t.getRenderer(this)}onAdd(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)}onRemove(){this._renderer._removePath(this)}redraw(){return this._map&&this._renderer._updatePath(this),this}setStyle(t){return l(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke)&&t&&Object.hasOwn(t,"weight")&&this._updateBounds(),this}bringToFront(){return this._renderer?._bringToFront(this),this}bringToBack(){return this._renderer?._bringToBack(this),this}getElement(){return this._path}_reset(){this._project(),this._update()}_clickTolerance(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}class pe extends C{static{this.setDefaultOptions({fill:!0,radius:10})}initialize(t,e){l(this,e),this._latlng=new w(t),this._radius=this.options.radius}setLatLng(t){var e=this._latlng;return this._latlng=new w(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})}getLatLng(){return this._latlng}setRadius(t){return this.options.radius=this._radius=t,this.redraw()}getRadius(){return this._radius}setStyle(t){var e=t?.radius??this._radius;return C.prototype.setStyle.call(this,t),this.setRadius(e),this}_project(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()}_updateBounds(){var t=this._radius,e=this._radiusY??t,i=this._clickTolerance(),t=[t+i,e+i];this._pxBounds=new u(this._point.subtract(t),this._point.add(t))}_update(){this._map&&this._updatePath()}_updatePath(){this._renderer._updateCircle(this)}_empty(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)}_containsPoint(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}class ce extends pe{initialize(t,e){if(l(this,e),this._latlng=new w(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius}setRadius(t){return this._mRadius=t,this.redraw()}getRadius(){return this._mRadius}getBounds(){var t=[this._radius,this._radiusY??this._radius];return new f(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))}setStyle=C.prototype.setStyle;_project(){var e=this._latlng.lng,i=this._latlng.lat,s=this._map,t=s.options.crs;if(t.distance===d.distance){var o=Math.PI/180,n=this._mRadius/d.R/o,a=s.project([i+n,e]),r=s.project([i-n,e]),r=a.add(r).divideBy(2),h=s.unproject(r).lat;let t=Math.acos((Math.cos(n*o)-Math.sin(i*o)*Math.sin(h*o))/(Math.cos(i*o)*Math.cos(h*o)))/o;!isNaN(t)&&0!==t||(t=n/Math.cos(Math.PI/180*i)),this._point=r.subtract(s.getPixelOrigin()),this._radius=isNaN(t)?0:r.x-s.project([h,e-t]).x,this._radiusY=r.y-a.y}else{o=t.unproject(t.project(this._latlng).subtract([this._mRadius,0]));this._point=s.latLngToLayerPoint(this._latlng),this._radius=Math.abs(this._point.x-s.latLngToLayerPoint(o).x)}this._updateBounds()}}class S extends C{static{this.setDefaultOptions({smoothFactor:1,noClip:!1})}initialize(t,e){l(this,e),this._setLatLngs(t)}getLatLngs(){return this._latlngs}setLatLngs(t){return this._setLatLngs(t),this.redraw()}isEmpty(){return!this._latlngs.length}closestLayerPoint(i){i=new g(i);let s=1/0,o=null,n,a;var r,h=te;for(r of this._parts)for(let t=1,e=r.length;t<e;t++){var l=h(i,n=r[t-1],a=r[t],!0);l<s&&(s=l,o=h(i,n,a))}return o&&(o.distance=Math.sqrt(s)),o}getCenter(){if(this._map)return ee(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")}getBounds(){return this._bounds}addLatLng(t,e){return e??=this._defaultShape(),t=new w(t),e.push(t),this._bounds.extend(t),this.redraw()}_setLatLngs(t){this._bounds=new f,this._latlngs=this._convertLatLngs(t)}_defaultShape(){return M(this._latlngs)?this._latlngs:this._latlngs[0]}_convertLatLngs(i){var s=[],o=M(i);for(let t=0,e=i.length;t<e;t++)o?(s[t]=new w(i[t]),this._bounds.extend(s[t])):s[t]=this._convertLatLngs(i[t]);return s}_project(){var t=new u;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())}_updateBounds(){var t=this._clickTolerance(),t=new g(t,t);this._rawPxBounds&&(this._pxBounds=new u([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))}_projectLatlngs(t,e,i){var s;t[0]instanceof w?((s=t.map(t=>this._map.latLngToLayerPoint(t))).forEach(t=>i.extend(t)),e.push(s)):t.forEach(t=>this._projectLatlngs(t,e,i))}_clipPoints(){var r=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(r))if(this.options.noClip)this._parts=this._rings;else{var h=this._parts;let t,e,i,s,o,n,a;for(t=0,i=0,s=this._rings.length;t<s;t++)for(a=this._rings[t],e=0,o=a.length;e<o-1;e++)(n=Xt(a[e],a[e+1],r,e,!0))&&(h[i]??=[],h[i].push(n[0]),n[1]===a[e+1]&&e!==o-2||(h[i].push(n[1]),i++))}}_simplifyPoints(){var i=this._parts,s=this.options.smoothFactor;for(let t=0,e=i.length;t<e;t++)i[t]=Kt(i[t],s)}_update(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())}_updatePath(){this._renderer._updatePoly(this)}_containsPoint(t,e){let i,s,o,n,a,r;var h=this._clickTolerance();if(this._pxBounds&&this._pxBounds.contains(t))for(i=0,n=this._parts.length;i<n;i++)for(r=this._parts[i],s=0,a=r.length,o=a-1;s<a;o=s++)if((e||0!==s)&&Yt(t,r[o],r[s])<=h)return!0;return!1}}class ue extends S{static{this.setDefaultOptions({fill:!0})}isEmpty(){return!this._latlngs.length||!this._latlngs[0].length}getCenter(){if(this._map)return Vt(this._defaultShape(),this._map.options.crs);throw new Error("Must add layer to map before using getCenter()")}_convertLatLngs(t){var t=S.prototype._convertLatLngs.call(this,t),e=t.length;return 2<=e&&t[0]instanceof w&&t[0].equals(t[e-1])&&t.pop(),t}_setLatLngs(t){S.prototype._setLatLngs.call(this,t),M(this._latlngs)&&(this._latlngs=[this._latlngs])}_defaultShape(){return(M(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]}_clipPoints(){let t=this._renderer._bounds;var e=this.options.weight,e=new g(e,e);if(t=new u(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i of this._rings){i=Ut(i,t,!0);i.length&&this._parts.push(i)}}_updatePath(){this._renderer._updatePoly(this,!0)}_containsPoint(t){let e=!1,i,s,o,n,a,r,h,l;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,h=this._parts.length;n<h;n++)for(i=this._parts[n],a=0,l=i.length,r=l-1;a<l;r=a++)s=i[a],o=i[r],s.y>t.y!=o.y>t.y&&t.x<(o.x-s.x)*(t.y-s.y)/(o.y-s.y)+s.x&&(e=!e);return e||S.prototype._containsPoint.call(this,t,!0)}}class A extends O{initialize(t,e){l(this,e),this._layers={},t&&this.addData(t)}addData(t){var e=Array.isArray(t)?t:t.features;if(e){for(var i of e)(i.geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var s,e=this.options;return(!e.filter||e.filter(t))&&(s=me(t,e))?(s.feature=be(t),s.defaultOptions=s.options,this.resetStyle(s),e.onEachFeature&&e.onEachFeature(t,s),this.addLayer(s)):this}resetStyle(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=Object.create(t.defaultOptions),this._setLayerStyle(t,this.options.style),this)}setStyle(e){return this.eachLayer(t=>this._setLayerStyle(t,e))}_setLayerStyle(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}}function me(t,e){var i="Feature"===t.type?t.geometry:t,s=i?.coordinates,o=[],n=e?.pointToLayer,a=e?.coordsToLatLng??fe;let r,h;if(!s&&!i)return null;switch(i.type){case"Point":return ge(n,t,r=a(s),e);case"MultiPoint":for(var l of s)r=a(l),o.push(ge(n,t,r,e));return new O(o);case"LineString":case"MultiLineString":return h=ve(s,"LineString"===i.type?0:1,a),new S(h,e);case"Polygon":case"MultiPolygon":return h=ve(s,"Polygon"===i.type?1:2,a),new ue(h,e);case"GeometryCollection":for(var d of i.geometries){d=me({geometry:d,type:"Feature",properties:t.properties},e);d&&o.push(d)}return new O(o);case"FeatureCollection":for(var _ of i.features){_=me(_,e);_&&o.push(_)}return new O(o);default:throw new Error("Invalid GeoJSON object.")}}function ge(t,e,i,s){return t?t(e,i):new _e(i,s?.markersInheritOptions&&s)}function fe(t){return new w(t[1],t[0],t[2])}function ve(t,e,i){return t.map(t=>e?ve(t,e-1,i):(i||fe)(t))}function ye(t,e){return void 0!==(t=new w(t)).alt?[i(t.lng,e),i(t.lat,e),i(t.alt,e)]:[i(t.lng,e),i(t.lat,e)]}function xe(t,e,i,s){t=t.map(t=>e?xe(t,M(t)?0:e-1,i,s):ye(t,s));return!e&&i&&0<t.length&&t.push(t[0].slice()),t}function we(t,e){return t.feature?{...t.feature,geometry:e}:be(e)}function be(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var E={toGeoJSON(t){return we(this,{type:"Point",coordinates:ye(this.getLatLng(),t)})}};_e.include(E),ce.include(E),pe.include(E),S.include({toGeoJSON(t){var e=!M(this._latlngs);return we(this,{type:`${e?"Multi":""}LineString`,coordinates:xe(this._latlngs,e?1:0,!1,t)})}}),ue.include({toGeoJSON(t){var e=!M(this._latlngs),i=e&&!M(this._latlngs[0]);let s=xe(this._latlngs,i?2:e?1:0,!0,t);return we(this,{type:`${i?"Multi":""}Polygon`,coordinates:s=e?s:[s]})}}),re.include({toMultiPoint(e){let i=[];return this.eachLayer(t=>{i.push(t.toGeoJSON(e).geometry.coordinates)}),we(this,{type:"MultiPoint",coordinates:i})},toGeoJSON(e){var t=this.feature?.geometry?.type;if("MultiPoint"===t)return this.toMultiPoint(e);let i="GeometryCollection"===t,s=[];return this.eachLayer(t=>{t.toGeoJSON&&(t=t.toGeoJSON(e),i?s.push(t.geometry):"FeatureCollection"===(t=be(t)).type?s.push.apply(s,t.features):s.push(t))}),i?we(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s}}});class Le extends Z{static{this.setDefaultOptions({padding:.1,continuous:!1})}initialize(t){l(this,t)}onAdd(){this._container||(this._initContainer(),this._container.classList.add("leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._resizeContainer(),this._onMoveEnd()}onRemove(){this._destroyContainer()}getEvents(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._onMoveEnd,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),this.options.continuous&&(t.move=this._onMoveEnd),t}_onAnimZoom(t){this._updateTransform(t.center,t.zoom)}_onZoom(){this._updateTransform(this._map.getCenter(),this._map.getZoom())}_updateTransform(t,e){var i=this._map.getZoomScale(e,this._zoom),s=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=s.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));p(this._container,s,i)}_onMoveEnd(t){var e=this.options.padding,i=this._map.getSize(),s=this._map.containerPointToLayerPoint(i.multiplyBy(-e)).round();this._bounds=new u(s,s.add(i.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._updateTransform(this._center,this._zoom),this._onSettled(t),this._resizeContainer()}_reset(){this._onSettled(),this._updateTransform(this._center,this._zoom),this._onViewReset()}_initContainer(){this._container=a("div")}_destroyContainer(){x(this._container),this._container.remove(),delete this._container}_resizeContainer(){var t=this.options.padding,t=this._map.getSize().multiplyBy(1+2*t).round();return this._container.style.width=t.x+"px",this._container.style.height=t.y+"px",t}_onZoomEnd(){}_onViewReset(){}_onSettled(){}}class Pe extends Z{static{this.setDefaultOptions({opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:"",decoding:"auto"})}initialize(t,e,i){this._url=t,this._bounds=new f(e),l(this,i)}onAdd(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(this._image.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()}onRemove(){this._image.remove(),this.options.interactive&&this.removeInteractiveTarget(this._image)}setOpacity(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this}setStyle(t){return t.opacity&&this.setOpacity(t.opacity),this}bringToFront(){return this._map&&st(this._image),this}bringToBack(){return this._map&&ot(this._image),this}setUrl(t){return this._url=t,this._image&&(this._image.src=t),this}setBounds(t){return this._bounds=new f(t),this._map&&this._reset(),this}getEvents(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}getBounds(){return this._bounds}getElement(){return this._image}_initImage(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:a("img");e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(...h(this.options.className)),e.onselectstart=n,e.onpointermove=n,e.onload=this.fire.bind(this,"load"),e.onerror=this._overlayOnError.bind(this),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e.decoding=this.options.decoding,this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)}_animateZoom(t){var e=this._map.getZoomScale(t.zoom),t=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;p(this._image,t,e)}_reset(){var t=this._image,e=new u(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();c(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"}_updateOpacity(){this._image.style.opacity=this.options.opacity}_updateZIndex(){this._image&&null!=this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)}_overlayOnError(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}getCenter(){return this._bounds.getCenter()}}class Te extends Pe{static{this.setDefaultOptions({autoplay:!0,controls:!1,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0})}_initImage(){var t,e="VIDEO"===this._url.tagName;let i=this._image=e?this._url:a("video");if(i.classList.add("leaflet-image-layer"),this._zoomAnimated&&i.classList.add("leaflet-zoom-animated"),this.options.className&&i.classList.add(...h(this.options.className)),v(i,"pointerdown",t=>{i.controls&&b(t)}),i.onloadeddata=this.fire.bind(this,"load"),e)t=(e=i.getElementsByTagName("source")).map(t=>t.src),this._url=0<e.length?t:[i.src];else{Array.isArray(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.hasOwn(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.controls=!!this.options.controls,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var s of this._url){var o=a("source");o.src=s,i.appendChild(o)}}}}class ze extends Pe{_initImage(){var t=this._image=this._url;t.classList.add("leaflet-image-layer"),this._zoomAnimated&&t.classList.add("leaflet-zoom-animated"),this.options.className&&t.classList.add(...h(this.options.className)),t.onselectstart=n,t.onpointermove=n}}class k extends Z{static{this.setDefaultOptions({interactive:!1,offset:[0,0],className:"",pane:void 0,content:""})}initialize(t,e){t instanceof w||Array.isArray(t)?(this._latlng=new w(t),l(this,e)):(l(this,t),this._source=e),this.options.content&&(this._content=this.options.content)}openOn(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this}close(){return this._map?.removeLayer(this),this}toggle(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this}onAdd(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&(this._container.style.opacity=0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&(this._container.style.opacity=1),this.bringToFront(),this.options.interactive&&(this._container.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._container))}onRemove(t){t._fadeAnimated?(this._container.style.opacity=0,this._removeTimeout=setTimeout(()=>this._container.remove(),200)):this._container.remove(),this.options.interactive&&(this._container.classList.remove("leaflet-interactive"),this.removeInteractiveTarget(this._container))}getLatLng(){return this._latlng}setLatLng(t){return this._latlng=new w(t),this._map&&(this._updatePosition(),this._adjustPan()),this}getContent(){return this._content}setContent(t){return this._content=t,this.update(),this}getElement(){return this._container}update(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())}getEvents(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}isOpen(){return!!this._map&&this._map.hasLayer(this)}bringToFront(){return this._map&&st(this._container),this}bringToBack(){return this._map&&ot(this._container),this}_prepareOpen(t){let e=this._source;if(!e._map)return!1;if(e instanceof O){e=null;for(var i of Object.values(this._source._layers))if(i._map){e=i;break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0}_updateContent(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source??this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}}_updatePosition(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),i=this._getAnchor();let t=new g(this.options.offset);this._zoomAnimated?c(this._container,e.add(i)):t=t.add(e).add(i);e=this._containerBottom=-t.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=e+"px",this._container.style.left=i+"px"}}_getAnchor(){return[0,0]}}o.include({_initOverlay(t,e,i,s){let o=e;return o instanceof t||(o=new t(s).setContent(e)),i&&o.setLatLng(i),o}}),Z.include({_initOverlay(t,e,i,s){let o=i;return o instanceof t?(l(o,s),o._source=this):(o=e&&!s?e:new t(s,this)).setContent(i),o}});class Me extends k{static{this.setDefaultOptions({pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,closeButtonLabel:"Close popup",autoClose:!0,closeOnEscapeKey:!0,className:"",trackResize:!0})}openOn(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,k.prototype.openOn.call(this,t)}onAdd(t){k.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof C||this._source.on("preclick",b))}onRemove(t){k.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof C||this._source.off("preclick",b))}getEvents(){var t=k.prototype.getEvents.call(this);return(this.options.closeOnClick??this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t}_initLayout(){var t="leaflet-popup",e=this._container=a("div",t+` ${this.options.className||""} leaflet-zoom-animated`),i=this._wrapper=a("div",t+"-content-wrapper",e);this._contentNode=a("div",t+"-content",i),At(e),St(this._contentNode),v(e,"contextmenu",b),this._tipContainer=a("div",t+"-tip-container",e),this._tip=a("div",t+"-tip",this._tipContainer),this.options.closeButton&&((i=this._closeButton=a("a",t+"-close-button",e)).setAttribute("role","button"),i.setAttribute("aria-label",this.options.closeButtonLabel),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',v(i,"click",t=>{L(t),this.close()})),this.options.trackResize&&(this._resizeObserver=new ResizeObserver(t=>{this._map&&(this._containerWidth=t[0]?.contentRect?.width,this._containerHeight=t[0]?.contentRect?.height,this._updateLayout(),this._updatePosition(),this._adjustPan())}),this._resizeObserver.observe(this._contentNode))}_updateLayout(){var t=this._contentNode,e=t.style,i=(e.maxWidth=this.options.maxWidth+"px",e.minWidth=this.options.minWidth+"px",this._containerHeight??t.offsetHeight),s=this.options.maxHeight,o="leaflet-popup-scrolled";s&&s<i?(e.height=s+"px",t.classList.add(o)):t.classList.remove(o),this._containerWidth=this._container.offsetWidth,this._containerHeight=this._container.offsetHeight}_animateZoom(t){var t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();c(this._container,t.add(e))}_adjustPan(){if(this.options.autoPan)if(this._map._panAnim?.stop(),this._autopanning)this._autopanning=!1;else{var i=this._map,s=parseInt(getComputedStyle(this._container).marginBottom,10)||0,s=this._containerHeight+s,o=this._containerWidth,n=new g(this._containerLeft,-s-this._containerBottom),n=(n._add(m(this._container)),i.layerPointToContainerPoint(n)),a=new g(this.options.autoPanPadding),r=new g(this.options.autoPanPaddingTopLeft??a),a=new g(this.options.autoPanPaddingBottomRight??a),h=i.getSize();let t=0,e=0;n.x+o+a.x>h.x&&(t=n.x+o-h.x+a.x),n.x-t-r.x<0&&(t=n.x-r.x),n.y+s+a.y>h.y&&(e=n.y+s-h.y+a.y),n.y-e-r.y<0&&(e=n.y-r.y),(t||e)&&(this.options.keepInView&&(this._autopanning=!0),i.fire("autopanstart").panBy([t,e]))}}_getAnchor(){return new g(this._source?._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}o.mergeOptions({closePopupOnClick:!0}),o.include({openPopup(t,e,i){return this._initOverlay(Me,t,e,i).openOn(this),this},closePopup(t){return(t=arguments.length?t:this._popup)?.close(),this}}),Z.include({bindPopup(t,e){return this._popup=this._initOverlay(Me,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup(){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(t){return this._popup&&(this instanceof O||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng))&&this._popup.openOn(this._map),this},closePopup(){return this._popup?.close(),this},togglePopup(){return this._popup?.toggle(this),this},isPopupOpen(){return this._popup?.isOpen()??!1},setPopupContent(t){return this._popup?.setContent(t),this},getPopup(){return this._popup},_openPopup(t){var e;this._popup&&this._map&&(Et(t),e=t.propagatedFrom??t.target,this._popup._source!==e||e instanceof C?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup(t){this._popup.setLatLng(t.latlng)},_onKeyPress(t){"Enter"===t.originalEvent.code&&this._openPopup(t)}});class Ze extends k{static{this.setDefaultOptions({pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9})}onAdd(t){k.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))}onRemove(t){k.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))}getEvents(){var t=k.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t}_initLayout(){var t=`leaflet-tooltip ${this.options.className||""} leaflet-zoom-`+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=a("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+r(this))}_updateLayout(){}_adjustPan(){}_setPosition(t){let e,i,s=this.options.direction;var o=this._map,n=this._container,a=o.latLngToContainerPoint(o.getCenter()),o=o.layerPointToContainerPoint(t),r=n.offsetWidth,h=n.offsetHeight,l=new g(this.options.offset),d=this._getAnchor();i="top"===s?(e=r/2,h):"bottom"===s?(e=r/2,0):(e="center"===s?r/2:"right"===s?0:"left"===s?r:o.x<a.x?(s="right",0):(s="left",r+2*(l.x+d.x)),h/2),t=t.subtract(new g(e,i,!0)).add(l).add(d),n.classList.remove("leaflet-tooltip-right","leaflet-tooltip-left","leaflet-tooltip-top","leaflet-tooltip-bottom"),n.classList.add("leaflet-tooltip-"+s),c(n,t)}_updatePosition(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)}setOpacity(t){this.options.opacity=t,this._container&&(this._container.style.opacity=t)}_animateZoom(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(t)}_getAnchor(){return new g(this._source?._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}o.include({openTooltip(t,e,i){return this._initOverlay(Ze,t,e,i).openOn(this),this},closeTooltip(t){return t.close(),this}}),Z.include({bindTooltip(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ze,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions(t){var e,i;!t&&this._tooltipHandlersAdded||(e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?i.add=this._openTooltip:(i.pointerover=this._openTooltip,i.pointerout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners(t):i.add=()=>this._addFocusListeners(t)),this._tooltip.options.sticky&&(i.pointermove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t)},openTooltip(t){return this._tooltip&&(this instanceof O||(this._tooltip._source=this),this._tooltip._prepareOpen(t))&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this)),this},closeTooltip(){if(this._tooltip)return this._tooltip.close()},toggleTooltip(){return this._tooltip?.toggle(this),this},isTooltipOpen(){return this._tooltip.isOpen()},setTooltipContent(t){return this._tooltip?.setContent(t),this},getTooltip(){return this._tooltip},_addFocusListeners(e){this.getElement?this._addFocusListenersOnLayer(this,e):this.eachLayer&&this.eachLayer(t=>this._addFocusListenersOnLayer(t,e),this)},_addFocusListenersOnLayer(t,e){var i,s="function"==typeof t.getElement&&t.getElement();s&&(i=e?"off":"on",e||(s._leaflet_focus_handler&&x(s,"focus",s._leaflet_focus_handler,this),s._leaflet_focus_handler=()=>{this._tooltip&&(this._tooltip._source=t,this.openTooltip())}),s._leaflet_focus_handler&&Rt[i](s,"focus",s._leaflet_focus_handler,this),Rt[i](s,"blur",this.closeTooltip,this),e)&&delete s._leaflet_focus_handler},_setAriaDescribedByOnLayer(t){("function"==typeof t.getElement&&t.getElement())?.setAttribute?.("aria-describedby",this._tooltip._container.id)},_openTooltip(t){this._tooltip&&this._map&&(this._map.dragging?.moving()?"add"!==t.type||this._moveEndOpensTooltip||(this._moveEndOpensTooltip=!0,this._map.once("moveend",()=>{this._moveEndOpensTooltip=!1,this._openTooltip(t)})):(this._tooltip._source=t.propagatedFrom??t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)))},_moveTooltip(t){let e=t.latlng,i,s;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.pointerEventToContainerPoint(t.originalEvent),s=this._map.containerPointToLayerPoint(i),e=this._map.layerPointToLatLng(s)),this._tooltip.setLatLng(e)}});class Oe extends he{static{this.setDefaultOptions({iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"})}createIcon(t){var t=t&&"DIV"===t.tagName?t:document.createElement("div"),e=this.options;return e.html instanceof Element?(t.replaceChildren(),t.appendChild(e.html)):t.innerHTML=!1!==e.html?e.html:"",e.bgPos&&(e=new g(e.bgPos),t.style.backgroundPosition=-e.x+`px ${-e.y}px`),this._setIconStyles(t,"icon"),t}createShadow(){return null}}he.Default=le;class Ce extends Z{static{this.setDefaultOptions({tileSize:256,opacity:1,updateWhenIdle:_.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2})}initialize(t){l(this,t)}onAdd(){this._initContainer(),this._levels={},this._tiles={},this._resetView()}beforeAdd(t){t._addZoomLimit(this)}onRemove(t){this._removeAllTiles(),this._container.remove(),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0,clearTimeout(this._pruneTimeout)}bringToFront(){return this._map&&(st(this._container),this._setAutoZIndex(Math.max)),this}bringToBack(){return this._map&&(ot(this._container),this._setAutoZIndex(Math.min)),this}getContainer(){return this._container}setOpacity(t){return this.options.opacity=t,this._updateOpacity(),this}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}isLoading(){return this._loading}redraw(){var t;return this._map&&(this._removeAllTiles(),(t=this._clampZoom(this._map.getZoom()))!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()),this}getEvents(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=j(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}createTile(){return document.createElement("div")}getTileSize(){var t=this.options.tileSize;return t instanceof g?t:new g(t,t)}_updateZIndex(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)}_setAutoZIndex(t){var e,i=this.getPane().children;let s=-t(-1/0,1/0);for(e of i){var o=e.style.zIndex;e!==this._container&&o&&(s=t(s,+o))}isFinite(s)&&(this.options.zIndex=s+t(-1,1),this._updateZIndex())}_updateOpacity(){if(this._map){this._container.style.opacity=this.options.opacity;var i,s,o=+new Date;let t=!1,e=!1;for(i of Object.values(this._tiles??{}))i.current&&i.loaded&&(s=Math.min(1,(o-i.loaded)/200),(i.el.style.opacity=s)<1?t=!0:(i.active?e=!0:this._onOpaqueTile(i),i.active=!0));e&&!this._noPrune&&this._pruneTiles(),t&&(cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this)))}}_onOpaqueTile(){}_initContainer(){this._container||(this._container=a("div","leaflet-layer "+(this.options.className??"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))}_updateLevels(){var e=this._tileZoom,i=this.options.maxZoom;if(void 0!==e){for(var s of Object.keys(this._levels))s=Number(s),this._levels[s].el.children.length||s===e?(this._levels[s].el.style.zIndex=i-Math.abs(e-s),this._onUpdateLevel(s)):(this._levels[s].el.remove(),this._removeTilesAtZoom(s),this._onRemoveLevel(s),delete this._levels[s]);let t=this._levels[e];var o=this._map;return t||((t=this._levels[e]={}).el=a("div","leaflet-tile-container leaflet-zoom-animated",this._container),t.el.style.zIndex=i,t.origin=o.project(o.unproject(o.getPixelOrigin()),e).round(),t.zoom=e,this._setZoomTransform(t,o.getCenter(),o.getZoom()),n(t.el.offsetWidth),this._onCreateLevel(t)),this._level=t}}_onUpdateLevel(){}_onRemoveLevel(){}_onCreateLevel(){}_pruneTiles(){if(this._map){var t=this._map.getZoom();if(t>this.options.maxZoom||t<this.options.minZoom)this._removeAllTiles();else{for(var e of Object.values(this._tiles))e.retain=e.current;for(var i of Object.values(this._tiles))i.current&&!i.active&&(i=i.coords,this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2));for(var[s,o]of Object.entries(this._tiles))o.retain||this._removeTile(s)}}}_removeTilesAtZoom(t){for(var[e,i]of Object.entries(this._tiles))i.coords.z===t&&this._removeTile(e)}_removeAllTiles(){for(var t of Object.keys(this._tiles))this._removeTile(t)}_invalidateAll(){for(var t of Object.keys(this._levels))this._levels[t].el.remove(),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0}_retainParent(t,e,i,s){var t=Math.floor(t/2),e=Math.floor(e/2),i=i-1,o=new g(+t,+e),o=(o.z=i,this._tileCoordsToKey(o)),o=this._tiles[o];return o?.active?o.retain=!0:(o?.loaded&&(o.retain=!0),s<i&&this._retainParent(t,e,i,s))}_retainChildren(t,i,s,o){for(let e=2*t;e<2*t+2;e++)for(let t=2*i;t<2*i+2;t++){var n=new g(e,t),n=(n.z=s+1,this._tileCoordsToKey(n)),n=this._tiles[n];n?.active?n.retain=!0:(n?.loaded&&(n.retain=!0),s+1<o&&this._retainChildren(e,t,s+1,o))}}_resetView(t){t=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)}_animateZoom(t){this._setView(t.center,t.zoom,!0,t.noUpdate)}_clampZoom(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t}_setView(t,e,i,s){let o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var n=this.options.updateWhenZooming&&o!==this._tileZoom;s&&!n||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)}_setZoomTransforms(t,e){for(var i of Object.values(this._levels))this._setZoomTransform(i,t,e)}_setZoomTransform(t,e,i){var s=this._map.getZoomScale(i,t.zoom),e=t.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(e,i)).round();p(t.el,e,s)}_resetGrid(){var t=this._map,e=t.options.crs,i=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/i.x),Math.ceil(t.project([0,e.wrapLng[1]],s).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],s).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],s).y/i.y)]}_onMoveEnd(){this._map&&!this._map._animatingZoom&&this._update()}_getTiledPixelBounds(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(i,this._tileZoom),t=e.project(t,this._tileZoom).floor(),e=e.getSize().divideBy(2*i);return new u(t.subtract(e),t.add(e))}_update(a){var t=this._map;if(t){var r=this._clampZoom(t.getZoom());if(void 0===a&&(a=t.getCenter()),void 0!==this._tileZoom){let t=this._getTiledPixelBounds(a),i=this._pxBoundsToTileRange(t),s=i.getCenter(),o=[],e=this.options.keepBuffer,n=new u(i.getBottomLeft().subtract([e,-e]),i.getTopRight().add([e,-e]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h of Object.values(this._tiles)){var l=h.coords;l.z===this._tileZoom&&n.contains(new g(l.x,l.y))||(h.current=!1)}if(1<Math.abs(r-this._tileZoom))this._setView(a,r);else{for(let e=i.min.y;e<=i.max.y;e++)for(let t=i.min.x;t<=i.max.x;t++){var d,_=new g(t,e);_.z=this._tileZoom,this._isValidTile(_)&&((d=this._tiles[this._tileCoordsToKey(_)])?d.current=!0:o.push(_))}if(o.sort((t,e)=>t.distanceTo(s)-e.distanceTo(s)),0!==o.length){this._loading||(this._loading=!0,this.fire("loading"));var p,c=document.createDocumentFragment();for(p of o)this._addTile(p,c);this._level.el.appendChild(c)}}}}}_isValidTile(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),new f(this.options.bounds).overlaps(e))}_keyToBounds(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))}_tileCoordsToNwSe(t){var e=this._map,i=this.getTileSize(),s=t.scaleBy(i),i=s.add(i);return[e.unproject(s,t.z),e.unproject(i,t.z)]}_tileCoordsToBounds(t){t=this._tileCoordsToNwSe(t);let e=new f(t[0],t[1]);return e=this.options.noWrap?e:this._map.wrapLatLngBounds(e)}_tileCoordsToKey(t){return t.x+`:${t.y}:`+t.z}_keyToTileCoords(t){var t=t.split(":"),e=new g(+t[0],+t[1]);return e.z=+t[2],e}_removeTile(t){var e=this._tiles[t];e&&(e.el.remove(),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))}_initTile(t){t.classList.add("leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=n,t.onpointermove=n}_addTile(t,e){var i=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),this._tileReady.bind(this,t));this._initTile(o),this.createTile.length<2&&requestAnimationFrame(this._tileReady.bind(this,t,null,o)),c(o,i),this._tiles[s]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})}_tileReady(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var s=this._tileCoordsToKey(t);(i=this._tiles[s])&&(i.loaded=+new Date,this._map._fadeAnimated?(i.el.style.opacity=0,cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this))):(i.active=!0,this._pruneTiles()),e||(i.el.classList.add("leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad())&&(this._loading=!1,this.fire("load"),this._map._fadeAnimated?this._pruneTimeout=setTimeout(this._pruneTiles.bind(this),250):requestAnimationFrame(this._pruneTiles.bind(this)))}_getTilePos(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)}_wrapCoords(t){var e=new g(this._wrapX?D(t.x,this._wrapX):t.x,this._wrapY?D(t.y,this._wrapY):t.y);return e.z=t.z,e}_pxBoundsToTileRange(t){var e=this.getTileSize();return new u(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))}_noTilesToLoad(){return Object.values(this._tiles).every(t=>t.loaded)}}class Se extends Ce{static{this.setDefaultOptions({minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1})}initialize(t,i){if(this._url=t,null===(i=l(this,i)).attribution&&URL.canParse(t)){let e=new URL(t).hostname;["tile.openstreetmap.org","tile.osm.org"].some(t=>e.endsWith(t))&&(i.attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors')}i.detectRetina&&_.retina&&0<i.maxZoom?(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom=Math.min(i.maxZoom,i.minZoom+1)):(i.zoomOffset++,i.maxZoom=Math.max(i.minZoom,i.maxZoom-1)),i.minZoom=Math.max(0,i.minZoom)):i.zoomReverse?i.minZoom=Math.min(i.maxZoom,i.minZoom):i.maxZoom=Math.max(i.minZoom,i.maxZoom),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)}setUrl(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this}createTile(t,e){var i=document.createElement("img");return v(i,"load",this._tileOnLoad.bind(this,e,i)),v(i,"error",this._tileOnError.bind(this,e,i)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i}getTileUrl(t){var e=Object.create(this.options);return Object.assign(e,{r:_.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()}),this._map&&!this._map.options.crs.infinite&&(t=this._globalTileRange.max.y-t.y,this.options.tms&&(e.y=t),e["-y"]=t),N(this._url,e)}_tileOnLoad(t,e){t(null,e)}_tileOnError(t,e,i){var s=this.options.errorTileUrl;s&&e.getAttribute("src")!==s&&(e.src=s),t(i,e)}_onTileRemove(t){t.tile.onload=null}_getZoomForUrl(){let t=this._tileZoom;var e=this.options.maxZoom,i=this.options.zoomReverse,s=this.options.zoomOffset;return(t=i?e-t:t)+s}_getSubdomain(t){t=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[t]}_abortLoading(){let t,e;for(t of Object.keys(this._tiles)){var i;this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=n,e.onerror=n,e.complete||(e.src=F,i=this._tiles[t].coords,e.remove(),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})))}}_removeTile(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",F),Ce.prototype._removeTile.call(this,t)}_tileReady(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==F))return Ce.prototype._tileReady.call(this,t,e,i)}_clampZoom(t){return Math.round(Ce.prototype._clampZoom.call(this,t))}}class Ae extends Se{static{this.prototype.defaultWmsParams={service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},this.setDefaultOptions({crs:null,uppercase:!1})}initialize(t,e){this._url=t;var i,s={...this.defaultWmsParams};for(i of Object.keys(e))i in this.options||(s[i]=e[i]);var t=(e=l(this,e)).detectRetina&&_.retina?2:1,o=this.getTileSize();s.width=o.x*t,s.height=o.y*t,this.wmsParams=s}onAdd(t){this._crs=this.options.crs??t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,Se.prototype.onAdd.call(this,t)}getTileUrl(t){var e,i,s=this._tileCoordsToNwSe(t),o=this._crs,o=new u(o.project(s[0]),o.project(s[1])),s=o.min,o=o.max,s=(1.3<=this._wmsVersion&&this._crs===ne?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),n=new URL(Se.prototype.getTileUrl.call(this,t));for([e,i]of Object.entries({...this.wmsParams,bbox:s}))n.searchParams.append(this.options.uppercase?e.toUpperCase():e,i);return n.toString()}setParams(t,e){return Object.assign(this.wmsParams,t),e||this.redraw(),this}}Se.WMS=Ae;class B extends Le{initialize(t){l(this,{...t,continuous:!1}),r(this),this._layers??={}}onAdd(t){super.onAdd(t),this.on("update",this._updatePaths,this)}onRemove(){super.onRemove(),this.off("update",this._updatePaths,this)}_onZoomEnd(){for(var t of Object.values(this._layers))t._project()}_updatePaths(){for(var t of Object.values(this._layers))t._update()}_onViewReset(){for(var t of Object.values(this._layers))t._reset()}_onSettled(){this._update()}_update(){}}class Ee extends B{static{this.setDefaultOptions({tolerance:0})}getEvents(){var t=B.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t}_onViewPreReset(){this._postponeUpdatePaths=!0}onAdd(t){B.prototype.onAdd.call(this,t),this._draw()}onRemove(){B.prototype.onRemove.call(this),clearTimeout(this._pointerHoverThrottleTimeout)}_initContainer(){var t=this._container=document.createElement("canvas");v(t,"pointermove",this._onPointerMove,this),v(t,"click dblclick pointerdown pointerup contextmenu",this._onClick,this),v(t,"pointerout",this._handlePointerOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")}_destroyContainer(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,delete this._ctx,B.prototype._destroyContainer.call(this)}_resizeContainer(){var t=B.prototype._resizeContainer.call(this),e=this._ctxScale=window.devicePixelRatio;this._container.width=e*t.x,this._container.height=e*t.y}_updatePaths(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(var t of Object.values(this._layers))t._update();this._redraw()}}_update(){var t,e;this._map._animatingZoom&&this._bounds||(t=this._bounds,e=this._ctxScale,this._ctx.setTransform(e,0,0,e,-t.min.x*e,-t.min.y*e),this.fire("update"))}_reset(){B.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())}_initPath(t){this._updateDashArray(t);t=(this._layers[r(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst??=this._drawLast}_addPath(t){this._requestRedraw(t)}_removePath(t){var e=t._order,i=e.next,e=e.prev;i?i.prev=e:this._drawLast=e,e?e.next=i:this._drawFirst=i,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)}_updatePath(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)}_updateStyle(t){this._updateDashArray(t),this._requestRedraw(t)}_updateDashArray(t){var e;"string"==typeof t.options.dashArray?(e=t.options.dashArray.split(/[, ]+/),t.options._dashArray=e.map(t=>Number(t)).filter(t=>!isNaN(t))):t.options._dashArray=t.options.dashArray}_requestRedraw(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest??=requestAnimationFrame(this._redraw.bind(this)))}_extendRedrawBounds(t){var e;t._pxBounds&&(e=(t.options.weight??0)+1,this._redrawBounds??=new u,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e])))}_redraw(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null}_clear(){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(){var e,t,i=this._redrawBounds;this._ctx.save(),i&&(t=i.getSize(),this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,t.x,t.y),this._ctx.clip()),this._drawing=!0;for(let t=this._drawFirst;t;t=t.next)e=t.layer,(!i||e._pxBounds&&e._pxBounds.intersects(i))&&e._updatePath();this._drawing=!1,this._ctx.restore()}_updatePoly(e,s){if(this._drawing){let t=e._parts,i=this._ctx;t.length&&(i.beginPath(),t.forEach(t=>{t.forEach((t,e)=>{i[e?"lineTo":"moveTo"](t.x,t.y)}),s&&i.closePath()}),this._fillStroke(i,e))}}_updateCircle(t){var e,i,s,o;this._drawing&&!t._empty()&&(e=t._point,i=this._ctx,s=Math.max(Math.round(t._radius),1),1!=(o=(Math.max(Math.round(t._radiusY),1)||s)/s)&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,s,0,2*Math.PI,!1),1!=o&&i.restore(),this._fillStroke(i,t))}_fillStroke(t,e){e=e.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor??e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&(t.lineDashOffset=Number(e.dashOffset??0),t.setLineDash(e._dashArray??[])),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())}_onClick(e){var i=this._map.pointerEventToLayerPoint(e);let s,o;for(let t=this._drawFirst;t;t=t.next)(s=t.layer).options.interactive&&s._containsPoint(i)&&(("click"===e.type||"preclick"===e.type)&&this._map._draggableMoved(s)||(o=s));this._fireEvent(!!o&&[o],e)}_onPointerMove(t){var e;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(e=this._map.pointerEventToLayerPoint(t),this._handlePointerHover(t,e))}_handlePointerOut(t){var e=this._hoveredLayer;e&&(this._container.classList.remove("leaflet-interactive"),this._fireEvent([e],t,"pointerout"),this._hoveredLayer=null,this._pointerHoverThrottled=!1)}_handlePointerHover(t,s){if(!this._pointerHoverThrottled){let e,i;for(let t=this._drawFirst;t;t=t.next)(e=t.layer).options.interactive&&e._containsPoint(s)&&(i=e);i!==this._hoveredLayer&&(this._handlePointerOut(t),i)&&(this._container.classList.add("leaflet-interactive"),this._fireEvent([i],t,"pointerover"),this._hoveredLayer=i),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._pointerHoverThrottled=!0,this._pointerHoverThrottleTimeout=setTimeout(()=>{this._pointerHoverThrottled=!1},32)}}_fireEvent(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)}_bringToFront(t){var e,i,s=t._order;s&&(e=s.next,i=s.prev,e)&&((e.prev=i)?i.next=e:e&&(this._drawFirst=e),s.prev=this._drawLast,(this._drawLast.next=s).next=null,this._drawLast=s,this._requestRedraw(t))}_bringToBack(t){var e,i,s=t._order;s&&(e=s.next,i=s.prev)&&((i.next=e)?e.prev=i:i&&(this._drawLast=i),s.prev=null,s.next=this._drawFirst,this._drawFirst.prev=s,this._drawFirst=s,this._requestRedraw(t))}}function ke(t,e){return t.flatMap(t=>[...t.map((t,e)=>(e?"L":"M")+t.x+" "+t.y),e?"z":""]).join("")||"M0 0"}let Be=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)};class Ie extends B{_initContainer(){this._container=Be("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Be("g"),this._container.appendChild(this._rootGroup)}_destroyContainer(){B.prototype._destroyContainer.call(this),delete this._rootGroup,delete this._svgSize}_resizeContainer(){var t=B.prototype._resizeContainer.call(this);this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,this._container.setAttribute("width",t.x),this._container.setAttribute("height",t.y))}_update(){var t,e;this._map._animatingZoom&&this._bounds||(e=(t=this._bounds).getSize(),this._container.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))}_initPath(t){var e=t._path=Be("path");t.options.className&&e.classList.add(...h(t.options.className)),t.options.interactive&&e.classList.add("leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t}_addPath(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)}_removePath(t){t._path.remove(),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]}_updatePath(t){t._project(),t._update()}_updateStyle(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))}_updatePoly(t,e){this._setPath(t,ke(t._parts,e))}_updateCircle(t){var e=t._point,i=Math.max(Math.round(t._radius),1),s=`a${i},${Math.max(Math.round(t._radiusY),1)||i} 0 1,0 `,e=t._empty()?"M0 0":`M${e.x-i},${e.y}${s}${2*i},0 ${s}${2*-i},0 `;this._setPath(t,e)}_setPath(t,e){t._path.setAttribute("d",e)}_bringToFront(t){st(t._path)}_bringToBack(t){ot(t._path)}}o.include({getRenderer(t){let e=t.options.renderer??this._getPaneRenderer(t.options.pane)??this.options.renderer??this._renderer;return e=e||(this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer(e){if("overlayPane"!==e&&void 0!==e){let t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t}},_createRenderer(t){return this.options.preferCanvas&&new Ee(t)||new Ie(t)}});class je extends ue{initialize(t,e){ue.prototype.initialize.call(this,this._boundsToLatLngs(t),e)}setBounds(t){return this.setLatLngs(this._boundsToLatLngs(t))}_boundsToLatLngs(t){return[(t=new f(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}Ie.create=Be,Ie.pointsToPath=ke,A.geometryToLayer=me,A.coordsToLatLng=fe,A.coordsToLatLngs=ve,A.latLngToCoords=ye,A.latLngsToCoords=xe,A.getFeature=we,A.asFeature=be,o.mergeOptions({boxZoom:!0});class De extends T{initialize(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)}addHooks(){v(this._container,"pointerdown",this._onPointerDown,this)}removeHooks(){x(this._container,"pointerdown",this._onPointerDown,this)}moved(){return this._moved}_destroy(){this._pane.remove(),delete this._pane}_resetState(){this._resetStateTimeout=0,this._moved=!1}_clearDeferredResetState(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)}_onPointerDown(t){if(!t.shiftKey||0!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),lt(),_t(),this._startPoint=this._map.pointerEventToContainerPoint(t),v(document,{contextmenu:Et,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerMove(t){this._moved||(this._moved=!0,this._box=a("div","leaflet-zoom-box",this._container),this._container.classList.add("leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.pointerEventToContainerPoint(t);var t=new u(this._point,this._startPoint),e=t.getSize();c(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"}_finish(){this._moved&&(this._box.remove(),this._container.classList.remove("leaflet-crosshair")),dt(),pt(),x(document,{contextmenu:Et,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerUp(t){0===t.button&&(this._finish(),this._moved)&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(this._resetState.bind(this),0),t=new f(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t}))}_onKeyDown(t){"Escape"===t.code&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}o.addInitHook("addHandler","boxZoom",De),o.mergeOptions({doubleClickZoom:!0});class Re extends T{addHooks(){this._map.on("dblclick",this._onDoubleClick,this)}removeHooks(){this._map.off("dblclick",this._onDoubleClick,this)}_onDoubleClick(t){var e=this._map,i=e.getZoom(),s=e.options.zoomDelta,i=t.originalEvent.shiftKey?i-s:i+s;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}o.addInitHook("addHandler","doubleClickZoom",Re),o.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});class Ne extends T{addHooks(){var t;this._draggable||(t=this._map,this._draggable=new z(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),this._map._container.classList.add("leaflet-grab","leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]}removeHooks(){this._map._container.classList.remove("leaflet-grab","leaflet-touch-drag"),this._draggable.disable()}moved(){return this._draggable?._moved}moving(){return this._draggable?._moving}_onDragStart(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=new f(this._map.options.maxBounds),this._offsetLimit=new u(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(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)}_prunePositions(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()}_onZoomEnd(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x}_viscousLimit(t,e){return t-(t-e)*this._viscosity}_onPreDragLimit(){var t,e;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit,t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))}_onPreDragWrap(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,s=this._draggable._newPos.x,o=(s-e+i)%t+e-i,s=(s+e+i)%t-e-i,t=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=t}_onDragEnd(t){let l=this._map,d=l.options,e=!d.inertia||t.noInertia||this._times.length<2;if(l.fire("dragend",t),e)l.fire("moveend");else{this._prunePositions(+new Date);let t=this._lastPos.subtract(this._positions[0]),e=(this._lastTime-this._times[0])/1e3,i=d.easeLinearity,s=t.multiplyBy(i/e),o=s.distanceTo([0,0]),n=Math.min(d.inertiaMaxSpeed,o),a=s.multiplyBy(n/o),r=n/(d.inertiaDeceleration*i),h=a.multiplyBy(-r/2).round();h.x||h.y?(h=l._limitOffset(h,l.options.maxBounds),requestAnimationFrame(()=>{l.panBy(h,{duration:r,easeLinearity:i,noMoveStart:!0,animate:!0})})):l.fire("moveend")}}}o.addInitHook("addHandler","dragging",Ne),o.mergeOptions({keyboard:!0,keyboardPanDelta:80});class Fe extends T{static keyCodes={left:["ArrowLeft"],right:["ArrowRight"],down:["ArrowDown"],up:["ArrowUp"],zoomIn:["Equal","NumpadAdd","BracketRight"],zoomOut:["Minus","NumpadSubtract","Digit6","Slash"]};initialize(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)}addHooks(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),t.ariaKeyShortcuts=Object.values(Fe.keyCodes).flat().join(" "),v(t,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)}removeHooks(){this._removeHooks(),x(this._map._container,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)}_onPointerDown(){var t,e,i;this._focused||(i=document.body,t=document.documentElement,e=i.scrollTop||t.scrollTop,i=i.scrollLeft||t.scrollLeft,this._map._container.focus(),window.scrollTo(i,e))}_onFocus(){this._focused=!0,this._map.fire("focus")}_onBlur(){this._focused=!1,this._map.fire("blur")}_setPanDelta(t){var e,i,s,o,n=this._panKeys={},a=Fe.keyCodes;for(e of a.left)n[e]=[-1*t,0];for(i of a.right)n[i]=[t,0];for(s of a.down)n[s]=[0,t];for(o of a.up)n[o]=[0,-1*t]}_setZoomDelta(t){var e,i,s=this._zoomKeys={},o=Fe.keyCodes;for(e of o.zoomIn)s[e]=t;for(i of o.zoomOut)s[i]=-t}_addHooks(){v(document,"keydown",this._onKeyDown,this)}_removeHooks(){x(document,"keydown",this._onKeyDown,this)}_onKeyDown(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var i,s=e.code,o=this._map;let t;if(s in this._panKeys)o._panAnim&&o._panAnim._inProgress||(t=this._panKeys[s],e.shiftKey&&(t=new g(t).multiplyBy(3)),o.options.maxBounds&&(t=o._limitOffset(new g(t),o.options.maxBounds)),o.options.worldCopyJump?(i=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(t))),o.panTo(i)):o.panBy(t));else if(s in this._zoomKeys)o.setZoom(o.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[s]);else{if("Escape"!==s||!o._popup||!o._popup.options.closeOnEscapeKey)return;o.closePopup()}Et(e)}}}o.addInitHook("addHandler","keyboard",Fe),o.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});class We extends T{addHooks(){v(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0}removeHooks(){x(this._map._container,"wheel",this._onWheelScroll,this),clearTimeout(this._timer)}_onWheelScroll(t){var e=jt(t),i=this._map.options.wheelDebounceTime,e=(this._delta+=e,this._lastMousePos=this._map.pointerEventToContainerPoint(t),this._startTime||(this._startTime=+new Date),Math.max(i-(+new Date-this._startTime),0));clearTimeout(this._timer),this._timer=setTimeout(this._performZoom.bind(this),e),Et(t)}_performZoom(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap??0,s=(t._stop(),this._delta/(4*this._map.options.wheelPxPerZoomLevel)),s=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,i=i?Math.ceil(s/i)*i:s,s=t._limitZoom(e+(0<this._delta?i:-i))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}}o.addInitHook("addHandler","scrollWheelZoom",We);o.mergeOptions({tapHold:_.safari&&_.mobile,tapTolerance:15});class He extends T{addHooks(){v(this._map._container,"pointerdown",this._onDown,this)}removeHooks(){x(this._map._container,"pointerdown",this._onDown,this),clearTimeout(this._holdTimeout)}_onDown(t){clearTimeout(this._holdTimeout),1===zt().length&&"mouse"!==t.pointerType&&(this._startPos=this._newPos=new g(t.clientX,t.clientY),this._holdTimeout=setTimeout(()=>{this._cancel(),this._isTapValid()&&(v(document,"pointerup",L),v(document,"pointerup pointercancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},600),v(document,"pointerup pointercancel contextmenu",this._cancel,this),v(document,"pointermove",this._onMove,this))}_cancelClickPrevent=function t(){x(document,"pointerup",L),x(document,"pointerup pointercancel",t)};_cancel(){clearTimeout(this._holdTimeout),x(document,"pointerup pointercancel contextmenu",this._cancel,this),x(document,"pointermove",this._onMove,this)}_onMove(t){this._newPos=new g(t.clientX,t.clientY)}_isTapValid(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance}_simulateEvent(t,e){t=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});t._simulated=!0,e.target.dispatchEvent(t)}}o.addInitHook("addHandler","tapHold",He),o.mergeOptions({pinchZoom:!0,bounceAtZoomLimits:!0});class qe extends T{addHooks(){this._map._container.classList.add("leaflet-touch-zoom"),v(this._map._container,"pointerdown",this._onPointerStart,this)}removeHooks(){this._map._container.classList.remove("leaflet-touch-zoom"),x(this._map._container,"pointerdown",this._onPointerStart,this)}_onPointerStart(t){var e,i=this._map,s=zt();2!==s.length||i._animatingZoom||this._zooming||(e=i.pointerEventToContainerPoint(s[0]),s=i.pointerEventToContainerPoint(s[1]),this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.pinchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(s)._divideBy(2))),this._startDist=e.distanceTo(s),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),v(document,"pointermove",this._onPointerMove,this),v(document,"pointerup pointercancel",this._onPointerEnd,this),L(t))}_onPointerMove(t){var e=zt();if(2===e.length&&this._zooming){var i=this._map,s=i.pointerEventToContainerPoint(e[0]),e=i.pointerEventToContainerPoint(e[1]),o=s.distanceTo(e)/this._startDist;if(this._zoom=i.getScaleZoom(o,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&o<1||this._zoom>i.getMaxZoom()&&1<o)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.pinchZoom){if(this._center=this._startLatLng,1==o)return}else{s=s._add(e)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===s.x&&0===s.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),cancelAnimationFrame(this._animRequest);e=i._move.bind(i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimationFrame(e.bind(this)),L(t)}}_onPointerEnd(){this._moved&&this._zooming?(this._zooming=!1,cancelAnimationFrame(this._animRequest),x(document,"pointermove",this._onPointerMove,this),x(document,"pointerup pointercancel",this._onPointerEnd,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}}o.addInitHook("addHandler","pinchZoom",qe),o.addInitHook(function(){this.touchZoom=this.pinchZoom,void 0!==this.options.touchZoom&&(console.warn("Map: touchZoom option is deprecated and will be removed in future versions. Use pinchZoom instead."),this.options.pinchZoom=this.options.touchZoom,delete this.options.touchZoom),this.options.pinchZoom?this.pinchZoom.enable():this.pinchZoom.disable()}),o.BoxZoom=De,o.DoubleClickZoom=Re,o.Drag=Ne,o.Keyboard=Fe,o.ScrollWheelZoom=We,o.TapHold=He,o.PinchZoom=qe,o.TouchZoom=qe;s="2.0.0-alpha.1",E={__proto__:null,BlanketOverlay:Le,Bounds:u,Browser:_,CRS:e,Canvas:Ee,Circle:ce,CircleMarker:pe,Class:H,Control:P,DivIcon:Oe,DivOverlay:k,DomEvent:Rt,DomUtil:yt,Draggable:z,Evented:q,FeatureGroup:O,GeoJSON:A,GridLayer:Ce,Handler:T,Icon:he,ImageOverlay:Pe,LatLng:w,LatLngBounds:f,Layer:Z,LayerGroup:re,LeafletMap:$,LineUtil:J,Map:o,Marker:_e,Path:C,Point:g,PolyUtil:X,Polygon:ue,Polyline:S,Popup:Me,PosAnimation:Nt,Projection:se,Rectangle:je,Renderer:B,SVG:Ie,SVGOverlay:ze,TileLayer:Se,Tooltip:Ze,Transformation:G,Util:W,VideoOverlay:Te,version:s};let Ue=Ve().L;function Ve(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}Ve().L=E,Ve().L.noConflict=function(){return Ve().L=Ue,this},t.BlanketOverlay=Le,t.Bounds=u,t.Browser=_,t.CRS=e,t.Canvas=Ee,t.Circle=ce,t.CircleMarker=pe,t.Class=H,t.Control=P,t.DivIcon=Oe,t.DivOverlay=k,t.DomEvent=Rt,t.DomUtil=yt,t.Draggable=z,t.Evented=q,t.FeatureGroup=O,t.GeoJSON=A,t.GridLayer=Ce,t.Handler=T,t.Icon=he,t.ImageOverlay=Pe,t.LatLng=w,t.LatLngBounds=f,t.Layer=Z,t.LayerGroup=re,t.LeafletMap=$,t.LineUtil=J,t.Map=o,t.Marker=_e,t.Path=C,t.Point=g,t.PolyUtil=X,t.Polygon=ue,t.Polyline=S,t.Popup=Me,t.PosAnimation=Nt,t.Projection=se,t.Rectangle=je,t.Renderer=B,t.SVG=Ie,t.SVGOverlay=ze,t.TileLayer=Se,t.Tooltip=Ze,t.Transformation=G,t.Util=W,t.VideoOverlay=Te,t.default=E,t.version=s});
|
|
//# sourceMappingURL=leaflet-global.js.map
|