@florasync/leaflet-geokit 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +109 -64
- package/dist/django/index.js +3825 -3277
- package/dist/django/index.js.map +1 -1
- package/dist/leaflet-geokit.es.js +2181 -1644
- package/dist/leaflet-geokit.es.js.map +1 -1
- package/dist/leaflet-geokit.external.es.js +1443 -906
- package/dist/leaflet-geokit.external.es.js.map +1 -1
- package/dist/leaflet-geokit.umd.js +64 -16
- package/dist/leaflet-geokit.umd.js.map +1 -1
- package/dist/preact/{index-x8CrGR_z.js → index-BMfJn-mD.js} +1428 -878
- package/dist/preact/index-BMfJn-mD.js.map +1 -0
- package/dist/preact/index.js +1 -1
- package/dist/preact-bundled/index.js +3300 -2750
- package/dist/preact-bundled/index.js.map +1 -1
- package/dist/react/{index-x8CrGR_z.js → index-BMfJn-mD.js} +1428 -878
- package/dist/react/index-BMfJn-mD.js.map +1 -0
- package/dist/react/index.js +1 -1
- package/dist/react-bundled/index.js +2332 -1782
- package/dist/react-bundled/index.js.map +1 -1
- package/dist/types/components/LeafletDrawMapElement.d.ts +17 -4
- package/dist/types/lib/MapController.d.ts +9 -5
- package/dist/types/types/events.d.ts +34 -6
- package/dist/types/types/public.d.ts +16 -5
- package/dist/types/utils/geojson.d.ts +10 -0
- package/package.json +2 -2
- package/dist/preact/index-x8CrGR_z.js.map +0 -1
- package/dist/react/index-x8CrGR_z.js.map +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ct,pt){typeof exports=="object"&&typeof module!="undefined"?pt(exports):typeof define=="function"&&define.amd?define(["exports"],pt):(ct=typeof globalThis!="undefined"?globalThis:ct||self,pt(ct.LeafletGeoKit={}))})(this,(function(ct){"use strict";var Us=Object.defineProperty;var Zs=(ct,pt,J)=>pt in ct?Us(ct,pt,{enumerable:!0,configurable:!0,writable:!0,value:J}):ct[pt]=J;var k=(ct,pt,J)=>Zs(ct,typeof pt!="symbol"?pt+"":pt,J);function pt(u,a){for(var n=0;n<a.length;n++){const h=a[n];if(typeof h!="string"&&!Array.isArray(h)){for(const i in h)if(i!=="default"&&!(i in u)){const r=Object.getOwnPropertyDescriptor(h,i);r&&Object.defineProperty(u,i,r.get?r:{enumerable:!0,get:()=>h[i]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}const J={Ready:"leaflet-draw:ready",Created:"leaflet-draw:created",Edited:"leaflet-draw:edited",Deleted:"leaflet-draw:deleted",Error:"leaflet-draw:error",Ingest:"leaflet-draw:ingest",Export:"leaflet-draw:export"},Le={Status:"leaflet-geokit:status",Diagnostic:"leaflet-geokit:diagnostic"},Ki={trace:10,debug:20,info:30,warn:40,error:50};function Bn(u,a){return u==="silent"?!1:Ki[a]>=Ki[u]}function Rn(){try{return new Date().toISOString()}catch{return""}}function be(u,a="debug",n=console){let h=a;const i=l=>(...d)=>{try{if(!Bn(h,l))return;const p=`[${Rn()}][${u}][${l.toUpperCase()}]`,m=n[l];typeof m=="function"?m(p,...d):n.log(p,...d)}catch{}};return{get level(){return h},setLevel(l){h=l},trace:i("trace"),debug:i("debug"),info:i("info"),warn:i("warn"),error:i("error"),child(l){return be(`${u}:${l}`,h,n)}}}function Nn(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var te={exports:{}};/* @preserve
|
|
2
2
|
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
|
|
3
3
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
4
|
-
*/var Bn=te.exports,ji;function Ji(){return ji||(ji=1,(function(u,a){(function(n,h){h(a)})(Bn,(function(n){var h="1.9.4";function i(t){var e,o,s,c;for(o=1,s=arguments.length;o<s;o++){c=arguments[o];for(e in c)t[e]=c[e]}return t}var r=Object.create||(function(){function t(){}return function(e){return t.prototype=e,new t}})();function l(t,e){var o=Array.prototype.slice;if(t.bind)return t.bind.apply(t,o.call(arguments,1));var s=o.call(arguments,2);return function(){return t.apply(e,s.length?s.concat(o.call(arguments)):arguments)}}var d=0;function p(t){return"_leaflet_id"in t||(t._leaflet_id=++d),t._leaflet_id}function _(t,e,o){var s,c,f,m;return m=function(){s=!1,c&&(f.apply(o,c),c=!1)},f=function(){s?c=arguments:(t.apply(o,arguments),setTimeout(m,e),s=!0)},f}function g(t,e,o){var s=e[1],c=e[0],f=s-c;return t===s&&o?t:((t-c)%f+f)%f+c}function y(){return!1}function x(t,e){if(e===!1)return t;var o=Math.pow(10,e===void 0?6:e);return Math.round(t*o)/o}function T(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function E(t){return T(t).split(/\s+/)}function A(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?r(t.options):{});for(var o in e)t.options[o]=e[o];return t.options}function U(t,e,o){var s=[];for(var c in t)s.push(encodeURIComponent(o?c.toUpperCase():c)+"="+encodeURIComponent(t[c]));return(!e||e.indexOf("?")===-1?"?":"&")+s.join("&")}var F=/\{ *([\w_ -]+) *\}/g;function C(t,e){return t.replace(F,function(o,s){var c=e[s];if(c===void 0)throw new Error("No value provided for variable "+o);return typeof c=="function"&&(c=c(e)),c})}var S=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function G(t,e){for(var o=0;o<t.length;o++)if(t[o]===e)return o;return-1}var q="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var nt=0;function rt(t){var e=+new Date,o=Math.max(0,16-(e-nt));return nt=e+o,window.setTimeout(t,o)}var At=window.requestAnimationFrame||Y("RequestAnimationFrame")||rt,Pe=window.cancelAnimationFrame||Y("CancelAnimationFrame")||Y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function st(t,e,o){if(o&&At===rt)t.call(e);else return At.call(window,l(t,e))}function at(t){t&&Pe.call(window,t)}var Ce={__proto__:null,extend:i,create:r,bind:l,get lastId(){return d},stamp:p,throttle:_,wrapNum:g,falseFn:y,formatNum:x,trim:T,splitWords:E,setOptions:A,getParamString:U,template:C,isArray:S,indexOf:G,emptyImageUrl:q,requestFn:At,cancelFn:Pe,requestAnimFrame:st,cancelAnimFrame:at};function mt(){}mt.extend=function(t){var e=function(){A(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,s=r(o);s.constructor=e,e.prototype=s;for(var c in this)Object.prototype.hasOwnProperty.call(this,c)&&c!=="prototype"&&c!=="__super__"&&(e[c]=this[c]);return t.statics&&i(e,t.statics),t.includes&&(ne(t.includes),i.apply(null,[s].concat(t.includes))),i(s,t),delete s.statics,delete s.includes,s.options&&(s.options=o.options?r(o.options):{},i(s.options,t.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var f=0,m=s._initHooks.length;f<m;f++)s._initHooks[f].call(this)}},e},mt.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},mt.mergeOptions=function(t){return i(this.prototype.options,t),this},mt.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),o=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(o),this};function ne(t){if(!(typeof L=="undefined"||!L||!L.Mixin)){t=S(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var pt={on:function(t,e,o){if(typeof t=="object")for(var s in t)this._on(s,t[s],e);else{t=E(t);for(var c=0,f=t.length;c<f;c++)this._on(t[c],e,o)}return this},off:function(t,e,o){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var s in t)this._off(s,t[s],e);else{t=E(t);for(var c=arguments.length===1,f=0,m=t.length;f<m;f++)c?this._off(t[f]):this._off(t[f],e,o)}return this},_on:function(t,e,o,s){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,o)===!1){o===this&&(o=void 0);var c={fn:e,ctx:o};s&&(c.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(c)}},_off:function(t,e,o){var s,c,f;if(this._events&&(s=this._events[t],!!s)){if(arguments.length===1){if(this._firingCount)for(c=0,f=s.length;c<f;c++)s[c].fn=y;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var m=this._listens(t,e,o);if(m!==!1){var v=s[m];this._firingCount&&(v.fn=y,this._events[t]=s=s.slice()),s.splice(m,1)}}},fire:function(t,e,o){if(!this.listens(t,o))return this;var s=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var c=this._events[t];if(c){this._firingCount=this._firingCount+1||1;for(var f=0,m=c.length;f<m;f++){var v=c[f],w=v.fn;v.once&&this.off(t,w,v.ctx),w.call(v.ctx||this,s)}this._firingCount--}}return o&&this._propagateEvent(s),this},listens:function(t,e,o,s){typeof t!="string"&&console.warn('"string" type argument expected');var c=e;typeof e!="function"&&(s=!!e,c=void 0,o=void 0);var f=this._events&&this._events[t];if(f&&f.length&&this._listens(t,c,o)!==!1)return!0;if(s){for(var m in this._eventParents)if(this._eventParents[m].listens(t,e,o,s))return!0}return!1},_listens:function(t,e,o){if(!this._events)return!1;var s=this._events[t]||[];if(!e)return!!s.length;o===this&&(o=void 0);for(var c=0,f=s.length;c<f;c++)if(s[c].fn===e&&s[c].ctx===o)return c;return!1},once:function(t,e,o){if(typeof t=="object")for(var s in t)this._on(s,t[s],e,!0);else{t=E(t);for(var c=0,f=t.length;c<f;c++)this._on(t[c],e,o,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[p(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[p(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};pt.addEventListener=pt.on,pt.removeEventListener=pt.clearAllEventListeners=pt.off,pt.addOneTimeEventListener=pt.once,pt.fireEvent=pt.fire,pt.hasEventListeners=pt.listens;var re=mt.extend(pt);function O(t,e,o){this.x=o?Math.round(t):t,this.y=o?Math.round(e):e}var wo=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};O.prototype={clone:function(){return new O(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new O(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new O(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=wo(this.x),this.y=wo(this.y),this},distanceTo:function(t){t=D(t);var e=t.x-this.x,o=t.y-this.y;return Math.sqrt(e*e+o*o)},equals:function(t){return t=D(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+x(this.x)+", "+x(this.y)+")"}};function D(t,e,o){return t instanceof O?t:S(t)?new O(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new O(t.x,t.y):new O(t,e,o)}function j(t,e){if(t)for(var o=e?[t,e]:t,s=0,c=o.length;s<c;s++)this.extend(o[s])}j.prototype={extend:function(t){var e,o;if(!t)return this;if(t instanceof O||typeof t[0]=="number"||"x"in t)e=o=D(t);else if(t=ht(t),e=t.min,o=t.max,!e||!o)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=o.clone()):(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(o.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(o.y,this.max.y)),this},getCenter:function(t){return D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return D(this.min.x,this.max.y)},getTopRight:function(){return D(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,o;return typeof t[0]=="number"||t instanceof O?t=D(t):t=ht(t),t instanceof j?(e=t.min,o=t.max):e=o=t,e.x>=this.min.x&&o.x<=this.max.x&&e.y>=this.min.y&&o.y<=this.max.y},intersects:function(t){t=ht(t);var e=this.min,o=this.max,s=t.min,c=t.max,f=c.x>=e.x&&s.x<=o.x,m=c.y>=e.y&&s.y<=o.y;return f&&m},overlaps:function(t){t=ht(t);var e=this.min,o=this.max,s=t.min,c=t.max,f=c.x>e.x&&s.x<o.x,m=c.y>e.y&&s.y<o.y;return f&&m},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,o=this.max,s=Math.abs(e.x-o.x)*t,c=Math.abs(e.y-o.y)*t;return ht(D(e.x-s,e.y-c),D(o.x+s,o.y+c))},equals:function(t){return t?(t=ht(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function ht(t,e){return!t||t instanceof j?t:new j(t,e)}function ct(t,e){if(t)for(var o=e?[t,e]:t,s=0,c=o.length;s<c;s++)this.extend(o[s])}ct.prototype={extend:function(t){var e=this._southWest,o=this._northEast,s,c;if(t instanceof V)s=t,c=t;else if(t instanceof ct){if(s=t._southWest,c=t._northEast,!s||!c)return this}else return t?this.extend(N(t)||Q(t)):this;return!e&&!o?(this._southWest=new V(s.lat,s.lng),this._northEast=new V(c.lat,c.lng)):(e.lat=Math.min(s.lat,e.lat),e.lng=Math.min(s.lng,e.lng),o.lat=Math.max(c.lat,o.lat),o.lng=Math.max(c.lng,o.lng)),this},pad:function(t){var e=this._southWest,o=this._northEast,s=Math.abs(e.lat-o.lat)*t,c=Math.abs(e.lng-o.lng)*t;return new ct(new V(e.lat-s,e.lng-c),new V(o.lat+s,o.lng+c))},getCenter:function(){return new V((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new V(this.getNorth(),this.getWest())},getSouthEast:function(){return new V(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof V||"lat"in t?t=N(t):t=Q(t);var e=this._southWest,o=this._northEast,s,c;return t instanceof ct?(s=t.getSouthWest(),c=t.getNorthEast()):s=c=t,s.lat>=e.lat&&c.lat<=o.lat&&s.lng>=e.lng&&c.lng<=o.lng},intersects:function(t){t=Q(t);var e=this._southWest,o=this._northEast,s=t.getSouthWest(),c=t.getNorthEast(),f=c.lat>=e.lat&&s.lat<=o.lat,m=c.lng>=e.lng&&s.lng<=o.lng;return f&&m},overlaps:function(t){t=Q(t);var e=this._southWest,o=this._northEast,s=t.getSouthWest(),c=t.getNorthEast(),f=c.lat>e.lat&&s.lat<o.lat,m=c.lng>e.lng&&s.lng<o.lng;return f&&m},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=Q(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function Q(t,e){return t instanceof ct?t:new ct(t,e)}function V(t,e,o){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,o!==void 0&&(this.alt=+o)}V.prototype={equals:function(t,e){if(!t)return!1;t=N(t);var o=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return o<=(e===void 0?1e-9:e)},toString:function(t){return"LatLng("+x(this.lat,t)+", "+x(this.lng,t)+")"},distanceTo:function(t){return St.distance(this,N(t))},wrap:function(){return St.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,o=e/Math.cos(Math.PI/180*this.lat);return Q([this.lat-e,this.lng-o],[this.lat+e,this.lng+o])},clone:function(){return new V(this.lat,this.lng,this.alt)}};function N(t,e,o){return t instanceof V?t:S(t)&&typeof t[0]!="object"?t.length===3?new V(t[0],t[1],t[2]):t.length===2?new V(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new V(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new V(t,e,o)}var Mt={latLngToPoint:function(t,e){var o=this.projection.project(t),s=this.scale(e);return this.transformation._transform(o,s)},pointToLatLng:function(t,e){var o=this.scale(e),s=this.transformation.untransform(t,o);return this.projection.unproject(s)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,o=this.scale(t),s=this.transformation.transform(e.min,o),c=this.transformation.transform(e.max,o);return new j(s,c)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?g(t.lng,this.wrapLng,!0):t.lng,o=this.wrapLat?g(t.lat,this.wrapLat,!0):t.lat,s=t.alt;return new V(o,e,s)},wrapLatLngBounds:function(t){var e=t.getCenter(),o=this.wrapLatLng(e),s=e.lat-o.lat,c=e.lng-o.lng;if(s===0&&c===0)return t;var f=t.getSouthWest(),m=t.getNorthEast(),v=new V(f.lat-s,f.lng-c),w=new V(m.lat-s,m.lng-c);return new ct(v,w)}},St=i({},Mt,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var o=Math.PI/180,s=t.lat*o,c=e.lat*o,f=Math.sin((e.lat-t.lat)*o/2),m=Math.sin((e.lng-t.lng)*o/2),v=f*f+Math.cos(s)*Math.cos(c)*m*m,w=2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v));return this.R*w}}),bo=6378137,pi={R:bo,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,o=this.MAX_LATITUDE,s=Math.max(Math.min(o,t.lat),-o),c=Math.sin(s*e);return new O(this.R*t.lng*e,this.R*Math.log((1+c)/(1-c))/2)},unproject:function(t){var e=180/Math.PI;return new V((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(function(){var t=bo*Math.PI;return new j([-t,-t],[t,t])})()};function mi(t,e,o,s){if(S(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=o,this._d=s}mi.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new O((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function se(t,e,o,s){return new mi(t,e,o,s)}var _i=i({},St,{code:"EPSG:3857",projection:pi,transformation:(function(){var t=.5/(Math.PI*pi.R);return se(t,.5,-t,.5)})()}),ss=i({},_i,{code:"EPSG:900913"});function xo(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ko(t,e){var o="",s,c,f,m,v,w;for(s=0,f=t.length;s<f;s++){for(v=t[s],c=0,m=v.length;c<m;c++)w=v[c],o+=(c?"L":"M")+w.x+" "+w.y;o+=e?P.svg?"z":"x":""}return o||"M0 0"}var gi=document.documentElement.style,Ie="ActiveXObject"in window,as=Ie&&!document.addEventListener,Ao="msLaunchUri"in navigator&&!("documentMode"in document),vi=wt("webkit"),Mo=wt("android"),Eo=wt("android 2")||wt("android 3"),ls=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),hs=Mo&&wt("Google")&&ls<537&&!("AudioNode"in window),yi=!!window.opera,To=!Ao&&wt("chrome"),Po=wt("gecko")&&!vi&&!yi&&!Ie,cs=!To&&wt("safari"),Co=wt("phantom"),Io="OTransition"in gi,ds=navigator.platform.indexOf("Win")===0,So=Ie&&"transition"in gi,Li="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Eo,Do="MozPerspective"in gi,us=!window.L_DISABLE_3D&&(So||Li||Do)&&!Io&&!Co,ae=typeof orientation!="undefined"||wt("mobile"),fs=ae&&vi,ps=ae&&Li,Oo=!window.PointerEvent&&window.MSPointerEvent,zo=!!(window.PointerEvent||Oo),Bo="ontouchstart"in window||!!window.TouchEvent,ms=!window.L_NO_TOUCH&&(Bo||zo),_s=ae&&yi,gs=ae&&Po,vs=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,ys=(function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",y,e),window.removeEventListener("testPassiveEventSupport",y,e)}catch{}return t})(),Ls=(function(){return!!document.createElement("canvas").getContext})(),wi=!!(document.createElementNS&&xo("svg").createSVGRect),ws=!!wi&&(function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),bs=!wi&&(function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}})(),xs=navigator.platform.indexOf("Mac")===0,ks=navigator.platform.indexOf("Linux")===0;function wt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var P={ie:Ie,ielt9:as,edge:Ao,webkit:vi,android:Mo,android23:Eo,androidStock:hs,opera:yi,chrome:To,gecko:Po,safari:cs,phantom:Co,opera12:Io,win:ds,ie3d:So,webkit3d:Li,gecko3d:Do,any3d:us,mobile:ae,mobileWebkit:fs,mobileWebkit3d:ps,msPointer:Oo,pointer:zo,touch:ms,touchNative:Bo,mobileOpera:_s,mobileGecko:gs,retina:vs,passiveEvents:ys,canvas:Ls,svg:wi,vml:bs,inlineSvg:ws,mac:xs,linux:ks},Ro=P.msPointer?"MSPointerDown":"pointerdown",Uo=P.msPointer?"MSPointerMove":"pointermove",No=P.msPointer?"MSPointerUp":"pointerup",Zo=P.msPointer?"MSPointerCancel":"pointercancel",bi={touchstart:Ro,touchmove:Uo,touchend:No,touchcancel:Zo},Ho={touchstart:Cs,touchmove:Se,touchend:Se,touchcancel:Se},Wt={},Fo=!1;function As(t,e,o){return e==="touchstart"&&Ps(),Ho[e]?(o=Ho[e].bind(this,o),t.addEventListener(bi[e],o,!1),o):(console.warn("wrong event specified:",e),y)}function Ms(t,e,o){if(!bi[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(bi[e],o,!1)}function Es(t){Wt[t.pointerId]=t}function Ts(t){Wt[t.pointerId]&&(Wt[t.pointerId]=t)}function Go(t){delete Wt[t.pointerId]}function Ps(){Fo||(document.addEventListener(Ro,Es,!0),document.addEventListener(Uo,Ts,!0),document.addEventListener(No,Go,!0),document.addEventListener(Zo,Go,!0),Fo=!0)}function Se(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var o in Wt)e.touches.push(Wt[o]);e.changedTouches=[e],t(e)}}function Cs(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&ot(e),Se(t,e)}function Is(t){var e={},o,s;for(s in t)o=t[s],e[s]=o&&o.bind?o.bind(t):o;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Ss=200;function Ds(t,e){t.addEventListener("dblclick",e);var o=0,s;function c(f){if(f.detail!==1){s=f.detail;return}if(!(f.pointerType==="mouse"||f.sourceCapabilities&&!f.sourceCapabilities.firesTouchEvents)){var m=jo(f);if(!(m.some(function(w){return w instanceof HTMLLabelElement&&w.attributes.for})&&!m.some(function(w){return w instanceof HTMLInputElement||w instanceof HTMLSelectElement}))){var v=Date.now();v-o<=Ss?(s++,s===2&&e(Is(f))):s=1,o=v}}}return t.addEventListener("click",c),{dblclick:e,simDblclick:c}}function Os(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var xi=ze(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),le=ze(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Vo=le==="webkitTransition"||le==="OTransition"?le+"End":"transitionend";function Wo(t){return typeof t=="string"?document.getElementById(t):t}function he(t,e){var o=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!o||o==="auto")&&document.defaultView){var s=document.defaultView.getComputedStyle(t,null);o=s?s[e]:null}return o==="auto"?null:o}function H(t,e,o){var s=document.createElement(t);return s.className=e||"",o&&o.appendChild(s),s}function J(t){var e=t.parentNode;e&&e.removeChild(t)}function De(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function qt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function Yt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ki(t,e){if(t.classList!==void 0)return t.classList.contains(e);var o=Oe(t);return o.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(o)}function B(t,e){if(t.classList!==void 0)for(var o=E(e),s=0,c=o.length;s<c;s++)t.classList.add(o[s]);else if(!ki(t,e)){var f=Oe(t);Ai(t,(f?f+" ":"")+e)}}function K(t,e){t.classList!==void 0?t.classList.remove(e):Ai(t,T((" "+Oe(t)+" ").replace(" "+e+" "," ")))}function Ai(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function Oe(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function _t(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&zs(t,e)}function zs(t,e){var o=!1,s="DXImageTransform.Microsoft.Alpha";try{o=t.filters.item(s)}catch{if(e===1)return}e=Math.round(e*100),o?(o.Enabled=e!==100,o.Opacity=e):t.style.filter+=" progid:"+s+"(opacity="+e+")"}function ze(t){for(var e=document.documentElement.style,o=0;o<t.length;o++)if(t[o]in e)return t[o];return!1}function Rt(t,e,o){var s=e||new O(0,0);t.style[xi]=(P.ie3d?"translate("+s.x+"px,"+s.y+"px)":"translate3d("+s.x+"px,"+s.y+"px,0)")+(o?" scale("+o+")":"")}function $(t,e){t._leaflet_pos=e,P.any3d?Rt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ut(t){return t._leaflet_pos||new O(0,0)}var ce,de,Mi;if("onselectstart"in document)ce=function(){z(window,"selectstart",ot)},de=function(){W(window,"selectstart",ot)};else{var ue=ze(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ce=function(){if(ue){var t=document.documentElement.style;Mi=t[ue],t[ue]="none"}},de=function(){ue&&(document.documentElement.style[ue]=Mi,Mi=void 0)}}function Ei(){z(window,"dragstart",ot)}function Ti(){W(window,"dragstart",ot)}var Be,Pi;function Ci(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(Re(),Be=t,Pi=t.style.outlineStyle,t.style.outlineStyle="none",z(window,"keydown",Re))}function Re(){Be&&(Be.style.outlineStyle=Pi,Be=void 0,Pi=void 0,W(window,"keydown",Re))}function qo(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Ii(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Bs={__proto__:null,TRANSFORM:xi,TRANSITION:le,TRANSITION_END:Vo,get:Wo,getStyle:he,create:H,remove:J,empty:De,toFront:qt,toBack:Yt,hasClass:ki,addClass:B,removeClass:K,setClass:Ai,getClass:Oe,setOpacity:_t,testProp:ze,setTransform:Rt,setPosition:$,getPosition:Ut,get disableTextSelection(){return ce},get enableTextSelection(){return de},disableImageDrag:Ei,enableImageDrag:Ti,preventOutline:Ci,restoreOutline:Re,getSizedParentNode:qo,getScale:Ii};function z(t,e,o,s){if(e&&typeof e=="object")for(var c in e)Di(t,c,e[c],o);else{e=E(e);for(var f=0,m=e.length;f<m;f++)Di(t,e[f],o,s)}return this}var bt="_leaflet_events";function W(t,e,o,s){if(arguments.length===1)Yo(t),delete t[bt];else if(e&&typeof e=="object")for(var c in e)Oi(t,c,e[c],o);else if(e=E(e),arguments.length===2)Yo(t,function(v){return G(e,v)!==-1});else for(var f=0,m=e.length;f<m;f++)Oi(t,e[f],o,s);return this}function Yo(t,e){for(var o in t[bt]){var s=o.split(/\d/)[0];(!e||e(s))&&Oi(t,s,null,null,o)}}var Si={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Di(t,e,o,s){var c=e+p(o)+(s?"_"+p(s):"");if(t[bt]&&t[bt][c])return this;var f=function(v){return o.call(s||t,v||window.event)},m=f;!P.touchNative&&P.pointer&&e.indexOf("touch")===0?f=As(t,e,f):P.touch&&e==="dblclick"?f=Ds(t,f):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(Si[e]||e,f,P.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(f=function(v){v=v||window.event,Bi(t,v)&&m(v)},t.addEventListener(Si[e],f,!1)):t.addEventListener(e,m,!1):t.attachEvent("on"+e,f),t[bt]=t[bt]||{},t[bt][c]=f}function Oi(t,e,o,s,c){c=c||e+p(o)+(s?"_"+p(s):"");var f=t[bt]&&t[bt][c];if(!f)return this;!P.touchNative&&P.pointer&&e.indexOf("touch")===0?Ms(t,e,f):P.touch&&e==="dblclick"?Os(t,f):"removeEventListener"in t?t.removeEventListener(Si[e]||e,f,!1):t.detachEvent("on"+e,f),t[bt][c]=null}function Nt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function zi(t){return Di(t,"wheel",Nt),this}function fe(t){return z(t,"mousedown touchstart dblclick contextmenu",Nt),t._leaflet_disable_click=!0,this}function ot(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Zt(t){return ot(t),Nt(t),this}function jo(t){if(t.composedPath)return t.composedPath();for(var e=[],o=t.target;o;)e.push(o),o=o.parentNode;return e}function Jo(t,e){if(!e)return new O(t.clientX,t.clientY);var o=Ii(e),s=o.boundingClientRect;return new O((t.clientX-s.left)/o.x-e.clientLeft,(t.clientY-s.top)/o.y-e.clientTop)}var Rs=P.linux&&P.chrome?window.devicePixelRatio:P.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Ko(t){return P.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Rs:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Bi(t,e){var o=e.relatedTarget;if(!o)return!0;try{for(;o&&o!==t;)o=o.parentNode}catch{return!1}return o!==t}var Us={__proto__:null,on:z,off:W,stopPropagation:Nt,disableScrollPropagation:zi,disableClickPropagation:fe,preventDefault:ot,stop:Zt,getPropagationPath:jo,getMousePosition:Jo,getWheelDelta:Ko,isExternalTarget:Bi,addListener:z,removeListener:W},Xo=re.extend({run:function(t,e,o,s){this.stop(),this._el=t,this._inProgress=!0,this._duration=o||.25,this._easeOutPower=1/Math.max(s||.5,.2),this._startPos=Ut(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=st(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,o=this._duration*1e3;e<o?this._runFrame(this._easeOut(e/o),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var o=this._startPos.add(this._offset.multiplyBy(t));e&&o._round(),$(this._el,o),this.fire("step")},_complete:function(){at(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Z=re.extend({options:{crs:_i,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:function(t,e){e=A(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==void 0&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==void 0&&this.setView(N(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=le&&P.any3d&&!P.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),z(this._proxy,Vo,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,o){if(e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(N(t),e,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&o!==!0){o.animate!==void 0&&(o.zoom=i({animate:o.animate},o.zoom),o.pan=i({animate:o.animate,duration:o.duration},o.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,o.zoom):this._tryAnimatedPan(t,o.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,o.pan&&o.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(P.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(P.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,o){var s=this.getZoomScale(e),c=this.getSize().divideBy(2),f=t instanceof O?t:this.latLngToContainerPoint(t),m=f.subtract(c).multiplyBy(1-1/s),v=this.containerPointToLatLng(c.add(m));return this.setView(v,e,{zoom:o})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Q(t);var o=D(e.paddingTopLeft||e.padding||[0,0]),s=D(e.paddingBottomRight||e.padding||[0,0]),c=this.getBoundsZoom(t,!1,o.add(s));if(c=typeof e.maxZoom=="number"?Math.min(e.maxZoom,c):c,c===1/0)return{center:t.getCenter(),zoom:c};var f=s.subtract(o).divideBy(2),m=this.project(t.getSouthWest(),c),v=this.project(t.getNorthEast(),c),w=this.unproject(m.add(v).divideBy(2).add(f),c);return{center:w,zoom:c}},fitBounds:function(t,e){if(t=Q(t),!t.isValid())throw new Error("Bounds are not valid.");var o=this._getBoundsCenterZoom(t,e);return this.setView(o.center,o.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=D(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Xo,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){B(this._mapPane,"leaflet-pan-anim");var o=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,o,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,o){if(o=o||{},o.animate===!1||!P.any3d)return this.setView(t,e,o);this._stop();var s=this.project(this.getCenter()),c=this.project(t),f=this.getSize(),m=this._zoom;t=N(t),e=e===void 0?m:e;var v=Math.max(f.x,f.y),w=v*this.getZoomScale(m,e),b=c.distanceTo(s)||1,M=1.42,I=M*M;function R(tt){var Je=tt?-1:1,Ma=tt?w:v,Ea=w*w-v*v+Je*I*I*b*b,Ta=2*Ma*I*b,Yi=Ea/Ta,Sn=Math.sqrt(Yi*Yi+1)-Yi,Pa=Sn<1e-9?-18:Math.log(Sn);return Pa}function lt(tt){return(Math.exp(tt)-Math.exp(-tt))/2}function et(tt){return(Math.exp(tt)+Math.exp(-tt))/2}function vt(tt){return lt(tt)/et(tt)}var dt=R(0);function $t(tt){return v*(et(dt)/et(dt+M*tt))}function ba(tt){return v*(et(dt)*vt(dt+M*tt)-lt(dt))/I}function xa(tt){return 1-Math.pow(1-tt,1.5)}var ka=Date.now(),Cn=(R(1)-dt)/M,Aa=o.duration?1e3*o.duration:1e3*Cn*.8;function In(){var tt=(Date.now()-ka)/Aa,Je=xa(tt)*Cn;tt<=1?(this._flyToFrame=st(In,this),this._move(this.unproject(s.add(c.subtract(s).multiplyBy(ba(Je)/b)),m),this.getScaleZoom(v/$t(Je),m),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,o.noMoveStart),In.call(this),this},flyToBounds:function(t,e){var o=this._getBoundsCenterZoom(t,e);return this.flyTo(o.center,o.zoom,e)},setMaxBounds:function(t){return t=Q(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:function(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:function(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:function(t,e){this._enforcingBounds=!0;var o=this.getCenter(),s=this._limitCenter(o,this._zoom,Q(t));return o.equals(s)||this.panTo(s,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var o=D(e.paddingTopLeft||e.padding||[0,0]),s=D(e.paddingBottomRight||e.padding||[0,0]),c=this.project(this.getCenter()),f=this.project(t),m=this.getPixelBounds(),v=ht([m.min.add(o),m.max.subtract(s)]),w=v.getSize();if(!v.contains(f)){this._enforcingBounds=!0;var b=f.subtract(v.getCenter()),M=v.extend(f).getSize().subtract(w);c.x+=b.x<0?-M.x:M.x,c.y+=b.y<0?-M.y:M.y,this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=e.divideBy(2).round(),c=o.divideBy(2).round(),f=s.subtract(c);return!f.x&&!f.y?this:(t.animate&&t.pan?this.panBy(f):(t.pan&&this._rawPanBy(f),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=l(this._handleGeolocationResponse,this),o=l(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,o=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+o+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,o=t.coords.longitude,s=new V(e,o),c=s.toBounds(t.coords.accuracy*2),f=this._locateOptions;if(f.setView){var m=this.getBoundsZoom(c);this.setView(s,f.maxZoom?Math.min(m,f.maxZoom):m)}var v={latlng:s,bounds:c,timestamp:t.timestamp};for(var w in t.coords)typeof t.coords[w]=="number"&&(v[w]=t.coords[w]);this.fire("locationfound",v)}},addHandler:function(t,e){if(!e)return this;var o=this[t]=new e(this);return this._handlers.push(o),this.options[t]&&o.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),J(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(at(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)J(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var o="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),s=H("div",o,e||this._mapPane);return t&&(this._panes[t]=s),s},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),o=this.unproject(t.getTopRight());return new ct(e,o)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,o){t=Q(t),o=D(o||[0,0]);var s=this.getZoom()||0,c=this.getMinZoom(),f=this.getMaxZoom(),m=t.getNorthWest(),v=t.getSouthEast(),w=this.getSize().subtract(o),b=ht(this.project(v,s),this.project(m,s)).getSize(),M=P.any3d?this.options.zoomSnap:1,I=w.x/b.x,R=w.y/b.y,lt=e?Math.max(I,R):Math.min(I,R);return s=this.getScaleZoom(lt,s),M&&(s=Math.round(s/(M/100))*(M/100),s=e?Math.ceil(s/M)*M:Math.floor(s/M)*M),Math.max(c,Math.min(f,s))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var o=this._getTopLeftPoint(t,e);return new j(o,o.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var o=this.options.crs;return e=e===void 0?this._zoom:e,o.scale(t)/o.scale(e)},getScaleZoom:function(t,e){var o=this.options.crs;e=e===void 0?this._zoom:e;var s=o.zoom(t*o.scale(e));return isNaN(s)?1/0:s},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(N(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(N(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(N(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Q(t))},distance:function(t,e){return this.options.crs.distance(N(t),N(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(N(t)))},mouseEventToContainerPoint:function(t){return Jo(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Wo(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");z(e,"scroll",this._onScroll,this),this._containerId=p(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&P.any3d,B(t,"leaflet-container"+(P.touch?" leaflet-touch":"")+(P.retina?" leaflet-retina":"")+(P.ielt9?" leaflet-oldie":"")+(P.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=he(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),$(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(B(t.markerPane,"leaflet-zoom-hide"),B(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,o){$(this._mapPane,new O(0,0));var s=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var c=this._zoom!==e;this._moveStart(c,o)._move(t,e)._moveEnd(c),this.fire("viewreset"),s&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,o,s){e===void 0&&(e=this._zoom);var c=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),s?o&&o.pinch&&this.fire("zoom",o):((c||o&&o.pinch)&&this.fire("zoom",o),this.fire("move",o)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return at(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){$(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[p(this._container)]=this;var e=t?W:z;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),P.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){at(this._resizeRequest),this._resizeRequest=st(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var o=[],s,c=e==="mouseout"||e==="mouseover",f=t.target||t.srcElement,m=!1;f;){if(s=this._targets[p(f)],s&&(e==="click"||e==="preclick")&&this._draggableMoved(s)){m=!0;break}if(s&&s.listens(e,!0)&&(c&&!Bi(f,t)||(o.push(s),c))||f===this._container)break;f=f.parentNode}return!o.length&&!m&&!c&&this.listens(e,!0)&&(o=[this]),o},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var o=t.type;o==="mousedown"&&Ci(e),this._fireDOMEvent(t,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,o){if(t.type==="click"){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,o)}var c=this._findEventTargets(t,e);if(o){for(var f=[],m=0;m<o.length;m++)o[m].listens(e,!0)&&f.push(o[m]);c=f.concat(c)}if(c.length){e==="contextmenu"&&ot(t);var v=c[0],w={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var b=v.getLatLng&&(!v._radius||v._radius<=10);w.containerPoint=b?this.latLngToContainerPoint(v.getLatLng()):this.mouseEventToContainerPoint(t),w.layerPoint=this.containerPointToLayerPoint(w.containerPoint),w.latlng=b?v.getLatLng():this.layerPointToLatLng(w.layerPoint)}for(m=0;m<c.length;m++)if(c[m].fire(e,w,!0),w.originalEvent._stopped||c[m].options.bubblingMouseEvents===!1&&G(this._mouseEvents,e)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Ut(this._mapPane)||new O(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var o=t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return o.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var o=this.getSize()._divideBy(2);return this.project(t,e)._subtract(o)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,o){var s=this._getNewPixelOrigin(o,e);return this.project(t,e)._subtract(s)},_latLngBoundsToNewLayerBounds:function(t,e,o){var s=this._getNewPixelOrigin(o,e);return ht([this.project(t.getSouthWest(),e)._subtract(s),this.project(t.getNorthWest(),e)._subtract(s),this.project(t.getSouthEast(),e)._subtract(s),this.project(t.getNorthEast(),e)._subtract(s)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,o){if(!o)return t;var s=this.project(t,e),c=this.getSize().divideBy(2),f=new j(s.subtract(c),s.add(c)),m=this._getBoundsOffset(f,o,e);return Math.abs(m.x)<=1&&Math.abs(m.y)<=1?t:this.unproject(s.add(m),e)},_limitOffset:function(t,e){if(!e)return t;var o=this.getPixelBounds(),s=new j(o.min.add(t),o.max.add(t));return t.add(this._getBoundsOffset(s,e))},_getBoundsOffset:function(t,e,o){var s=ht(this.project(e.getNorthEast(),o),this.project(e.getSouthWest(),o)),c=s.min.subtract(t.min),f=s.max.subtract(t.max),m=this._rebound(c.x,-f.x),v=this._rebound(c.y,-f.y);return new O(m,v)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),o=this.getMaxZoom(),s=P.any3d?this.options.zoomSnap:1;return s&&(t=Math.round(t/s)*s),Math.max(e,Math.min(o,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){K(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var o=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(o)?!1:(this.panBy(o,e),!0)},_createAnimProxy:function(){var t=this._proxy=H("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var o=xi,s=this._proxy.style[o];Rt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),s===this._proxy.style[o]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){J(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Rt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,o){if(this._animatingZoom)return!0;if(o=o||{},!this._zoomAnimated||o.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var s=this.getZoomScale(e),c=this._getCenterOffset(t)._divideBy(1-1/s);return o.animate!==!0&&!this.getSize().contains(c)?!1:(st(function(){this._moveStart(!0,o.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,o,s){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,B(this._mapPane,"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),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&K(this._mapPane,"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))}});function Ns(t,e){return new Z(t,e)}var yt=mt.extend({options:{position:"topright"},initialize:function(t){A(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),o=this.getPosition(),s=t._controlCorners[o];return B(e,"leaflet-control"),o.indexOf("bottom")!==-1?s.insertBefore(e,s.firstChild):s.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(J(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),pe=function(t){return new yt(t)};Z.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",o=this._controlContainer=H("div",e+"control-container",this._container);function s(c,f){var m=e+c+" "+e+f;t[c+f]=H("div",m,o)}s("top","left"),s("top","right"),s("bottom","left"),s("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)J(this._controlCorners[t]);J(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Qo=yt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,o,s){return o<s?-1:s<o?1:0}},initialize:function(t,e,o){A(this,o),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var s in t)this._addLayer(t[s],s);for(s in e)this._addLayer(e[s],s,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return yt.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(p(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){B(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(B(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):K(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return K(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=H("div",t),o=this.options.collapsed;e.setAttribute("aria-haspopup",!0),fe(e),zi(e);var s=this._section=H("section",t+"-list");o&&(this._map.on("click",this.collapse,this),z(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var c=this._layersLink=H("a",t+"-toggle",e);c.href="#",c.title="Layers",c.setAttribute("role","button"),z(c,{keydown:function(f){f.keyCode===13&&this._expandSafely()},click:function(f){ot(f),this._expandSafely()}},this),o||this.expand(),this._baseLayersList=H("div",t+"-base",s),this._separator=H("div",t+"-separator",s),this._overlaysList=H("div",t+"-overlays",s),e.appendChild(s)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&p(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,o){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:o}),this.options.sortLayers&&this._layers.sort(l(function(s,c){return this.options.sortFunction(s.layer,c.layer,s.name,c.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;De(this._baseLayersList),De(this._overlaysList),this._layerControlInputs=[];var t,e,o,s,c=0;for(o=0;o<this._layers.length;o++)s=this._layers[o],this._addItem(s),e=e||s.overlay,t=t||!s.overlay,c+=s.overlay?0:1;return this.options.hideSingleBase&&(t=t&&c>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(p(t.target)),o=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;o&&this._map.fire(o,e)},_createRadioElement:function(t,e){var o='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",s=document.createElement("div");return s.innerHTML=o,s.firstChild},_addItem:function(t){var e=document.createElement("label"),o=this._map.hasLayer(t.layer),s;t.overlay?(s=document.createElement("input"),s.type="checkbox",s.className="leaflet-control-layers-selector",s.defaultChecked=o):s=this._createRadioElement("leaflet-base-layers_"+p(this),o),this._layerControlInputs.push(s),s.layerId=p(t.layer),z(s,"click",this._onInputClick,this);var c=document.createElement("span");c.innerHTML=" "+t.name;var f=document.createElement("span");e.appendChild(f),f.appendChild(s),f.appendChild(c);var m=t.overlay?this._overlaysList:this._baseLayersList;return m.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,o,s=[],c=[];this._handlingClick=!0;for(var f=t.length-1;f>=0;f--)e=t[f],o=this._getLayer(e.layerId).layer,e.checked?s.push(o):e.checked||c.push(o);for(f=0;f<c.length;f++)this._map.hasLayer(c[f])&&this._map.removeLayer(c[f]);for(f=0;f<s.length;f++)this._map.hasLayer(s[f])||this._map.addLayer(s[f]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,o,s=this._map.getZoom(),c=t.length-1;c>=0;c--)e=t[c],o=this._getLayer(e.layerId).layer,e.disabled=o.options.minZoom!==void 0&&s<o.options.minZoom||o.options.maxZoom!==void 0&&s>o.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,z(t,"click",ot),this.expand();var e=this;setTimeout(function(){W(t,"click",ot),e._preventClick=!1})}}),Zs=function(t,e,o){return new Qo(t,e,o)},Ri=yt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",o=H("div",e+" leaflet-bar"),s=this.options;return this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,e+"-in",o,this._zoomIn),this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,e+"-out",o,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),o},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,o,s,c){var f=H("a",o,s);return f.innerHTML=t,f.href="#",f.title=e,f.setAttribute("role","button"),f.setAttribute("aria-label",e),fe(f),z(f,"click",Zt),z(f,"click",c,this),z(f,"click",this._refocusOnMap,this),f},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";K(this._zoomInButton,e),K(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(B(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(B(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Z.mergeOptions({zoomControl:!0}),Z.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ri,this.addControl(this.zoomControl))});var Hs=function(t){return new Ri(t)},$o=yt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",o=H("div",e),s=this.options;return this._addScales(s,e+"-line",o),t.on(s.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),o},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,o){t.metric&&(this._mScale=H("div",e,o)),t.imperial&&(this._iScale=H("div",e,o))},_update:function(){var t=this._map,e=t.getSize().y/2,o=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(o)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),o=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,o,e/t)},_updateImperial:function(t){var e=t*3.2808399,o,s,c;e>5280?(o=e/5280,s=this._getRoundNum(o),this._updateScale(this._iScale,s+" mi",s/o)):(c=this._getRoundNum(e),this._updateScale(this._iScale,c+" ft",c/e))},_updateScale:function(t,e,o){t.style.width=Math.round(this.options.maxWidth*o)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),o=t/e;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,e*o}}),Fs=function(t){return new $o(t)},Gs='<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>',Ui=yt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(P.inlineSvg?Gs+" ":"")+"Leaflet</a>"},initialize:function(t){A(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=H("div","leaflet-control-attribution"),fe(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var o=[];this.options.prefix&&o.push(this.options.prefix),t.length&&o.push(t.join(", ")),this._container.innerHTML=o.join(' <span aria-hidden="true">|</span> ')}}});Z.mergeOptions({attributionControl:!0}),Z.addInitHook(function(){this.options.attributionControl&&new Ui().addTo(this)});var Vs=function(t){return new Ui(t)};yt.Layers=Qo,yt.Zoom=Ri,yt.Scale=$o,yt.Attribution=Ui,pe.layers=Zs,pe.zoom=Hs,pe.scale=Fs,pe.attribution=Vs;var xt=mt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});xt.addTo=function(t,e){return t.addHandler(e,this),this};var Ws={Events:pt},tn=P.touch?"touchstart mousedown":"mousedown",Dt=re.extend({options:{clickTolerance:3},initialize:function(t,e,o,s){A(this,s),this._element=t,this._dragStartTarget=e||t,this._preventOutline=o},enable:function(){this._enabled||(z(this._dragStartTarget,tn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Dt._dragging===this&&this.finishDrag(!0),W(this._dragStartTarget,tn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ki(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Dt._dragging===this&&this.finishDrag();return}if(!(Dt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Dt._dragging=this,this._preventOutline&&Ci(this._element),Ei(),ce(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,o=qo(this._element);this._startPoint=new O(e.clientX,e.clientY),this._startPos=Ut(this._element),this._parentScale=Ii(o);var s=t.type==="mousedown";z(document,s?"mousemove":"touchmove",this._onMove,this),z(document,s?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,o=new O(e.clientX,e.clientY)._subtract(this._startPoint);!o.x&&!o.y||Math.abs(o.x)+Math.abs(o.y)<this.options.clickTolerance||(o.x/=this._parentScale.x,o.y/=this._parentScale.y,ot(t),this._moved||(this.fire("dragstart"),this._moved=!0,B(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),B(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(o),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),$(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){K(document.body,"leaflet-dragging"),this._lastTarget&&(K(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),W(document,"mousemove touchmove",this._onMove,this),W(document,"mouseup touchend touchcancel",this._onUp,this),Ti(),de();var e=this._moved&&this._moving;this._moving=!1,Dt._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function en(t,e,o){var s,c=[1,4,2,8],f,m,v,w,b,M,I,R;for(f=0,M=t.length;f<M;f++)t[f]._code=Ht(t[f],e);for(v=0;v<4;v++){for(I=c[v],s=[],f=0,M=t.length,m=M-1;f<M;m=f++)w=t[f],b=t[m],w._code&I?b._code&I||(R=Ue(b,w,I,e,o),R._code=Ht(R,e),s.push(R)):(b._code&I&&(R=Ue(b,w,I,e,o),R._code=Ht(R,e),s.push(R)),s.push(w));t=s}return t}function on(t,e){var o,s,c,f,m,v,w,b,M;if(!t||t.length===0)throw new Error("latlngs not passed");gt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var I=N([0,0]),R=Q(t),lt=R.getNorthWest().distanceTo(R.getSouthWest())*R.getNorthEast().distanceTo(R.getNorthWest());lt<1700&&(I=Ni(t));var et=t.length,vt=[];for(o=0;o<et;o++){var dt=N(t[o]);vt.push(e.project(N([dt.lat-I.lat,dt.lng-I.lng])))}for(v=w=b=0,o=0,s=et-1;o<et;s=o++)c=vt[o],f=vt[s],m=c.y*f.x-f.y*c.x,w+=(c.x+f.x)*m,b+=(c.y+f.y)*m,v+=m*3;v===0?M=vt[0]:M=[w/v,b/v];var $t=e.unproject(D(M));return N([$t.lat+I.lat,$t.lng+I.lng])}function Ni(t){for(var e=0,o=0,s=0,c=0;c<t.length;c++){var f=N(t[c]);e+=f.lat,o+=f.lng,s++}return N([e/s,o/s])}var qs={__proto__:null,clipPolygon:en,polygonCenter:on,centroid:Ni};function nn(t,e){if(!e||!t.length)return t.slice();var o=e*e;return t=Js(t,o),t=js(t,o),t}function rn(t,e,o){return Math.sqrt(me(t,e,o,!0))}function Ys(t,e,o){return me(t,e,o)}function js(t,e){var o=t.length,s=typeof Uint8Array!="undefined"?Uint8Array:Array,c=new s(o);c[0]=c[o-1]=1,Zi(t,c,e,0,o-1);var f,m=[];for(f=0;f<o;f++)c[f]&&m.push(t[f]);return m}function Zi(t,e,o,s,c){var f=0,m,v,w;for(v=s+1;v<=c-1;v++)w=me(t[v],t[s],t[c],!0),w>f&&(m=v,f=w);f>o&&(e[m]=1,Zi(t,e,o,s,m),Zi(t,e,o,m,c))}function Js(t,e){for(var o=[t[0]],s=1,c=0,f=t.length;s<f;s++)Ks(t[s],t[c])>e&&(o.push(t[s]),c=s);return c<f-1&&o.push(t[f-1]),o}var sn;function an(t,e,o,s,c){var f=s?sn:Ht(t,o),m=Ht(e,o),v,w,b;for(sn=m;;){if(!(f|m))return[t,e];if(f&m)return!1;v=f||m,w=Ue(t,e,v,o,c),b=Ht(w,o),v===f?(t=w,f=b):(e=w,m=b)}}function Ue(t,e,o,s,c){var f=e.x-t.x,m=e.y-t.y,v=s.min,w=s.max,b,M;return o&8?(b=t.x+f*(w.y-t.y)/m,M=w.y):o&4?(b=t.x+f*(v.y-t.y)/m,M=v.y):o&2?(b=w.x,M=t.y+m*(w.x-t.x)/f):o&1&&(b=v.x,M=t.y+m*(v.x-t.x)/f),new O(b,M,c)}function Ht(t,e){var o=0;return t.x<e.min.x?o|=1:t.x>e.max.x&&(o|=2),t.y<e.min.y?o|=4:t.y>e.max.y&&(o|=8),o}function Ks(t,e){var o=e.x-t.x,s=e.y-t.y;return o*o+s*s}function me(t,e,o,s){var c=e.x,f=e.y,m=o.x-c,v=o.y-f,w=m*m+v*v,b;return w>0&&(b=((t.x-c)*m+(t.y-f)*v)/w,b>1?(c=o.x,f=o.y):b>0&&(c+=m*b,f+=v*b)),m=t.x-c,v=t.y-f,s?m*m+v*v:new O(c,f)}function gt(t){return!S(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]!="undefined"}function ln(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),gt(t)}function hn(t,e){var o,s,c,f,m,v,w,b;if(!t||t.length===0)throw new Error("latlngs not passed");gt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var M=N([0,0]),I=Q(t),R=I.getNorthWest().distanceTo(I.getSouthWest())*I.getNorthEast().distanceTo(I.getNorthWest());R<1700&&(M=Ni(t));var lt=t.length,et=[];for(o=0;o<lt;o++){var vt=N(t[o]);et.push(e.project(N([vt.lat-M.lat,vt.lng-M.lng])))}for(o=0,s=0;o<lt-1;o++)s+=et[o].distanceTo(et[o+1])/2;if(s===0)b=et[0];else for(o=0,f=0;o<lt-1;o++)if(m=et[o],v=et[o+1],c=m.distanceTo(v),f+=c,f>s){w=(f-s)/c,b=[v.x-w*(v.x-m.x),v.y-w*(v.y-m.y)];break}var dt=e.unproject(D(b));return N([dt.lat+M.lat,dt.lng+M.lng])}var Xs={__proto__:null,simplify:nn,pointToSegmentDistance:rn,closestPointOnSegment:Ys,clipSegment:an,_getEdgeIntersection:Ue,_getBitCode:Ht,_sqClosestPointOnSegment:me,isFlat:gt,_flat:ln,polylineCenter:hn},Hi={project:function(t){return new O(t.lng,t.lat)},unproject:function(t){return new V(t.y,t.x)},bounds:new j([-180,-90],[180,90])},Fi={R:6378137,R_MINOR:6356752314245179e-9,bounds:new j([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,o=this.R,s=t.lat*e,c=this.R_MINOR/o,f=Math.sqrt(1-c*c),m=f*Math.sin(s),v=Math.tan(Math.PI/4-s/2)/Math.pow((1-m)/(1+m),f/2);return s=-o*Math.log(Math.max(v,1e-10)),new O(t.lng*e*o,s)},unproject:function(t){for(var e=180/Math.PI,o=this.R,s=this.R_MINOR/o,c=Math.sqrt(1-s*s),f=Math.exp(-t.y/o),m=Math.PI/2-2*Math.atan(f),v=0,w=.1,b;v<15&&Math.abs(w)>1e-7;v++)b=c*Math.sin(m),b=Math.pow((1-b)/(1+b),c/2),w=Math.PI/2-2*Math.atan(f*b)-m,m+=w;return new V(m*e,t.x*e/o)}},Qs={__proto__:null,LonLat:Hi,Mercator:Fi,SphericalMercator:pi},$s=i({},St,{code:"EPSG:3395",projection:Fi,transformation:(function(){var t=.5/(Math.PI*Fi.R);return se(t,.5,-t,.5)})()}),cn=i({},St,{code:"EPSG:4326",projection:Hi,transformation:se(1/180,1,-1/180,.5)}),ta=i({},Mt,{projection:Hi,transformation:se(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var o=e.lng-t.lng,s=e.lat-t.lat;return Math.sqrt(o*o+s*s)},infinite:!0});Mt.Earth=St,Mt.EPSG3395=$s,Mt.EPSG3857=_i,Mt.EPSG900913=ss,Mt.EPSG4326=cn,Mt.Simple=ta;var Lt=re.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[p(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[p(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var o=this.getEvents();e.on(o,this),this.once("remove",function(){e.off(o,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});Z.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=p(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=p(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):this},hasLayer:function(t){return p(t)in this._layers},eachLayer:function(t,e){for(var o in this._layers)t.call(e,this._layers[o]);return this},_addLayers:function(t){t=t?S(t)?t:[t]:[];for(var e=0,o=t.length;e<o;e++)this.addLayer(t[e])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[p(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=p(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,o=this._getZoomSpan();for(var s in this._zoomBoundLayers){var c=this._zoomBoundLayers[s].options;t=c.minZoom===void 0?t:Math.min(t,c.minZoom),e=c.maxZoom===void 0?e:Math.max(e,c.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,o!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var jt=Lt.extend({initialize:function(t,e){A(this,e),this._layers={};var o,s;if(t)for(o=0,s=t.length;o<s;o++)this.addLayer(t[o])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){var e=typeof t=="number"?t:this.getLayerId(t);return e in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e=Array.prototype.slice.call(arguments,1),o,s;for(o in this._layers)s=this._layers[o],s[t]&&s[t].apply(s,e);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var o in this._layers)t.call(e,this._layers[o]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return p(t)}}),ea=function(t,e){return new jt(t,e)},Et=jt.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),jt.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),jt.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new ct;for(var e in this._layers){var o=this._layers[e];t.extend(o.getBounds?o.getBounds():o.getLatLng())}return t}}),ia=function(t,e){return new Et(t,e)},Jt=mt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){A(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var o=this._getIconUrl(t);if(!o){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var s=this._createImg(o,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(s,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),s},_setIconStyles:function(t,e){var o=this.options,s=o[e+"Size"];typeof s=="number"&&(s=[s,s]);var c=D(s),f=D(e==="shadow"&&o.shadowAnchor||o.iconAnchor||c&&c.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(o.className||""),f&&(t.style.marginLeft=-f.x+"px",t.style.marginTop=-f.y+"px"),c&&(t.style.width=c.x+"px",t.style.height=c.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return P.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function oa(t){return new Jt(t)}var _e=Jt.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return typeof _e.imagePath!="string"&&(_e.imagePath=this._detectIconPath()),(this.options.imagePath||_e.imagePath)+Jt.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(o,s,c){var f=s.exec(o);return f&&f[c]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=H("div","leaflet-default-icon-path",document.body),e=he(t,"background-image")||he(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e),e)return e;var o=document.querySelector('link[href$="leaflet.css"]');return o?o.href.substring(0,o.href.length-11-1):""}}),dn=xt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Dt(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),B(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&K(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,o=e._map,s=this._marker.options.autoPanSpeed,c=this._marker.options.autoPanPadding,f=Ut(e._icon),m=o.getPixelBounds(),v=o.getPixelOrigin(),w=ht(m.min._subtract(v).add(c),m.max._subtract(v).subtract(c));if(!w.contains(f)){var b=D((Math.max(w.max.x,f.x)-w.max.x)/(m.max.x-w.max.x)-(Math.min(w.min.x,f.x)-w.min.x)/(m.min.x-w.min.x),(Math.max(w.max.y,f.y)-w.max.y)/(m.max.y-w.max.y)-(Math.min(w.min.y,f.y)-w.min.y)/(m.min.y-w.min.y)).multiplyBy(s);o.panBy(b,{animate:!1}),this._draggable._newPos._add(b),this._draggable._startPos._add(b),$(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=st(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(at(this._panRequest),this._panRequest=st(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,o=e._shadow,s=Ut(e._icon),c=e._map.layerPointToLatLng(s);o&&$(o,s),e._latlng=c,t.latlng=c,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){at(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ne=Lt.extend({options:{icon:new _e,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){A(this,e),this._latlng=N(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&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:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=N(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),o=t.icon.createIcon(this._icon),s=!1;o!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(o.title=t.title),o.tagName==="IMG"&&(o.alt=t.alt||"")),B(o,e),t.keyboard&&(o.tabIndex="0",o.setAttribute("role","button")),this._icon=o,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&z(o,"focus",this._panOnFocus,this);var c=t.icon.createShadow(this._shadow),f=!1;c!==this._shadow&&(this._removeShadow(),f=!0),c&&(B(c,e),c.alt=""),this._shadow=c,t.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),c&&f&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&W(this._icon,"focus",this._panOnFocus,this),J(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&J(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&$(this._icon,t),this._shadow&&$(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(B(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),dn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new dn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&_t(this._icon,t),this._shadow&&_t(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,o=e.iconSize?D(e.iconSize):D(0,0),s=e.iconAnchor?D(e.iconAnchor):D(0,0);t.panInside(this._latlng,{paddingTopLeft:s,paddingBottomRight:o.subtract(s)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function na(t,e){return new Ne(t,e)}var Ot=Lt.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return A(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Ze=Ot.extend({options:{fill:!0,radius:10},initialize:function(t,e){A(this,e),this._latlng=N(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=N(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Ot.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,o=this._clickTolerance(),s=[t+o,e+o];this._pxBounds=new j(this._point.subtract(s),this._point.add(s))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ra(t,e){return new Ze(t,e)}var Gi=Ze.extend({initialize:function(t,e,o){if(typeof e=="number"&&(e=i({},o,{radius:e})),A(this,e),this._latlng=N(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new ct(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Ot.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,o=this._map,s=o.options.crs;if(s.distance===St.distance){var c=Math.PI/180,f=this._mRadius/St.R/c,m=o.project([e+f,t]),v=o.project([e-f,t]),w=m.add(v).divideBy(2),b=o.unproject(w).lat,M=Math.acos((Math.cos(f*c)-Math.sin(e*c)*Math.sin(b*c))/(Math.cos(e*c)*Math.cos(b*c)))/c;(isNaN(M)||M===0)&&(M=f/Math.cos(Math.PI/180*e)),this._point=w.subtract(o.getPixelOrigin()),this._radius=isNaN(M)?0:w.x-o.project([b,t-M]).x,this._radiusY=w.y-m.y}else{var I=s.unproject(s.project(this._latlng).subtract([this._mRadius,0]));this._point=o.latLngToLayerPoint(this._latlng),this._radius=this._point.x-o.latLngToLayerPoint(I).x}this._updateBounds()}});function sa(t,e,o){return new Gi(t,e,o)}var Tt=Ot.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){A(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,o=null,s=me,c,f,m=0,v=this._parts.length;m<v;m++)for(var w=this._parts[m],b=1,M=w.length;b<M;b++){c=w[b-1],f=w[b];var I=s(t,c,f,!0);I<e&&(e=I,o=s(t,c,f))}return o&&(o.distance=Math.sqrt(e)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return hn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=N(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new ct,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return gt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],o=gt(t),s=0,c=t.length;s<c;s++)o?(e[s]=N(t[s]),this._bounds.extend(e[s])):e[s]=this._convertLatLngs(t[s]);return e},_project:function(){var t=new j;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new O(t,t);this._rawPxBounds&&(this._pxBounds=new j([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,o){var s=t[0]instanceof V,c=t.length,f,m;if(s){for(m=[],f=0;f<c;f++)m[f]=this._map.latLngToLayerPoint(t[f]),o.extend(m[f]);e.push(m)}else for(f=0;f<c;f++)this._projectLatlngs(t[f],e,o)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var e=this._parts,o,s,c,f,m,v,w;for(o=0,c=0,f=this._rings.length;o<f;o++)for(w=this._rings[o],s=0,m=w.length;s<m-1;s++)v=an(w[s],w[s+1],t,s,!0),v&&(e[c]=e[c]||[],e[c].push(v[0]),(v[1]!==w[s+1]||s===m-2)&&(e[c].push(v[1]),c++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,o=0,s=t.length;o<s;o++)t[o]=nn(t[o],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var o,s,c,f,m,v,w=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,f=this._parts.length;o<f;o++)for(v=this._parts[o],s=0,m=v.length,c=m-1;s<m;c=s++)if(!(!e&&s===0)&&rn(t,v[c],v[s])<=w)return!0;return!1}});function aa(t,e){return new Tt(t,e)}Tt._flat=ln;var Kt=Tt.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return on(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Tt.prototype._convertLatLngs.call(this,t),o=e.length;return o>=2&&e[0]instanceof V&&e[0].equals(e[o-1])&&e.pop(),e},_setLatLngs:function(t){Tt.prototype._setLatLngs.call(this,t),gt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return gt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,o=new O(e,e);if(t=new j(t.min.subtract(o),t.max.add(o)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var s=0,c=this._rings.length,f;s<c;s++)f=en(this._rings[s],t,!0),f.length&&this._parts.push(f)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,o,s,c,f,m,v,w,b;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(f=0,w=this._parts.length;f<w;f++)for(o=this._parts[f],m=0,b=o.length,v=b-1;m<b;v=m++)s=o[m],c=o[v],s.y>t.y!=c.y>t.y&&t.x<(c.x-s.x)*(t.y-s.y)/(c.y-s.y)+s.x&&(e=!e);return e||Tt.prototype._containsPoint.call(this,t,!0)}});function la(t,e){return new Kt(t,e)}var Pt=Et.extend({initialize:function(t,e){A(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=S(t)?t:t.features,o,s,c;if(e){for(o=0,s=e.length;o<s;o++)c=e[o],(c.geometries||c.geometry||c.features||c.coordinates)&&this.addData(c);return this}var f=this.options;if(f.filter&&!f.filter(t))return this;var m=He(t,f);return m?(m.feature=Ve(t),m.defaultOptions=m.options,this.resetStyle(m),f.onEachFeature&&f.onEachFeature(t,m),this.addLayer(m)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&(typeof e=="function"&&(e=e(t.feature)),t.setStyle(e))}});function He(t,e){var o=t.type==="Feature"?t.geometry:t,s=o?o.coordinates:null,c=[],f=e&&e.pointToLayer,m=e&&e.coordsToLatLng||Vi,v,w,b,M;if(!s&&!o)return null;switch(o.type){case"Point":return v=m(s),un(f,t,v,e);case"MultiPoint":for(b=0,M=s.length;b<M;b++)v=m(s[b]),c.push(un(f,t,v,e));return new Et(c);case"LineString":case"MultiLineString":return w=Fe(s,o.type==="LineString"?0:1,m),new Tt(w,e);case"Polygon":case"MultiPolygon":return w=Fe(s,o.type==="Polygon"?1:2,m),new Kt(w,e);case"GeometryCollection":for(b=0,M=o.geometries.length;b<M;b++){var I=He({geometry:o.geometries[b],type:"Feature",properties:t.properties},e);I&&c.push(I)}return new Et(c);case"FeatureCollection":for(b=0,M=o.features.length;b<M;b++){var R=He(o.features[b],e);R&&c.push(R)}return new Et(c);default:throw new Error("Invalid GeoJSON object.")}}function un(t,e,o,s){return t?t(e,o):new Ne(o,s&&s.markersInheritOptions&&s)}function Vi(t){return new V(t[1],t[0],t[2])}function Fe(t,e,o){for(var s=[],c=0,f=t.length,m;c<f;c++)m=e?Fe(t[c],e-1,o):(o||Vi)(t[c]),s.push(m);return s}function Wi(t,e){return t=N(t),t.alt!==void 0?[x(t.lng,e),x(t.lat,e),x(t.alt,e)]:[x(t.lng,e),x(t.lat,e)]}function Ge(t,e,o,s){for(var c=[],f=0,m=t.length;f<m;f++)c.push(e?Ge(t[f],gt(t[f])?0:e-1,o,s):Wi(t[f],s));return!e&&o&&c.length>0&&c.push(c[0].slice()),c}function Xt(t,e){return t.feature?i({},t.feature,{geometry:e}):Ve(e)}function Ve(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var qi={toGeoJSON:function(t){return Xt(this,{type:"Point",coordinates:Wi(this.getLatLng(),t)})}};Ne.include(qi),Gi.include(qi),Ze.include(qi),Tt.include({toGeoJSON:function(t){var e=!gt(this._latlngs),o=Ge(this._latlngs,e?1:0,!1,t);return Xt(this,{type:(e?"Multi":"")+"LineString",coordinates:o})}}),Kt.include({toGeoJSON:function(t){var e=!gt(this._latlngs),o=e&&!gt(this._latlngs[0]),s=Ge(this._latlngs,o?2:e?1:0,!0,t);return e||(s=[s]),Xt(this,{type:(o?"Multi":"")+"Polygon",coordinates:s})}}),jt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(o){e.push(o.toGeoJSON(t).geometry.coordinates)}),Xt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var o=e==="GeometryCollection",s=[];return this.eachLayer(function(c){if(c.toGeoJSON){var f=c.toGeoJSON(t);if(o)s.push(f.geometry);else{var m=Ve(f);m.type==="FeatureCollection"?s.push.apply(s,m.features):s.push(m)}}}),o?Xt(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s}}});function fn(t,e){return new Pt(t,e)}var ha=fn,We=Lt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,o){this._url=t,this._bounds=Q(e),A(this,o)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(B(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){J(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&qt(this._image),this},bringToBack:function(){return this._map&&Yt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Q(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:H("img");if(B(e,"leaflet-image-layer"),this._zoomAnimated&&B(e,"leaflet-zoom-animated"),this.options.className&&B(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onload=l(this.fire,this,"load"),e.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),o=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Rt(this._image,o,e)},_reset:function(){var t=this._image,e=new j(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),o=e.getSize();$(t,e.min),t.style.width=o.x+"px",t.style.height=o.y+"px"},_updateOpacity:function(){_t(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),ca=function(t,e,o){return new We(t,e,o)},pn=We.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:H("video");if(B(e,"leaflet-image-layer"),this._zoomAnimated&&B(e,"leaflet-zoom-animated"),this.options.className&&B(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onloadeddata=l(this.fire,this,"load"),t){for(var o=e.getElementsByTagName("source"),s=[],c=0;c<o.length;c++)s.push(o[c].src);this._url=o.length>0?s:[e.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var f=0;f<this._url.length;f++){var m=H("source");m.src=this._url[f],e.appendChild(m)}}});function da(t,e,o){return new pn(t,e,o)}var mn=We.extend({_initImage:function(){var t=this._image=this._url;B(t,"leaflet-image-layer"),this._zoomAnimated&&B(t,"leaflet-zoom-animated"),this.options.className&&B(t,this.options.className),t.onselectstart=y,t.onmousemove=y}});function ua(t,e,o){return new mn(t,e,o)}var kt=Lt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof V||S(t))?(this._latlng=N(t),A(this,e)):(A(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&_t(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_t(this._container,1),this.bringToFront(),this.options.interactive&&(B(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(_t(this._container,0),this._removeTimeout=setTimeout(l(J,void 0,this._container),200)):J(this._container),this.options.interactive&&(K(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=N(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&qt(this._container),this},bringToBack:function(){return this._map&&Yt(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Et){e=null;var o=this._source._layers;for(var s in o)if(o[s]._map){e=o[s];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)t=e.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof e=="string")t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),o=this._getAnchor();this._zoomAnimated?$(this._container,t.add(o)):e=e.add(t).add(o);var s=this._containerBottom=-e.y,c=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=s+"px",this._container.style.left=c+"px"}},_getAnchor:function(){return[0,0]}});Z.include({_initOverlay:function(t,e,o,s){var c=e;return c instanceof t||(c=new t(s).setContent(e)),o&&c.setLatLng(o),c}}),Lt.include({_initOverlay:function(t,e,o,s){var c=o;return c instanceof t?(A(c,s),c._source=this):(c=e&&!s?e:new t(s,this),c.setContent(o)),c}});var qe=kt.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,kt.prototype.openOn.call(this,t)},onAdd:function(t){kt.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ot||this._source.on("preclick",Nt))},onRemove:function(t){kt.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ot||this._source.off("preclick",Nt))},getEvents:function(){var t=kt.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=H("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),o=this._wrapper=H("div",t+"-content-wrapper",e);if(this._contentNode=H("div",t+"-content",o),fe(e),zi(this._contentNode),z(e,"contextmenu",Nt),this._tipContainer=H("div",t+"-tip-container",e),this._tip=H("div",t+"-tip",this._tipContainer),this.options.closeButton){var s=this._closeButton=H("a",t+"-close-button",e);s.setAttribute("role","button"),s.setAttribute("aria-label","Close popup"),s.href="#close",s.innerHTML='<span aria-hidden="true">×</span>',z(s,"click",function(c){ot(c),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var o=t.offsetWidth;o=Math.min(o,this.options.maxWidth),o=Math.max(o,this.options.minWidth),e.width=o+1+"px",e.whiteSpace="",e.height="";var s=t.offsetHeight,c=this.options.maxHeight,f="leaflet-popup-scrolled";c&&s>c?(e.height=c+"px",B(t,f)):K(t,f),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),o=this._getAnchor();$(this._container,e.add(o))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(he(this._container,"marginBottom"),10)||0,o=this._container.offsetHeight+e,s=this._containerWidth,c=new O(this._containerLeft,-o-this._containerBottom);c._add(Ut(this._container));var f=t.layerPointToContainerPoint(c),m=D(this.options.autoPanPadding),v=D(this.options.autoPanPaddingTopLeft||m),w=D(this.options.autoPanPaddingBottomRight||m),b=t.getSize(),M=0,I=0;f.x+s+w.x>b.x&&(M=f.x+s-b.x+w.x),f.x-M-v.x<0&&(M=f.x-v.x),f.y+o+w.y>b.y&&(I=f.y+o-b.y+w.y),f.y-I-v.y<0&&(I=f.y-v.y),(M||I)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([M,I]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),fa=function(t,e){return new qe(t,e)};Z.mergeOptions({closePopupOnClick:!0}),Z.include({openPopup:function(t,e,o){return this._initOverlay(qe,t,e,o).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),Lt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(qe,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:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Et||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){Zt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof Ot)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ye=kt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){kt.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:function(t){kt.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=kt.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=H("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+p(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,o,s=this._map,c=this._container,f=s.latLngToContainerPoint(s.getCenter()),m=s.layerPointToContainerPoint(t),v=this.options.direction,w=c.offsetWidth,b=c.offsetHeight,M=D(this.options.offset),I=this._getAnchor();v==="top"?(e=w/2,o=b):v==="bottom"?(e=w/2,o=0):v==="center"?(e=w/2,o=b/2):v==="right"?(e=0,o=b/2):v==="left"?(e=w,o=b/2):m.x<f.x?(v="right",e=0,o=b/2):(v="left",e=w+(M.x+I.x)*2,o=b/2),t=t.subtract(D(e,o,!0)).add(M).add(I),K(c,"leaflet-tooltip-right"),K(c,"leaflet-tooltip-left"),K(c,"leaflet-tooltip-top"),K(c,"leaflet-tooltip-bottom"),B(c,"leaflet-tooltip-"+v),$(c,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_t(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),pa=function(t,e){return new Ye(t,e)};Z.include({openTooltip:function(t,e,o){return this._initOverlay(Ye,t,e,o).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Lt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ye,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(!(!t&&this._tooltipHandlersAdded)){var e=t?"off":"on",o={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?o.add=this._openTooltip:(o.mouseover=this._openTooltip,o.mouseout=this.closeTooltip,o.click=this._openTooltip,this._map?this._addFocusListeners():o.add=this._addFocusListeners),this._tooltip.options.sticky&&(o.mousemove=this._moveTooltip),this[e](o),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Et||(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:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&(z(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),z(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var e=t.latlng,o,s;this._tooltip.options.sticky&&t.originalEvent&&(o=this._map.mouseEventToContainerPoint(t.originalEvent),s=this._map.containerPointToLayerPoint(o),e=this._map.layerPointToLatLng(s)),this._tooltip.setLatLng(e)}});var _n=Jt.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&t.tagName==="DIV"?t:document.createElement("div"),o=this.options;if(o.html instanceof Element?(De(e),e.appendChild(o.html)):e.innerHTML=o.html!==!1?o.html:"",o.bgPos){var s=D(o.bgPos);e.style.backgroundPosition=-s.x+"px "+-s.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function ma(t){return new _n(t)}Jt.Default=_e;var ge=Lt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:P.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:function(t){A(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),J(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(qt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Yt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=_(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof O?t:new O(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e=this.getPane().children,o=-t(-1/0,1/0),s=0,c=e.length,f;s<c;s++)f=e[s].style.zIndex,e[s]!==this._container&&f&&(o=t(o,+f));isFinite(o)&&(this.options.zIndex=o+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!P.ielt9){_t(this._container,this.options.opacity);var t=+new Date,e=!1,o=!1;for(var s in this._tiles){var c=this._tiles[s];if(!(!c.current||!c.loaded)){var f=Math.min(1,(t-c.loaded)/200);_t(c.el,f),f<1?e=!0:(c.active?o=!0:this._onOpaqueTile(c),c.active=!0)}}o&&!this._noPrune&&this._pruneTiles(),e&&(at(this._fadeFrame),this._fadeFrame=st(this._updateOpacity,this))}},_onOpaqueTile:y,_initContainer:function(){this._container||(this._container=H("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(t!==void 0){for(var o in this._levels)o=Number(o),this._levels[o].el.children.length||o===t?(this._levels[o].el.style.zIndex=e-Math.abs(t-o),this._onUpdateLevel(o)):(J(this._levels[o].el),this._removeTilesAtZoom(o),this._onRemoveLevel(o),delete this._levels[o]);var s=this._levels[t],c=this._map;return s||(s=this._levels[t]={},s.el=H("div","leaflet-tile-container leaflet-zoom-animated",this._container),s.el.style.zIndex=e,s.origin=c.project(c.unproject(c.getPixelOrigin()),t).round(),s.zoom=t,this._setZoomTransform(s,c.getCenter(),c.getZoom()),y(s.el.offsetWidth),this._onCreateLevel(s)),this._level=s,s}},_onUpdateLevel:y,_onRemoveLevel:y,_onCreateLevel:y,_pruneTiles:function(){if(this._map){var t,e,o=this._map.getZoom();if(o>this.options.maxZoom||o<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)e=this._tiles[t],e.retain=e.current;for(t in this._tiles)if(e=this._tiles[t],e.current&&!e.active){var s=e.coords;this._retainParent(s.x,s.y,s.z,s.z-5)||this._retainChildren(s.x,s.y,s.z,s.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)J(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,o,s){var c=Math.floor(t/2),f=Math.floor(e/2),m=o-1,v=new O(+c,+f);v.z=+m;var w=this._tileCoordsToKey(v),b=this._tiles[w];return b&&b.active?(b.retain=!0,!0):(b&&b.loaded&&(b.retain=!0),m>s?this._retainParent(c,f,m,s):!1)},_retainChildren:function(t,e,o,s){for(var c=2*t;c<2*t+2;c++)for(var f=2*e;f<2*e+2;f++){var m=new O(c,f);m.z=o+1;var v=this._tileCoordsToKey(m),w=this._tiles[v];if(w&&w.active){w.retain=!0;continue}else w&&w.loaded&&(w.retain=!0);o+1<s&&this._retainChildren(c,f,o+1,s)}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return e.minNativeZoom!==void 0&&t<e.minNativeZoom?e.minNativeZoom:e.maxNativeZoom!==void 0&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,o,s){var c=Math.round(e);this.options.maxZoom!==void 0&&c>this.options.maxZoom||this.options.minZoom!==void 0&&c<this.options.minZoom?c=void 0:c=this._clampZoom(c);var f=this.options.updateWhenZooming&&c!==this._tileZoom;(!s||f)&&(this._tileZoom=c,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),c!==void 0&&this._update(t),o||this._pruneTiles(),this._noPrune=!!o),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var o in this._levels)this._setZoomTransform(this._levels[o],t,e)},_setZoomTransform:function(t,e,o){var s=this._map.getZoomScale(o,t.zoom),c=t.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(e,o)).round();P.any3d?Rt(t.el,c,s):$(t.el,c)},_resetGrid:function(){var t=this._map,e=t.options.crs,o=this._tileSize=this.getTileSize(),s=this._tileZoom,c=this._map.getPixelWorldBounds(this._tileZoom);c&&(this._globalTileRange=this._pxBoundsToTileRange(c)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],s).x/o.x),Math.ceil(t.project([0,e.wrapLng[1]],s).x/o.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],s).y/o.x),Math.ceil(t.project([e.wrapLat[1],0],s).y/o.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var e=this._map,o=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),s=e.getZoomScale(o,this._tileZoom),c=e.project(t,this._tileZoom).floor(),f=e.getSize().divideBy(s*2);return new j(c.subtract(f),c.add(f))},_update:function(t){var e=this._map;if(e){var o=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom!==void 0){var s=this._getTiledPixelBounds(t),c=this._pxBoundsToTileRange(s),f=c.getCenter(),m=[],v=this.options.keepBuffer,w=new j(c.getBottomLeft().subtract([v,-v]),c.getTopRight().add([v,-v]));if(!(isFinite(c.min.x)&&isFinite(c.min.y)&&isFinite(c.max.x)&&isFinite(c.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var b in this._tiles){var M=this._tiles[b].coords;(M.z!==this._tileZoom||!w.contains(new O(M.x,M.y)))&&(this._tiles[b].current=!1)}if(Math.abs(o-this._tileZoom)>1){this._setView(t,o);return}for(var I=c.min.y;I<=c.max.y;I++)for(var R=c.min.x;R<=c.max.x;R++){var lt=new O(R,I);if(lt.z=this._tileZoom,!!this._isValidTile(lt)){var et=this._tiles[this._tileCoordsToKey(lt)];et?et.current=!0:m.push(lt)}}if(m.sort(function(dt,$t){return dt.distanceTo(f)-$t.distanceTo(f)}),m.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var vt=document.createDocumentFragment();for(R=0;R<m.length;R++)this._addTile(m[R],vt);this._level.el.appendChild(vt)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var o=this._globalTileRange;if(!e.wrapLng&&(t.x<o.min.x||t.x>o.max.x)||!e.wrapLat&&(t.y<o.min.y||t.y>o.max.y))return!1}if(!this.options.bounds)return!0;var s=this._tileCoordsToBounds(t);return Q(this.options.bounds).overlaps(s)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,o=this.getTileSize(),s=t.scaleBy(o),c=s.add(o),f=e.unproject(s,t.z),m=e.unproject(c,t.z);return[f,m]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),o=new ct(e[0],e[1]);return this.options.noWrap||(o=this._map.wrapLatLngBounds(o)),o},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),o=new O(+e[0],+e[1]);return o.z=+e[2],o},_removeTile:function(t){var e=this._tiles[t];e&&(J(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){B(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=y,t.onmousemove=y,P.ielt9&&this.options.opacity<1&&_t(t,this.options.opacity)},_addTile:function(t,e){var o=this._getTilePos(t),s=this._tileCoordsToKey(t),c=this.createTile(this._wrapCoords(t),l(this._tileReady,this,t));this._initTile(c),this.createTile.length<2&&st(l(this._tileReady,this,t,null,c)),$(c,o),this._tiles[s]={el:c,coords:t,current:!0},e.appendChild(c),this.fire("tileloadstart",{tile:c,coords:t})},_tileReady:function(t,e,o){e&&this.fire("tileerror",{error:e,tile:o,coords:t});var s=this._tileCoordsToKey(t);o=this._tiles[s],o&&(o.loaded=+new Date,this._map._fadeAnimated?(_t(o.el,0),at(this._fadeFrame),this._fadeFrame=st(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),e||(B(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),P.ielt9||!this._map._fadeAnimated?st(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?g(t.x,this._wrapX):t.x,this._wrapY?g(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new j(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function _a(t){return new ge(t)}var Qt=ge.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=A(this,e),e.detectRetina&&P.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var o=document.createElement("img");return z(o,"load",l(this._tileOnLoad,this,e,o)),z(o,"error",l(this._tileOnError,this,e,o)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(o.referrerPolicy=this.options.referrerPolicy),o.alt="",o.src=this.getTileUrl(t),o},getTileUrl:function(t){var e={r:P.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=o),e["-y"]=o}return C(this._url,i(e,this.options))},_tileOnLoad:function(t,e){P.ielt9?setTimeout(l(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,o){var s=this.options.errorTileUrl;s&&e.getAttribute("src")!==s&&(e.src=s),t(o,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,o=this.options.zoomReverse,s=this.options.zoomOffset;return o&&(t=e-t),t+s},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=y,e.onerror=y,!e.complete)){e.src=q;var o=this._tiles[t].coords;J(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:o})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",q),ge.prototype._removeTile.call(this,t)},_tileReady:function(t,e,o){if(!(!this._map||o&&o.getAttribute("src")===q))return ge.prototype._tileReady.call(this,t,e,o)}});function gn(t,e){return new Qt(t,e)}var vn=Qt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var o=i({},this.defaultWmsParams);for(var s in e)s in this.options||(o[s]=e[s]);e=A(this,e);var c=e.detectRetina&&P.retina?2:1,f=this.getTileSize();o.width=f.x*c,o.height=f.y*c,this.wmsParams=o},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Qt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),o=this._crs,s=ht(o.project(e[0]),o.project(e[1])),c=s.min,f=s.max,m=(this._wmsVersion>=1.3&&this._crs===cn?[c.y,c.x,f.y,f.x]:[c.x,c.y,f.x,f.y]).join(","),v=Qt.prototype.getTileUrl.call(this,t);return v+U(this.wmsParams,v,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+m},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function ga(t,e){return new vn(t,e)}Qt.WMS=vn,gn.wms=ga;var Ct=Lt.extend({options:{padding:.1},initialize:function(t){A(this,t),p(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),B(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var o=this._map.getZoomScale(e,this._zoom),s=this._map.getSize().multiplyBy(.5+this.options.padding),c=this._map.project(this._center,e),f=s.multiplyBy(-o).add(c).subtract(this._map._getNewPixelOrigin(t,e));P.any3d?Rt(this._container,f,o):$(this._container,f)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),o=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new j(o,o.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),yn=Ct.extend({options:{tolerance:0},getEvents:function(){var t=Ct.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ct.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");z(t,"mousemove",this._onMouseMove,this),z(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),z(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){at(this._redrawRequest),delete this._ctx,J(this._container),W(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ct.prototype._update.call(this);var t=this._bounds,e=this._container,o=t.getSize(),s=P.retina?2:1;$(e,t.min),e.width=s*o.x,e.height=s*o.y,e.style.width=o.x+"px",e.style.height=o.y+"px",P.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Ct.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[p(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,o=e.next,s=e.prev;o?o.prev=s:this._drawLast=s,s?s.next=o:this._drawFirst=o,delete t._order,delete this._layers[p(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),o=[],s,c;for(c=0;c<e.length;c++){if(s=Number(e[c]),isNaN(s))return;o.push(s)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||st(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new j,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var o=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,o.x,o.y),this._ctx.clip()}this._drawing=!0;for(var s=this._drawFirst;s;s=s.next)t=s.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var o,s,c,f,m=t._parts,v=m.length,w=this._ctx;if(v){for(w.beginPath(),o=0;o<v;o++){for(s=0,c=m[o].length;s<c;s++)f=m[o][s],w[s?"lineTo":"moveTo"](f.x,f.y);e&&w.closePath()}this._fillStroke(w,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,o=this._ctx,s=Math.max(Math.round(t._radius),1),c=(Math.max(Math.round(t._radiusY),1)||s)/s;c!==1&&(o.save(),o.scale(1,c)),o.beginPath(),o.arc(e.x,e.y/c,s,0,Math.PI*2,!1),c!==1&&o.restore(),this._fillStroke(o,t)}},_fillStroke:function(t,e){var o=e.options;o.fill&&(t.globalAlpha=o.fillOpacity,t.fillStyle=o.fillColor||o.color,t.fill(o.fillRule||"evenodd")),o.stroke&&o.weight!==0&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=o.opacity,t.lineWidth=o.weight,t.strokeStyle=o.color,t.lineCap=o.lineCap,t.lineJoin=o.lineJoin,t.stroke())},_onClick:function(t){for(var e=this._map.mouseEventToLayerPoint(t),o,s,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(o))&&(s=o);this._fireEvent(s?[s]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(K(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var o,s,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(e)&&(s=o);s!==this._hoveredLayer&&(this._handleMouseOut(t),s&&(B(this._container,"leaflet-interactive"),this._fireEvent([s],t,"mouseover"),this._hoveredLayer=s)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,o){this._map._fireDOMEvent(e,o||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var o=e.next,s=e.prev;if(o)o.prev=s;else return;s?s.next=o:o&&(this._drawFirst=o),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}},_bringToBack:function(t){var e=t._order;if(e){var o=e.next,s=e.prev;if(s)s.next=o;else return;o?o.prev=s:s&&(this._drawLast=s),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function Ln(t){return P.canvas?new yn(t):null}var ve=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),va={_initContainer:function(){this._container=H("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ct.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=ve("shape");B(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=ve("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;J(e),t.removeInteractiveTarget(e),delete this._layers[p(t)]},_updateStyle:function(t){var e=t._stroke,o=t._fill,s=t.options,c=t._container;c.stroked=!!s.stroke,c.filled=!!s.fill,s.stroke?(e||(e=t._stroke=ve("stroke")),c.appendChild(e),e.weight=s.weight+"px",e.color=s.color,e.opacity=s.opacity,s.dashArray?e.dashStyle=S(s.dashArray)?s.dashArray.join(" "):s.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=s.lineCap.replace("butt","flat"),e.joinstyle=s.lineJoin):e&&(c.removeChild(e),t._stroke=null),s.fill?(o||(o=t._fill=ve("fill")),c.appendChild(o),o.color=s.fillColor||s.color,o.opacity=s.fillOpacity):o&&(c.removeChild(o),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),o=Math.round(t._radius),s=Math.round(t._radiusY||o);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+o+","+s+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){qt(t._container)},_bringToBack:function(t){Yt(t._container)}},je=P.vml?ve:xo,ye=Ct.extend({_initContainer:function(){this._container=je("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=je("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){J(this._container),W(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ct.prototype._update.call(this);var t=this._bounds,e=t.getSize(),o=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,o.setAttribute("width",e.x),o.setAttribute("height",e.y)),$(o,t.min),o.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=je("path");t.options.className&&B(e,t.options.className),t.options.interactive&&B(e,"leaflet-interactive"),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){J(t._path),t.removeInteractiveTarget(t._path),delete this._layers[p(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,o=t.options;e&&(o.stroke?(e.setAttribute("stroke",o.color),e.setAttribute("stroke-opacity",o.opacity),e.setAttribute("stroke-width",o.weight),e.setAttribute("stroke-linecap",o.lineCap),e.setAttribute("stroke-linejoin",o.lineJoin),o.dashArray?e.setAttribute("stroke-dasharray",o.dashArray):e.removeAttribute("stroke-dasharray"),o.dashOffset?e.setAttribute("stroke-dashoffset",o.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),o.fill?(e.setAttribute("fill",o.fillColor||o.color),e.setAttribute("fill-opacity",o.fillOpacity),e.setAttribute("fill-rule",o.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,ko(t._parts,e))},_updateCircle:function(t){var e=t._point,o=Math.max(Math.round(t._radius),1),s=Math.max(Math.round(t._radiusY),1)||o,c="a"+o+","+s+" 0 1,0 ",f=t._empty()?"M0 0":"M"+(e.x-o)+","+e.y+c+o*2+",0 "+c+-o*2+",0 ";this._setPath(t,f)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){qt(t._path)},_bringToBack:function(t){Yt(t._path)}});P.vml&&ye.include(va);function wn(t){return P.svg||P.vml?new ye(t):null}Z.include({getRenderer:function(t){var 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:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Ln(t)||wn(t)}});var bn=Kt.extend({initialize:function(t,e){Kt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=Q(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function ya(t,e){return new bn(t,e)}ye.create=je,ye.pointsToPath=ko,Pt.geometryToLayer=He,Pt.coordsToLatLng=Vi,Pt.coordsToLatLngs=Fe,Pt.latLngToCoords=Wi,Pt.latLngsToCoords=Ge,Pt.getFeature=Xt,Pt.asFeature=Ve,Z.mergeOptions({boxZoom:!0});var xn=xt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){z(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){W(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){J(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ce(),Ei(),this._startPoint=this._map.mouseEventToContainerPoint(t),z(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=H("div","leaflet-zoom-box",this._container),B(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new j(this._point,this._startPoint),o=e.getSize();$(this._box,e.min),this._box.style.width=o.x+"px",this._box.style.height=o.y+"px"},_finish:function(){this._moved&&(J(this._box),K(this._container,"leaflet-crosshair")),de(),Ti(),W(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var e=new ct(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Z.addInitHook("addHandler","boxZoom",xn),Z.mergeOptions({doubleClickZoom:!0});var kn=xt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,o=e.getZoom(),s=e.options.zoomDelta,c=t.originalEvent.shiftKey?o-s:o+s;e.options.doubleClickZoom==="center"?e.setZoom(c):e.setZoomAround(t.containerPoint,c)}});Z.addInitHook("addHandler","doubleClickZoom",kn),Z.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var An=xt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Dt(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))}B(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){K(this._map._container,"leaflet-grab"),K(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=Q(this._map.options.maxBounds);this._offsetLimit=ht(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,o=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(o),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){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:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var 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:function(){var t=this._worldWidth,e=Math.round(t/2),o=this._initialWorldOffset,s=this._draggable._newPos.x,c=(s-e+o)%t+e-o,f=(s+e+o)%t-e-o,m=Math.abs(c+o)<Math.abs(f+o)?c:f;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=m},_onDragEnd:function(t){var e=this._map,o=e.options,s=!o.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),s)e.fire("moveend");else{this._prunePositions(+new Date);var c=this._lastPos.subtract(this._positions[0]),f=(this._lastTime-this._times[0])/1e3,m=o.easeLinearity,v=c.multiplyBy(m/f),w=v.distanceTo([0,0]),b=Math.min(o.inertiaMaxSpeed,w),M=v.multiplyBy(b/w),I=b/(o.inertiaDeceleration*m),R=M.multiplyBy(-I/2).round();!R.x&&!R.y?e.fire("moveend"):(R=e._limitOffset(R,e.options.maxBounds),st(function(){e.panBy(R,{duration:I,easeLinearity:m,noMoveStart:!0,animate:!0})}))}}});Z.addInitHook("addHandler","dragging",An),Z.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Mn=xt.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),z(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),W(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,o=t.scrollTop||e.scrollTop,s=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e=this._panKeys={},o=this.keyCodes,s,c;for(s=0,c=o.left.length;s<c;s++)e[o.left[s]]=[-1*t,0];for(s=0,c=o.right.length;s<c;s++)e[o.right[s]]=[t,0];for(s=0,c=o.down.length;s<c;s++)e[o.down[s]]=[0,t];for(s=0,c=o.up.length;s<c;s++)e[o.up[s]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},o=this.keyCodes,s,c;for(s=0,c=o.zoomIn.length;s<c;s++)e[o.zoomIn[s]]=t;for(s=0,c=o.zoomOut.length;s<c;s++)e[o.zoomOut[s]]=-t},_addHooks:function(){z(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){W(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,o=this._map,s;if(e in this._panKeys){if(!o._panAnim||!o._panAnim._inProgress)if(s=this._panKeys[e],t.shiftKey&&(s=D(s).multiplyBy(3)),o.options.maxBounds&&(s=o._limitOffset(D(s),o.options.maxBounds)),o.options.worldCopyJump){var c=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(s)));o.panTo(c)}else o.panBy(s)}else if(e in this._zoomKeys)o.setZoom(o.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e===27&&o._popup&&o._popup.options.closeOnEscapeKey)o.closePopup();else return;Zt(t)}}});Z.addInitHook("addHandler","keyboard",Mn),Z.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var En=xt.extend({addHooks:function(){z(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){W(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ko(t),o=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(o-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),s),Zt(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),o=this._map.options.zoomSnap||0;t._stop();var s=this._delta/(this._map.options.wheelPxPerZoomLevel*4),c=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,f=o?Math.ceil(c/o)*o:c,m=t._limitZoom(e+(this._delta>0?f:-f))-e;this._delta=0,this._startTime=null,m&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+m):t.setZoomAround(this._lastMousePos,e+m))}});Z.addInitHook("addHandler","scrollWheelZoom",En);var La=600;Z.mergeOptions({tapHold:P.touchNative&&P.safari&&P.mobile,tapTolerance:15});var Tn=xt.extend({addHooks:function(){z(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){W(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new O(e.clientX,e.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(z(document,"touchend",ot),z(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),La),z(document,"touchend touchcancel contextmenu",this._cancel,this),z(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){W(document,"touchend",ot),W(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),W(document,"touchend touchcancel contextmenu",this._cancel,this),W(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new O(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var o=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});o._simulated=!0,e.target.dispatchEvent(o)}});Z.addInitHook("addHandler","tapHold",Tn),Z.mergeOptions({touchZoom:P.touch,bounceAtZoomLimits:!0});var Pn=xt.extend({addHooks:function(){B(this._map._container,"leaflet-touch-zoom"),z(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){K(this._map._container,"leaflet-touch-zoom"),W(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var o=e.mouseEventToContainerPoint(t.touches[0]),s=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(o.add(s)._divideBy(2))),this._startDist=o.distanceTo(s),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),z(document,"touchmove",this._onTouchMove,this),z(document,"touchend touchcancel",this._onTouchEnd,this),ot(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,o=e.mouseEventToContainerPoint(t.touches[0]),s=e.mouseEventToContainerPoint(t.touches[1]),c=o.distanceTo(s)/this._startDist;if(this._zoom=e.getScaleZoom(c,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&c<1||this._zoom>e.getMaxZoom()&&c>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,c===1)return}else{var f=o._add(s)._divideBy(2)._subtract(this._centerPoint);if(c===1&&f.x===0&&f.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(f),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),at(this._animRequest);var m=l(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=st(m,this,!0),ot(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,at(this._animRequest),W(document,"touchmove",this._onTouchMove,this),W(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Z.addInitHook("addHandler","touchZoom",Pn),Z.BoxZoom=xn,Z.DoubleClickZoom=kn,Z.Drag=An,Z.Keyboard=Mn,Z.ScrollWheelZoom=En,Z.TapHold=Tn,Z.TouchZoom=Pn,n.Bounds=j,n.Browser=P,n.CRS=Mt,n.Canvas=yn,n.Circle=Gi,n.CircleMarker=Ze,n.Class=mt,n.Control=yt,n.DivIcon=_n,n.DivOverlay=kt,n.DomEvent=Us,n.DomUtil=Bs,n.Draggable=Dt,n.Evented=re,n.FeatureGroup=Et,n.GeoJSON=Pt,n.GridLayer=ge,n.Handler=xt,n.Icon=Jt,n.ImageOverlay=We,n.LatLng=V,n.LatLngBounds=ct,n.Layer=Lt,n.LayerGroup=jt,n.LineUtil=Xs,n.Map=Z,n.Marker=Ne,n.Mixin=Ws,n.Path=Ot,n.Point=O,n.PolyUtil=qs,n.Polygon=Kt,n.Polyline=Tt,n.Popup=qe,n.PosAnimation=Xo,n.Projection=Qs,n.Rectangle=bn,n.Renderer=Ct,n.SVG=ye,n.SVGOverlay=mn,n.TileLayer=Qt,n.Tooltip=Ye,n.Transformation=mi,n.Util=Ce,n.VideoOverlay=pn,n.bind=l,n.bounds=ht,n.canvas=Ln,n.circle=sa,n.circleMarker=ra,n.control=pe,n.divIcon=ma,n.extend=i,n.featureGroup=ia,n.geoJSON=fn,n.geoJson=ha,n.gridLayer=_a,n.icon=oa,n.imageOverlay=ca,n.latLng=N,n.latLngBounds=Q,n.layerGroup=ea,n.map=Ns,n.marker=na,n.point=D,n.polygon=la,n.polyline=aa,n.popup=fa,n.rectangle=ya,n.setOptions=A,n.stamp=p,n.svg=wn,n.svgOverlay=ua,n.tileLayer=gn,n.tooltip=pa,n.transformation=se,n.version=h,n.videoOverlay=da;var wa=window.L;n.noConflict=function(){return window.L=wa,this},window.L=n}))})(te,te.exports)),te.exports}var X=Ji();const we=ft({__proto__:null,default:zn(X)},[X]),Rn='.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}',Un=`.leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbvSURBVHic7dtdbBxXFQfw/9nZ3SRKwAP7UFFUQOoHqGnUoEAoNghX9tyxVcpD1X0J+WgiUQmpfUB5ACSgG1qJIKASqBIUIauqAbWseIlqb+bOWHVR6y0FKZBEqdIUQROIREGRx3FFvR/38ODZst3a3nE8Ywfv+T2t7hzdM3fle/bOnWtACCGEEEIIIYQQQgghhBBCCCGEEEIIIcRa0EbfgBDdFItFKwzDAa3175LuWylVAvBIR/MxrXUp6Vxx9dp4VyObVEdKKW591lonXgiVUg6AHzPzk9ls9meVSmUh6RzXkz179uQKhcIgM+8CACI6U6vVnp+enm6knXt4ePiuTCbzWQAwxlSDIHg57ZwroDAMnwKwz3XdBzzPG08hxzsTNprQG2lTjtd13WFmfghAP4A+AJcATFiW9YNKpfL3uP0kUliiX4SG1pqUUpx0wXJd9/PMXAGwPWq6yMyPz8/P/7xarf4nyVwt7QV4JWkU52i8YwBu6bh0wRhzJAiCF5POCQCDg4N2Pp//NYDRjkuTxph9QRCESeYrFov5ubm5R5n5AIAPtV1aYOb7BgYGTpZKJeO67lFmPsbM9/i+/8Ja8y6zylhOYquPXhsvAJRKpczMzMwTAIaJ6LFGo+HNzs5eKRQKNxPRAWb+CoAjWuvn4vS35skWFasxAAdbbUlOYqVUPwAPwI4lLr8J4KeWZT1eqVTmksoZ5d2QghUVKx/AlmVCFph5yPf9l5LMCwBKqUksFqszRHQcAJj5GwB2MfOE7/tfTDKf4zjHiejrAE4CuNhqZ+bf2rY9FYbhGBH92/O8o47j3Oj7/uUk86+3XhsvACilHmPmgW3btn3pxIkTVzuvj4yMfNoY85wxZiQIglPd+lvTZIuq5xiAQwCe6evr218ul5tr6bNd9GiiAbyvS+hFrfVHk8oLbEzBih4Dz+G9K6t3IaLXFhYWdib5eBh911UA8wBu1lq/CQBDQ0M3WJb1OoAdRPQZz/NeSSqnUuofAKpa6/vb26MfwacA7AdwFcCdWuu/JpU3yl1C91VHoquNXhvvyMjIx4wxr1iWtbNSqfxruTjHcR4AcMj3/bu79XnNe1hpFyvHcXYT0QS6FysASHR1tVEKhcIguhQrAGDm23K53BcATCWV27KsAWYGgPOtYgUAU1NT/1RKnQewxxjzOQCJFSwANwI4297QtmLfD+AtZr43m83OJ5iz3bGU+l1OT43XGFNk5mdXKlYAYNv2eBiG31dK3aS1vrRSbOZabqRYLFppFisAIKJxAB+MGf56krk30O64gZlMJnZsHMxsoo8fHxoauqHVHn3+BAAQUaxV57Xq2F54i5nvIaJXm81mYoX5etID491JRH/sFlQul5tEdMoYc3u32FUXrLYvObViBQDM/MQqwi8knX8jEJHpHrXIGJNo8WDm1spph2VZgeu6+5RSX7YsK8D/Xnb8Psmcnebm5h7G4uS9ysxutOH8VQC70sy7UTb7eImImTnWlgkzUyaT6fr3v6qC1fGL8EytVjuQRrECANu2fwHg1TixzPyXNO5hvTHz6VWE/znJ3L7vzxBRa9PzDmb+FYBfArgjajvd39+f9vGGKwACZh5te6mwmc8KburxMvO5TCbzqW5xxWLRArDbsqyu8z32HtZSxSrNM0Hlcrnpum6JmZ+NEb4pHglrtdrz+Xz+AoBbu4Ser9fra37d3YEBfBvAkq+XmfmbpVIp9grwWnie9zSAp9PMcT3Z7OPNZrO/aTQaf1BKfbd9X7RTGIaHmPlcnPNYsVZYSikOw7AB4CAzj/f19e1fjwOMnueVEeMxJJfLbYqCNT093TDGHAGw0qHYBQBH0vj+Pc+bYOb3HFRk5nHf9yeTzgfgMhF9uEvMTQD+71/vR3pqvJOTk28AeBJAeXR09P1LxbiuuxfA9wB8LU6fsVdYrUOhtm0fTusxcAlMRN+KziUt5SqAM3v37r00OZnGfFp/QRC86DjOUCaTGWPm2zoun8fiIbuZtPLX6/UH8/n8rQDuippertfrD6aRKyqOR5VS81ji8Z+IbmfmgwB+mEb+9dZr4wWA/v7+R6rV6k+azeYpx3EezeVyJ7dv335lfn7+lkajcZCZDzPzYd/3/xSnv9gFq3UuaR2LFQDA87xAKVUB8BEAZ6N9nrNEdEZr/TcArLVOPG8aJ9jj8n3/pcHBwZ1btmx5519zmPl0vV5/Ie2V7fT09Nujo6Nus9kcA4CtW7ce1lq/nUYu27a/Mzs7CyI6gMVX/u/CzJeZ+Ue2bcc9pb1aXc8lJZms18YLANE2wkOu694N4OFGo3E8DMMPAHiDiCaY+ZOb4YCsEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhEjYfwGO+b5dFNs4OgAAAABJRU5ErkJggg==);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA16SURBVHic7d1/jBxneQfw7zNzvotdn+9sVQkxoRKoammBqqpbk6uT5mLfvHPn42yn1VFRVCEhoFH5IYpoSaUCKi1NcGkcfrbCVRFKEwG2aHLn83pmLvY2CTqT1AmCOBE0EOT4B0nBPw/snb2dp3/sLr6s77i923dud/a+H8ny7tzMo8f3eud99p133gGIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiFYGaXYCRETUPMYYrWe/MAzZX2QQ27d5OpqdABFROxgZGVlz5cqVrzuOc18QBJPNzofsYvvSYrVcgTVftZ2l6npgYODXHMc5oKoHHcfZHQTB2WbnRETpGRkZWVMoFA6IyO2qutX3/R1Z64TnO8fWOwLSzti+mSKDg4M3l0qlnSJyG4CbAFwP4ByAlwE8paoPX3fddcH4+PjP00yk5QqsrDPGvAZAHsBrReRNqvpeY8x/iMg9QRCcaXJ6ZIHv+xtUdReAHQBej/IHGABOAnhORMY6OjoempiYONe0JC3zPM84jjOqqrfi6r/3RQCPAdgXhmHUvOyaa3R01L1w4cJBALdVNq1W1THP87woir7ZzNyocWzf7PA8b4uI7E6S5A9Frqknb6j8eZOIvKNQKPzU9/1/dhznvlwuV0gjn5YbFapW09Vqu/Z9K9u2bdsNruvmUe50axUAfMV13X/I5XInlzcze2x/28lCu1b19fWt7u7u/hCAvwGwboHdL6jq7unp6T1TU1OXlyG9VAwODv5mkiR7Ady6wK6Plkqldz/yyCPfX468bBkaGuqamZm5E8DbReQNANYscMiLIrI1CILnZ280xrwHwL+hck4VkacBDLTS6HVaIxWt/Blm+zauldu3atOmTas2bNjwWRG5s7LplKp+VUQOuq77/bVr17589uzZ9SKy0XGcAVUdFZE/qOx7zHXdXWn0yy31i6sMw/4MyF6BZYy5XlWPiMhvL7BrrKpfcxznE7Uf4ixYqQWW53kbATw060NZr28nSbJzcnLyRBp5pcnzvNtE5CEAvXUecg7ArjAMH00xLWuGhoZuKpVKEwB+p85DXnRd9/ZcLvcDAOjv778un88XAChwtRMWkW+jxTpfYOV1wGxfO1q1fav6+vpWr1u3blxVtwH4uar+/fT09OcW+mJrjBkBcC+AXwdwBoAJw/AZm7m1zC+uUlyNA9g6189buZH7+/t/tbOz8wiANy7isKKqftV13U8eOnToe2nlZttKLLAqJ+qjAF69xBAnZ2Zmbj58+PApm3mlqTJydRTXFldHAUxVXvcBuLnm5+dU9c1RFP1v2jk2YmhoqKtUKj2B+jvfE0mS3D45OflD4OqcHADPh2H4F6h0wp7nva1YLOby+fz5dDKnerB9Vwzxff8BVX0bgFMAdoZheKzeg4eHh9cXi8WvAfAAvOC67ptzudz/WUvOVqBGVO7OmBCR/vn2adWOuL+/v7ezs3MSwKYlhkgAHBSRjwdB8JTF1FKx0gqsymXBxwH8XoOh/ieO41vz+fwVG3mlzRjzKF55WfA8gD8LwzA3ez/P87aLyIMAeqrbVDUfRdHty5Pp0hhjPgDgM9X3qnq/iNwPYM5RCdd1T1RPvLM63+q/ce/sTpiaj+27Mvi+f6eq/iuAi67r9uVyuWcXG6NSjB8B0KeqE1EUvcVWfk3v3OYZuXosjuPt+Xx+ull51WNgYKBHRKIlXDaaS6Kq+6Mo+lMLsVKz0gosz/M+KiKfsBTub8MwvMdSrNQYYzwAYc3m7bXFVZXv+8OqemD2NlUdiKLokbRybJQx5lsANlfefi4Mww/UedyvADgI4I9mbxeRDwdB8C92s0yHrc9wK3922b6Na+X2BYD+/v61nZ2dz6M8cX00DMP9S421ffv2V83MzDwHoNfmucuxEWSpslxcjYyMrHEcZ8xScQUAjoj8vqVYZIHv+xtE5MMWQ941PDy83mK8VIjIW2s2HZ2vuAKAIAgmADyxQIxWM3uu5J56DhgZGVkDYBw1nS+ApwB82VJeZAfbt82tWrXqPSgXV481UlwBwMGDB3+sqncDgIh81EZ+QBMLrKwXV5Uh5NoPYqMyN+m9nanqHVj4bsHF6InjeKfFeKmoLMUw+/2Ct6KLyOM1m2x/NmxbW30RhuGPFtp5jstGVU+JiNdqE57rEYahzB6lWOz7Fsf2be/2hYj8SeXlvTbiFYvFLwK4DOAWY8z1NmI2pcDKcnE1OjraWSgU9uPaD2LDRKSlJwavQCO2A4rIDtsxU7BxsQeoau2Jeak3BDTDL72kUm/n63neaFoJUkPYvm3G9/0NKN9gc7mrq6t2OsOSVGqPSQCuiAzaiLnsBVaWiysAuHDhwn4AQ2nEVtUfpBGXluwNKcRcaBmPVpDMfiMiW+o4pnafZM69MmYxnW9lsj9lCNs3m1T1tSjXL89aXo39WCX+62wEW9YCK+vFVcXLKcbmJcLW8qoUYmZhZOfFmvc3e563fb6djTFvwdUJxfPFyJx6O1/f999a6Xz5ZIwMYftm2o2Vv60+HUVETldeLnoUfy7LVmC1SXEFVf0YgFSeX5QkCQus9tfyIzsicnSObQ/6vj9cu71SXP1nPTGyplAo5FDT+arqk3Ecb5s9J0dV2flmENs3u0REgTmnJjRkVjwrd2Iuy3+adimuACCKotPGmC8A+GvLoZOZmZkXLMekBojIaVX9DcthTy+8S3MlSTIuIu+q2dyjqgeMMU8A+CYAUdUtAOa8izZJkvG081wG19xN5jjO4ByLTLrLlRBZxfbNrjMAICI3LrTjIlVHrqyMjKU+gtVOxVVVHMf/hHkWrGvAiawsQrlSqOqiF61rRkzbOjo6AsxfCG4G8FcAPvhLlih5qVgsWpl42kIyezcZ1YXtmy0/QvlqwG9V1i6zZRMAiIiV+dCpFljtWFwBQOUbzqcth+XlwdZjfRRGRMZsx7St8mT5zzcQ4r52+LKgqp9S1U8B+GTtZSPKPrZvdlXaagrAalU1NmJWCrVtAEqO4xyyETO1S4TtWlxVXbp06b7u7u6/BHCTjXiqygKrxYjIQ6p6L2Y9BqZB51etWtXyBRYAuK77hVKp9H5cnUxarzOu634xjZyWWxRFdzU7B0oP2zfbVPUbIrLFcZwPAfivRuOJyPtUdbWq5m09jzCVEax2L64AYGpq6rKq/qOteI7jsMBqMUEQnFXV3bbiqerdExMT52zFS1Mul7soIovugETkI7lc7mIaORERVRWLxS8BeElVb/F9v6EnR/i+f6Oq3gUAjuPYejSavQLLGKPVP4VC4Wd4ZXF1pKura7Bdiquq3t7efwfwnKVwLLBa0PT09B5U1kZp0BPFYvGzFuIsmyAI7kf5uWz1OhgEwTV3FLaoX5yLKosWLknNsZcayohsYvu2uUo98TEAUNW9vu8vad3CoaGhLlX9BoBeAONBEByxleNyLNPwWBzHOywvBtYS9u3bV1LVj1sKxwKrBU1NTV12XXcXgFMNhDmpqndkcF6SisifAzhRx76n4jh+Byzd3rwMjldfqOqSV+xPkmT2yvzH592RlhvbdwUIw3AvgAcArFPVcHBwcFHPBvZ9f0OpVDqA8qrwL8Rx/E6b+VkvsGqfZ9ROlwXnEkXRfgDfajCMXrx48Yc28iH7crncSVXdrKpPLvZYEXk6SZItURS1/PIMcwmC4KzjOCMAam9dn+0SgJ35fP4ny5SWDQ/Mer3HGLPoTtgYMyIiv3gOmqpmZfRuJWD7rgwax/G7UH7EzcYkSf7bGHNXX1/f6oUO9H1/Z+WcPoDysgw7bJ/DUl8Hq52LqwoVkb9T1WiRx8UoX158RlWfnJqaupxCbmRJFEWn+/r6buvu7v4ggI9g4Ynv50XknkKh8JkMjly9wqFDh77j+/6oqo4BqD1xXRaRPw6CwMZl1GXjuu6XSqXSOwH8LoD1AMaMMecA1PtF53WV4wCUC+menp699jOlpWD7rhz5fP5Kf3//UFdX132q+l4Ad3d3d7/fGPN1EZlQ1e/19PS8dPbs2fWu694kIgOqOqqqm4Dy4rKlUumOw4cPN3KVYk7WVkE1xsx5aSBLT+duhDEmQrkSnssZlIeXnxWRY6p6PI7j41nveFeq4eHh9XEc7xSRnQBej6t3kp5EuWh+OI7jh+dYsDDTfN/frKrjAKpPmv9pkiS7JicnH29mXku1devWV3d0dBxAuRNeMhF5ulgsjqRxgk7DfOfqxWr1czvbtzGt3r5zGRwc7FPV3ap6y0L7ishPAHx63bp1e/bt2xenkQ8LLEuMMZtE5JCqfhfAMwCeSZLkO2vWrDk+NjbGyZHUFjzP2yginwcAVX1fVi99Vo2OjnaeP3/+3SLydgBvBNBd56GXAHxXVR/s7e3dm9YJOg0rqQNm+y5dFtp3HmKM2QxgF8qr9b8GwA0AzgH4MYBjIjJ28eLFkFeOiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhWgv8Hnffz4dmwY9cAAAAASUVORK5CYII=);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e")}.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#fff;font:11px/19px Helvetica Neue,Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:#00000080;border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px Helvetica Neue,Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:#00000080;border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:#fe57a11a;border:4px dashed rgba(254,87,161,.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}`,Nn=".leaflet-ruler{height:35px;width:35px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center}.leaflet-ruler:hover{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=)}.leaflet-ruler-clicked{height:35px;width:35px;background-repeat:no-repeat;background-position:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=);border-color:#7fff00!important}.leaflet-bar{background-color:#fff}.leaflet-control{cursor:pointer}.result-tooltip{background-color:#fff;border-width:medium;border-color:#de0000;font-size:smaller}.moving-tooltip{background-color:#ffffffb3;background-clip:padding-box;opacity:.5;border:dotted;border-color:red;font-size:smaller}.plus-length{padding-left:45px}",Zn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Hn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Fn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Gn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='430'%20height='430'%20style='width:100%25;height:100%25;transform:translate3d(0,0,0);content-visibility:visible'%20viewBox='0%200%20430%20430'%3e%3cdefs%3e%3cclipPath%20id='i'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='s'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='e'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='p'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='f'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='m'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='g'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='j'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='h'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cfilter%20id='t'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='r'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'%20stdDeviation='52.5%2052.5'/%3e%3c/filter%3e%3cfilter%20id='n'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='k'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cmask%20id='u'%20mask-type='alpha'%3e%3cuse%20xmlns:ns1='http://www.w3.org/1999/xlink'%20ns1:href='%23a'/%3e%3c/mask%3e%3cmask%20id='q'%20mask-type='alpha'%3e%3cuse%20xmlns:ns2='http://www.w3.org/1999/xlink'%20ns2:href='%23b'/%3e%3c/mask%3e%3cmask%20id='o'%20mask-type='alpha'%3e%3cuse%20xmlns:ns3='http://www.w3.org/1999/xlink'%20ns3:href='%23c'/%3e%3c/mask%3e%3cmask%20id='l'%20mask-type='alpha'%3e%3cuse%20xmlns:ns4='http://www.w3.org/1999/xlink'%20ns4:href='%23d'/%3e%3c/mask%3e%3cg%20id='a'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23e)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='b'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='12'%20clip-path='url(%23f)'%20style='display:block'%3e%3cpath%20stroke='%2308A88A'%20d='M44.446-66.518a79.998%2079.998%200%200%200-101.012%209.952A79.998%2079.998%200%201%200%2056.569%2056.569%2080.005%2080.005%200%200%200%2073.91-30.615a80.001%2080.001%200%200%200-29.464-35.903z'%20class='secondary'%20style='display:block'%20transform='translate(215%20214)'/%3e%3cpath%20stroke='%23121331'%20d='m141.409%2025.241%208.727%205.041s0%200%200%200a22.3%2022.3%200%200%201%2010.411%2013.542%2022.32%2022.32%200%200%201-2.221%2016.937l-26.515%2045.924a22.325%2022.325%200%200%201-30.497%208.172l-8.754-5.059a143.414%20143.414%200%200%201-43.718%2025.286v10.108a22.302%2022.302%200%200%201-13.778%2020.612%2022.303%2022.303%200%200%201-8.539%201.696h-53.029a22.303%2022.303%200%200%201-15.779-6.531%2022.302%2022.302%200%200%201-6.537-15.777v-10.073a143.416%20143.416%200%200%201-43.719-25.285l-8.754%205.059a22.325%2022.325%200%200%201-30.497-8.172l-26.523-45.924a22.315%2022.315%200%200%201-2.238-16.943A22.31%2022.31%200%200%201-150.142%2030.3l8.727-5.041a145.097%20145.097%200%200%201%200-50.518l-8.727-5.041a22.294%2022.294%200%200%201-10.409-13.554%2022.306%2022.306%200%200%201%202.238-16.943l26.514-45.924a22.325%2022.325%200%200%201%2030.497-8.172l8.754%205.059a143.416%20143.416%200%200%201%2043.719-25.285v-10.073a22.302%2022.302%200%200%201%206.537-15.777%2022.3%2022.3%200%200%201%2015.779-6.531h53.02a22.307%2022.307%200%200%201%2022.317%2022.308v10.037a143.41%20143.41%200%200%201%2043.718%2025.285l8.754-5.059a22.325%2022.325%200%200%201%2030.497%208.172l26.515%2045.942a22.313%2022.313%200%200%201-1.618%2024.757%2022.294%2022.294%200%200%201-6.554%205.74l-8.727%205.041a145.097%20145.097%200%200%201%200%2050.518z'%20class='primary'%20style='display:block'%20transform='rotate(-120%20169.576%2045.095)'/%3e%3c/g%3e%3cg%20id='c'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23g)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='d'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23h)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3c/defs%3e%3cg%20clip-path='url(%23i)'%3e%3cg%20clip-path='url(%23j)'%20filter='url(%23k)'%20mask='url(%23l)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23m)'%20filter='url(%23n)'%20mask='url(%23o)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23p)'%20mask='url(%23q)'%20style='display:block'%3e%3cg%20filter='url(%23r)'%20transform='rotate(-94%20238.762%20-16.565)%20scale(2.4)'%3e%3cg%20class='design'%3e%3cpath%20fill='%234BE1EC'%20d='M0-250c137.975%200%20250%20112.025%20250%20250S137.975%20250%200%20250-250%20137.975-250%200-137.975-250%200-250z'%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20fill='%23CB5EEE'%20d='M113.242-295.384c97.478%200%20176.5%2079.022%20176.5%20176.5s-79.022%20176.5-176.5%20176.5c-43.948%200-74.396-34.057-105.29-60.631-37.631-32.369-71.21-62.338-71.21-115.869%200-97.478%2079.022-176.5%20176.5-176.5z'%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23s)'%20filter='url(%23t)'%20mask='url(%23u)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ki="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%20-1.67%2047.336%2047.336'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group_42'%20data-name='Group%2042'%20transform='translate(-172.455%20-364.36)'%3e%3cpath%20id='Rectangle_17'%20data-name='Rectangle%2017'%20d='M4.351,0H40.984a4.351,4.351,0,0,1,4.351,4.351V22.117a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(173.455%20384.243)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_90'%20data-name='Path%2090'%20d='M218.79,390.249a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.778,3.778,0,0,1-3.777-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cg%20id='Group_41'%20data-name='Group%2041'%3e%3cpath%20id='Rectangle_18'%20data-name='Rectangle%2018'%20d='M4.351,0H26.473a4.351,4.351,0,0,1,4.351,4.351V17.883a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(180.71%20365.36)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_91'%20data-name='Path%2091'%20d='M211.234,370.794a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Vn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",Wn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=";function qn(u){const a="data-leaflet-styles";if(u.querySelector(`style[${a}]`))return;const n=document.createElement("style");n.setAttribute(a,"true"),n.textContent=`
|
|
4
|
+
*/var Un=te.exports,Xi;function Qi(){return Xi||(Xi=1,(function(u,a){(function(n,h){h(a)})(Un,(function(n){var h="1.9.4";function i(t){var e,o,s,c;for(o=1,s=arguments.length;o<s;o++){c=arguments[o];for(e in c)t[e]=c[e]}return t}var r=Object.create||(function(){function t(){}return function(e){return t.prototype=e,new t}})();function l(t,e){var o=Array.prototype.slice;if(t.bind)return t.bind.apply(t,o.call(arguments,1));var s=o.call(arguments,2);return function(){return t.apply(e,s.length?s.concat(o.call(arguments)):arguments)}}var d=0;function p(t){return"_leaflet_id"in t||(t._leaflet_id=++d),t._leaflet_id}function m(t,e,o){var s,c,f,g;return g=function(){s=!1,c&&(f.apply(o,c),c=!1)},f=function(){s?c=arguments:(t.apply(o,arguments),setTimeout(g,e),s=!0)},f}function _(t,e,o){var s=e[1],c=e[0],f=s-c;return t===s&&o?t:((t-c)%f+f)%f+c}function y(){return!1}function w(t,e){if(e===!1)return t;var o=Math.pow(10,e===void 0?6:e);return Math.round(t*o)/o}function T(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function E(t){return T(t).split(/\s+/)}function A(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?r(t.options):{});for(var o in e)t.options[o]=e[o];return t.options}function N(t,e,o){var s=[];for(var c in t)s.push(encodeURIComponent(o?c.toUpperCase():c)+"="+encodeURIComponent(t[c]));return(!e||e.indexOf("?")===-1?"?":"&")+s.join("&")}var F=/\{ *([\w_ -]+) *\}/g;function P(t,e){return t.replace(F,function(o,s){var c=e[s];if(c===void 0)throw new Error("No value provided for variable "+o);return typeof c=="function"&&(c=c(e)),c})}var I=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function G(t,e){for(var o=0;o<t.length;o++)if(t[o]===e)return o;return-1}var j="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function q(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var rt=0;function at(t){var e=+new Date,o=Math.max(0,16-(e-rt));return rt=e+o,window.setTimeout(t,o)}var Mt=window.requestAnimationFrame||q("RequestAnimationFrame")||at,Se=window.cancelAnimationFrame||q("CancelAnimationFrame")||q("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function st(t,e,o){if(o&&Mt===at)t.call(e);else return Mt.call(window,l(t,e))}function lt(t){t&&Se.call(window,t)}var Ie={__proto__:null,extend:i,create:r,bind:l,get lastId(){return d},stamp:p,throttle:m,wrapNum:_,falseFn:y,formatNum:w,trim:T,splitWords:E,setOptions:A,getParamString:N,template:P,isArray:I,indexOf:G,emptyImageUrl:j,requestFn:Mt,cancelFn:Se,requestAnimFrame:st,cancelAnimFrame:lt};function gt(){}gt.extend=function(t){var e=function(){A(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,s=r(o);s.constructor=e,e.prototype=s;for(var c in this)Object.prototype.hasOwnProperty.call(this,c)&&c!=="prototype"&&c!=="__super__"&&(e[c]=this[c]);return t.statics&&i(e,t.statics),t.includes&&(ne(t.includes),i.apply(null,[s].concat(t.includes))),i(s,t),delete s.statics,delete s.includes,s.options&&(s.options=o.options?r(o.options):{},i(s.options,t.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var f=0,g=s._initHooks.length;f<g;f++)s._initHooks[f].call(this)}},e},gt.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},gt.mergeOptions=function(t){return i(this.prototype.options,t),this},gt.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),o=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(o),this};function ne(t){if(!(typeof L=="undefined"||!L||!L.Mixin)){t=I(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var mt={on:function(t,e,o){if(typeof t=="object")for(var s in t)this._on(s,t[s],e);else{t=E(t);for(var c=0,f=t.length;c<f;c++)this._on(t[c],e,o)}return this},off:function(t,e,o){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var s in t)this._off(s,t[s],e);else{t=E(t);for(var c=arguments.length===1,f=0,g=t.length;f<g;f++)c?this._off(t[f]):this._off(t[f],e,o)}return this},_on:function(t,e,o,s){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,o)===!1){o===this&&(o=void 0);var c={fn:e,ctx:o};s&&(c.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(c)}},_off:function(t,e,o){var s,c,f;if(this._events&&(s=this._events[t],!!s)){if(arguments.length===1){if(this._firingCount)for(c=0,f=s.length;c<f;c++)s[c].fn=y;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}var g=this._listens(t,e,o);if(g!==!1){var v=s[g];this._firingCount&&(v.fn=y,this._events[t]=s=s.slice()),s.splice(g,1)}}},fire:function(t,e,o){if(!this.listens(t,o))return this;var s=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var c=this._events[t];if(c){this._firingCount=this._firingCount+1||1;for(var f=0,g=c.length;f<g;f++){var v=c[f],b=v.fn;v.once&&this.off(t,b,v.ctx),b.call(v.ctx||this,s)}this._firingCount--}}return o&&this._propagateEvent(s),this},listens:function(t,e,o,s){typeof t!="string"&&console.warn('"string" type argument expected');var c=e;typeof e!="function"&&(s=!!e,c=void 0,o=void 0);var f=this._events&&this._events[t];if(f&&f.length&&this._listens(t,c,o)!==!1)return!0;if(s){for(var g in this._eventParents)if(this._eventParents[g].listens(t,e,o,s))return!0}return!1},_listens:function(t,e,o){if(!this._events)return!1;var s=this._events[t]||[];if(!e)return!!s.length;o===this&&(o=void 0);for(var c=0,f=s.length;c<f;c++)if(s[c].fn===e&&s[c].ctx===o)return c;return!1},once:function(t,e,o){if(typeof t=="object")for(var s in t)this._on(s,t[s],e,!0);else{t=E(t);for(var c=0,f=t.length;c<f;c++)this._on(t[c],e,o,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[p(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[p(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};mt.addEventListener=mt.on,mt.removeEventListener=mt.clearAllEventListeners=mt.off,mt.addOneTimeEventListener=mt.once,mt.fireEvent=mt.fire,mt.hasEventListeners=mt.listens;var re=gt.extend(mt);function O(t,e,o){this.x=o?Math.round(t):t,this.y=o?Math.round(e):e}var ko=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};O.prototype={clone:function(){return new O(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new O(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new O(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ko(this.x),this.y=ko(this.y),this},distanceTo:function(t){t=D(t);var e=t.x-this.x,o=t.y-this.y;return Math.sqrt(e*e+o*o)},equals:function(t){return t=D(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+w(this.x)+", "+w(this.y)+")"}};function D(t,e,o){return t instanceof O?t:I(t)?new O(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new O(t.x,t.y):new O(t,e,o)}function Y(t,e){if(t)for(var o=e?[t,e]:t,s=0,c=o.length;s<c;s++)this.extend(o[s])}Y.prototype={extend:function(t){var e,o;if(!t)return this;if(t instanceof O||typeof t[0]=="number"||"x"in t)e=o=D(t);else if(t=dt(t),e=t.min,o=t.max,!e||!o)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=o.clone()):(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(o.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(o.y,this.max.y)),this},getCenter:function(t){return D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return D(this.min.x,this.max.y)},getTopRight:function(){return D(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,o;return typeof t[0]=="number"||t instanceof O?t=D(t):t=dt(t),t instanceof Y?(e=t.min,o=t.max):e=o=t,e.x>=this.min.x&&o.x<=this.max.x&&e.y>=this.min.y&&o.y<=this.max.y},intersects:function(t){t=dt(t);var e=this.min,o=this.max,s=t.min,c=t.max,f=c.x>=e.x&&s.x<=o.x,g=c.y>=e.y&&s.y<=o.y;return f&&g},overlaps:function(t){t=dt(t);var e=this.min,o=this.max,s=t.min,c=t.max,f=c.x>e.x&&s.x<o.x,g=c.y>e.y&&s.y<o.y;return f&&g},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var e=this.min,o=this.max,s=Math.abs(e.x-o.x)*t,c=Math.abs(e.y-o.y)*t;return dt(D(e.x-s,e.y-c),D(o.x+s,o.y+c))},equals:function(t){return t?(t=dt(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function dt(t,e){return!t||t instanceof Y?t:new Y(t,e)}function ut(t,e){if(t)for(var o=e?[t,e]:t,s=0,c=o.length;s<c;s++)this.extend(o[s])}ut.prototype={extend:function(t){var e=this._southWest,o=this._northEast,s,c;if(t instanceof V)s=t,c=t;else if(t instanceof ut){if(s=t._southWest,c=t._northEast,!s||!c)return this}else return t?this.extend(U(t)||$(t)):this;return!e&&!o?(this._southWest=new V(s.lat,s.lng),this._northEast=new V(c.lat,c.lng)):(e.lat=Math.min(s.lat,e.lat),e.lng=Math.min(s.lng,e.lng),o.lat=Math.max(c.lat,o.lat),o.lng=Math.max(c.lng,o.lng)),this},pad:function(t){var e=this._southWest,o=this._northEast,s=Math.abs(e.lat-o.lat)*t,c=Math.abs(e.lng-o.lng)*t;return new ut(new V(e.lat-s,e.lng-c),new V(o.lat+s,o.lng+c))},getCenter:function(){return new V((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new V(this.getNorth(),this.getWest())},getSouthEast:function(){return new V(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof V||"lat"in t?t=U(t):t=$(t);var e=this._southWest,o=this._northEast,s,c;return t instanceof ut?(s=t.getSouthWest(),c=t.getNorthEast()):s=c=t,s.lat>=e.lat&&c.lat<=o.lat&&s.lng>=e.lng&&c.lng<=o.lng},intersects:function(t){t=$(t);var e=this._southWest,o=this._northEast,s=t.getSouthWest(),c=t.getNorthEast(),f=c.lat>=e.lat&&s.lat<=o.lat,g=c.lng>=e.lng&&s.lng<=o.lng;return f&&g},overlaps:function(t){t=$(t);var e=this._southWest,o=this._northEast,s=t.getSouthWest(),c=t.getNorthEast(),f=c.lat>e.lat&&s.lat<o.lat,g=c.lng>e.lng&&s.lng<o.lng;return f&&g},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return t?(t=$(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function $(t,e){return t instanceof ut?t:new ut(t,e)}function V(t,e,o){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,o!==void 0&&(this.alt=+o)}V.prototype={equals:function(t,e){if(!t)return!1;t=U(t);var o=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return o<=(e===void 0?1e-9:e)},toString:function(t){return"LatLng("+w(this.lat,t)+", "+w(this.lng,t)+")"},distanceTo:function(t){return Dt.distance(this,U(t))},wrap:function(){return Dt.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,o=e/Math.cos(Math.PI/180*this.lat);return $([this.lat-e,this.lng-o],[this.lat+e,this.lng+o])},clone:function(){return new V(this.lat,this.lng,this.alt)}};function U(t,e,o){return t instanceof V?t:I(t)&&typeof t[0]!="object"?t.length===3?new V(t[0],t[1],t[2]):t.length===2?new V(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new V(t.lat,"lng"in t?t.lng:t.lon,t.alt):e===void 0?null:new V(t,e,o)}var Et={latLngToPoint:function(t,e){var o=this.projection.project(t),s=this.scale(e);return this.transformation._transform(o,s)},pointToLatLng:function(t,e){var o=this.scale(e),s=this.transformation.untransform(t,o);return this.projection.unproject(s)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,o=this.scale(t),s=this.transformation.transform(e.min,o),c=this.transformation.transform(e.max,o);return new Y(s,c)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?_(t.lng,this.wrapLng,!0):t.lng,o=this.wrapLat?_(t.lat,this.wrapLat,!0):t.lat,s=t.alt;return new V(o,e,s)},wrapLatLngBounds:function(t){var e=t.getCenter(),o=this.wrapLatLng(e),s=e.lat-o.lat,c=e.lng-o.lng;if(s===0&&c===0)return t;var f=t.getSouthWest(),g=t.getNorthEast(),v=new V(f.lat-s,f.lng-c),b=new V(g.lat-s,g.lng-c);return new ut(v,b)}},Dt=i({},Et,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var o=Math.PI/180,s=t.lat*o,c=e.lat*o,f=Math.sin((e.lat-t.lat)*o/2),g=Math.sin((e.lng-t.lng)*o/2),v=f*f+Math.cos(s)*Math.cos(c)*g*g,b=2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v));return this.R*b}}),Ao=6378137,gi={R:Ao,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,o=this.MAX_LATITUDE,s=Math.max(Math.min(o,t.lat),-o),c=Math.sin(s*e);return new O(this.R*t.lng*e,this.R*Math.log((1+c)/(1-c))/2)},unproject:function(t){var e=180/Math.PI;return new V((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(function(){var t=Ao*Math.PI;return new Y([-t,-t],[t,t])})()};function _i(t,e,o,s){if(I(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=o,this._d=s}_i.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new O((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};function ae(t,e,o,s){return new _i(t,e,o,s)}var vi=i({},Dt,{code:"EPSG:3857",projection:gi,transformation:(function(){var t=.5/(Math.PI*gi.R);return ae(t,.5,-t,.5)})()}),ma=i({},vi,{code:"EPSG:900913"});function Mo(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Eo(t,e){var o="",s,c,f,g,v,b;for(s=0,f=t.length;s<f;s++){for(v=t[s],c=0,g=v.length;c<g;c++)b=v[c],o+=(c?"L":"M")+b.x+" "+b.y;o+=e?C.svg?"z":"x":""}return o||"M0 0"}var yi=document.documentElement.style,De="ActiveXObject"in window,ga=De&&!document.addEventListener,To="msLaunchUri"in navigator&&!("documentMode"in document),Li=wt("webkit"),Co=wt("android"),Po=wt("android 2")||wt("android 3"),_a=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),va=Co&&wt("Google")&&_a<537&&!("AudioNode"in window),bi=!!window.opera,So=!To&&wt("chrome"),Io=wt("gecko")&&!Li&&!bi&&!De,ya=!So&&wt("safari"),Do=wt("phantom"),Oo="OTransition"in yi,La=navigator.platform.indexOf("Win")===0,zo=De&&"transition"in yi,wi="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Po,Bo="MozPerspective"in yi,ba=!window.L_DISABLE_3D&&(zo||wi||Bo)&&!Oo&&!Do,se=typeof orientation!="undefined"||wt("mobile"),wa=se&&Li,xa=se&&wi,Ro=!window.PointerEvent&&window.MSPointerEvent,No=!!(window.PointerEvent||Ro),Uo="ontouchstart"in window||!!window.TouchEvent,ka=!window.L_NO_TOUCH&&(Uo||No),Aa=se&&bi,Ma=se&&Io,Ea=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ta=(function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",y,e),window.removeEventListener("testPassiveEventSupport",y,e)}catch{}return t})(),Ca=(function(){return!!document.createElement("canvas").getContext})(),xi=!!(document.createElementNS&&Mo("svg").createSVGRect),Pa=!!xi&&(function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),Sa=!xi&&(function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}})(),Ia=navigator.platform.indexOf("Mac")===0,Da=navigator.platform.indexOf("Linux")===0;function wt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var C={ie:De,ielt9:ga,edge:To,webkit:Li,android:Co,android23:Po,androidStock:va,opera:bi,chrome:So,gecko:Io,safari:ya,phantom:Do,opera12:Oo,win:La,ie3d:zo,webkit3d:wi,gecko3d:Bo,any3d:ba,mobile:se,mobileWebkit:wa,mobileWebkit3d:xa,msPointer:Ro,pointer:No,touch:ka,touchNative:Uo,mobileOpera:Aa,mobileGecko:Ma,retina:Ea,passiveEvents:Ta,canvas:Ca,svg:xi,vml:Sa,inlineSvg:Pa,mac:Ia,linux:Da},Zo=C.msPointer?"MSPointerDown":"pointerdown",Ho=C.msPointer?"MSPointerMove":"pointermove",Fo=C.msPointer?"MSPointerUp":"pointerup",Go=C.msPointer?"MSPointerCancel":"pointercancel",ki={touchstart:Zo,touchmove:Ho,touchend:Fo,touchcancel:Go},Vo={touchstart:Ua,touchmove:Oe,touchend:Oe,touchcancel:Oe},Wt={},Wo=!1;function Oa(t,e,o){return e==="touchstart"&&Na(),Vo[e]?(o=Vo[e].bind(this,o),t.addEventListener(ki[e],o,!1),o):(console.warn("wrong event specified:",e),y)}function za(t,e,o){if(!ki[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(ki[e],o,!1)}function Ba(t){Wt[t.pointerId]=t}function Ra(t){Wt[t.pointerId]&&(Wt[t.pointerId]=t)}function Jo(t){delete Wt[t.pointerId]}function Na(){Wo||(document.addEventListener(Zo,Ba,!0),document.addEventListener(Ho,Ra,!0),document.addEventListener(Fo,Jo,!0),document.addEventListener(Go,Jo,!0),Wo=!0)}function Oe(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var o in Wt)e.touches.push(Wt[o]);e.changedTouches=[e],t(e)}}function Ua(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&nt(e),Oe(t,e)}function Za(t){var e={},o,s;for(s in t)o=t[s],e[s]=o&&o.bind?o.bind(t):o;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var Ha=200;function Fa(t,e){t.addEventListener("dblclick",e);var o=0,s;function c(f){if(f.detail!==1){s=f.detail;return}if(!(f.pointerType==="mouse"||f.sourceCapabilities&&!f.sourceCapabilities.firesTouchEvents)){var g=Xo(f);if(!(g.some(function(b){return b instanceof HTMLLabelElement&&b.attributes.for})&&!g.some(function(b){return b instanceof HTMLInputElement||b instanceof HTMLSelectElement}))){var v=Date.now();v-o<=Ha?(s++,s===2&&e(Za(f))):s=1,o=v}}}return t.addEventListener("click",c),{dblclick:e,simDblclick:c}}function Ga(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var Ai=Re(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),le=Re(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),jo=le==="webkitTransition"||le==="OTransition"?le+"End":"transitionend";function qo(t){return typeof t=="string"?document.getElementById(t):t}function he(t,e){var o=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!o||o==="auto")&&document.defaultView){var s=document.defaultView.getComputedStyle(t,null);o=s?s[e]:null}return o==="auto"?null:o}function H(t,e,o){var s=document.createElement(t);return s.className=e||"",o&&o.appendChild(s),s}function K(t){var e=t.parentNode;e&&e.removeChild(t)}function ze(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Jt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function jt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Mi(t,e){if(t.classList!==void 0)return t.classList.contains(e);var o=Be(t);return o.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(o)}function B(t,e){if(t.classList!==void 0)for(var o=E(e),s=0,c=o.length;s<c;s++)t.classList.add(o[s]);else if(!Mi(t,e)){var f=Be(t);Ei(t,(f?f+" ":"")+e)}}function X(t,e){t.classList!==void 0?t.classList.remove(e):Ei(t,T((" "+Be(t)+" ").replace(" "+e+" "," ")))}function Ei(t,e){t.className.baseVal===void 0?t.className=e:t.className.baseVal=e}function Be(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function _t(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Va(t,e)}function Va(t,e){var o=!1,s="DXImageTransform.Microsoft.Alpha";try{o=t.filters.item(s)}catch{if(e===1)return}e=Math.round(e*100),o?(o.Enabled=e!==100,o.Opacity=e):t.style.filter+=" progid:"+s+"(opacity="+e+")"}function Re(t){for(var e=document.documentElement.style,o=0;o<t.length;o++)if(t[o]in e)return t[o];return!1}function Rt(t,e,o){var s=e||new O(0,0);t.style[Ai]=(C.ie3d?"translate("+s.x+"px,"+s.y+"px)":"translate3d("+s.x+"px,"+s.y+"px,0)")+(o?" scale("+o+")":"")}function tt(t,e){t._leaflet_pos=e,C.any3d?Rt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Nt(t){return t._leaflet_pos||new O(0,0)}var ce,de,Ti;if("onselectstart"in document)ce=function(){z(window,"selectstart",nt)},de=function(){W(window,"selectstart",nt)};else{var ue=Re(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ce=function(){if(ue){var t=document.documentElement.style;Ti=t[ue],t[ue]="none"}},de=function(){ue&&(document.documentElement.style[ue]=Ti,Ti=void 0)}}function Ci(){z(window,"dragstart",nt)}function Pi(){W(window,"dragstart",nt)}var Ne,Si;function Ii(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(Ue(),Ne=t,Si=t.style.outlineStyle,t.style.outlineStyle="none",z(window,"keydown",Ue))}function Ue(){Ne&&(Ne.style.outlineStyle=Si,Ne=void 0,Si=void 0,W(window,"keydown",Ue))}function Yo(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Di(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Wa={__proto__:null,TRANSFORM:Ai,TRANSITION:le,TRANSITION_END:jo,get:qo,getStyle:he,create:H,remove:K,empty:ze,toFront:Jt,toBack:jt,hasClass:Mi,addClass:B,removeClass:X,setClass:Ei,getClass:Be,setOpacity:_t,testProp:Re,setTransform:Rt,setPosition:tt,getPosition:Nt,get disableTextSelection(){return ce},get enableTextSelection(){return de},disableImageDrag:Ci,enableImageDrag:Pi,preventOutline:Ii,restoreOutline:Ue,getSizedParentNode:Yo,getScale:Di};function z(t,e,o,s){if(e&&typeof e=="object")for(var c in e)zi(t,c,e[c],o);else{e=E(e);for(var f=0,g=e.length;f<g;f++)zi(t,e[f],o,s)}return this}var xt="_leaflet_events";function W(t,e,o,s){if(arguments.length===1)Ko(t),delete t[xt];else if(e&&typeof e=="object")for(var c in e)Bi(t,c,e[c],o);else if(e=E(e),arguments.length===2)Ko(t,function(v){return G(e,v)!==-1});else for(var f=0,g=e.length;f<g;f++)Bi(t,e[f],o,s);return this}function Ko(t,e){for(var o in t[xt]){var s=o.split(/\d/)[0];(!e||e(s))&&Bi(t,s,null,null,o)}}var Oi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function zi(t,e,o,s){var c=e+p(o)+(s?"_"+p(s):"");if(t[xt]&&t[xt][c])return this;var f=function(v){return o.call(s||t,v||window.event)},g=f;!C.touchNative&&C.pointer&&e.indexOf("touch")===0?f=Oa(t,e,f):C.touch&&e==="dblclick"?f=Fa(t,f):"addEventListener"in t?e==="touchstart"||e==="touchmove"||e==="wheel"||e==="mousewheel"?t.addEventListener(Oi[e]||e,f,C.passiveEvents?{passive:!1}:!1):e==="mouseenter"||e==="mouseleave"?(f=function(v){v=v||window.event,Ni(t,v)&&g(v)},t.addEventListener(Oi[e],f,!1)):t.addEventListener(e,g,!1):t.attachEvent("on"+e,f),t[xt]=t[xt]||{},t[xt][c]=f}function Bi(t,e,o,s,c){c=c||e+p(o)+(s?"_"+p(s):"");var f=t[xt]&&t[xt][c];if(!f)return this;!C.touchNative&&C.pointer&&e.indexOf("touch")===0?za(t,e,f):C.touch&&e==="dblclick"?Ga(t,f):"removeEventListener"in t?t.removeEventListener(Oi[e]||e,f,!1):t.detachEvent("on"+e,f),t[xt][c]=null}function Ut(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ri(t){return zi(t,"wheel",Ut),this}function fe(t){return z(t,"mousedown touchstart dblclick contextmenu",Ut),t._leaflet_disable_click=!0,this}function nt(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Zt(t){return nt(t),Ut(t),this}function Xo(t){if(t.composedPath)return t.composedPath();for(var e=[],o=t.target;o;)e.push(o),o=o.parentNode;return e}function Qo(t,e){if(!e)return new O(t.clientX,t.clientY);var o=Di(e),s=o.boundingClientRect;return new O((t.clientX-s.left)/o.x-e.clientLeft,(t.clientY-s.top)/o.y-e.clientTop)}var Ja=C.linux&&C.chrome?window.devicePixelRatio:C.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function $o(t){return C.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Ja:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Ni(t,e){var o=e.relatedTarget;if(!o)return!0;try{for(;o&&o!==t;)o=o.parentNode}catch{return!1}return o!==t}var ja={__proto__:null,on:z,off:W,stopPropagation:Ut,disableScrollPropagation:Ri,disableClickPropagation:fe,preventDefault:nt,stop:Zt,getPropagationPath:Xo,getMousePosition:Qo,getWheelDelta:$o,isExternalTarget:Ni,addListener:z,removeListener:W},tn=re.extend({run:function(t,e,o,s){this.stop(),this._el=t,this._inProgress=!0,this._duration=o||.25,this._easeOutPower=1/Math.max(s||.5,.2),this._startPos=Nt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=st(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,o=this._duration*1e3;e<o?this._runFrame(this._easeOut(e/o),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var o=this._startPos.add(this._offset.multiplyBy(t));e&&o._round(),tt(this._el,o),this.fire("step")},_complete:function(){lt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Z=re.extend({options:{crs:vi,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:function(t,e){e=A(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=l(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==void 0&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==void 0&&this.setView(U(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=le&&C.any3d&&!C.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),z(this._proxy,jo,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,o){if(e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(U(t),e,this.options.maxBounds),o=o||{},this._stop(),this._loaded&&!o.reset&&o!==!0){o.animate!==void 0&&(o.zoom=i({animate:o.animate},o.zoom),o.pan=i({animate:o.animate,duration:o.duration},o.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,o.zoom):this._tryAnimatedPan(t,o.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e,o.pan&&o.pan.noMoveStart),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(C.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(C.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,o){var s=this.getZoomScale(e),c=this.getSize().divideBy(2),f=t instanceof O?t:this.latLngToContainerPoint(t),g=f.subtract(c).multiplyBy(1-1/s),v=this.containerPointToLatLng(c.add(g));return this.setView(v,e,{zoom:o})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():$(t);var o=D(e.paddingTopLeft||e.padding||[0,0]),s=D(e.paddingBottomRight||e.padding||[0,0]),c=this.getBoundsZoom(t,!1,o.add(s));if(c=typeof e.maxZoom=="number"?Math.min(e.maxZoom,c):c,c===1/0)return{center:t.getCenter(),zoom:c};var f=s.subtract(o).divideBy(2),g=this.project(t.getSouthWest(),c),v=this.project(t.getNorthEast(),c),b=this.unproject(g.add(v).divideBy(2).add(f),c);return{center:b,zoom:c}},fitBounds:function(t,e){if(t=$(t),!t.isValid())throw new Error("Bounds are not valid.");var o=this._getBoundsCenterZoom(t,e);return this.setView(o.center,o.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=D(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){B(this._mapPane,"leaflet-pan-anim");var o=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,o,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,o){if(o=o||{},o.animate===!1||!C.any3d)return this.setView(t,e,o);this._stop();var s=this.project(this.getCenter()),c=this.project(t),f=this.getSize(),g=this._zoom;t=U(t),e=e===void 0?g:e;var v=Math.max(f.x,f.y),b=v*this.getZoomScale(g,e),x=c.distanceTo(s)||1,M=1.42,S=M*M;function R(et){var Xe=et?-1:1,zs=et?b:v,Bs=b*b-v*v+Xe*S*S*x*x,Rs=2*zs*S*x,Yi=Bs/Rs,zn=Math.sqrt(Yi*Yi+1)-Yi,Ns=zn<1e-9?-18:Math.log(zn);return Ns}function ht(et){return(Math.exp(et)-Math.exp(-et))/2}function it(et){return(Math.exp(et)+Math.exp(-et))/2}function yt(et){return ht(et)/it(et)}var ft=R(0);function $t(et){return v*(it(ft)/it(ft+M*et))}function Ss(et){return v*(it(ft)*yt(ft+M*et)-ht(ft))/S}function Is(et){return 1-Math.pow(1-et,1.5)}var Ds=Date.now(),Dn=(R(1)-ft)/M,Os=o.duration?1e3*o.duration:1e3*Dn*.8;function On(){var et=(Date.now()-Ds)/Os,Xe=Is(et)*Dn;et<=1?(this._flyToFrame=st(On,this),this._move(this.unproject(s.add(c.subtract(s).multiplyBy(Ss(Xe)/x)),g),this.getScaleZoom(v/$t(Xe),g),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,o.noMoveStart),On.call(this),this},flyToBounds:function(t,e){var o=this._getBoundsCenterZoom(t,e);return this.flyTo(o.center,o.zoom,e)},setMaxBounds:function(t){return t=$(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:function(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:function(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:function(t,e){this._enforcingBounds=!0;var o=this.getCenter(),s=this._limitCenter(o,this._zoom,$(t));return o.equals(s)||this.panTo(s,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var o=D(e.paddingTopLeft||e.padding||[0,0]),s=D(e.paddingBottomRight||e.padding||[0,0]),c=this.project(this.getCenter()),f=this.project(t),g=this.getPixelBounds(),v=dt([g.min.add(o),g.max.subtract(s)]),b=v.getSize();if(!v.contains(f)){this._enforcingBounds=!0;var x=f.subtract(v.getCenter()),M=v.extend(f).getSize().subtract(b);c.x+=x.x<0?-M.x:M.x,c.y+=x.y<0?-M.y:M.y,this.panTo(this.unproject(c),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=e.divideBy(2).round(),c=o.divideBy(2).round(),f=s.subtract(c);return!f.x&&!f.y?this:(t.animate&&t.pan?this.panBy(f):(t.pan&&this._rawPanBy(f),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(l(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=l(this._handleGeolocationResponse,this),o=l(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,o=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+o+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,o=t.coords.longitude,s=new V(e,o),c=s.toBounds(t.coords.accuracy*2),f=this._locateOptions;if(f.setView){var g=this.getBoundsZoom(c);this.setView(s,f.maxZoom?Math.min(g,f.maxZoom):g)}var v={latlng:s,bounds:c,timestamp:t.timestamp};for(var b in t.coords)typeof t.coords[b]=="number"&&(v[b]=t.coords[b]);this.fire("locationfound",v)}},addHandler:function(t,e){if(!e)return this;var o=this[t]=new e(this);return this._handlers.push(o),this.options[t]&&o.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),K(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(lt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)K(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var o="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),s=H("div",o,e||this._mapPane);return t&&(this._panes[t]=s),s},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),o=this.unproject(t.getTopRight());return new ut(e,o)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,o){t=$(t),o=D(o||[0,0]);var s=this.getZoom()||0,c=this.getMinZoom(),f=this.getMaxZoom(),g=t.getNorthWest(),v=t.getSouthEast(),b=this.getSize().subtract(o),x=dt(this.project(v,s),this.project(g,s)).getSize(),M=C.any3d?this.options.zoomSnap:1,S=b.x/x.x,R=b.y/x.y,ht=e?Math.max(S,R):Math.min(S,R);return s=this.getScaleZoom(ht,s),M&&(s=Math.round(s/(M/100))*(M/100),s=e?Math.ceil(s/M)*M:Math.floor(s/M)*M),Math.max(c,Math.min(f,s))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new O(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var o=this._getTopLeftPoint(t,e);return new Y(o,o.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var o=this.options.crs;return e=e===void 0?this._zoom:e,o.scale(t)/o.scale(e)},getScaleZoom:function(t,e){var o=this.options.crs;e=e===void 0?this._zoom:e;var s=o.zoom(t*o.scale(e));return isNaN(s)?1/0:s},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(U(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(U(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(U(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds($(t))},distance:function(t,e){return this.options.crs.distance(U(t),U(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(U(t)))},mouseEventToContainerPoint:function(t){return Qo(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=qo(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");z(e,"scroll",this._onScroll,this),this._containerId=p(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&C.any3d,B(t,"leaflet-container"+(C.touch?" leaflet-touch":"")+(C.retina?" leaflet-retina":"")+(C.ielt9?" leaflet-oldie":"")+(C.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=he(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),tt(this._mapPane,new O(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(B(t.markerPane,"leaflet-zoom-hide"),B(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,o){tt(this._mapPane,new O(0,0));var s=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var c=this._zoom!==e;this._moveStart(c,o)._move(t,e)._moveEnd(c),this.fire("viewreset"),s&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,o,s){e===void 0&&(e=this._zoom);var c=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),s?o&&o.pinch&&this.fire("zoom",o):((c||o&&o.pinch)&&this.fire("zoom",o),this.fire("move",o)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return lt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){tt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[p(this._container)]=this;var e=t?W:z;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),C.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){lt(this._resizeRequest),this._resizeRequest=st(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var o=[],s,c=e==="mouseout"||e==="mouseover",f=t.target||t.srcElement,g=!1;f;){if(s=this._targets[p(f)],s&&(e==="click"||e==="preclick")&&this._draggableMoved(s)){g=!0;break}if(s&&s.listens(e,!0)&&(c&&!Ni(f,t)||(o.push(s),c))||f===this._container)break;f=f.parentNode}return!o.length&&!g&&!c&&this.listens(e,!0)&&(o=[this]),o},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var o=t.type;o==="mousedown"&&Ii(e),this._fireDOMEvent(t,o)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,o){if(t.type==="click"){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,o)}var c=this._findEventTargets(t,e);if(o){for(var f=[],g=0;g<o.length;g++)o[g].listens(e,!0)&&f.push(o[g]);c=f.concat(c)}if(c.length){e==="contextmenu"&&nt(t);var v=c[0],b={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var x=v.getLatLng&&(!v._radius||v._radius<=10);b.containerPoint=x?this.latLngToContainerPoint(v.getLatLng()):this.mouseEventToContainerPoint(t),b.layerPoint=this.containerPointToLayerPoint(b.containerPoint),b.latlng=x?v.getLatLng():this.layerPointToLatLng(b.layerPoint)}for(g=0;g<c.length;g++)if(c[g].fire(e,b,!0),b.originalEvent._stopped||c[g].options.bubblingMouseEvents===!1&&G(this._mouseEvents,e)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Nt(this._mapPane)||new O(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var o=t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return o.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var o=this.getSize()._divideBy(2);return this.project(t,e)._subtract(o)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,o){var s=this._getNewPixelOrigin(o,e);return this.project(t,e)._subtract(s)},_latLngBoundsToNewLayerBounds:function(t,e,o){var s=this._getNewPixelOrigin(o,e);return dt([this.project(t.getSouthWest(),e)._subtract(s),this.project(t.getNorthWest(),e)._subtract(s),this.project(t.getSouthEast(),e)._subtract(s),this.project(t.getNorthEast(),e)._subtract(s)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,o){if(!o)return t;var s=this.project(t,e),c=this.getSize().divideBy(2),f=new Y(s.subtract(c),s.add(c)),g=this._getBoundsOffset(f,o,e);return Math.abs(g.x)<=1&&Math.abs(g.y)<=1?t:this.unproject(s.add(g),e)},_limitOffset:function(t,e){if(!e)return t;var o=this.getPixelBounds(),s=new Y(o.min.add(t),o.max.add(t));return t.add(this._getBoundsOffset(s,e))},_getBoundsOffset:function(t,e,o){var s=dt(this.project(e.getNorthEast(),o),this.project(e.getSouthWest(),o)),c=s.min.subtract(t.min),f=s.max.subtract(t.max),g=this._rebound(c.x,-f.x),v=this._rebound(c.y,-f.y);return new O(g,v)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),o=this.getMaxZoom(),s=C.any3d?this.options.zoomSnap:1;return s&&(t=Math.round(t/s)*s),Math.max(e,Math.min(o,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){X(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var o=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(o)?!1:(this.panBy(o,e),!0)},_createAnimProxy:function(){var t=this._proxy=H("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var o=Ai,s=this._proxy.style[o];Rt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),s===this._proxy.style[o]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){K(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Rt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,o){if(this._animatingZoom)return!0;if(o=o||{},!this._zoomAnimated||o.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var s=this.getZoomScale(e),c=this._getCenterOffset(t)._divideBy(1-1/s);return o.animate!==!0&&!this.getSize().contains(c)?!1:(st(function(){this._moveStart(!0,o.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,o,s){this._mapPane&&(o&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,B(this._mapPane,"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),setTimeout(l(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&X(this._mapPane,"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))}});function qa(t,e){return new Z(t,e)}var Lt=gt.extend({options:{position:"topright"},initialize:function(t){A(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),o=this.getPosition(),s=t._controlCorners[o];return B(e,"leaflet-control"),o.indexOf("bottom")!==-1?s.insertBefore(e,s.firstChild):s.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(K(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),pe=function(t){return new Lt(t)};Z.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",o=this._controlContainer=H("div",e+"control-container",this._container);function s(c,f){var g=e+c+" "+e+f;t[c+f]=H("div",g,o)}s("top","left"),s("top","right"),s("bottom","left"),s("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)K(this._controlCorners[t]);K(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var en=Lt.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,o,s){return o<s?-1:s<o?1:0}},initialize:function(t,e,o){A(this,o),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var s in t)this._addLayer(t[s],s);for(s in e)this._addLayer(e[s],s,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Lt.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(p(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){B(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(B(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):X(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return X(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=H("div",t),o=this.options.collapsed;e.setAttribute("aria-haspopup",!0),fe(e),Ri(e);var s=this._section=H("section",t+"-list");o&&(this._map.on("click",this.collapse,this),z(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var c=this._layersLink=H("a",t+"-toggle",e);c.href="#",c.title="Layers",c.setAttribute("role","button"),z(c,{keydown:function(f){f.keyCode===13&&this._expandSafely()},click:function(f){nt(f),this._expandSafely()}},this),o||this.expand(),this._baseLayersList=H("div",t+"-base",s),this._separator=H("div",t+"-separator",s),this._overlaysList=H("div",t+"-overlays",s),e.appendChild(s)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&p(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,o){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:o}),this.options.sortLayers&&this._layers.sort(l(function(s,c){return this.options.sortFunction(s.layer,c.layer,s.name,c.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ze(this._baseLayersList),ze(this._overlaysList),this._layerControlInputs=[];var t,e,o,s,c=0;for(o=0;o<this._layers.length;o++)s=this._layers[o],this._addItem(s),e=e||s.overlay,t=t||!s.overlay,c+=s.overlay?0:1;return this.options.hideSingleBase&&(t=t&&c>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(p(t.target)),o=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;o&&this._map.fire(o,e)},_createRadioElement:function(t,e){var o='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",s=document.createElement("div");return s.innerHTML=o,s.firstChild},_addItem:function(t){var e=document.createElement("label"),o=this._map.hasLayer(t.layer),s;t.overlay?(s=document.createElement("input"),s.type="checkbox",s.className="leaflet-control-layers-selector",s.defaultChecked=o):s=this._createRadioElement("leaflet-base-layers_"+p(this),o),this._layerControlInputs.push(s),s.layerId=p(t.layer),z(s,"click",this._onInputClick,this);var c=document.createElement("span");c.innerHTML=" "+t.name;var f=document.createElement("span");e.appendChild(f),f.appendChild(s),f.appendChild(c);var g=t.overlay?this._overlaysList:this._baseLayersList;return g.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,o,s=[],c=[];this._handlingClick=!0;for(var f=t.length-1;f>=0;f--)e=t[f],o=this._getLayer(e.layerId).layer,e.checked?s.push(o):e.checked||c.push(o);for(f=0;f<c.length;f++)this._map.hasLayer(c[f])&&this._map.removeLayer(c[f]);for(f=0;f<s.length;f++)this._map.hasLayer(s[f])||this._map.addLayer(s[f]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,e,o,s=this._map.getZoom(),c=t.length-1;c>=0;c--)e=t[c],o=this._getLayer(e.layerId).layer,e.disabled=o.options.minZoom!==void 0&&s<o.options.minZoom||o.options.maxZoom!==void 0&&s>o.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,z(t,"click",nt),this.expand();var e=this;setTimeout(function(){W(t,"click",nt),e._preventClick=!1})}}),Ya=function(t,e,o){return new en(t,e,o)},Ui=Lt.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",o=H("div",e+" leaflet-bar"),s=this.options;return this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,e+"-in",o,this._zoomIn),this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,e+"-out",o,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),o},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,o,s,c){var f=H("a",o,s);return f.innerHTML=t,f.href="#",f.title=e,f.setAttribute("role","button"),f.setAttribute("aria-label",e),fe(f),z(f,"click",Zt),z(f,"click",c,this),z(f,"click",this._refocusOnMap,this),f},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";X(this._zoomInButton,e),X(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(B(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(B(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Z.mergeOptions({zoomControl:!0}),Z.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ui,this.addControl(this.zoomControl))});var Ka=function(t){return new Ui(t)},on=Lt.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",o=H("div",e),s=this.options;return this._addScales(s,e+"-line",o),t.on(s.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),o},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,o){t.metric&&(this._mScale=H("div",e,o)),t.imperial&&(this._iScale=H("div",e,o))},_update:function(){var t=this._map,e=t.getSize().y/2,o=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(o)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),o=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,o,e/t)},_updateImperial:function(t){var e=t*3.2808399,o,s,c;e>5280?(o=e/5280,s=this._getRoundNum(o),this._updateScale(this._iScale,s+" mi",s/o)):(c=this._getRoundNum(e),this._updateScale(this._iScale,c+" ft",c/e))},_updateScale:function(t,e,o){t.style.width=Math.round(this.options.maxWidth*o)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),o=t/e;return o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:1,e*o}}),Xa=function(t){return new on(t)},Qa='<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>',Zi=Lt.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(C.inlineSvg?Qa+" ":"")+"Leaflet</a>"},initialize:function(t){A(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=H("div","leaflet-control-attribution"),fe(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var o=[];this.options.prefix&&o.push(this.options.prefix),t.length&&o.push(t.join(", ")),this._container.innerHTML=o.join(' <span aria-hidden="true">|</span> ')}}});Z.mergeOptions({attributionControl:!0}),Z.addInitHook(function(){this.options.attributionControl&&new Zi().addTo(this)});var $a=function(t){return new Zi(t)};Lt.Layers=en,Lt.Zoom=Ui,Lt.Scale=on,Lt.Attribution=Zi,pe.layers=Ya,pe.zoom=Ka,pe.scale=Xa,pe.attribution=$a;var kt=gt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});kt.addTo=function(t,e){return t.addHandler(e,this),this};var ts={Events:mt},nn=C.touch?"touchstart mousedown":"mousedown",Ot=re.extend({options:{clickTolerance:3},initialize:function(t,e,o,s){A(this,s),this._element=t,this._dragStartTarget=e||t,this._preventOutline=o},enable:function(){this._enabled||(z(this._dragStartTarget,nn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ot._dragging===this&&this.finishDrag(!0),W(this._dragStartTarget,nn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Mi(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){Ot._dragging===this&&this.finishDrag();return}if(!(Ot._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Ot._dragging=this,this._preventOutline&&Ii(this._element),Ci(),ce(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,o=Yo(this._element);this._startPoint=new O(e.clientX,e.clientY),this._startPos=Nt(this._element),this._parentScale=Di(o);var s=t.type==="mousedown";z(document,s?"mousemove":"touchmove",this._onMove,this),z(document,s?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,o=new O(e.clientX,e.clientY)._subtract(this._startPoint);!o.x&&!o.y||Math.abs(o.x)+Math.abs(o.y)<this.options.clickTolerance||(o.x/=this._parentScale.x,o.y/=this._parentScale.y,nt(t),this._moved||(this.fire("dragstart"),this._moved=!0,B(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),B(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(o),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),tt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){X(document.body,"leaflet-dragging"),this._lastTarget&&(X(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),W(document,"mousemove touchmove",this._onMove,this),W(document,"mouseup touchend touchcancel",this._onUp,this),Pi(),de();var e=this._moved&&this._moving;this._moving=!1,Ot._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function rn(t,e,o){var s,c=[1,4,2,8],f,g,v,b,x,M,S,R;for(f=0,M=t.length;f<M;f++)t[f]._code=Ht(t[f],e);for(v=0;v<4;v++){for(S=c[v],s=[],f=0,M=t.length,g=M-1;f<M;g=f++)b=t[f],x=t[g],b._code&S?x._code&S||(R=Ze(x,b,S,e,o),R._code=Ht(R,e),s.push(R)):(x._code&S&&(R=Ze(x,b,S,e,o),R._code=Ht(R,e),s.push(R)),s.push(b));t=s}return t}function an(t,e){var o,s,c,f,g,v,b,x,M;if(!t||t.length===0)throw new Error("latlngs not passed");vt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var S=U([0,0]),R=$(t),ht=R.getNorthWest().distanceTo(R.getSouthWest())*R.getNorthEast().distanceTo(R.getNorthWest());ht<1700&&(S=Hi(t));var it=t.length,yt=[];for(o=0;o<it;o++){var ft=U(t[o]);yt.push(e.project(U([ft.lat-S.lat,ft.lng-S.lng])))}for(v=b=x=0,o=0,s=it-1;o<it;s=o++)c=yt[o],f=yt[s],g=c.y*f.x-f.y*c.x,b+=(c.x+f.x)*g,x+=(c.y+f.y)*g,v+=g*3;v===0?M=yt[0]:M=[b/v,x/v];var $t=e.unproject(D(M));return U([$t.lat+S.lat,$t.lng+S.lng])}function Hi(t){for(var e=0,o=0,s=0,c=0;c<t.length;c++){var f=U(t[c]);e+=f.lat,o+=f.lng,s++}return U([e/s,o/s])}var es={__proto__:null,clipPolygon:rn,polygonCenter:an,centroid:Hi};function sn(t,e){if(!e||!t.length)return t.slice();var o=e*e;return t=ns(t,o),t=os(t,o),t}function ln(t,e,o){return Math.sqrt(me(t,e,o,!0))}function is(t,e,o){return me(t,e,o)}function os(t,e){var o=t.length,s=typeof Uint8Array!="undefined"?Uint8Array:Array,c=new s(o);c[0]=c[o-1]=1,Fi(t,c,e,0,o-1);var f,g=[];for(f=0;f<o;f++)c[f]&&g.push(t[f]);return g}function Fi(t,e,o,s,c){var f=0,g,v,b;for(v=s+1;v<=c-1;v++)b=me(t[v],t[s],t[c],!0),b>f&&(g=v,f=b);f>o&&(e[g]=1,Fi(t,e,o,s,g),Fi(t,e,o,g,c))}function ns(t,e){for(var o=[t[0]],s=1,c=0,f=t.length;s<f;s++)rs(t[s],t[c])>e&&(o.push(t[s]),c=s);return c<f-1&&o.push(t[f-1]),o}var hn;function cn(t,e,o,s,c){var f=s?hn:Ht(t,o),g=Ht(e,o),v,b,x;for(hn=g;;){if(!(f|g))return[t,e];if(f&g)return!1;v=f||g,b=Ze(t,e,v,o,c),x=Ht(b,o),v===f?(t=b,f=x):(e=b,g=x)}}function Ze(t,e,o,s,c){var f=e.x-t.x,g=e.y-t.y,v=s.min,b=s.max,x,M;return o&8?(x=t.x+f*(b.y-t.y)/g,M=b.y):o&4?(x=t.x+f*(v.y-t.y)/g,M=v.y):o&2?(x=b.x,M=t.y+g*(b.x-t.x)/f):o&1&&(x=v.x,M=t.y+g*(v.x-t.x)/f),new O(x,M,c)}function Ht(t,e){var o=0;return t.x<e.min.x?o|=1:t.x>e.max.x&&(o|=2),t.y<e.min.y?o|=4:t.y>e.max.y&&(o|=8),o}function rs(t,e){var o=e.x-t.x,s=e.y-t.y;return o*o+s*s}function me(t,e,o,s){var c=e.x,f=e.y,g=o.x-c,v=o.y-f,b=g*g+v*v,x;return b>0&&(x=((t.x-c)*g+(t.y-f)*v)/b,x>1?(c=o.x,f=o.y):x>0&&(c+=g*x,f+=v*x)),g=t.x-c,v=t.y-f,s?g*g+v*v:new O(c,f)}function vt(t){return!I(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]!="undefined"}function dn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),vt(t)}function un(t,e){var o,s,c,f,g,v,b,x;if(!t||t.length===0)throw new Error("latlngs not passed");vt(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var M=U([0,0]),S=$(t),R=S.getNorthWest().distanceTo(S.getSouthWest())*S.getNorthEast().distanceTo(S.getNorthWest());R<1700&&(M=Hi(t));var ht=t.length,it=[];for(o=0;o<ht;o++){var yt=U(t[o]);it.push(e.project(U([yt.lat-M.lat,yt.lng-M.lng])))}for(o=0,s=0;o<ht-1;o++)s+=it[o].distanceTo(it[o+1])/2;if(s===0)x=it[0];else for(o=0,f=0;o<ht-1;o++)if(g=it[o],v=it[o+1],c=g.distanceTo(v),f+=c,f>s){b=(f-s)/c,x=[v.x-b*(v.x-g.x),v.y-b*(v.y-g.y)];break}var ft=e.unproject(D(x));return U([ft.lat+M.lat,ft.lng+M.lng])}var as={__proto__:null,simplify:sn,pointToSegmentDistance:ln,closestPointOnSegment:is,clipSegment:cn,_getEdgeIntersection:Ze,_getBitCode:Ht,_sqClosestPointOnSegment:me,isFlat:vt,_flat:dn,polylineCenter:un},Gi={project:function(t){return new O(t.lng,t.lat)},unproject:function(t){return new V(t.y,t.x)},bounds:new Y([-180,-90],[180,90])},Vi={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Y([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,o=this.R,s=t.lat*e,c=this.R_MINOR/o,f=Math.sqrt(1-c*c),g=f*Math.sin(s),v=Math.tan(Math.PI/4-s/2)/Math.pow((1-g)/(1+g),f/2);return s=-o*Math.log(Math.max(v,1e-10)),new O(t.lng*e*o,s)},unproject:function(t){for(var e=180/Math.PI,o=this.R,s=this.R_MINOR/o,c=Math.sqrt(1-s*s),f=Math.exp(-t.y/o),g=Math.PI/2-2*Math.atan(f),v=0,b=.1,x;v<15&&Math.abs(b)>1e-7;v++)x=c*Math.sin(g),x=Math.pow((1-x)/(1+x),c/2),b=Math.PI/2-2*Math.atan(f*x)-g,g+=b;return new V(g*e,t.x*e/o)}},ss={__proto__:null,LonLat:Gi,Mercator:Vi,SphericalMercator:gi},ls=i({},Dt,{code:"EPSG:3395",projection:Vi,transformation:(function(){var t=.5/(Math.PI*Vi.R);return ae(t,.5,-t,.5)})()}),fn=i({},Dt,{code:"EPSG:4326",projection:Gi,transformation:ae(1/180,1,-1/180,.5)}),hs=i({},Et,{projection:Gi,transformation:ae(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var o=e.lng-t.lng,s=e.lat-t.lat;return Math.sqrt(o*o+s*s)},infinite:!0});Et.Earth=Dt,Et.EPSG3395=ls,Et.EPSG3857=vi,Et.EPSG900913=ma,Et.EPSG4326=fn,Et.Simple=hs;var bt=re.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[p(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[p(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var o=this.getEvents();e.on(o,this),this.once("remove",function(){e.off(o,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});Z.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=p(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=p(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):this},hasLayer:function(t){return p(t)in this._layers},eachLayer:function(t,e){for(var o in this._layers)t.call(e,this._layers[o]);return this},_addLayers:function(t){t=t?I(t)?t:[t]:[];for(var e=0,o=t.length;e<o;e++)this.addLayer(t[e])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[p(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=p(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,o=this._getZoomSpan();for(var s in this._zoomBoundLayers){var c=this._zoomBoundLayers[s].options;t=c.minZoom===void 0?t:Math.min(t,c.minZoom),e=c.maxZoom===void 0?e:Math.max(e,c.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,o!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var qt=bt.extend({initialize:function(t,e){A(this,e),this._layers={};var o,s;if(t)for(o=0,s=t.length;o<s;o++)this.addLayer(t[o])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){var e=typeof t=="number"?t:this.getLayerId(t);return e in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e=Array.prototype.slice.call(arguments,1),o,s;for(o in this._layers)s=this._layers[o],s[t]&&s[t].apply(s,e);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var o in this._layers)t.call(e,this._layers[o]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return p(t)}}),cs=function(t,e){return new qt(t,e)},Tt=qt.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),qt.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),qt.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new ut;for(var e in this._layers){var o=this._layers[e];t.extend(o.getBounds?o.getBounds():o.getLatLng())}return t}}),ds=function(t,e){return new Tt(t,e)},Yt=gt.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){A(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var o=this._getIconUrl(t);if(!o){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var s=this._createImg(o,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(s,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),s},_setIconStyles:function(t,e){var o=this.options,s=o[e+"Size"];typeof s=="number"&&(s=[s,s]);var c=D(s),f=D(e==="shadow"&&o.shadowAnchor||o.iconAnchor||c&&c.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(o.className||""),f&&(t.style.marginLeft=-f.x+"px",t.style.marginTop=-f.y+"px"),c&&(t.style.width=c.x+"px",t.style.height=c.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return C.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function us(t){return new Yt(t)}var ge=Yt.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return typeof ge.imagePath!="string"&&(ge.imagePath=this._detectIconPath()),(this.options.imagePath||ge.imagePath)+Yt.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(o,s,c){var f=s.exec(o);return f&&f[c]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=H("div","leaflet-default-icon-path",document.body),e=he(t,"background-image")||he(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e),e)return e;var o=document.querySelector('link[href$="leaflet.css"]');return o?o.href.substring(0,o.href.length-11-1):""}}),pn=kt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Ot(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),B(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&X(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,o=e._map,s=this._marker.options.autoPanSpeed,c=this._marker.options.autoPanPadding,f=Nt(e._icon),g=o.getPixelBounds(),v=o.getPixelOrigin(),b=dt(g.min._subtract(v).add(c),g.max._subtract(v).subtract(c));if(!b.contains(f)){var x=D((Math.max(b.max.x,f.x)-b.max.x)/(g.max.x-b.max.x)-(Math.min(b.min.x,f.x)-b.min.x)/(g.min.x-b.min.x),(Math.max(b.max.y,f.y)-b.max.y)/(g.max.y-b.max.y)-(Math.min(b.min.y,f.y)-b.min.y)/(g.min.y-b.min.y)).multiplyBy(s);o.panBy(x,{animate:!1}),this._draggable._newPos._add(x),this._draggable._startPos._add(x),tt(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=st(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(lt(this._panRequest),this._panRequest=st(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,o=e._shadow,s=Nt(e._icon),c=e._map.layerPointToLatLng(s);o&&tt(o,s),e._latlng=c,t.latlng=c,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){lt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),He=bt.extend({options:{icon:new ge,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){A(this,e),this._latlng=U(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&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:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=U(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),o=t.icon.createIcon(this._icon),s=!1;o!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(o.title=t.title),o.tagName==="IMG"&&(o.alt=t.alt||"")),B(o,e),t.keyboard&&(o.tabIndex="0",o.setAttribute("role","button")),this._icon=o,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&z(o,"focus",this._panOnFocus,this);var c=t.icon.createShadow(this._shadow),f=!1;c!==this._shadow&&(this._removeShadow(),f=!0),c&&(B(c,e),c.alt=""),this._shadow=c,t.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),c&&f&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&W(this._icon,"focus",this._panOnFocus,this),K(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&K(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&tt(this._icon,t),this._shadow&&tt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(B(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),pn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new pn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&_t(this._icon,t),this._shadow&&_t(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,o=e.iconSize?D(e.iconSize):D(0,0),s=e.iconAnchor?D(e.iconAnchor):D(0,0);t.panInside(this._latlng,{paddingTopLeft:s,paddingBottomRight:o.subtract(s)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function fs(t,e){return new He(t,e)}var zt=bt.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return A(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Fe=zt.extend({options:{fill:!0,radius:10},initialize:function(t,e){A(this,e),this._latlng=U(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=U(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return zt.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,o=this._clickTolerance(),s=[t+o,e+o];this._pxBounds=new Y(this._point.subtract(s),this._point.add(s))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ps(t,e){return new Fe(t,e)}var Wi=Fe.extend({initialize:function(t,e,o){if(typeof e=="number"&&(e=i({},o,{radius:e})),A(this,e),this._latlng=U(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new ut(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:zt.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,o=this._map,s=o.options.crs;if(s.distance===Dt.distance){var c=Math.PI/180,f=this._mRadius/Dt.R/c,g=o.project([e+f,t]),v=o.project([e-f,t]),b=g.add(v).divideBy(2),x=o.unproject(b).lat,M=Math.acos((Math.cos(f*c)-Math.sin(e*c)*Math.sin(x*c))/(Math.cos(e*c)*Math.cos(x*c)))/c;(isNaN(M)||M===0)&&(M=f/Math.cos(Math.PI/180*e)),this._point=b.subtract(o.getPixelOrigin()),this._radius=isNaN(M)?0:b.x-o.project([x,t-M]).x,this._radiusY=b.y-g.y}else{var S=s.unproject(s.project(this._latlng).subtract([this._mRadius,0]));this._point=o.latLngToLayerPoint(this._latlng),this._radius=this._point.x-o.latLngToLayerPoint(S).x}this._updateBounds()}});function ms(t,e,o){return new Wi(t,e,o)}var Ct=zt.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){A(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,o=null,s=me,c,f,g=0,v=this._parts.length;g<v;g++)for(var b=this._parts[g],x=1,M=b.length;x<M;x++){c=b[x-1],f=b[x];var S=s(t,c,f,!0);S<e&&(e=S,o=s(t,c,f))}return o&&(o.distance=Math.sqrt(e)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return un(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=U(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new ut,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return vt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],o=vt(t),s=0,c=t.length;s<c;s++)o?(e[s]=U(t[s]),this._bounds.extend(e[s])):e[s]=this._convertLatLngs(t[s]);return e},_project:function(){var t=new Y;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new O(t,t);this._rawPxBounds&&(this._pxBounds=new Y([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,o){var s=t[0]instanceof V,c=t.length,f,g;if(s){for(g=[],f=0;f<c;f++)g[f]=this._map.latLngToLayerPoint(t[f]),o.extend(g[f]);e.push(g)}else for(f=0;f<c;f++)this._projectLatlngs(t[f],e,o)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var e=this._parts,o,s,c,f,g,v,b;for(o=0,c=0,f=this._rings.length;o<f;o++)for(b=this._rings[o],s=0,g=b.length;s<g-1;s++)v=cn(b[s],b[s+1],t,s,!0),v&&(e[c]=e[c]||[],e[c].push(v[0]),(v[1]!==b[s+1]||s===g-2)&&(e[c].push(v[1]),c++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,o=0,s=t.length;o<s;o++)t[o]=sn(t[o],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var o,s,c,f,g,v,b=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,f=this._parts.length;o<f;o++)for(v=this._parts[o],s=0,g=v.length,c=g-1;s<g;c=s++)if(!(!e&&s===0)&&ln(t,v[c],v[s])<=b)return!0;return!1}});function gs(t,e){return new Ct(t,e)}Ct._flat=dn;var Kt=Ct.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return an(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Ct.prototype._convertLatLngs.call(this,t),o=e.length;return o>=2&&e[0]instanceof V&&e[0].equals(e[o-1])&&e.pop(),e},_setLatLngs:function(t){Ct.prototype._setLatLngs.call(this,t),vt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return vt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,o=new O(e,e);if(t=new Y(t.min.subtract(o),t.max.add(o)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var s=0,c=this._rings.length,f;s<c;s++)f=rn(this._rings[s],t,!0),f.length&&this._parts.push(f)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e=!1,o,s,c,f,g,v,b,x;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(f=0,b=this._parts.length;f<b;f++)for(o=this._parts[f],g=0,x=o.length,v=x-1;g<x;v=g++)s=o[g],c=o[v],s.y>t.y!=c.y>t.y&&t.x<(c.x-s.x)*(t.y-s.y)/(c.y-s.y)+s.x&&(e=!e);return e||Ct.prototype._containsPoint.call(this,t,!0)}});function _s(t,e){return new Kt(t,e)}var Pt=Tt.extend({initialize:function(t,e){A(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=I(t)?t:t.features,o,s,c;if(e){for(o=0,s=e.length;o<s;o++)c=e[o],(c.geometries||c.geometry||c.features||c.coordinates)&&this.addData(c);return this}var f=this.options;if(f.filter&&!f.filter(t))return this;var g=Ge(t,f);return g?(g.feature=Je(t),g.defaultOptions=g.options,this.resetStyle(g),f.onEachFeature&&f.onEachFeature(t,g),this.addLayer(g)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&(typeof e=="function"&&(e=e(t.feature)),t.setStyle(e))}});function Ge(t,e){var o=t.type==="Feature"?t.geometry:t,s=o?o.coordinates:null,c=[],f=e&&e.pointToLayer,g=e&&e.coordsToLatLng||Ji,v,b,x,M;if(!s&&!o)return null;switch(o.type){case"Point":return v=g(s),mn(f,t,v,e);case"MultiPoint":for(x=0,M=s.length;x<M;x++)v=g(s[x]),c.push(mn(f,t,v,e));return new Tt(c);case"LineString":case"MultiLineString":return b=Ve(s,o.type==="LineString"?0:1,g),new Ct(b,e);case"Polygon":case"MultiPolygon":return b=Ve(s,o.type==="Polygon"?1:2,g),new Kt(b,e);case"GeometryCollection":for(x=0,M=o.geometries.length;x<M;x++){var S=Ge({geometry:o.geometries[x],type:"Feature",properties:t.properties},e);S&&c.push(S)}return new Tt(c);case"FeatureCollection":for(x=0,M=o.features.length;x<M;x++){var R=Ge(o.features[x],e);R&&c.push(R)}return new Tt(c);default:throw new Error("Invalid GeoJSON object.")}}function mn(t,e,o,s){return t?t(e,o):new He(o,s&&s.markersInheritOptions&&s)}function Ji(t){return new V(t[1],t[0],t[2])}function Ve(t,e,o){for(var s=[],c=0,f=t.length,g;c<f;c++)g=e?Ve(t[c],e-1,o):(o||Ji)(t[c]),s.push(g);return s}function ji(t,e){return t=U(t),t.alt!==void 0?[w(t.lng,e),w(t.lat,e),w(t.alt,e)]:[w(t.lng,e),w(t.lat,e)]}function We(t,e,o,s){for(var c=[],f=0,g=t.length;f<g;f++)c.push(e?We(t[f],vt(t[f])?0:e-1,o,s):ji(t[f],s));return!e&&o&&c.length>0&&c.push(c[0].slice()),c}function Xt(t,e){return t.feature?i({},t.feature,{geometry:e}):Je(e)}function Je(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var qi={toGeoJSON:function(t){return Xt(this,{type:"Point",coordinates:ji(this.getLatLng(),t)})}};He.include(qi),Wi.include(qi),Fe.include(qi),Ct.include({toGeoJSON:function(t){var e=!vt(this._latlngs),o=We(this._latlngs,e?1:0,!1,t);return Xt(this,{type:(e?"Multi":"")+"LineString",coordinates:o})}}),Kt.include({toGeoJSON:function(t){var e=!vt(this._latlngs),o=e&&!vt(this._latlngs[0]),s=We(this._latlngs,o?2:e?1:0,!0,t);return e||(s=[s]),Xt(this,{type:(o?"Multi":"")+"Polygon",coordinates:s})}}),qt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(o){e.push(o.toGeoJSON(t).geometry.coordinates)}),Xt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var o=e==="GeometryCollection",s=[];return this.eachLayer(function(c){if(c.toGeoJSON){var f=c.toGeoJSON(t);if(o)s.push(f.geometry);else{var g=Je(f);g.type==="FeatureCollection"?s.push.apply(s,g.features):s.push(g)}}}),o?Xt(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s}}});function gn(t,e){return new Pt(t,e)}var vs=gn,je=bt.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,o){this._url=t,this._bounds=$(e),A(this,o)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(B(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){K(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&Jt(this._image),this},bringToBack:function(){return this._map&&jt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=$(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:H("img");if(B(e,"leaflet-image-layer"),this._zoomAnimated&&B(e,"leaflet-zoom-animated"),this.options.className&&B(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onload=l(this.fire,this,"load"),e.onerror=l(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),o=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Rt(this._image,o,e)},_reset:function(){var t=this._image,e=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),o=e.getSize();tt(t,e.min),t.style.width=o.x+"px",t.style.height=o.y+"px"},_updateOpacity:function(){_t(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),ys=function(t,e,o){return new je(t,e,o)},_n=je.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:H("video");if(B(e,"leaflet-image-layer"),this._zoomAnimated&&B(e,"leaflet-zoom-animated"),this.options.className&&B(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onloadeddata=l(this.fire,this,"load"),t){for(var o=e.getElementsByTagName("source"),s=[],c=0;c<o.length;c++)s.push(o[c].src);this._url=o.length>0?s:[e.src];return}I(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var f=0;f<this._url.length;f++){var g=H("source");g.src=this._url[f],e.appendChild(g)}}});function Ls(t,e,o){return new _n(t,e,o)}var vn=je.extend({_initImage:function(){var t=this._image=this._url;B(t,"leaflet-image-layer"),this._zoomAnimated&&B(t,"leaflet-zoom-animated"),this.options.className&&B(t,this.options.className),t.onselectstart=y,t.onmousemove=y}});function bs(t,e,o){return new vn(t,e,o)}var At=bt.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof V||I(t))?(this._latlng=U(t),A(this,e)):(A(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&_t(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_t(this._container,1),this.bringToFront(),this.options.interactive&&(B(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(_t(this._container,0),this._removeTimeout=setTimeout(l(K,void 0,this._container),200)):K(this._container),this.options.interactive&&(X(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=U(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Jt(this._container),this},bringToBack:function(){return this._map&&jt(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Tt){e=null;var o=this._source._layers;for(var s in o)if(o[s]._map){e=o[s];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)t=e.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof e=="string")t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=D(this.options.offset),o=this._getAnchor();this._zoomAnimated?tt(this._container,t.add(o)):e=e.add(t).add(o);var s=this._containerBottom=-e.y,c=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=s+"px",this._container.style.left=c+"px"}},_getAnchor:function(){return[0,0]}});Z.include({_initOverlay:function(t,e,o,s){var c=e;return c instanceof t||(c=new t(s).setContent(e)),o&&c.setLatLng(o),c}}),bt.include({_initOverlay:function(t,e,o,s){var c=o;return c instanceof t?(A(c,s),c._source=this):(c=e&&!s?e:new t(s,this),c.setContent(o)),c}});var qe=At.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,At.prototype.openOn.call(this,t)},onAdd:function(t){At.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof zt||this._source.on("preclick",Ut))},onRemove:function(t){At.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof zt||this._source.off("preclick",Ut))},getEvents:function(){var t=At.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=H("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),o=this._wrapper=H("div",t+"-content-wrapper",e);if(this._contentNode=H("div",t+"-content",o),fe(e),Ri(this._contentNode),z(e,"contextmenu",Ut),this._tipContainer=H("div",t+"-tip-container",e),this._tip=H("div",t+"-tip",this._tipContainer),this.options.closeButton){var s=this._closeButton=H("a",t+"-close-button",e);s.setAttribute("role","button"),s.setAttribute("aria-label","Close popup"),s.href="#close",s.innerHTML='<span aria-hidden="true">×</span>',z(s,"click",function(c){nt(c),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var o=t.offsetWidth;o=Math.min(o,this.options.maxWidth),o=Math.max(o,this.options.minWidth),e.width=o+1+"px",e.whiteSpace="",e.height="";var s=t.offsetHeight,c=this.options.maxHeight,f="leaflet-popup-scrolled";c&&s>c?(e.height=c+"px",B(t,f)):X(t,f),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),o=this._getAnchor();tt(this._container,e.add(o))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(he(this._container,"marginBottom"),10)||0,o=this._container.offsetHeight+e,s=this._containerWidth,c=new O(this._containerLeft,-o-this._containerBottom);c._add(Nt(this._container));var f=t.layerPointToContainerPoint(c),g=D(this.options.autoPanPadding),v=D(this.options.autoPanPaddingTopLeft||g),b=D(this.options.autoPanPaddingBottomRight||g),x=t.getSize(),M=0,S=0;f.x+s+b.x>x.x&&(M=f.x+s-x.x+b.x),f.x-M-v.x<0&&(M=f.x-v.x),f.y+o+b.y>x.y&&(S=f.y+o-x.y+b.y),f.y-S-v.y<0&&(S=f.y-v.y),(M||S)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([M,S]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),ws=function(t,e){return new qe(t,e)};Z.mergeOptions({closePopupOnClick:!0}),Z.include({openPopup:function(t,e,o){return this._initOverlay(qe,t,e,o).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),bt.include({bindPopup:function(t,e){return this._popup=this._initOverlay(qe,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:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Tt||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){Zt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof zt)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ye=At.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){At.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:function(t){At.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=At.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=H("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+p(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,o,s=this._map,c=this._container,f=s.latLngToContainerPoint(s.getCenter()),g=s.layerPointToContainerPoint(t),v=this.options.direction,b=c.offsetWidth,x=c.offsetHeight,M=D(this.options.offset),S=this._getAnchor();v==="top"?(e=b/2,o=x):v==="bottom"?(e=b/2,o=0):v==="center"?(e=b/2,o=x/2):v==="right"?(e=0,o=x/2):v==="left"?(e=b,o=x/2):g.x<f.x?(v="right",e=0,o=x/2):(v="left",e=b+(M.x+S.x)*2,o=x/2),t=t.subtract(D(e,o,!0)).add(M).add(S),X(c,"leaflet-tooltip-right"),X(c,"leaflet-tooltip-left"),X(c,"leaflet-tooltip-top"),X(c,"leaflet-tooltip-bottom"),B(c,"leaflet-tooltip-"+v),tt(c,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_t(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),xs=function(t,e){return new Ye(t,e)};Z.include({openTooltip:function(t,e,o){return this._initOverlay(Ye,t,e,o).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),bt.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ye,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(!(!t&&this._tooltipHandlersAdded)){var e=t?"off":"on",o={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?o.add=this._openTooltip:(o.mouseover=this._openTooltip,o.mouseout=this.closeTooltip,o.click=this._openTooltip,this._map?this._addFocusListeners():o.add=this._addFocusListeners),this._tooltip.options.sticky&&(o.mousemove=this._moveTooltip),this[e](o),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Tt||(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:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&(z(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),z(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e=typeof t.getElement=="function"&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var e=t.latlng,o,s;this._tooltip.options.sticky&&t.originalEvent&&(o=this._map.mouseEventToContainerPoint(t.originalEvent),s=this._map.containerPointToLayerPoint(o),e=this._map.layerPointToLatLng(s)),this._tooltip.setLatLng(e)}});var yn=Yt.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&t.tagName==="DIV"?t:document.createElement("div"),o=this.options;if(o.html instanceof Element?(ze(e),e.appendChild(o.html)):e.innerHTML=o.html!==!1?o.html:"",o.bgPos){var s=D(o.bgPos);e.style.backgroundPosition=-s.x+"px "+-s.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function ks(t){return new yn(t)}Yt.Default=ge;var _e=bt.extend({options:{tileSize:256,opacity:1,updateWhenIdle:C.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:function(t){A(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),K(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Jt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(jt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=m(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof O?t:new O(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e=this.getPane().children,o=-t(-1/0,1/0),s=0,c=e.length,f;s<c;s++)f=e[s].style.zIndex,e[s]!==this._container&&f&&(o=t(o,+f));isFinite(o)&&(this.options.zIndex=o+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!C.ielt9){_t(this._container,this.options.opacity);var t=+new Date,e=!1,o=!1;for(var s in this._tiles){var c=this._tiles[s];if(!(!c.current||!c.loaded)){var f=Math.min(1,(t-c.loaded)/200);_t(c.el,f),f<1?e=!0:(c.active?o=!0:this._onOpaqueTile(c),c.active=!0)}}o&&!this._noPrune&&this._pruneTiles(),e&&(lt(this._fadeFrame),this._fadeFrame=st(this._updateOpacity,this))}},_onOpaqueTile:y,_initContainer:function(){this._container||(this._container=H("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(t!==void 0){for(var o in this._levels)o=Number(o),this._levels[o].el.children.length||o===t?(this._levels[o].el.style.zIndex=e-Math.abs(t-o),this._onUpdateLevel(o)):(K(this._levels[o].el),this._removeTilesAtZoom(o),this._onRemoveLevel(o),delete this._levels[o]);var s=this._levels[t],c=this._map;return s||(s=this._levels[t]={},s.el=H("div","leaflet-tile-container leaflet-zoom-animated",this._container),s.el.style.zIndex=e,s.origin=c.project(c.unproject(c.getPixelOrigin()),t).round(),s.zoom=t,this._setZoomTransform(s,c.getCenter(),c.getZoom()),y(s.el.offsetWidth),this._onCreateLevel(s)),this._level=s,s}},_onUpdateLevel:y,_onRemoveLevel:y,_onCreateLevel:y,_pruneTiles:function(){if(this._map){var t,e,o=this._map.getZoom();if(o>this.options.maxZoom||o<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)e=this._tiles[t],e.retain=e.current;for(t in this._tiles)if(e=this._tiles[t],e.current&&!e.active){var s=e.coords;this._retainParent(s.x,s.y,s.z,s.z-5)||this._retainChildren(s.x,s.y,s.z,s.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)K(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,o,s){var c=Math.floor(t/2),f=Math.floor(e/2),g=o-1,v=new O(+c,+f);v.z=+g;var b=this._tileCoordsToKey(v),x=this._tiles[b];return x&&x.active?(x.retain=!0,!0):(x&&x.loaded&&(x.retain=!0),g>s?this._retainParent(c,f,g,s):!1)},_retainChildren:function(t,e,o,s){for(var c=2*t;c<2*t+2;c++)for(var f=2*e;f<2*e+2;f++){var g=new O(c,f);g.z=o+1;var v=this._tileCoordsToKey(g),b=this._tiles[v];if(b&&b.active){b.retain=!0;continue}else b&&b.loaded&&(b.retain=!0);o+1<s&&this._retainChildren(c,f,o+1,s)}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return e.minNativeZoom!==void 0&&t<e.minNativeZoom?e.minNativeZoom:e.maxNativeZoom!==void 0&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,o,s){var c=Math.round(e);this.options.maxZoom!==void 0&&c>this.options.maxZoom||this.options.minZoom!==void 0&&c<this.options.minZoom?c=void 0:c=this._clampZoom(c);var f=this.options.updateWhenZooming&&c!==this._tileZoom;(!s||f)&&(this._tileZoom=c,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),c!==void 0&&this._update(t),o||this._pruneTiles(),this._noPrune=!!o),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var o in this._levels)this._setZoomTransform(this._levels[o],t,e)},_setZoomTransform:function(t,e,o){var s=this._map.getZoomScale(o,t.zoom),c=t.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(e,o)).round();C.any3d?Rt(t.el,c,s):tt(t.el,c)},_resetGrid:function(){var t=this._map,e=t.options.crs,o=this._tileSize=this.getTileSize(),s=this._tileZoom,c=this._map.getPixelWorldBounds(this._tileZoom);c&&(this._globalTileRange=this._pxBoundsToTileRange(c)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],s).x/o.x),Math.ceil(t.project([0,e.wrapLng[1]],s).x/o.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],s).y/o.x),Math.ceil(t.project([e.wrapLat[1],0],s).y/o.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var e=this._map,o=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),s=e.getZoomScale(o,this._tileZoom),c=e.project(t,this._tileZoom).floor(),f=e.getSize().divideBy(s*2);return new Y(c.subtract(f),c.add(f))},_update:function(t){var e=this._map;if(e){var o=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom!==void 0){var s=this._getTiledPixelBounds(t),c=this._pxBoundsToTileRange(s),f=c.getCenter(),g=[],v=this.options.keepBuffer,b=new Y(c.getBottomLeft().subtract([v,-v]),c.getTopRight().add([v,-v]));if(!(isFinite(c.min.x)&&isFinite(c.min.y)&&isFinite(c.max.x)&&isFinite(c.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var x in this._tiles){var M=this._tiles[x].coords;(M.z!==this._tileZoom||!b.contains(new O(M.x,M.y)))&&(this._tiles[x].current=!1)}if(Math.abs(o-this._tileZoom)>1){this._setView(t,o);return}for(var S=c.min.y;S<=c.max.y;S++)for(var R=c.min.x;R<=c.max.x;R++){var ht=new O(R,S);if(ht.z=this._tileZoom,!!this._isValidTile(ht)){var it=this._tiles[this._tileCoordsToKey(ht)];it?it.current=!0:g.push(ht)}}if(g.sort(function(ft,$t){return ft.distanceTo(f)-$t.distanceTo(f)}),g.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var yt=document.createDocumentFragment();for(R=0;R<g.length;R++)this._addTile(g[R],yt);this._level.el.appendChild(yt)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var o=this._globalTileRange;if(!e.wrapLng&&(t.x<o.min.x||t.x>o.max.x)||!e.wrapLat&&(t.y<o.min.y||t.y>o.max.y))return!1}if(!this.options.bounds)return!0;var s=this._tileCoordsToBounds(t);return $(this.options.bounds).overlaps(s)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,o=this.getTileSize(),s=t.scaleBy(o),c=s.add(o),f=e.unproject(s,t.z),g=e.unproject(c,t.z);return[f,g]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),o=new ut(e[0],e[1]);return this.options.noWrap||(o=this._map.wrapLatLngBounds(o)),o},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),o=new O(+e[0],+e[1]);return o.z=+e[2],o},_removeTile:function(t){var e=this._tiles[t];e&&(K(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){B(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=y,t.onmousemove=y,C.ielt9&&this.options.opacity<1&&_t(t,this.options.opacity)},_addTile:function(t,e){var o=this._getTilePos(t),s=this._tileCoordsToKey(t),c=this.createTile(this._wrapCoords(t),l(this._tileReady,this,t));this._initTile(c),this.createTile.length<2&&st(l(this._tileReady,this,t,null,c)),tt(c,o),this._tiles[s]={el:c,coords:t,current:!0},e.appendChild(c),this.fire("tileloadstart",{tile:c,coords:t})},_tileReady:function(t,e,o){e&&this.fire("tileerror",{error:e,tile:o,coords:t});var s=this._tileCoordsToKey(t);o=this._tiles[s],o&&(o.loaded=+new Date,this._map._fadeAnimated?(_t(o.el,0),lt(this._fadeFrame),this._fadeFrame=st(this._updateOpacity,this)):(o.active=!0,this._pruneTiles()),e||(B(o.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:o.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),C.ielt9||!this._map._fadeAnimated?st(this._pruneTiles,this):setTimeout(l(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new O(this._wrapX?_(t.x,this._wrapX):t.x,this._wrapY?_(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new Y(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function As(t){return new _e(t)}var Qt=_e.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=A(this,e),e.detectRetina&&C.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var o=document.createElement("img");return z(o,"load",l(this._tileOnLoad,this,e,o)),z(o,"error",l(this._tileOnError,this,e,o)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(o.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(o.referrerPolicy=this.options.referrerPolicy),o.alt="",o.src=this.getTileUrl(t),o},getTileUrl:function(t){var e={r:C.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=o),e["-y"]=o}return P(this._url,i(e,this.options))},_tileOnLoad:function(t,e){C.ielt9?setTimeout(l(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,o){var s=this.options.errorTileUrl;s&&e.getAttribute("src")!==s&&(e.src=s),t(o,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,o=this.options.zoomReverse,s=this.options.zoomOffset;return o&&(t=e-t),t+s},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=y,e.onerror=y,!e.complete)){e.src=j;var o=this._tiles[t].coords;K(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:o})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",j),_e.prototype._removeTile.call(this,t)},_tileReady:function(t,e,o){if(!(!this._map||o&&o.getAttribute("src")===j))return _e.prototype._tileReady.call(this,t,e,o)}});function Ln(t,e){return new Qt(t,e)}var bn=Qt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var o=i({},this.defaultWmsParams);for(var s in e)s in this.options||(o[s]=e[s]);e=A(this,e);var c=e.detectRetina&&C.retina?2:1,f=this.getTileSize();o.width=f.x*c,o.height=f.y*c,this.wmsParams=o},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Qt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),o=this._crs,s=dt(o.project(e[0]),o.project(e[1])),c=s.min,f=s.max,g=(this._wmsVersion>=1.3&&this._crs===fn?[c.y,c.x,f.y,f.x]:[c.x,c.y,f.x,f.y]).join(","),v=Qt.prototype.getTileUrl.call(this,t);return v+N(this.wmsParams,v,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+g},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function Ms(t,e){return new bn(t,e)}Qt.WMS=bn,Ln.wms=Ms;var St=bt.extend({options:{padding:.1},initialize:function(t){A(this,t),p(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),B(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var o=this._map.getZoomScale(e,this._zoom),s=this._map.getSize().multiplyBy(.5+this.options.padding),c=this._map.project(this._center,e),f=s.multiplyBy(-o).add(c).subtract(this._map._getNewPixelOrigin(t,e));C.any3d?Rt(this._container,f,o):tt(this._container,f)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),o=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new Y(o,o.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),wn=St.extend({options:{tolerance:0},getEvents:function(){var t=St.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){St.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");z(t,"mousemove",this._onMouseMove,this),z(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),z(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){lt(this._redrawRequest),delete this._ctx,K(this._container),W(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var t=this._bounds,e=this._container,o=t.getSize(),s=C.retina?2:1;tt(e,t.min),e.width=s*o.x,e.height=s*o.y,e.style.width=o.x+"px",e.style.height=o.y+"px",C.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){St.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[p(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,o=e.next,s=e.prev;o?o.prev=s:this._drawLast=s,s?s.next=o:this._drawFirst=o,delete t._order,delete this._layers[p(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),o=[],s,c;for(c=0;c<e.length;c++){if(s=Number(e[c]),isNaN(s))return;o.push(s)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||st(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Y,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var o=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,o.x,o.y),this._ctx.clip()}this._drawing=!0;for(var s=this._drawFirst;s;s=s.next)t=s.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var o,s,c,f,g=t._parts,v=g.length,b=this._ctx;if(v){for(b.beginPath(),o=0;o<v;o++){for(s=0,c=g[o].length;s<c;s++)f=g[o][s],b[s?"lineTo":"moveTo"](f.x,f.y);e&&b.closePath()}this._fillStroke(b,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var e=t._point,o=this._ctx,s=Math.max(Math.round(t._radius),1),c=(Math.max(Math.round(t._radiusY),1)||s)/s;c!==1&&(o.save(),o.scale(1,c)),o.beginPath(),o.arc(e.x,e.y/c,s,0,Math.PI*2,!1),c!==1&&o.restore(),this._fillStroke(o,t)}},_fillStroke:function(t,e){var o=e.options;o.fill&&(t.globalAlpha=o.fillOpacity,t.fillStyle=o.fillColor||o.color,t.fill(o.fillRule||"evenodd")),o.stroke&&o.weight!==0&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=o.opacity,t.lineWidth=o.weight,t.strokeStyle=o.color,t.lineCap=o.lineCap,t.lineJoin=o.lineJoin,t.stroke())},_onClick:function(t){for(var e=this._map.mouseEventToLayerPoint(t),o,s,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(o))&&(s=o);this._fireEvent(s?[s]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(X(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var o,s,c=this._drawFirst;c;c=c.next)o=c.layer,o.options.interactive&&o._containsPoint(e)&&(s=o);s!==this._hoveredLayer&&(this._handleMouseOut(t),s&&(B(this._container,"leaflet-interactive"),this._fireEvent([s],t,"mouseover"),this._hoveredLayer=s)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(l(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,o){this._map._fireDOMEvent(e,o||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var o=e.next,s=e.prev;if(o)o.prev=s;else return;s?s.next=o:o&&(this._drawFirst=o),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}},_bringToBack:function(t){var e=t._order;if(e){var o=e.next,s=e.prev;if(s)s.next=o;else return;o?o.prev=s:s&&(this._drawLast=s),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}}});function xn(t){return C.canvas?new wn(t):null}var ve=(function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),Es={_initContainer:function(){this._container=H("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(St.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=ve("shape");B(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=ve("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;K(e),t.removeInteractiveTarget(e),delete this._layers[p(t)]},_updateStyle:function(t){var e=t._stroke,o=t._fill,s=t.options,c=t._container;c.stroked=!!s.stroke,c.filled=!!s.fill,s.stroke?(e||(e=t._stroke=ve("stroke")),c.appendChild(e),e.weight=s.weight+"px",e.color=s.color,e.opacity=s.opacity,s.dashArray?e.dashStyle=I(s.dashArray)?s.dashArray.join(" "):s.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=s.lineCap.replace("butt","flat"),e.joinstyle=s.lineJoin):e&&(c.removeChild(e),t._stroke=null),s.fill?(o||(o=t._fill=ve("fill")),c.appendChild(o),o.color=s.fillColor||s.color,o.opacity=s.fillOpacity):o&&(c.removeChild(o),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),o=Math.round(t._radius),s=Math.round(t._radiusY||o);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+o+","+s+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Jt(t._container)},_bringToBack:function(t){jt(t._container)}},Ke=C.vml?ve:Mo,ye=St.extend({_initContainer:function(){this._container=Ke("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ke("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){K(this._container),W(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var t=this._bounds,e=t.getSize(),o=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,o.setAttribute("width",e.x),o.setAttribute("height",e.y)),tt(o,t.min),o.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ke("path");t.options.className&&B(e,t.options.className),t.options.interactive&&B(e,"leaflet-interactive"),this._updateStyle(t),this._layers[p(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){K(t._path),t.removeInteractiveTarget(t._path),delete this._layers[p(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,o=t.options;e&&(o.stroke?(e.setAttribute("stroke",o.color),e.setAttribute("stroke-opacity",o.opacity),e.setAttribute("stroke-width",o.weight),e.setAttribute("stroke-linecap",o.lineCap),e.setAttribute("stroke-linejoin",o.lineJoin),o.dashArray?e.setAttribute("stroke-dasharray",o.dashArray):e.removeAttribute("stroke-dasharray"),o.dashOffset?e.setAttribute("stroke-dashoffset",o.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),o.fill?(e.setAttribute("fill",o.fillColor||o.color),e.setAttribute("fill-opacity",o.fillOpacity),e.setAttribute("fill-rule",o.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Eo(t._parts,e))},_updateCircle:function(t){var e=t._point,o=Math.max(Math.round(t._radius),1),s=Math.max(Math.round(t._radiusY),1)||o,c="a"+o+","+s+" 0 1,0 ",f=t._empty()?"M0 0":"M"+(e.x-o)+","+e.y+c+o*2+",0 "+c+-o*2+",0 ";this._setPath(t,f)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Jt(t._path)},_bringToBack:function(t){jt(t._path)}});C.vml&&ye.include(Es);function kn(t){return C.svg||C.vml?new ye(t):null}Z.include({getRenderer:function(t){var 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:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&xn(t)||kn(t)}});var An=Kt.extend({initialize:function(t,e){Kt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=$(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ts(t,e){return new An(t,e)}ye.create=Ke,ye.pointsToPath=Eo,Pt.geometryToLayer=Ge,Pt.coordsToLatLng=Ji,Pt.coordsToLatLngs=Ve,Pt.latLngToCoords=ji,Pt.latLngsToCoords=We,Pt.getFeature=Xt,Pt.asFeature=Je,Z.mergeOptions({boxZoom:!0});var Mn=kt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){z(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){W(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){K(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ce(),Ci(),this._startPoint=this._map.mouseEventToContainerPoint(t),z(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=H("div","leaflet-zoom-box",this._container),B(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new Y(this._point,this._startPoint),o=e.getSize();tt(this._box,e.min),this._box.style.width=o.x+"px",this._box.style.height=o.y+"px"},_finish:function(){this._moved&&(K(this._box),X(this._container,"leaflet-crosshair")),de(),Pi(),W(document,{contextmenu:Zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(l(this._resetState,this),0);var e=new ut(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Z.addInitHook("addHandler","boxZoom",Mn),Z.mergeOptions({doubleClickZoom:!0});var En=kt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,o=e.getZoom(),s=e.options.zoomDelta,c=t.originalEvent.shiftKey?o-s:o+s;e.options.doubleClickZoom==="center"?e.setZoom(c):e.setZoomAround(t.containerPoint,c)}});Z.addInitHook("addHandler","doubleClickZoom",En),Z.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Tn=kt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Ot(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))}B(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){X(this._map._container,"leaflet-grab"),X(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=$(this._map.options.maxBounds);this._offsetLimit=dt(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,o=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(o),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){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:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var 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:function(){var t=this._worldWidth,e=Math.round(t/2),o=this._initialWorldOffset,s=this._draggable._newPos.x,c=(s-e+o)%t+e-o,f=(s+e+o)%t-e-o,g=Math.abs(c+o)<Math.abs(f+o)?c:f;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=g},_onDragEnd:function(t){var e=this._map,o=e.options,s=!o.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),s)e.fire("moveend");else{this._prunePositions(+new Date);var c=this._lastPos.subtract(this._positions[0]),f=(this._lastTime-this._times[0])/1e3,g=o.easeLinearity,v=c.multiplyBy(g/f),b=v.distanceTo([0,0]),x=Math.min(o.inertiaMaxSpeed,b),M=v.multiplyBy(x/b),S=x/(o.inertiaDeceleration*g),R=M.multiplyBy(-S/2).round();!R.x&&!R.y?e.fire("moveend"):(R=e._limitOffset(R,e.options.maxBounds),st(function(){e.panBy(R,{duration:S,easeLinearity:g,noMoveStart:!0,animate:!0})}))}}});Z.addInitHook("addHandler","dragging",Tn),Z.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Cn=kt.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),z(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),W(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,o=t.scrollTop||e.scrollTop,s=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e=this._panKeys={},o=this.keyCodes,s,c;for(s=0,c=o.left.length;s<c;s++)e[o.left[s]]=[-1*t,0];for(s=0,c=o.right.length;s<c;s++)e[o.right[s]]=[t,0];for(s=0,c=o.down.length;s<c;s++)e[o.down[s]]=[0,t];for(s=0,c=o.up.length;s<c;s++)e[o.up[s]]=[0,-1*t]},_setZoomDelta:function(t){var e=this._zoomKeys={},o=this.keyCodes,s,c;for(s=0,c=o.zoomIn.length;s<c;s++)e[o.zoomIn[s]]=t;for(s=0,c=o.zoomOut.length;s<c;s++)e[o.zoomOut[s]]=-t},_addHooks:function(){z(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){W(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=t.keyCode,o=this._map,s;if(e in this._panKeys){if(!o._panAnim||!o._panAnim._inProgress)if(s=this._panKeys[e],t.shiftKey&&(s=D(s).multiplyBy(3)),o.options.maxBounds&&(s=o._limitOffset(D(s),o.options.maxBounds)),o.options.worldCopyJump){var c=o.wrapLatLng(o.unproject(o.project(o.getCenter()).add(s)));o.panTo(c)}else o.panBy(s)}else if(e in this._zoomKeys)o.setZoom(o.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e===27&&o._popup&&o._popup.options.closeOnEscapeKey)o.closePopup();else return;Zt(t)}}});Z.addInitHook("addHandler","keyboard",Cn),Z.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Pn=kt.extend({addHooks:function(){z(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){W(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=$o(t),o=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(o-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(l(this._performZoom,this),s),Zt(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),o=this._map.options.zoomSnap||0;t._stop();var s=this._delta/(this._map.options.wheelPxPerZoomLevel*4),c=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,f=o?Math.ceil(c/o)*o:c,g=t._limitZoom(e+(this._delta>0?f:-f))-e;this._delta=0,this._startTime=null,g&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+g):t.setZoomAround(this._lastMousePos,e+g))}});Z.addInitHook("addHandler","scrollWheelZoom",Pn);var Cs=600;Z.mergeOptions({tapHold:C.touchNative&&C.safari&&C.mobile,tapTolerance:15});var Sn=kt.extend({addHooks:function(){z(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){W(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new O(e.clientX,e.clientY),this._holdTimeout=setTimeout(l(function(){this._cancel(),this._isTapValid()&&(z(document,"touchend",nt),z(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Cs),z(document,"touchend touchcancel contextmenu",this._cancel,this),z(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){W(document,"touchend",nt),W(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),W(document,"touchend touchcancel contextmenu",this._cancel,this),W(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new O(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var o=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});o._simulated=!0,e.target.dispatchEvent(o)}});Z.addInitHook("addHandler","tapHold",Sn),Z.mergeOptions({touchZoom:C.touch,bounceAtZoomLimits:!0});var In=kt.extend({addHooks:function(){B(this._map._container,"leaflet-touch-zoom"),z(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){X(this._map._container,"leaflet-touch-zoom"),W(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var o=e.mouseEventToContainerPoint(t.touches[0]),s=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(o.add(s)._divideBy(2))),this._startDist=o.distanceTo(s),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),z(document,"touchmove",this._onTouchMove,this),z(document,"touchend touchcancel",this._onTouchEnd,this),nt(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,o=e.mouseEventToContainerPoint(t.touches[0]),s=e.mouseEventToContainerPoint(t.touches[1]),c=o.distanceTo(s)/this._startDist;if(this._zoom=e.getScaleZoom(c,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&c<1||this._zoom>e.getMaxZoom()&&c>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,c===1)return}else{var f=o._add(s)._divideBy(2)._subtract(this._centerPoint);if(c===1&&f.x===0&&f.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(f),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),lt(this._animRequest);var g=l(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=st(g,this,!0),nt(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,lt(this._animRequest),W(document,"touchmove",this._onTouchMove,this),W(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});Z.addInitHook("addHandler","touchZoom",In),Z.BoxZoom=Mn,Z.DoubleClickZoom=En,Z.Drag=Tn,Z.Keyboard=Cn,Z.ScrollWheelZoom=Pn,Z.TapHold=Sn,Z.TouchZoom=In,n.Bounds=Y,n.Browser=C,n.CRS=Et,n.Canvas=wn,n.Circle=Wi,n.CircleMarker=Fe,n.Class=gt,n.Control=Lt,n.DivIcon=yn,n.DivOverlay=At,n.DomEvent=ja,n.DomUtil=Wa,n.Draggable=Ot,n.Evented=re,n.FeatureGroup=Tt,n.GeoJSON=Pt,n.GridLayer=_e,n.Handler=kt,n.Icon=Yt,n.ImageOverlay=je,n.LatLng=V,n.LatLngBounds=ut,n.Layer=bt,n.LayerGroup=qt,n.LineUtil=as,n.Map=Z,n.Marker=He,n.Mixin=ts,n.Path=zt,n.Point=O,n.PolyUtil=es,n.Polygon=Kt,n.Polyline=Ct,n.Popup=qe,n.PosAnimation=tn,n.Projection=ss,n.Rectangle=An,n.Renderer=St,n.SVG=ye,n.SVGOverlay=vn,n.TileLayer=Qt,n.Tooltip=Ye,n.Transformation=_i,n.Util=Ie,n.VideoOverlay=_n,n.bind=l,n.bounds=dt,n.canvas=xn,n.circle=ms,n.circleMarker=ps,n.control=pe,n.divIcon=ks,n.extend=i,n.featureGroup=ds,n.geoJSON=gn,n.geoJson=vs,n.gridLayer=As,n.icon=us,n.imageOverlay=ys,n.latLng=U,n.latLngBounds=$,n.layerGroup=cs,n.map=qa,n.marker=fs,n.point=D,n.polygon=_s,n.polyline=gs,n.popup=ws,n.rectangle=Ts,n.setOptions=A,n.stamp=p,n.svg=kn,n.svgOverlay=bs,n.tileLayer=Ln,n.tooltip=xs,n.transformation=ae,n.version=h,n.videoOverlay=Ls;var Ps=window.L;n.noConflict=function(){return window.L=Ps,this},window.L=n}))})(te,te.exports)),te.exports}var Q=Qi();const we=pt({__proto__:null,default:Nn(Q)},[Q]),Zn='.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}',Hn=`.leaflet-draw-section{position:relative}.leaflet-draw-toolbar{margin-top:12px}.leaflet-draw-toolbar-top{margin-top:0}.leaflet-draw-toolbar-notop a:first-child{border-top-right-radius:0}.leaflet-draw-toolbar-nobottom a:last-child{border-bottom-right-radius:0}.leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAAeCAYAAACWuCNnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbvSURBVHic7dtdbBxXFQfw/9nZ3SRKwAP7UFFUQOoHqGnUoEAoNghX9tyxVcpD1X0J+WgiUQmpfUB5ACSgG1qJIKASqBIUIauqAbWseIlqb+bOWHVR6y0FKZBEqdIUQROIREGRx3FFvR/38ODZst3a3nE8Ywfv+T2t7hzdM3fle/bOnWtACCGEEEIIIYQQQgghhBBCCCGEEEIIIcRa0EbfgBDdFItFKwzDAa3175LuWylVAvBIR/MxrXUp6Vxx9dp4VyObVEdKKW591lonXgiVUg6AHzPzk9ls9meVSmUh6RzXkz179uQKhcIgM+8CACI6U6vVnp+enm6knXt4ePiuTCbzWQAwxlSDIHg57ZwroDAMnwKwz3XdBzzPG08hxzsTNprQG2lTjtd13WFmfghAP4A+AJcATFiW9YNKpfL3uP0kUliiX4SG1pqUUpx0wXJd9/PMXAGwPWq6yMyPz8/P/7xarf4nyVwt7QV4JWkU52i8YwBu6bh0wRhzJAiCF5POCQCDg4N2Pp//NYDRjkuTxph9QRCESeYrFov5ubm5R5n5AIAPtV1aYOb7BgYGTpZKJeO67lFmPsbM9/i+/8Ja8y6zylhOYquPXhsvAJRKpczMzMwTAIaJ6LFGo+HNzs5eKRQKNxPRAWb+CoAjWuvn4vS35skWFasxAAdbbUlOYqVUPwAPwI4lLr8J4KeWZT1eqVTmksoZ5d2QghUVKx/AlmVCFph5yPf9l5LMCwBKqUksFqszRHQcAJj5GwB2MfOE7/tfTDKf4zjHiejrAE4CuNhqZ+bf2rY9FYbhGBH92/O8o47j3Oj7/uUk86+3XhsvACilHmPmgW3btn3pxIkTVzuvj4yMfNoY85wxZiQIglPd+lvTZIuq5xiAQwCe6evr218ul5tr6bNd9GiiAbyvS+hFrfVHk8oLbEzBih4Dz+G9K6t3IaLXFhYWdib5eBh911UA8wBu1lq/CQBDQ0M3WJb1OoAdRPQZz/NeSSqnUuofAKpa6/vb26MfwacA7AdwFcCdWuu/JpU3yl1C91VHoquNXhvvyMjIx4wxr1iWtbNSqfxruTjHcR4AcMj3/bu79XnNe1hpFyvHcXYT0QS6FysASHR1tVEKhcIguhQrAGDm23K53BcATCWV27KsAWYGgPOtYgUAU1NT/1RKnQewxxjzOQCJFSwANwI4297QtmLfD+AtZr43m83OJ5iz3bGU+l1OT43XGFNk5mdXKlYAYNv2eBiG31dK3aS1vrRSbOZabqRYLFppFisAIKJxAB+MGf56krk30O64gZlMJnZsHMxsoo8fHxoauqHVHn3+BAAQUaxV57Xq2F54i5nvIaJXm81mYoX5etID491JRH/sFlQul5tEdMoYc3u32FUXrLYvObViBQDM/MQqwi8knX8jEJHpHrXIGJNo8WDm1spph2VZgeu6+5RSX7YsK8D/Xnb8Psmcnebm5h7G4uS9ysxutOH8VQC70sy7UTb7eImImTnWlgkzUyaT6fr3v6qC1fGL8EytVjuQRrECANu2fwHg1TixzPyXNO5hvTHz6VWE/znJ3L7vzxBRa9PzDmb+FYBfArgjajvd39+f9vGGKwACZh5te6mwmc8KburxMvO5TCbzqW5xxWLRArDbsqyu8z32HtZSxSrNM0Hlcrnpum6JmZ+NEb4pHglrtdrz+Xz+AoBbu4Ser9fra37d3YEBfBvAkq+XmfmbpVIp9grwWnie9zSAp9PMcT3Z7OPNZrO/aTQaf1BKfbd9X7RTGIaHmPlcnPNYsVZYSikOw7AB4CAzj/f19e1fjwOMnueVEeMxJJfLbYqCNT093TDGHAGw0qHYBQBH0vj+Pc+bYOb3HFRk5nHf9yeTzgfgMhF9uEvMTQD+71/vR3pqvJOTk28AeBJAeXR09P1LxbiuuxfA9wB8LU6fsVdYrUOhtm0fTusxcAlMRN+KziUt5SqAM3v37r00OZnGfFp/QRC86DjOUCaTGWPm2zoun8fiIbuZtPLX6/UH8/n8rQDuippertfrD6aRKyqOR5VS81ji8Z+IbmfmgwB+mEb+9dZr4wWA/v7+R6rV6k+azeYpx3EezeVyJ7dv335lfn7+lkajcZCZDzPzYd/3/xSnv9gFq3UuaR2LFQDA87xAKVUB8BEAZ6N9nrNEdEZr/TcArLVOPG8aJ9jj8n3/pcHBwZ1btmx5519zmPl0vV5/Ie2V7fT09Nujo6Nus9kcA4CtW7ce1lq/nUYu27a/Mzs7CyI6gMVX/u/CzJeZ+Ue2bcc9pb1aXc8lJZms18YLANE2wkOu694N4OFGo3E8DMMPAHiDiCaY+ZOb4YCsEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhEjYfwGO+b5dFNs4OgAAAABJRU5ErkJggg==);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e");background-repeat:no-repeat;background-size:300px 30px;background-clip:padding-box}.leaflet-retina .leaflet-draw-toolbar a{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAA8CAYAAAC6nMS5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA16SURBVHic7d1/jBxneQfw7zNzvotdn+9sVQkxoRKoammBqqpbk6uT5mLfvHPn42yn1VFRVCEhoFH5IYpoSaUCKi1NcGkcfrbCVRFKEwG2aHLn83pmLvY2CTqT1AmCOBE0EOT4B0nBPw/snb2dp3/sLr6s77i923dud/a+H8ny7tzMo8f3eud99p133gGIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiFYGaXYCRETUPMYYrWe/MAzZX2QQ27d5OpqdABFROxgZGVlz5cqVrzuOc18QBJPNzofsYvvSYrVcgTVftZ2l6npgYODXHMc5oKoHHcfZHQTB2WbnRETpGRkZWVMoFA6IyO2qutX3/R1Z64TnO8fWOwLSzti+mSKDg4M3l0qlnSJyG4CbAFwP4ByAlwE8paoPX3fddcH4+PjP00yk5QqsrDPGvAZAHsBrReRNqvpeY8x/iMg9QRCcaXJ6ZIHv+xtUdReAHQBej/IHGABOAnhORMY6OjoempiYONe0JC3zPM84jjOqqrfi6r/3RQCPAdgXhmHUvOyaa3R01L1w4cJBALdVNq1W1THP87woir7ZzNyocWzf7PA8b4uI7E6S5A9Frqknb6j8eZOIvKNQKPzU9/1/dhznvlwuV0gjn5YbFapW09Vqu/Z9K9u2bdsNruvmUe50axUAfMV13X/I5XInlzcze2x/28lCu1b19fWt7u7u/hCAvwGwboHdL6jq7unp6T1TU1OXlyG9VAwODv5mkiR7Ady6wK6Plkqldz/yyCPfX468bBkaGuqamZm5E8DbReQNANYscMiLIrI1CILnZ280xrwHwL+hck4VkacBDLTS6HVaIxWt/Blm+zauldu3atOmTas2bNjwWRG5s7LplKp+VUQOuq77/bVr17589uzZ9SKy0XGcAVUdFZE/qOx7zHXdXWn0yy31i6sMw/4MyF6BZYy5XlWPiMhvL7BrrKpfcxznE7Uf4ixYqQWW53kbATw060NZr28nSbJzcnLyRBp5pcnzvNtE5CEAvXUecg7ArjAMH00xLWuGhoZuKpVKEwB+p85DXnRd9/ZcLvcDAOjv778un88XAChwtRMWkW+jxTpfYOV1wGxfO1q1fav6+vpWr1u3blxVtwH4uar+/fT09OcW+mJrjBkBcC+AXwdwBoAJw/AZm7m1zC+uUlyNA9g6189buZH7+/t/tbOz8wiANy7isKKqftV13U8eOnToe2nlZttKLLAqJ+qjAF69xBAnZ2Zmbj58+PApm3mlqTJydRTXFldHAUxVXvcBuLnm5+dU9c1RFP1v2jk2YmhoqKtUKj2B+jvfE0mS3D45OflD4OqcHADPh2H4F6h0wp7nva1YLOby+fz5dDKnerB9Vwzxff8BVX0bgFMAdoZheKzeg4eHh9cXi8WvAfAAvOC67ptzudz/WUvOVqBGVO7OmBCR/vn2adWOuL+/v7ezs3MSwKYlhkgAHBSRjwdB8JTF1FKx0gqsymXBxwH8XoOh/ieO41vz+fwVG3mlzRjzKF55WfA8gD8LwzA3ez/P87aLyIMAeqrbVDUfRdHty5Pp0hhjPgDgM9X3qnq/iNwPYM5RCdd1T1RPvLM63+q/ce/sTpiaj+27Mvi+f6eq/iuAi67r9uVyuWcXG6NSjB8B0KeqE1EUvcVWfk3v3OYZuXosjuPt+Xx+ull51WNgYKBHRKIlXDaaS6Kq+6Mo+lMLsVKz0gosz/M+KiKfsBTub8MwvMdSrNQYYzwAYc3m7bXFVZXv+8OqemD2NlUdiKLokbRybJQx5lsANlfefi4Mww/UedyvADgI4I9mbxeRDwdB8C92s0yHrc9wK3922b6Na+X2BYD+/v61nZ2dz6M8cX00DMP9S421ffv2V83MzDwHoNfmucuxEWSpslxcjYyMrHEcZ8xScQUAjoj8vqVYZIHv+xtE5MMWQ941PDy83mK8VIjIW2s2HZ2vuAKAIAgmADyxQIxWM3uu5J56DhgZGVkDYBw1nS+ApwB82VJeZAfbt82tWrXqPSgXV481UlwBwMGDB3+sqncDgIh81EZ+QBMLrKwXV5Uh5NoPYqMyN+m9nanqHVj4bsHF6InjeKfFeKmoLMUw+/2Ct6KLyOM1m2x/NmxbW30RhuGPFtp5jstGVU+JiNdqE57rEYahzB6lWOz7Fsf2be/2hYj8SeXlvTbiFYvFLwK4DOAWY8z1NmI2pcDKcnE1OjraWSgU9uPaD2LDRKSlJwavQCO2A4rIDtsxU7BxsQeoau2Jeak3BDTDL72kUm/n63neaFoJUkPYvm3G9/0NKN9gc7mrq6t2OsOSVGqPSQCuiAzaiLnsBVaWiysAuHDhwn4AQ2nEVtUfpBGXluwNKcRcaBmPVpDMfiMiW+o4pnafZM69MmYxnW9lsj9lCNs3m1T1tSjXL89aXo39WCX+62wEW9YCK+vFVcXLKcbmJcLW8qoUYmZhZOfFmvc3e563fb6djTFvwdUJxfPFyJx6O1/f999a6Xz5ZIwMYftm2o2Vv60+HUVETldeLnoUfy7LVmC1SXEFVf0YgFSeX5QkCQus9tfyIzsicnSObQ/6vj9cu71SXP1nPTGyplAo5FDT+arqk3Ecb5s9J0dV2flmENs3u0REgTmnJjRkVjwrd2Iuy3+adimuACCKotPGmC8A+GvLoZOZmZkXLMekBojIaVX9DcthTy+8S3MlSTIuIu+q2dyjqgeMMU8A+CYAUdUtAOa8izZJkvG081wG19xN5jjO4ByLTLrLlRBZxfbNrjMAICI3LrTjIlVHrqyMjKU+gtVOxVVVHMf/hHkWrGvAiawsQrlSqOqiF61rRkzbOjo6AsxfCG4G8FcAPvhLlih5qVgsWpl42kIyezcZ1YXtmy0/QvlqwG9V1i6zZRMAiIiV+dCpFljtWFwBQOUbzqcth+XlwdZjfRRGRMZsx7St8mT5zzcQ4r52+LKgqp9S1U8B+GTtZSPKPrZvdlXaagrAalU1NmJWCrVtAEqO4xyyETO1S4TtWlxVXbp06b7u7u6/BHCTjXiqygKrxYjIQ6p6L2Y9BqZB51etWtXyBRYAuK77hVKp9H5cnUxarzOu634xjZyWWxRFdzU7B0oP2zfbVPUbIrLFcZwPAfivRuOJyPtUdbWq5m09jzCVEax2L64AYGpq6rKq/qOteI7jsMBqMUEQnFXV3bbiqerdExMT52zFS1Mul7soIovugETkI7lc7mIaORERVRWLxS8BeElVb/F9v6EnR/i+f6Oq3gUAjuPYejSavQLLGKPVP4VC4Wd4ZXF1pKura7Bdiquq3t7efwfwnKVwLLBa0PT09B5U1kZp0BPFYvGzFuIsmyAI7kf5uWz1OhgEwTV3FLaoX5yLKosWLknNsZcayohsYvu2uUo98TEAUNW9vu8vad3CoaGhLlX9BoBeAONBEByxleNyLNPwWBzHOywvBtYS9u3bV1LVj1sKxwKrBU1NTV12XXcXgFMNhDmpqndkcF6SisifAzhRx76n4jh+Byzd3rwMjldfqOqSV+xPkmT2yvzH592RlhvbdwUIw3AvgAcArFPVcHBwcFHPBvZ9f0OpVDqA8qrwL8Rx/E6b+VkvsGqfZ9ROlwXnEkXRfgDfajCMXrx48Yc28iH7crncSVXdrKpPLvZYEXk6SZItURS1/PIMcwmC4KzjOCMAam9dn+0SgJ35fP4ny5SWDQ/Mer3HGLPoTtgYMyIiv3gOmqpmZfRuJWD7rgwax/G7UH7EzcYkSf7bGHNXX1/f6oUO9H1/Z+WcPoDysgw7bJ/DUl8Hq52LqwoVkb9T1WiRx8UoX158RlWfnJqaupxCbmRJFEWn+/r6buvu7v4ggI9g4Ynv50XknkKh8JkMjly9wqFDh77j+/6oqo4BqD1xXRaRPw6CwMZl1GXjuu6XSqXSOwH8LoD1AMaMMecA1PtF53WV4wCUC+menp699jOlpWD7rhz5fP5Kf3//UFdX132q+l4Ad3d3d7/fGPN1EZlQ1e/19PS8dPbs2fWu694kIgOqOqqqm4Dy4rKlUumOw4cPN3KVYk7WVkE1xsx5aSBLT+duhDEmQrkSnssZlIeXnxWRY6p6PI7j41nveFeq4eHh9XEc7xSRnQBej6t3kp5EuWh+OI7jh+dYsDDTfN/frKrjAKpPmv9pkiS7JicnH29mXku1devWV3d0dBxAuRNeMhF5ulgsjqRxgk7DfOfqxWr1czvbtzGt3r5zGRwc7FPV3ap6y0L7ishPAHx63bp1e/bt2xenkQ8LLEuMMZtE5JCqfhfAMwCeSZLkO2vWrDk+NjbGyZHUFjzP2yginwcAVX1fVi99Vo2OjnaeP3/+3SLydgBvBNBd56GXAHxXVR/s7e3dm9YJOg0rqQNm+y5dFtp3HmKM2QxgF8qr9b8GwA0AzgH4MYBjIjJ28eLFkFeOiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIhWgv8Hnffz4dmwY9cAAAAASUVORK5CYII=);background-image:linear-gradient(transparent,transparent),url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns:dc='http://purl.org/dc/elements/1.1/'%20xmlns:cc='http://creativecommons.org/ns%23'%20xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%20xmlns:svg='http://www.w3.org/2000/svg'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20viewBox='0%200%20600%2060'%20height='60'%20width='600'%20id='svg4225'%20version='1.1'%20inkscape:version='0.91%20r13725'%20sodipodi:docname='spritesheet.svg'%20inkscape:export-filename='/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png'%20inkscape:export-xdpi='90'%20inkscape:export-ydpi='90'%3e%3cmetadata%20id='metadata4258'%3e%3crdf:RDF%3e%3ccc:Work%20rdf:about=''%3e%3cdc:format%3eimage/svg+xml%3c/dc:format%3e%3cdc:type%20rdf:resource='http://purl.org/dc/dcmitype/StillImage'%20/%3e%3cdc:title%20/%3e%3c/cc:Work%3e%3c/rdf:RDF%3e%3c/metadata%3e%3cdefs%20id='defs4256'%20/%3e%3csodipodi:namedview%20pagecolor='%23ffffff'%20bordercolor='%23666666'%20borderopacity='1'%20objecttolerance='10'%20gridtolerance='10'%20guidetolerance='10'%20inkscape:pageopacity='0'%20inkscape:pageshadow='2'%20inkscape:window-width='1920'%20inkscape:window-height='1056'%20id='namedview4254'%20showgrid='false'%20inkscape:zoom='1.3101852'%20inkscape:cx='237.56928'%20inkscape:cy='7.2419621'%20inkscape:window-x='1920'%20inkscape:window-y='24'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg4225'%20/%3e%3cg%20id='enabled'%20style='fill:%23464646;fill-opacity:1'%3e%3cg%20id='polyline'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%2018,36%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4229'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2036,18%200,6%206,0%200,-6%20-6,0%20z%20m%204,4%20-2,0%200,-2%202,0%200,2%20z'%20id='path4231'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%2023.142,39.145%20-2.285,-2.29%2016,-15.998%202.285,2.285%20z'%20id='path4233'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cpath%20id='polygon'%20d='M%20100,24.565%2097.904,39.395%2083.07,42%2076,28.773%2086.463,18%20Z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='rectangle'%20d='m%20140,20%2020,0%200,20%20-20,0%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='circle'%20d='m%20221,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20id='marker'%20d='m%20270,19%20c%20-4.971,0%20-9,4.029%20-9,9%200,4.971%205.001,12%209,14%204.001,-2%209,-9.029%209,-14%200,-4.971%20-4.029,-9%20-9,-9%20z%20m%200,12.5%20c%20-2.484,0%20-4.5,-2.014%20-4.5,-4.5%200,-2.484%202.016,-4.5%204.5,-4.5%202.485,0%204.5,2.016%204.5,4.5%200,2.486%20-2.015,4.5%20-4.5,4.5%20z'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cg%20id='edit'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20337,30.156%200,0.407%200,5.604%20c%200,1.658%20-1.344,3%20-3,3%20l%20-10,0%20c%20-1.655,0%20-3,-1.342%20-3,-3%20l%200,-10%20c%200,-1.657%201.345,-3%203,-3%20l%206.345,0%203.19,-3.17%20-9.535,0%20c%20-3.313,0%20-6,2.687%20-6,6%20l%200,10%20c%200,3.313%202.687,6%206,6%20l%2010,0%20c%203.314,0%206,-2.687%206,-6%20l%200,-8.809%20-3,2.968'%20id='path4240'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.72,24.637%20-8.892,8.892%20-2.828,0%200,-2.829%208.89,-8.89%20z'%20id='path4242'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20338.697,17.826%204,0%200,4%20-4,0%20z'%20transform='matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)'%20id='path4244'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3cg%20id='remove'%20style='fill:%23464646;fill-opacity:1'%3e%3cpath%20d='m%20381,42%2018,0%200,-18%20-18,0%200,18%20z%20m%2014,-16%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z%20m%20-4,0%202,0%200,14%20-2,0%200,-14%20z'%20id='path4247'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3cpath%20d='m%20395,20%200,-4%20-10,0%200,4%20-6,0%200,2%2022,0%200,-2%20-6,0%20z%20m%20-2,0%20-6,0%200,-2%206,0%200,2%20z'%20id='path4249'%20inkscape:connector-curvature='0'%20style='fill:%23464646;fill-opacity:1'%20/%3e%3c/g%3e%3c/g%3e%3cg%20id='disabled'%20transform='translate(120,0)'%20style='fill:%23bbbbbb'%3e%3cuse%20xlink:href='%23edit'%20id='edit-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3cuse%20xlink:href='%23remove'%20id='remove-disabled'%20x='0'%20y='0'%20width='100%25'%20height='100%25'%20/%3e%3c/g%3e%3cpath%20style='fill:none;stroke:%23464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1'%20id='circle-3'%20d='m%20581.65725,30%20c%200,6.078%20-4.926,11%20-11,11%20-6.074,0%20-11,-4.922%20-11,-11%200,-6.074%204.926,-11%2011,-11%206.074,0%2011,4.926%2011,11%20z'%20inkscape:connector-curvature='0'%20/%3e%3c/svg%3e")}.leaflet-draw a{display:block;text-align:center;text-decoration:none}.leaflet-draw a .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.leaflet-draw-actions{display:none;list-style:none;margin:0;padding:0;position:absolute;left:26px;top:0;white-space:nowrap}.leaflet-touch .leaflet-draw-actions{left:32px}.leaflet-right .leaflet-draw-actions{right:26px;left:auto}.leaflet-touch .leaflet-right .leaflet-draw-actions{right:32px;left:auto}.leaflet-draw-actions li{display:inline-block}.leaflet-draw-actions li:first-child a{border-left:0}.leaflet-draw-actions li:last-child a{-webkit-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.leaflet-right .leaflet-draw-actions li:last-child a{-webkit-border-radius:0;border-radius:0}.leaflet-right .leaflet-draw-actions li:first-child a{-webkit-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.leaflet-draw-actions a{background-color:#919187;border-left:1px solid #AAA;color:#fff;font:11px/19px Helvetica Neue,Arial,Helvetica,sans-serif;line-height:28px;text-decoration:none;padding-left:10px;padding-right:10px;height:28px}.leaflet-touch .leaflet-draw-actions a{font-size:12px;line-height:30px;height:30px}.leaflet-draw-actions-bottom{margin-top:0}.leaflet-draw-actions-top{margin-top:1px}.leaflet-draw-actions-top a,.leaflet-draw-actions-bottom a{height:27px;line-height:27px}.leaflet-draw-actions a:hover{background-color:#a0a098}.leaflet-draw-actions-top.leaflet-draw-actions-bottom a{height:26px;line-height:26px}.leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:-2px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline{background-position:0 -1px}.leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-31px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon{background-position:-29px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-62px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle{background-position:-60px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-92px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle{background-position:-90px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-122px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker{background-position:-120px -1px}.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-273px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker{background-position:-271px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-152px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit{background-position:-150px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-182px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove{background-position:-180px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-212px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled{background-position:-210px -1px}.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-242px -2px}.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled{background-position:-240px -2px}.leaflet-mouse-marker{background-color:#fff;cursor:crosshair}.leaflet-draw-tooltip{background:#363636;background:#00000080;border:1px solid transparent;-webkit-border-radius:4px;border-radius:4px;color:#fff;font:12px/18px Helvetica Neue,Arial,Helvetica,sans-serif;margin-left:20px;margin-top:-21px;padding:4px 8px;position:absolute;visibility:hidden;white-space:nowrap;z-index:6}.leaflet-draw-tooltip:before{border-right:6px solid black;border-right-color:#00000080;border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:7px;left:-7px}.leaflet-error-draw-tooltip{background-color:#f2dede;border:1px solid #e6b6bd;color:#b94a48}.leaflet-error-draw-tooltip:before{border-right-color:#e6b6bd}.leaflet-draw-tooltip-single{margin-top:-12px}.leaflet-draw-tooltip-subtext{color:#f8d5e4}.leaflet-draw-guide-dash{font-size:1%;opacity:.6;position:absolute;width:5px;height:5px}.leaflet-edit-marker-selected{background-color:#fe57a11a;border:4px dashed rgba(254,87,161,.6);-webkit-border-radius:4px;border-radius:4px;box-sizing:content-box}.leaflet-edit-move{cursor:move}.leaflet-edit-resize{cursor:pointer}.leaflet-oldie .leaflet-draw-toolbar{border:1px solid #999}`,Fn=".leaflet-ruler{height:35px;width:35px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:center}.leaflet-ruler:hover{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=)}.leaflet-ruler-clicked{height:35px;width:35px;background-repeat:no-repeat;background-position:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=);border-color:#7fff00!important}.leaflet-bar{background-color:#fff}.leaflet-control{cursor:pointer}.result-tooltip{background-color:#fff;border-width:medium;border-color:#de0000;font-size:smaller}.moving-tooltip{background-color:#ffffffb3;background-clip:padding-box;opacity:.5;border:dotted;border-color:red;font-size:smaller}.plus-length{padding-left:45px}",Gn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Vn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Wn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Jn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='430'%20height='430'%20style='width:100%25;height:100%25;transform:translate3d(0,0,0);content-visibility:visible'%20viewBox='0%200%20430%20430'%3e%3cdefs%3e%3cclipPath%20id='i'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='s'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='e'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='p'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='f'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='m'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='g'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='j'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cclipPath%20id='h'%3e%3cpath%20d='M0%200h430v430H0z'/%3e%3c/clipPath%3e%3cfilter%20id='t'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='r'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'%20stdDeviation='52.5%2052.5'/%3e%3c/filter%3e%3cfilter%20id='n'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cfilter%20id='k'%20width='300%25'%20height='300%25'%20x='-100%25'%20y='-100%25'%3e%3cfeGaussianBlur%20result='filter_result_0'/%3e%3c/filter%3e%3cmask%20id='u'%20mask-type='alpha'%3e%3cuse%20xmlns:ns1='http://www.w3.org/1999/xlink'%20ns1:href='%23a'/%3e%3c/mask%3e%3cmask%20id='q'%20mask-type='alpha'%3e%3cuse%20xmlns:ns2='http://www.w3.org/1999/xlink'%20ns2:href='%23b'/%3e%3c/mask%3e%3cmask%20id='o'%20mask-type='alpha'%3e%3cuse%20xmlns:ns3='http://www.w3.org/1999/xlink'%20ns3:href='%23c'/%3e%3c/mask%3e%3cmask%20id='l'%20mask-type='alpha'%3e%3cuse%20xmlns:ns4='http://www.w3.org/1999/xlink'%20ns4:href='%23d'/%3e%3c/mask%3e%3cg%20id='a'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23e)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='b'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='12'%20clip-path='url(%23f)'%20style='display:block'%3e%3cpath%20stroke='%2308A88A'%20d='M44.446-66.518a79.998%2079.998%200%200%200-101.012%209.952A79.998%2079.998%200%201%200%2056.569%2056.569%2080.005%2080.005%200%200%200%2073.91-30.615a80.001%2080.001%200%200%200-29.464-35.903z'%20class='secondary'%20style='display:block'%20transform='translate(215%20214)'/%3e%3cpath%20stroke='%23121331'%20d='m141.409%2025.241%208.727%205.041s0%200%200%200a22.3%2022.3%200%200%201%2010.411%2013.542%2022.32%2022.32%200%200%201-2.221%2016.937l-26.515%2045.924a22.325%2022.325%200%200%201-30.497%208.172l-8.754-5.059a143.414%20143.414%200%200%201-43.718%2025.286v10.108a22.302%2022.302%200%200%201-13.778%2020.612%2022.303%2022.303%200%200%201-8.539%201.696h-53.029a22.303%2022.303%200%200%201-15.779-6.531%2022.302%2022.302%200%200%201-6.537-15.777v-10.073a143.416%20143.416%200%200%201-43.719-25.285l-8.754%205.059a22.325%2022.325%200%200%201-30.497-8.172l-26.523-45.924a22.315%2022.315%200%200%201-2.238-16.943A22.31%2022.31%200%200%201-150.142%2030.3l8.727-5.041a145.097%20145.097%200%200%201%200-50.518l-8.727-5.041a22.294%2022.294%200%200%201-10.409-13.554%2022.306%2022.306%200%200%201%202.238-16.943l26.514-45.924a22.325%2022.325%200%200%201%2030.497-8.172l8.754%205.059a143.416%20143.416%200%200%201%2043.719-25.285v-10.073a22.302%2022.302%200%200%201%206.537-15.777%2022.3%2022.3%200%200%201%2015.779-6.531h53.02a22.307%2022.307%200%200%201%2022.317%2022.308v10.037a143.41%20143.41%200%200%201%2043.718%2025.285l8.754-5.059a22.325%2022.325%200%200%201%2030.497%208.172l26.515%2045.942a22.313%2022.313%200%200%201-1.618%2024.757%2022.294%2022.294%200%200%201-6.554%205.74l-8.727%205.041a145.097%20145.097%200%200%201%200%2050.518z'%20class='primary'%20style='display:block'%20transform='rotate(-120%20169.576%2045.095)'/%3e%3c/g%3e%3cg%20id='c'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23g)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3cg%20id='d'%20fill-opacity='0'%20stroke-linecap='round'%20stroke-linejoin='round'%20clip-path='url(%23h)'%20style='display:none'%3e%3cpath%20class='secondary'%20style='display:none'/%3e%3cpath%20class='primary'%20style='display:none'/%3e%3c/g%3e%3c/defs%3e%3cg%20clip-path='url(%23i)'%3e%3cg%20clip-path='url(%23j)'%20filter='url(%23k)'%20mask='url(%23l)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23m)'%20filter='url(%23n)'%20mask='url(%23o)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23p)'%20mask='url(%23q)'%20style='display:block'%3e%3cg%20filter='url(%23r)'%20transform='rotate(-94%20238.762%20-16.565)%20scale(2.4)'%3e%3cg%20class='design'%3e%3cpath%20fill='%234BE1EC'%20d='M0-250c137.975%200%20250%20112.025%20250%20250S137.975%20250%200%20250-250%20137.975-250%200-137.975-250%200-250z'%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20fill='%23CB5EEE'%20d='M113.242-295.384c97.478%200%20176.5%2079.022%20176.5%20176.5s-79.022%20176.5-176.5%20176.5c-43.948%200-74.396-34.057-105.29-60.631-37.631-32.369-71.21-62.338-71.21-115.869%200-97.478%2079.022-176.5%20176.5-176.5z'%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20clip-path='url(%23s)'%20filter='url(%23t)'%20mask='url(%23u)'%20style='display:none'%3e%3cg%20class='design'%3e%3cpath%20class='primary'/%3e%3c/g%3e%3cg%20class='design'%3e%3cpath%20class='secondary'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",$i="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%20-1.67%2047.336%2047.336'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group_42'%20data-name='Group%2042'%20transform='translate(-172.455%20-364.36)'%3e%3cpath%20id='Rectangle_17'%20data-name='Rectangle%2017'%20d='M4.351,0H40.984a4.351,4.351,0,0,1,4.351,4.351V22.117a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(173.455%20384.243)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_90'%20data-name='Path%2090'%20d='M218.79,390.249a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.778,3.778,0,0,1-3.777-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cg%20id='Group_41'%20data-name='Group%2041'%3e%3cpath%20id='Rectangle_18'%20data-name='Rectangle%2018'%20d='M4.351,0H26.473a4.351,4.351,0,0,1,4.351,4.351V17.883a1,1,0,0,1-1,1H1a1,1,0,0,1-1-1V4.351A4.351,4.351,0,0,1,4.351,0Z'%20transform='translate(180.71%20365.36)'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3cpath%20id='Path_91'%20data-name='Path%2091'%20d='M211.234,370.794a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778'%20fill='none'%20stroke='%23000000'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",jn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAQAAABKfvVzAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfhBQoMHg6McuYvAAABwklEQVQ4y43TP0jUYRgH8M/daQpqdujhnwShGiwyipCIoIgWxyIwrqEhnCQoGqKhpoYMg1qCQjg8TC2JCtSkjCgaKisIhyQUwpJssD9KZWRZg6d450/yGV54n/fzfd53eUOCaoNa5QpNGNPr9cKjUAatdsB++co0G1XiiHd+uqnTq8VzI874o9s2Ic1iiEpii9tmnJOdfkOldt/dU+HYolHnjdmpRNzbuVaNL86m4sXqNOrz3kMXHFKYMqd8VREGBToMifqLgwY1yNZirya5knaBqH16fJjNJiWEFSlxy4g980+pMuZkir/UJjLbrvNRPnINaLUygK/yQpuImHp47LOjuKJPOJA/1y4iZsAlyozLs8IO42L/4QlhGrSCy5oCeKH+dM59vVbL9sn6AP5MRzpnVKtN1viRxit1WRvEmVKFrQbTpoddNR3E+aYKuw1lPOapa0GcEf22KzOtejmcG1rkYdjEAn59KU5cDzjt+HI4BSZtVJTazfIsMQOmFAusLr/E53lniickJYIDNcaUL+JhMZPWBUdOeCCaweGOw5k0lFrv2uyRuBxPlLpoBtTK0p3mh+f+dKl6jX6LapRj6XrzD+1bmkFA/dTVAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA1LTEwVDEyOjMwOjE0KzAyOjAwUNH5TAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNS0xMFQxMjozMDoxNCswMjowMCGMQfAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",qn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAACmAAAApgHdff84AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAn9QTFRF////AAAAAAAAAAAAAAAAAAAzABcXABQUABIkDhwrAA0aAAwYABUgABQfABIbABAZAA8fABUcABMaABMfABIeABEcABAbABQeABMdABIdABEbABIbABIbABEdABEcABIcBxsoABEdABIdABIdABEcABMbABMdFBwgERofAhIbEhsfAhIdBxUeEhsgEBofAhMbAhMdBRMdAhIbAhIdAhMdCRceARIcDBgfDBgfDBcfDBcfFhwgDBceDBceCxceFCs5HTdGAxMcDxofGTFAHDRDHDVDHDVEHTZFDRkfEBofERogCh0oERsgARIcEhsfEhsgCh4pDCEsDRkfDRkfEBofBhQdDSMvDRgfDBgfCBUeBxUeDyUyECYzUDktPTAqCRceCRYeChYeDxkfEBkgLCgmWj4wCBYdW0AwGh4hHCAiHSAiTDctBhUdBxYdEBkfLyonMConBhUdJiUkLCclLSgmLigmOzApPTEpDBgfBRQdDBgfERsgWT8wBBMdCBYeChceQjMrSzctZEUyBBMdERsgXUAxXkExY0QzglQ5AxUfBxolSjcthlU6hlY7h1Y7AxMcSDUsSjYsd042g1Q5hlY6jVo8AhIcAxMcBBQdLEpcOVpvARIcAhIcBhQdDSIuEhsgJ0NUNS0oNi0oO11yTTgtUXmSUnqUXEAxXUExYEIyZUUzaEYzb0o1cEo1dEw2i1g8jFk8jcfskFs9mdX9mmA/mtf/pmZCqGdCsWxEvnJHxHVJxnZJyHdJzHlK0XxM031M139N3IFO3YJO4INP5IVQ5YZQ5oZQ6ohR7IlS7opS74tS8ItT841T9I1T9o5U949U+ZBV+pBV/ZJW/pJW/5NWIYcOagAAAJt0Uk5TAAECAwQFCw0OEhQVGBkcHyEkKCkqLTAzNUZLVFZZW2RnanJzeHl8f4uMjY6Pj5KVl52eoKGprKytrq+vsLGytLu9vb/BwsLDxcXP0NDS09bf4uPk5OXl5ufo6enq7O3u7+/x8fHy8/P09PT09fX19fX29vb29vb29/j4+Pj5+fn5+fn6+vr6+vr7/Pz8/Pz9/f39/f39/v7+/v7Td3FlAAABgklEQVQoU2NggAMRJU1DTWURBlQgqhWUND11Tfr05GBdMYQws8a07j2XVx2/cnLl5T0T5+ixQsX5/RrWr70CA+s2NPoLgMUlciddvnLl3PbslMysmi2ngXKTc/iA4uwRC1dfudRT76UtJy5lMHvHlSsni82ZgBLWbZdOHCuPlARpForvBYszA9ky1WeunC8y5YCI9125cqrEnJlbnoHBZ/6mK+0eTAjxUgtmbl99Bt6Ksxd2pXGDxRPg4kZMDIqxV6406cDFT8PEGRwnHLlYJQwSTwSJ51tCxRmiVuw7VAsRP7zkIEKcofnAlb0hEPWXls9AiDNUHriyMxwoPgVoToEVQpwhdNHuY/2imOIMZq1nr2QUgsVtkMUZZOOuXOmYiinOwF63/8QVsDgLd0wnFwMCOM3dBhK3ZeGOXjzLHklCIu8oRDxs8eaNXYJIMuplJ0HigYs3b906UwFJgtGzxY6FLWDe0mXLli3wVoEAaZAMjxoLA6eDu5urq4uziTEEqAIAvamx163e5EoAAAAASUVORK5CYII=";function Yn(u){const a="data-leaflet-styles";if(u.querySelector(`style[${a}]`))return;const n=document.createElement("style");n.setAttribute(a,"true"),n.textContent=`
|
|
5
5
|
/* --- Leaflet core CSS --- */
|
|
6
|
-
${
|
|
6
|
+
${Zn}
|
|
7
7
|
|
|
8
8
|
/* --- Leaflet.draw CSS --- */
|
|
9
|
-
${
|
|
9
|
+
${Hn}
|
|
10
10
|
|
|
11
11
|
/* --- Leaflet.ruler CSS --- */
|
|
12
|
-
${
|
|
12
|
+
${Fn}
|
|
13
13
|
|
|
14
14
|
/* --- Fix Leaflet.ruler icons (broken relative paths in inlined CSS) --- */
|
|
15
15
|
.leaflet-ruler {
|
|
16
16
|
width: 30px !important; /* Match Leaflet Draw default size approx */
|
|
17
17
|
height: 30px !important;
|
|
18
18
|
background-color: #fff; /* Ensure visibility */
|
|
19
|
-
background-image: url(${
|
|
19
|
+
background-image: url(${jn}) !important;
|
|
20
20
|
background-size: 16px 16px; /* Scale icon to fit */
|
|
21
21
|
}
|
|
22
22
|
.leaflet-ruler:hover,
|
|
23
23
|
.leaflet-ruler-clicked {
|
|
24
|
-
background-image: url(${
|
|
24
|
+
background-image: url(${qn}) !important;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/* --- Custom overrides for marker/handle sizes --- */
|
|
@@ -51,7 +51,7 @@ ${Nn}
|
|
|
51
51
|
padding: 0;
|
|
52
52
|
border-radius: 4px;
|
|
53
53
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
|
|
54
|
-
background-image: url(${
|
|
54
|
+
background-image: url(${Jn});
|
|
55
55
|
transition: background-color 0.15s ease, box-shadow 0.15s ease;
|
|
56
56
|
}
|
|
57
57
|
.leaflet-ruler-settings-button:hover {
|
|
@@ -135,7 +135,7 @@ ${Nn}
|
|
|
135
135
|
|
|
136
136
|
/* --- Layer Cake draw tool icon + manager UI --- */
|
|
137
137
|
.leaflet-draw-toolbar a.leaflet-draw-draw-cake {
|
|
138
|
-
background-image: url(${
|
|
138
|
+
background-image: url(${$i}) !important;
|
|
139
139
|
background-size: 18px 18px !important;
|
|
140
140
|
background-position: 50% 50% !important;
|
|
141
141
|
background-repeat: no-repeat !important;
|
|
@@ -181,6 +181,54 @@ ${Nn}
|
|
|
181
181
|
border-right-color: #8A2BE2 !important;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
/* --- Managed toolbar controls --- */
|
|
185
|
+
[data-geokit-map-container][data-geokit-default-toolbar-hidden] .leaflet-draw-toolbar,
|
|
186
|
+
[data-geokit-map-container][data-geokit-default-toolbar-hidden] .leaflet-ruler,
|
|
187
|
+
[data-geokit-map-container][data-geokit-default-toolbar-hidden] .leaflet-ruler-settings-control {
|
|
188
|
+
display: none !important;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.leaflet-geokit-toolbar-group {
|
|
192
|
+
display: flex !important;
|
|
193
|
+
flex-direction: column !important;
|
|
194
|
+
gap: 6px !important;
|
|
195
|
+
padding: 6px !important;
|
|
196
|
+
border: 1px solid rgba(15, 23, 18, 0.16) !important;
|
|
197
|
+
border-radius: 16px !important;
|
|
198
|
+
background: rgba(255, 255, 255, 0.94) !important;
|
|
199
|
+
backdrop-filter: blur(10px) !important;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.leaflet-geokit-toolbar-button {
|
|
203
|
+
width: 44px !important;
|
|
204
|
+
height: 44px !important;
|
|
205
|
+
border: 1px solid rgba(15, 23, 18, 0.18) !important;
|
|
206
|
+
border-radius: 12px !important;
|
|
207
|
+
background: #fff !important;
|
|
208
|
+
color: #1f5134 !important;
|
|
209
|
+
box-shadow: 0 10px 24px rgba(15, 23, 18, 0.16) !important;
|
|
210
|
+
transition:
|
|
211
|
+
background 160ms ease,
|
|
212
|
+
border-color 160ms ease,
|
|
213
|
+
box-shadow 160ms ease,
|
|
214
|
+
transform 160ms ease !important;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.leaflet-geokit-toolbar-button:hover,
|
|
218
|
+
.leaflet-geokit-toolbar-button:focus-visible {
|
|
219
|
+
background: #f0f8ed !important;
|
|
220
|
+
border-color: #2f8f5f !important;
|
|
221
|
+
box-shadow:
|
|
222
|
+
0 0 0 1px rgba(47, 143, 95, 0.35),
|
|
223
|
+
0 12px 26px rgba(15, 23, 18, 0.18) !important;
|
|
224
|
+
transform: translateY(-1px) !important;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.leaflet-geokit-toolbar-button:focus-visible {
|
|
228
|
+
outline: 2px solid #2f8f5f !important;
|
|
229
|
+
outline-offset: 2px !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
184
232
|
/* --- Move tool mode cursor styles --- */
|
|
185
233
|
.leaflet-draw-move-mode {
|
|
186
234
|
cursor: default !important;
|
|
@@ -193,21 +241,21 @@ ${Nn}
|
|
|
193
241
|
.leaflet-draw-move-mode .leaflet-interactive:active {
|
|
194
242
|
cursor: grabbing !important;
|
|
195
243
|
}
|
|
196
|
-
`,u.appendChild(n)}function
|
|
244
|
+
`,u.appendChild(n)}function Kn(u){const a="data-leaflet-custom-styles";if(u.querySelector(`style[${a}]`))return;const n=document.createElement("style");n.setAttribute(a,"true"),n.textContent=`
|
|
197
245
|
/* Ensure Layer Cake toolbar icon uses project asset instead of draw sprite sheet */
|
|
198
246
|
.leaflet-draw-toolbar a.leaflet-draw-draw-cake {
|
|
199
|
-
background-image: url(${
|
|
247
|
+
background-image: url(${$i}) !important;
|
|
200
248
|
background-size: 18px 18px !important;
|
|
201
249
|
background-position: 50% 50% !important;
|
|
202
250
|
background-repeat: no-repeat !important;
|
|
203
251
|
background-color: #fff;
|
|
204
252
|
}
|
|
205
|
-
`,u.appendChild(n)}function jn(){var u,a;(a=(u=X.Icon.Default).mergeOptions)==null||a.call(u,{iconRetinaUrl:Zn,iconUrl:Hn,shadowUrl:Fn})}function Jn(u){const{root:a,skipStyles:n}=u;try{n||(qn(a),jn()),Yn(a)}catch{}}(function(u,a,n){function h(i,r){for(;(i=i.parentElement)&&!i.classList.contains(r););return i}L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(i,r){this._map=i,this._container=i._container,this._overlayPane=i._panes.overlayPane,this._popupPane=i._panes.popupPane,r&&r.shapeOptions&&(r.shapeOptions=L.Util.extend({},this.options.shapeOptions,r.shapeOptions)),L.setOptions(this,r);var l=L.version.split(".");parseInt(l[0],10)===1&&parseInt(l[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(L.DomUtil.disableTextSelection(),i.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(i){L.setOptions(this,i)},_fireCreatedEvent:function(i){this._map.fire(L.Draw.Event.CREATED,{layer:i,layerType:this.type})},_cancelDrawing:function(i){i.keyCode===27&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(i,r){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,r&&r.drawError&&(r.drawError=L.Util.extend({},this.options.drawError,r.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var i=this._markers.pop(),r=this._poly,l=r.getLatLngs(),d=l.splice(-1,1)[0];this._poly.setLatLngs(l),this._markerGroup.removeLayer(i),r.getLatLngs().length<2&&this._map.removeLayer(r),this._vertexChanged(d,!1)}},addVertex:function(i){if(this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(i))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(i)),this._poly.addLatLng(i),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._vertexChanged(i,!0)},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var i=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),r=this._poly.newLatLngIntersects(i[i.length-1]);if(!this.options.allowIntersection&&r||!this._shapeIsValid())return void this._showErrorTooltip();this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_shapeIsValid:function(){return!0},_onZoomEnd:function(){this._markers!==null&&this._updateGuide()},_onMouseMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent),l=this._map.layerPointToLatLng(r);this._currentLatLng=l,this._updateTooltip(l),this._updateGuide(r),this._mouseMarker.setLatLng(l),L.DomEvent.preventDefault(i.originalEvent)},_vertexChanged:function(i,r){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(i,r),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(i){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(i),this._clickHandled=!0,this._disableNewMarkers();var r=i.originalEvent,l=r.clientX,d=r.clientY;this._startPoint.call(this,l,d)}},_startPoint:function(i,r){this._mouseDownOrigin=L.point(i,r)},_onMouseUp:function(i){var r=i.originalEvent,l=r.clientX,d=r.clientY;this._endPoint.call(this,l,d,i),this._clickHandled=null},_endPoint:function(i,r,l){if(this._mouseDownOrigin){var d=L.point(i,r).distanceTo(this._mouseDownOrigin),p=this._calculateFinishDistance(l.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(l.latlng),this._finishShape()):p<10&&L.Browser.touch?this._finishShape():Math.abs(d)<9*(u.devicePixelRatio||1)&&this.addVertex(l.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(i){var r,l,d=i.originalEvent;!d.touches||!d.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(r=d.touches[0].clientX,l=d.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,r,l),this._endPoint.call(this,r,l,i),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(i){var r;if(this._markers.length>0){var l;if(this.type===L.Draw.Polyline.TYPE)l=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;l=this._markers[0]}var d=this._map.latLngToContainerPoint(l.getLatLng()),p=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),_=this._map.latLngToContainerPoint(p.getLatLng());r=d.distanceTo(_)}else r=1/0;return r},_updateFinishHandler:function(){var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_createMarker:function(i){var r=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(r),r},_updateGuide:function(i){var r=this._markers?this._markers.length:0;r>0&&(i=i||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[r-1].getLatLng()),i))},_updateTooltip:function(i){var r=this._getTooltipText();i&&this._tooltip.updatePosition(i),this._errorShown||this._tooltip.updateContent(r)},_drawGuide:function(i,r){var l,d,p,_=Math.floor(Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2))),g=this.options.guidelineDistance,y=this.options.maxGuideLineLength,x=_>y?_-y:g;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));x<_;x+=this.options.guidelineDistance)l=x/_,d={x:Math.floor(i.x*(1-l)+l*r.x),y:Math.floor(i.y*(1-l)+l*r.y)},p=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer),p.style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(p,d)},_updateGuideColor:function(i){if(this._guidesContainer)for(var r=0,l=this._guidesContainer.childNodes.length;r<l;r++)this._guidesContainer.childNodes[r].style.backgroundColor=i},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var i,r,l=this.options.showLength;return this._markers.length===0?i={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(r=l?this._getMeasurementString():"",i=this._markers.length===1?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:r}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:r}),i},_updateRunningMeasure:function(i,r){var l,d,p=this._markers.length;this._markers.length===1?this._measurementRunningTotal=0:(l=p-(r?2:1),d=L.GeometryUtil.isVersion07x()?i.distanceTo(this._markers[l].getLatLng())*(this.options.factor||1):this._map.distance(i,this._markers[l].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=d*(r?1:-1))},_getMeasurementString:function(){var i,r=this._currentLatLng,l=this._markers[this._markers.length-1].getLatLng();return i=L.GeometryUtil.isVersion07x()?l&&r&&r.distanceTo?this._measurementRunningTotal+r.distanceTo(l)*(this.options.factor||1):this._measurementRunningTotal||0:l&&r?this._measurementRunningTotal+this._map.distance(r,l)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(i,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var i=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(i,r){L.Draw.Polyline.prototype.initialize.call(this,i,r),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var i=this._markers.length;i===1&&this._markers[0].on("click",this._finishShape,this),i>2&&(this._markers[i-1].on("dblclick",this._finishShape,this),i>3&&this._markers[i-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var i,r;return this._markers.length===0?i=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(i=L.drawLocal.draw.handlers.polygon.tooltip.cont,r=this._getMeasurementString()):(i=L.drawLocal.draw.handlers.polygon.tooltip.end,r=this._getMeasurementString()),{text:i,subtext:r}},_getMeasurementString:function(){var i=this._area,r="";return i||this.options.showLength?(this.options.showLength&&(r=L.Draw.Polyline.prototype._getMeasurementString.call(this)),i&&(r+="<br>"+L.GeometryUtil.readableArea(i,this.options.metric,this.options.precision)),r):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(i,r){var l;!this.options.allowIntersection&&this.options.showArea&&(l=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(l)),L.Draw.Polyline.prototype._vertexChanged.call(this,i,r)},_cleanUpShape:function(){var i=this._markers.length;i>0&&(this._markers[0].off("click",this._finishShape,this),i>2&&this._markers[i-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(i,r){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),a.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(a,"mouseup",this._onMouseUp,this),L.DomEvent.off(a,"touchend",this._onMouseUp,this),a.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(i){this._isDrawing=!0,this._startLatLng=i.latlng,L.DomEvent.on(a,"mouseup",this._onMouseUp,this).on(a,"touchend",this._onMouseUp,this).preventDefault(i.originalEvent)},_onMouseMove:function(i){var r=i.latlng;this._tooltip.updatePosition(r),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(r))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(i,r){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,r)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(i){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!h(i.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(i){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,i)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,i),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_getTooltipText:function(){var i,r,l,d=L.Draw.SimpleShape.prototype._getTooltipText.call(this),p=this._shape,_=this.options.showArea;return p&&(i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),r=L.GeometryUtil.geodesicArea(i),l=_?L.GeometryUtil.readableArea(r,this.options.metric):""),{text:d.text,subtext:l}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(i,r){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(i){var r=i.latlng;this._tooltip.updatePosition(r),this._mouseMarker.setLatLng(r),this._marker?(r=this._mouseMarker.getLatLng(),this._marker.setLatLng(r)):(this._marker=this._createMarker(r),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(i){return new L.Marker(i,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(i){this._onMouseMove(i),this._onClick()},_fireCreatedEvent:function(){var i=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(i,r){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,r)},_fireCreatedEvent:function(){var i=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)},_createMarker:function(i){return new L.CircleMarker(i,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(i,r){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,r)},_drawShape:function(i){if(L.GeometryUtil.isVersion07x())var r=this._startLatLng.distanceTo(i);else var r=this._map.distance(this._startLatLng,i);this._shape?this._shape.setRadius(r):(this._shape=new L.Circle(this._startLatLng,r,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_onMouseMove:function(i){var r,l=i.latlng,d=this.options.showRadius,p=this.options.metric;if(this._tooltip.updatePosition(l),this._isDrawing){this._drawShape(l),r=this._shape.getRadius().toFixed(1);var _="";d&&(_=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(r,p,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:_})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(i,r){this._marker=i,L.setOptions(this,r)},addHooks:function(){var i=this._marker;i.dragging.enable(),i.on("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},removeHooks:function(){var i=this._marker;i.dragging.disable(),i.off("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},_onDragEnd:function(i){var r=i.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_toggleMarkerHighlight:function(){var i=this._marker._icon;i&&(i.style.display="none",L.DomUtil.hasClass(i,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,-4)):(L.DomUtil.addClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,4)),i.style.display="")},_offsetMarker:function(i,r){var l=parseInt(i.style.marginTop,10)-r,d=parseInt(i.style.marginLeft,10)-r;i.style.marginTop=l+"px",i.style.marginLeft=d+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(i){this.latlngs=[i._latlngs],i._holes&&(this.latlngs=this.latlngs.concat(i._holes)),this._poly=i,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(i){for(var r=0;r<this._verticesHandlers.length;r++)i(this._verticesHandlers[r])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(i){i.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(i){i.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(i){i.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var i=0;i<this.latlngs.length;i++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[i],this._poly.options.poly))},_updateLatLngs:function(i){this.latlngs=[i.layer._latlngs],i.layer._holes&&(this.latlngs=this.latlngs.concat(i.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(i,r,l){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=i,l&&l.drawError&&(l.drawError=L.Util.extend({},this.options.drawError,l.drawError)),this._latlngs=r,L.setOptions(this,l)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var i=this._poly,r=i._path;i instanceof L.Polygon||(i.options.fill=!1,i.options.editing&&(i.options.editing.fill=!1)),r&&i.options.editing&&i.options.editing.className&&(i.options.original.className&&i.options.original.className.split(" ").forEach(function(l){L.DomUtil.removeClass(r,l)}),i.options.editing.className.split(" ").forEach(function(l){L.DomUtil.addClass(r,l)})),i.setStyle(i.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var i=this._poly,r=i._path;r&&i.options.editing&&i.options.editing.className&&(i.options.editing.className.split(" ").forEach(function(l){L.DomUtil.removeClass(r,l)}),i.options.original.className&&i.options.original.className.split(" ").forEach(function(l){L.DomUtil.addClass(r,l)})),i.setStyle(i.options.original),i._map&&(i._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var i,r,l,d,p=this._defaultShape();for(i=0,l=p.length;i<l;i++)d=this._createMarker(p[i],i),d.on("click",this._onMarkerClick,this),d.on("contextmenu",this._onContextMenu,this),this._markers.push(d);var _,g;for(i=0,r=l-1;i<l;r=i++)(i!==0||L.Polygon&&this._poly instanceof L.Polygon)&&(_=this._markers[r],g=this._markers[i],this._createMiddleMarker(_,g),this._updatePrevNext(_,g))},_createMarker:function(i,r){var l=new L.Marker.Touch(i,{draggable:!0,icon:this.options.icon});return l._origLatLng=i,l._index=r,l.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(l),l},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var i=this._defaultShape(),r=[].splice.apply(i,arguments);return this._poly._convertLatLngs(i,!0),this._poly.redraw(),r},_removeMarker:function(i){var r=i._index;this._markerGroup.removeLayer(i),this._markers.splice(r,1),this._spliceLatLngs(r,1),this._updateIndexes(r,-1),i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(i){var r=i.target,l=this._poly,d=L.LatLngUtil.cloneLatLng(r._origLatLng);if(L.extend(r._origLatLng,r._latlng),l.options.poly){var p=l._map._editTooltip;if(!l.options.poly.allowIntersection&&l.intersects()){L.extend(r._origLatLng,d),r.setLatLng(d);var _=l.options.color;l.setStyle({color:this.options.drawError.color}),p&&p.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){l.setStyle({color:_}),p&&p.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}r._middleLeft&&r._middleLeft.setLatLng(this._getMiddleLatLng(r._prev,r)),r._middleRight&&r._middleRight.setLatLng(this._getMiddleLatLng(r,r._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var g=this._poly.getLatLngs();this._poly._convertLatLngs(g,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(i){var r=L.Polygon&&this._poly instanceof L.Polygon?4:3,l=i.target;this._defaultShape().length<r||(this._removeMarker(l),this._updatePrevNext(l._prev,l._next),l._middleLeft&&this._markerGroup.removeLayer(l._middleLeft),l._middleRight&&this._markerGroup.removeLayer(l._middleRight),l._prev&&l._next?this._createMiddleMarker(l._prev,l._next):l._prev?l._next||(l._prev._middleRight=null):l._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(i){var r=i.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:r,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),l=this._map.layerPointToLatLng(r),d=i.target;L.extend(d._origLatLng,l),d._middleLeft&&d._middleLeft.setLatLng(this._getMiddleLatLng(d._prev,d)),d._middleRight&&d._middleRight.setLatLng(this._getMiddleLatLng(d,d._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(i,r){this._markerGroup.eachLayer(function(l){l._index>i&&(l._index+=r)})},_createMiddleMarker:function(i,r){var l,d,p,_=this._getMiddleLatLng(i,r),g=this._createMarker(_);g.setOpacity(.6),i._middleRight=r._middleLeft=g,d=function(){g.off("touchmove",d,this);var y=r._index;g._index=y,g.off("click",l,this).on("click",this._onMarkerClick,this),_.lat=g.getLatLng().lat,_.lng=g.getLatLng().lng,this._spliceLatLngs(y,0,_),this._markers.splice(y,0,g),g.setOpacity(1),this._updateIndexes(y,1),r._index++,this._updatePrevNext(i,g),this._updatePrevNext(g,r),this._poly.fire("editstart")},p=function(){g.off("dragstart",d,this),g.off("dragend",p,this),g.off("touchmove",d,this),this._createMiddleMarker(i,g),this._createMiddleMarker(g,r)},l=function(){d.call(this),p.call(this),this._fireEdit()},g.on("click",l,this).on("dragstart",d,this).on("dragend",p,this).on("touchmove",d,this),this._markerGroup.addLayer(g)},_updatePrevNext:function(i,r){i&&(i._next=r),r&&(r._prev=i)},_getMiddleLatLng:function(i,r){var l=this._poly._map,d=l.project(i.getLatLng()),p=l.project(r.getLatLng());return l.unproject(d._add(p)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(i,r){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=i,L.Util.setOptions(this,r)},addHooks:function(){var i=this._shape;this._shape._map&&(this._map=this._shape._map,i.setStyle(i.options.editing),i._map&&(this._map=i._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var i=this._shape;if(i.setStyle(i.options.original),i._map){this._unbindMarker(this._moveMarker);for(var r=0,l=this._resizeMarkers.length;r<l;r++)this._unbindMarker(this._resizeMarkers[r]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(i,r){var l=new L.Marker.Touch(i,{draggable:!0,icon:r,zIndexOffset:10});return this._bindMarker(l),this._markerGroup.addLayer(l),l},_bindMarker:function(i){i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(i){i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(i){i.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(i){var r=i.target,l=r.getLatLng();r===this._moveMarker?this._move(l):this._resize(l),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(i){i.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(i){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i),typeof this._getCorners=="function"){var r=this._getCorners(),l=i.target,d=l._cornerIndex;l.setOpacity(0),this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)}this._shape.fire("editstart")},_onTouchMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),l=this._map.layerPointToLatLng(r);return i.target===this._moveMarker?this._move(l):this._resize(l),this._shape.redraw(),!1},_onTouchEnd:function(i){i.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getBounds(),r=i.getCenter();this._moveMarker=this._createMarker(r,this.options.moveIcon)},_createResizeMarker:function(){var i=this._getCorners();this._resizeMarkers=[];for(var r=0,l=i.length;r<l;r++)this._resizeMarkers.push(this._createMarker(i[r],this.options.resizeIcon)),this._resizeMarkers[r]._cornerIndex=r},_onMarkerDragStart:function(i){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i);var r=this._getCorners(),l=i.target,d=l._cornerIndex;this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)},_onMarkerDragEnd:function(i){var r,l,d=i.target;d===this._moveMarker&&(r=this._shape.getBounds(),l=r.getCenter(),d.setLatLng(l)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,i)},_move:function(i){for(var r,l=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),d=this._shape.getBounds(),p=d.getCenter(),_=[],g=0,y=l.length;g<y;g++)r=[l[g].lat-p.lat,l[g].lng-p.lng],_.push([i.lat+r[0],i.lng+r[1]]);this._shape.setLatLngs(_),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(i){var r;this._shape.setBounds(L.latLngBounds(i,this._oppositeCorner)),r=this._shape.getBounds(),this._moveMarker.setLatLng(r.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var i=this._shape.getBounds();return[i.getNorthWest(),i.getNorthEast(),i.getSouthEast(),i.getSouthWest()]},_toggleCornerMarkers:function(i){for(var r=0,l=this._resizeMarkers.length;r<l;r++)this._resizeMarkers[r].setOpacity(i)},_repositionCornerMarkers:function(){for(var i=this._getCorners(),r=0,l=this._resizeMarkers.length;r<l;r++)this._resizeMarkers[r].setLatLng(i[r])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getLatLng();this._moveMarker=this._createMarker(i,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(i){if(this._resizeMarkers.length){var r=this._getResizeMarkerPoint(i);this._resizeMarkers[0].setLatLng(r)}this._shape.setLatLng(i),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var i=this._shape.getLatLng(),r=this._getResizeMarkerPoint(i);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(r,this.options.resizeIcon))},_getResizeMarkerPoint:function(i){var r=this._shape._radius*Math.cos(Math.PI/4),l=this._map.project(i);return this._map.unproject([l.x+r,l.y-r])},_resize:function(i){var r=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=r.distanceTo(i):radius=this._map.distance(r,i),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(i){this._map=i,this._container=i._container,this._pane=i._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(i,r){var l={};if(i.touches!==void 0){if(!i.touches.length)return;l=i.touches[0]}else if(i.pointerType!=="touch"||(l=i,!this._filterClick(i)))return;var d=this._map.mouseEventToContainerPoint(l),p=this._map.mouseEventToLayerPoint(l),_=this._map.layerPointToLatLng(p);this._map.fire(r,{latlng:_,layerPoint:p,containerPoint:d,pageX:l.pageX,pageY:l.pageY,originalEvent:i})},_filterClick:function(i){var r=i.timeStamp||i.originalEvent.timeStamp,l=L.DomEvent._lastClick&&r-L.DomEvent._lastClick;return l&&l>100&&l<500||i.target._simulatedClick&&!i._simulated?(L.DomEvent.stop(i),!1):(L.DomEvent._lastClick=r,!0)},_onTouchStart:function(i){this._map._loaded&&this._touchEvent(i,"touchstart")},_onTouchEnd:function(i){this._map._loaded&&this._touchEvent(i,"touchend")},_onTouchCancel:function(i){if(this._map._loaded){var r="touchcancel";this._detectIE()&&(r="pointercancel"),this._touchEvent(i,r)}},_onTouchLeave:function(i){this._map._loaded&&this._touchEvent(i,"touchleave")},_onTouchMove:function(i){this._map._loaded&&this._touchEvent(i,"touchmove")},_detectIE:function(){var i=u.navigator.userAgent,r=i.indexOf("MSIE ");if(r>0)return parseInt(i.substring(r+5,i.indexOf(".",r)),10);if(i.indexOf("Trident/")>0){var l=i.indexOf("rv:");return parseInt(i.substring(l+3,i.indexOf(".",l)),10)}var d=i.indexOf("Edge/");return d>0&&parseInt(i.substring(d+5,i.indexOf(".",d)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var i=this._icon,r=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?r.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):r.concat(["touchcancel"]),L.DomUtil.addClass(i,"leaflet-clickable"),L.DomEvent.on(i,"click",this._onMouseClick,this),L.DomEvent.on(i,"keypress",this._onKeyPress,this);for(var l=0;l<r.length;l++)L.DomEvent.on(i,r[l],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var i=u.navigator.userAgent,r=i.indexOf("MSIE ");if(r>0)return parseInt(i.substring(r+5,i.indexOf(".",r)),10);if(i.indexOf("Trident/")>0){var l=i.indexOf("rv:");return parseInt(i.substring(l+3,i.indexOf(".",l)),10)}var d=i.indexOf("Edge/");return d>0&&parseInt(i.substring(d+5,i.indexOf(".",d)),10)}}),L.LatLngUtil={cloneLatLngs:function(i){for(var r=[],l=0,d=i.length;l<d;l++)Array.isArray(i[l])?r.push(L.LatLngUtil.cloneLatLngs(i[l])):r.push(this.cloneLatLng(i[l]));return r},cloneLatLng:function(i){return L.latLng(i.lat,i.lng)}},(function(){var i={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(r){var l,d,p=r.length,_=0,g=Math.PI/180;if(p>2){for(var y=0;y<p;y++)l=r[y],d=r[(y+1)%p],_+=(d.lng-l.lng)*g*(2+Math.sin(l.lat*g)+Math.sin(d.lat*g));_=6378137*_*6378137/2}return Math.abs(_)},formattedNumber:function(r,l){var d=parseFloat(r).toFixed(l),p=L.drawLocal.format&&L.drawLocal.format.numeric,_=p&&p.delimiters,g=_&&_.thousands,y=_&&_.decimal;if(g||y){var x=d.split(".");d=g?x[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+g):x[0],y=y||".",x.length>1&&(d=d+y+x[1])}return d},readableArea:function(r,l,g){var p,_,g=L.Util.extend({},i,g);return l?(_=["ha","m"],type=typeof l,type==="string"?_=[l]:type!=="boolean"&&(_=l),p=r>=1e6&&_.indexOf("km")!==-1?L.GeometryUtil.formattedNumber(1e-6*r,g.km)+" km²":r>=1e4&&_.indexOf("ha")!==-1?L.GeometryUtil.formattedNumber(1e-4*r,g.ha)+" ha":L.GeometryUtil.formattedNumber(r,g.m)+" m²"):(r/=.836127,p=r>=3097600?L.GeometryUtil.formattedNumber(r/3097600,g.mi)+" mi²":r>=4840?L.GeometryUtil.formattedNumber(r/4840,g.ac)+" acres":L.GeometryUtil.formattedNumber(r,g.yd)+" yd²"),p},readableDistance:function(r,l,d,p,y){var g,y=L.Util.extend({},i,y);switch(l?typeof l=="string"?l:"metric":d?"feet":p?"nauticalMile":"yards"){case"metric":g=r>1e3?L.GeometryUtil.formattedNumber(r/1e3,y.km)+" km":L.GeometryUtil.formattedNumber(r,y.m)+" m";break;case"feet":r*=3.28083,g=L.GeometryUtil.formattedNumber(r,y.ft)+" ft";break;case"nauticalMile":r*=.53996,g=L.GeometryUtil.formattedNumber(r/1e3,y.nm)+" nm";break;case"yards":default:r*=1.09361,g=r>1760?L.GeometryUtil.formattedNumber(r/1760,y.mi)+" miles":L.GeometryUtil.formattedNumber(r,y.yd)+" yd"}return g},isVersion07x:function(){var r=L.version.split(".");return parseInt(r[0],10)===0&&parseInt(r[1],10)===7}})})(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(i,r,l,d){return this._checkCounterclockwise(i,l,d)!==this._checkCounterclockwise(r,l,d)&&this._checkCounterclockwise(i,r,l)!==this._checkCounterclockwise(i,r,d)},_checkCounterclockwise:function(i,r,l){return(l.y-i.y)*(r.x-i.x)>(r.y-i.y)*(l.x-i.x)}}),L.Polyline.include({intersects:function(){var i,r,l,d=this._getProjectedPoints(),p=d?d.length:0;if(this._tooFewPointsForIntersection())return!1;for(i=p-1;i>=3;i--)if(r=d[i-1],l=d[i],this._lineSegmentsIntersectsRange(r,l,i-2))return!0;return!1},newLatLngIntersects:function(i,r){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(i),r)},newPointIntersects:function(i,r){var l=this._getProjectedPoints(),d=l?l.length:0,p=l?l[d-1]:null,_=d-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(p,i,_,r?1:0)},_tooFewPointsForIntersection:function(i){var r=this._getProjectedPoints(),l=r?r.length:0;return l+=i||0,!r||l<=3},_lineSegmentsIntersectsRange:function(i,r,l,d){var p,_,g=this._getProjectedPoints();d=d||0;for(var y=l;y>d;y--)if(p=g[y-1],_=g[y],L.LineUtil.segmentsIntersect(i,r,p,_))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var i=[],r=this._defaultShape(),l=0;l<r.length;l++)i.push(this._map.latLngToLayerPoint(r[l]));return i}}),L.Polygon.include({intersects:function(){var i,r,l,d,p=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(i=p.length,r=p[0],l=p[i-1],d=i-2,this._lineSegmentsIntersectsRange(l,r,d,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(i){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,i);var r;this._toolbars={},L.DrawToolbar&&this.options.draw&&(r=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=r,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(r=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=r,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(i){var r,l=L.DomUtil.create("div","leaflet-draw"),d=!1;for(var p in this._toolbars)this._toolbars.hasOwnProperty(p)&&(r=this._toolbars[p].addToolbar(i))&&(d||(L.DomUtil.hasClass(r,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(r.childNodes[0],"leaflet-draw-toolbar-top"),d=!0),l.appendChild(r));return l},onRemove:function(){for(var i in this._toolbars)this._toolbars.hasOwnProperty(i)&&this._toolbars[i].removeToolbar()},setDrawingOptions:function(i){for(var r in this._toolbars)this._toolbars[r]instanceof L.DrawToolbar&&this._toolbars[r].setOptions(i)},_toolbarEnabled:function(i){var r=i.target;for(var l in this._toolbars)this._toolbars[l]!==r&&this._toolbars[l].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(i){L.setOptions(this,i),this._modes={},this._actionButtons=[],this._activeMode=null;var r=L.version.split(".");parseInt(r[0],10)===1&&parseInt(r[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return this._activeMode!==null},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(i){var r,l=L.DomUtil.create("div","leaflet-draw-section"),d=0,p=this._toolbarClass||"",_=this.getModeHandlers(i);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=i,r=0;r<_.length;r++)_[r].enabled&&this._initModeHandler(_[r].handler,this._toolbarContainer,d++,p,_[r].title);if(d)return this._lastButtonIndex=--d,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),l.appendChild(this._toolbarContainer),l.appendChild(this._actionsContainer),l},removeToolbar:function(){for(var i in this._modes)this._modes.hasOwnProperty(i)&&(this._disposeButton(this._modes[i].button,this._modes[i].handler.enable,this._modes[i].handler),this._modes[i].handler.disable(),this._modes[i].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var r=0,l=this._actionButtons.length;r<l;r++)this._disposeButton(this._actionButtons[r].button,this._actionButtons[r].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(i,r,l,d,p){var _=i.type;this._modes[_]={},this._modes[_].handler=i,this._modes[_].button=this._createButton({type:_,title:p,className:d+"-"+_,container:r,callback:this._modes[_].handler.enable,context:this._modes[_].handler}),this._modes[_].buttonIndex=l,this._modes[_].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!u.MSStream},_createButton:function(i){var r=L.DomUtil.create("a",i.className||"",i.container),l=L.DomUtil.create("span","sr-only",i.container);r.href="#",r.appendChild(l),i.title&&(r.title=i.title,l.innerHTML=i.title),i.text&&(r.innerHTML=i.text,l.innerHTML=i.text);var d=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(r,"click",L.DomEvent.stopPropagation).on(r,"mousedown",L.DomEvent.stopPropagation).on(r,"dblclick",L.DomEvent.stopPropagation).on(r,"touchstart",L.DomEvent.stopPropagation).on(r,"click",L.DomEvent.preventDefault).on(r,d,i.callback,i.context),r},_disposeButton:function(i,r){var l=this._detectIOS()?"touchstart":"click";L.DomEvent.off(i,"click",L.DomEvent.stopPropagation).off(i,"mousedown",L.DomEvent.stopPropagation).off(i,"dblclick",L.DomEvent.stopPropagation).off(i,"touchstart",L.DomEvent.stopPropagation).off(i,"click",L.DomEvent.preventDefault).off(i,l,r)},_handlerActivated:function(i){this.disable(),this._activeMode=this._modes[i.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(i){var r,l,d,p,_=this._actionsContainer,g=this.getActions(i),y=g.length;for(l=0,d=this._actionButtons.length;l<d;l++)this._disposeButton(this._actionButtons[l].button,this._actionButtons[l].callback);for(this._actionButtons=[];_.firstChild;)_.removeChild(_.firstChild);for(var x=0;x<y;x++)"enabled"in g[x]&&!g[x].enabled||(r=L.DomUtil.create("li","",_),p=this._createButton({title:g[x].title,text:g[x].text,container:r,callback:g[x].callback,context:g[x].context}),this._actionButtons.push({button:p,callback:g[x].callback}))},_showActionsToolbar:function(){var i=this._activeMode.buttonIndex,r=this._lastButtonIndex,l=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=l+"px",i===0&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),i===r&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(i){this._map=i,this._popupPane=i._panes.popupPane,this._visible=!1,this._container=i.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(i){return this._container?(i.subtext=i.subtext||"",i.subtext.length!==0||this._singleLineLabel?i.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(i.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+i.subtext+"</span><br />":"")+"<span>"+i.text+"</span>",i.text||i.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(i){var r=this._map.latLngToLayerPoint(i),l=this._container;return this._container&&(this._visible&&(l.style.visibility="inherit"),L.DomUtil.setPosition(l,r)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(i){for(var r in this.options)this.options.hasOwnProperty(r)&&i[r]&&(i[r]=L.extend({},this.options[r],i[r]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,i)},getModeHandlers:function(i){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(i,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(i,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(i,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(i,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(i,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(i,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(i){return[{enabled:i.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:i.completeShape,context:i},{enabled:i.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:i.deleteLastVertex,context:i},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(i){L.setOptions(this,i);for(var r in this._modes)this._modes.hasOwnProperty(r)&&i.hasOwnProperty(r)&&this._modes[r].handler.setOptions(i[r])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(i){i.edit&&(i.edit.selectedPathOptions===void 0&&(i.edit.selectedPathOptions=this.options.edit.selectedPathOptions),i.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,i.edit.selectedPathOptions)),i.remove&&(i.remove=L.extend({},this.options.remove,i.remove)),i.poly&&(i.poly=L.extend({},this.options.poly,i.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,i),this._selectedFeatureCount=0},getModeHandlers:function(i){var r=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(i,{featureGroup:r,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(i,{featureGroup:r}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(i){var r=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return i.removeAllLayers&&r.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),r},addToolbar:function(i){var r=L.Toolbar.prototype.addToolbar.call(this,i);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),r},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var i,r=this.options.featureGroup,l=r.getLayers().length!==0;this.options.edit&&(i=this._modes[L.EditToolbar.Edit.TYPE].button,l?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",l?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(i=this._modes[L.EditToolbar.Delete.TYPE].button,l?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",l?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(i,r){if(L.Handler.prototype.initialize.call(this,i),L.setOptions(this,r),this._featureGroup=r.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var l=L.version.split(".");parseInt(l[0],10)===1&&parseInt(l[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),i._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(i){this._revertLayer(i)},this)},save:function(){var i=new L.LayerGroup;this._featureGroup.eachLayer(function(r){r.edited&&(i.addLayer(r),r.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:i})},_backupLayer:function(i){var r=L.Util.stamp(i);this._uneditedLayerProps[r]||(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?this._uneditedLayerProps[r]={latlngs:L.LatLngUtil.cloneLatLngs(i.getLatLngs())}:i instanceof L.Circle?this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng()),radius:i.getRadius()}:(i instanceof L.Marker||i instanceof L.CircleMarker)&&(this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(i){var r=L.Util.stamp(i);i.edited=!1,this._uneditedLayerProps.hasOwnProperty(r)&&(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?i.setLatLngs(this._uneditedLayerProps[r].latlngs):i instanceof L.Circle?(i.setLatLng(this._uneditedLayerProps[r].latlng),i.setRadius(this._uneditedLayerProps[r].radius)):(i instanceof L.Marker||i instanceof L.CircleMarker)&&i.setLatLng(this._uneditedLayerProps[r].latlng),i.fire("revert-edited",{layer:i}))},_enableLayerEdit:function(i){var r,l,d=i.layer||i.target||i;this._backupLayer(d),this.options.poly&&(l=L.Util.extend({},this.options.poly),d.options.poly=l),this.options.selectedPathOptions&&(r=L.Util.extend({},this.options.selectedPathOptions),r.maintainColor&&(r.color=d.options.color,r.fillColor=d.options.fillColor),d.options.original=L.extend({},d.options),d.options.editing=r),d instanceof L.Marker?(d.editing&&d.editing.enable(),d.dragging.enable(),d.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):d.editing.enable()},_disableLayerEdit:function(i){var r=i.layer||i.target||i;r.edited=!1,r.editing&&r.editing.disable(),delete r.options.editing,delete r.options.original,this._selectedPathOptions&&(r instanceof L.Marker?this._toggleMarkerHighlight(r):(r.setStyle(r.options.previousOptions),delete r.options.previousOptions)),r instanceof L.Marker?(r.dragging.disable(),r.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):r.editing.disable()},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_onMarkerDragEnd:function(i){var r=i.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_onTouchMove:function(i){var r=i.originalEvent.changedTouches[0],l=this._map.mouseEventToLayerPoint(r),d=this._map.layerPointToLatLng(l);i.target.setLatLng(d)},_hasAvailableLayers:function(){return this._featureGroup.getLayers().length!==0}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(i,r){if(L.Handler.prototype.initialize.call(this,i),L.Util.setOptions(this,r),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var l=L.version.split(".");parseInt(l[0],10)===1&&parseInt(l[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(i){this._deletableLayers.addLayer(i),i.fire("revert-deleted",{layer:i})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(i){this._removeLayer({layer:i})},this),this.save()},_enableLayerDelete:function(i){(i.layer||i.target||i).on("click",this._removeLayer,this)},_disableLayerDelete:function(i){var r=i.layer||i.target||i;r.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(r)},_removeLayer:function(i){var r=i.layer||i.target||i;this._deletableLayers.removeLayer(r),this._deletedLayers.addLayer(r),r.fire("deleted")},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_hasAvailableLayers:function(){return this._deletableLayers.getLayers().length!==0}})})(window,document);var Ke={exports:{}},Xi;function Kn(){return Xi||(Xi=1,(function(u,a){(function(n,h){u.exports=n(Ji()),typeof h!="undefined"&&h.L&&(h.L.Ruler=n(L))})(function(n){n.Control.Ruler=n.Control.extend({options:{position:"topright",circleMarker:{color:"red",radius:2},lineStyle:{color:"red",dashArray:"1,6"},lengthUnit:{display:"km",decimal:2,factor:null,label:"Distance:"},angleUnit:{display:"°",decimal:2,factor:null,label:"Bearing:"}},onAdd:function(h){return this._map=h,this._container=n.DomUtil.create("div","leaflet-bar"),this._container.classList.add("leaflet-ruler"),n.DomEvent.disableClickPropagation(this._container),n.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._choice=!1,this._defaultCursor=this._map._container.style.cursor,this._allLayers=n.layerGroup(),this._container},onRemove:function(){n.DomEvent.off(this._container,"click",this._toggleMeasure,this)},_toggleMeasure:function(){this._choice=!this._choice,this._clickedLatLong=null,this._clickedPoints=[],this._totalLength=0,this._choice?(this._map.doubleClickZoom.disable(),n.DomEvent.on(this._map._container,"keydown",this._escape,this),n.DomEvent.on(this._map._container,"dblclick",this._closePath,this),this._container.classList.add("leaflet-ruler-clicked"),this._clickCount=0,this._tempLine=n.featureGroup().addTo(this._allLayers),this._tempPoint=n.featureGroup().addTo(this._allLayers),this._pointLayer=n.featureGroup().addTo(this._allLayers),this._polylineLayer=n.featureGroup().addTo(this._allLayers),this._allLayers.addTo(this._map),this._map._container.style.cursor="crosshair",this._map.on("click",this._clicked,this),this._map.on("mousemove",this._moving,this)):(this._map.doubleClickZoom.enable(),n.DomEvent.off(this._map._container,"keydown",this._escape,this),n.DomEvent.off(this._map._container,"dblclick",this._closePath,this),this._container.classList.remove("leaflet-ruler-clicked"),this._map.removeLayer(this._allLayers),this._allLayers=n.layerGroup(),this._map._container.style.cursor=this._defaultCursor,this._map.off("click",this._clicked,this),this._map.off("mousemove",this._moving,this))},_clicked:function(h){if(this._clickedLatLong=h.latlng,this._clickedPoints.push(this._clickedLatLong),n.circleMarker(this._clickedLatLong,this.options.circleMarker).addTo(this._pointLayer),this._clickCount>0&&!h.latlng.equals(this._clickedPoints[this._clickedPoints.length-2])){this._movingLatLong&&n.polyline([this._clickedPoints[this._clickCount-1],this._movingLatLong],this.options.lineStyle).addTo(this._polylineLayer);var i;this._totalLength+=this._result.Distance,this._clickCount>1?i="<b>"+this.options.angleUnit.label+"</b> "+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+" "+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b> "+this._totalLength.toFixed(this.options.lengthUnit.decimal)+" "+this.options.lengthUnit.display:i="<b>"+this.options.angleUnit.label+"</b> "+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+" "+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b> "+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+" "+this.options.lengthUnit.display,n.circleMarker(this._clickedLatLong,this.options.circleMarker).bindTooltip(i,{permanent:!0,className:"result-tooltip"}).addTo(this._pointLayer).openTooltip()}this._clickCount++},_moving:function(h){if(this._clickedLatLong){n.DomEvent.off(this._container,"click",this._toggleMeasure,this),this._movingLatLong=h.latlng,this._tempLine&&(this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint));var i;this._addedLength=0,this._tempLine=n.featureGroup(),this._tempPoint=n.featureGroup(),this._tempLine.addTo(this._map),this._tempPoint.addTo(this._map),this._calculateBearingAndDistance(),this._addedLength=this._result.Distance+this._totalLength,n.polyline([this._clickedLatLong,this._movingLatLong],this.options.lineStyle).addTo(this._tempLine),this._clickCount>1?i="<b>"+this.options.angleUnit.label+"</b> "+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+" "+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b> "+this._addedLength.toFixed(this.options.lengthUnit.decimal)+" "+this.options.lengthUnit.display+'<br><div class="plus-length">(+'+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+")</div>":i="<b>"+this.options.angleUnit.label+"</b> "+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+" "+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b> "+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+" "+this.options.lengthUnit.display,n.circleMarker(this._movingLatLong,this.options.circleMarker).bindTooltip(i,{sticky:!0,offset:n.point(0,-40),className:"moving-tooltip"}).addTo(this._tempPoint).openTooltip()}},_escape:function(h){h.keyCode===27&&(this._clickCount>0?this._closePath():(this._choice=!0,this._toggleMeasure()))},_calculateBearingAndDistance:function(){var h=this._clickedLatLong.lat,i=this._clickedLatLong.lng,r=this._movingLatLong.lat,l=this._movingLatLong.lng,d=Math.PI/180,p=Math.sin((l-i)*d)*Math.cos(r*d),_=Math.cos(h*d)*Math.sin(r*d)-Math.sin(h*d)*Math.cos(r*d)*Math.cos((l-i)*d),g=Math.atan2(p,_)*((this.options.angleUnit.factor?this.options.angleUnit.factor/2:180)/Math.PI);g+=g<0?this.options.angleUnit.factor?this.options.angleUnit.factor:360:0;var y=this.options.lengthUnit.factor?6371*this.options.lengthUnit.factor:6371,x=(r-h)*d,T=(l-i)*d,E=Math.sin(x/2)*Math.sin(x/2)+Math.cos(h*d)*Math.cos(r*d)*Math.sin(T/2)*Math.sin(T/2),A=2*Math.atan2(Math.sqrt(E),Math.sqrt(1-E)),U=y*A;this._result={Bearing:g,Distance:U}},_closePath:function(){this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint),this._clickCount<=1&&this._map.removeLayer(this._pointLayer),this._choice=!1,n.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._toggleMeasure()}}),n.control.ruler=function(h){return new n.Control.Ruler(h)}},window)})(Ke)),Ke.exports}Kn();let be;const Xn=new Uint8Array(16);function Qn(){if(!be&&(be=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!be))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return be(Xn)}const it=[];for(let u=0;u<256;++u)it.push((u+256).toString(16).slice(1));function $n(u,a=0){return it[u[a+0]]+it[u[a+1]]+it[u[a+2]]+it[u[a+3]]+"-"+it[u[a+4]]+it[u[a+5]]+"-"+it[u[a+6]]+it[u[a+7]]+"-"+it[u[a+8]]+it[u[a+9]]+"-"+it[u[a+10]]+it[u[a+11]]+it[u[a+12]]+it[u[a+13]]+it[u[a+14]]+it[u[a+15]]}const Qi={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Xe(u,a,n){if(Qi.randomUUID&&!u)return Qi.randomUUID();u=u||{};const h=u.random||(u.rng||Qn)();return h[6]=h[6]&15|64,h[8]=h[8]&63|128,$n(h)}function Qe(u){var n,h;const a=(h=u.id)!=null?h:(n=u.properties)==null?void 0:n.id;if(a!=null)return String(a)}function tr(u,a){const n=h=>{switch(h.type){case"Point":a(h.coordinates);break;case"MultiPoint":case"LineString":for(const i of h.coordinates)a(i);break;case"MultiLineString":case"Polygon":for(const i of h.coordinates)for(const r of i)a(r);break;case"MultiPolygon":for(const i of h.coordinates)for(const r of i)for(const l of r)a(l);break;case"GeometryCollection":for(const i of h.geometries)n(i);break}};n(u)}function er(u){const a=u.geometry;if(!a)return null;let n=1/0,h=1/0,i=-1/0,r=-1/0,l=!1;return tr(a,d=>{const[p,_]=d;typeof p!="number"||typeof _!="number"||(l=!0,p<n&&(n=p),_<h&&(h=_),p>i&&(i=p),_>r&&(r=_))}),l?[n,h,i,r]:null}function ir(u){let a=1/0,n=1/0,h=-1/0,i=-1/0,r=!1;for(const l of u.features){const d=er(l);d&&(r=!0,a=Math.min(a,d[0]),n=Math.min(n,d[1]),h=Math.max(h,d[2]),i=Math.max(i,d[3]))}return r?[a,n,h,i]:null}function or(u){const[a,n,h,i]=u;return[[n,a],[i,h]]}function $i(u){var n;const a=[];for(const h of u.features){if(!h||h.type!=="Feature")continue;const i=(n=h.properties)!=null?n:{},r=Qe(h),l=(p,_)=>{const g=i&&typeof i=="object"?{...i}:{},y=r!==void 0?`${r}::${_}`:void 0;return y!==void 0&&(g.id=y),{type:"Feature",id:y,properties:g,geometry:p}},d=h.geometry;if(d)switch(d.type){case"MultiPolygon":for(const[p,_]of d.coordinates.entries())a.push(l({type:"Polygon",coordinates:_},p));break;case"MultiLineString":for(const[p,_]of d.coordinates.entries())a.push(l({type:"LineString",coordinates:_},p));break;case"MultiPoint":for(const[p,_]of d.coordinates.entries())a.push(l({type:"Point",coordinates:_},p));break;case"GeometryCollection":for(const[p,_]of d.geometries.entries())a.push(l(_,p));break;default:a.push(h);break}}return{type:"FeatureCollection",features:a}}function to(u){return(u==null?void 0:u.type)==="Polygon"}function eo(u){return(u==null?void 0:u.type)==="MultiPolygon"}function nr(u){const a=u.geometry;return a?to(a)?[a.coordinates]:eo(a)?a.coordinates:[]:[]}function rr(u,a){var i,r;const n=[];for(const l of u){const d=nr(l);d.length>0&&n.push(...d)}if(n.length===0)return null;const h=(r=a!=null?a:(i=u[0])==null?void 0:i.properties)!=null?r:{};return n.length===1?{type:"Feature",properties:{...h},geometry:{type:"Polygon",coordinates:n[0]}}:{type:"Feature",properties:{...h},geometry:{type:"MultiPolygon",coordinates:n}}}class sr{constructor(a=Le("feature-store","debug")){k(this,"log");k(this,"features");this.log=a,this.features=new Map}size(){return this.features.size}has(a){return this.features.has(a)}get(a){return this.features.get(a)}add(a){var r,l,d,p;const n=[],h=(l=(r=performance.now)==null?void 0:r.call(performance))!=null?l:Date.now();for(const _ of a.features){const g=this.ensureId(_),y={..._,id:g};this.features.set(g,y),n.push(g)}const i=((p=(d=performance.now)==null?void 0:d.call(performance))!=null?p:Date.now())-h;return this.log.debug("add",{count:a.features.length,ids:n,elapsedMs:Math.round(i)}),n}update(a,n){if(!this.features.has(a)){this.log.warn("update:missing",{id:a});return}const h={...n,id:a};this.features.set(a,h),this.log.debug("update",{id:a})}remove(a){this.features.delete(a)?this.log.debug("remove",{id:a}):this.log.warn("remove:missing",{id:a})}clear(){const a=this.features.size;this.features.clear(),this.log.debug("clear",{count:a})}toFeatureCollection(){return{type:"FeatureCollection",features:Array.from(this.features.values())}}bounds(){const a=this.toFeatureCollection();if(a.features.length===0)return null;const n=ir(a);return n?or(n):null}ensureId(a){const n=Qe(a);if(n)return String(n);const h=Xe();return a.id=h,a.properties&&typeof a.properties=="object"&&(a.properties.id=h),h}}const xe={polygon:{selectors:["a.leaflet-draw-draw-polygon"],dataTool:"polygon"},polyline:{selectors:["a.leaflet-draw-draw-polyline"],dataTool:"polyline"},rectangle:{selectors:["a.leaflet-draw-draw-rectangle"],dataTool:"rectangle"},circle:{selectors:["a.leaflet-draw-draw-circle"],dataTool:"circle"},marker:{selectors:["a.leaflet-draw-draw-marker"],dataTool:"marker"},layerCake:{selectors:["a.leaflet-draw-draw-cake"],dataTool:"layer-cake"},move:{selectors:["a.leaflet-draw-draw-move"],dataTool:"move"},select:{selectors:[],dataTool:"select"},edit:{selectors:["a.leaflet-draw-edit-edit"],dataTool:"edit"},delete:{selectors:["a.leaflet-draw-edit-remove"],dataTool:"delete"},ruler:{selectors:[".leaflet-ruler","a.leaflet-ruler"],dataTool:"ruler"},measurementSettings:{selectors:[".leaflet-ruler-settings-button"],dataTool:"measurement-settings"},layerStyle:{selectors:[],dataTool:"layer-style"}},ar=Object.keys(xe),io="leaflet-geokit-tool-button-icon",oo=".leaflet-geokit-cake-icon, .leaflet-geokit-move-icon",lr="[data-geokit-managed-toolbar='true']",hr="[data-geokit-tool-popover='true']",cr="[data-geokit-tool][aria-expanded='true']",$e=new WeakMap,ti=new WeakMap,ei=new WeakMap;function ii(u,a,n={}){ee(u);for(const h of ar){const i=xe[h];for(const r of dr(u,i.selectors)){r.setAttribute("data-geokit-tool",i.dataTool),ur(r);const l=a==null?void 0:a[h];l&&fr(r,l,h),so(r,h,{source:"leaflet-toolbar",activate:!1,onTrigger:n.onTrigger})}}vr(u,a,n)}function dr(u,a){const n=new Set;for(const h of a)u.querySelectorAll(h).forEach(i=>{n.add(i)});return[...n]}function ur(u){const a=$e.get(u);a&&(u.removeEventListener("click",a),$e.delete(u)),delete u.__geokitToolButtonConfig;const n=ke(u.dataset.geokitToolButtonClass);n.length>0&&u.classList.remove(...n),delete u.dataset.geokitToolButtonClass,u.removeAttribute("data-geokit-custom-tool-button"),u.dataset.geokitOriginalTitle!==void 0&&no(u,"title",u.dataset.geokitOriginalTitle),u.dataset.geokitOriginalAriaLabel!==void 0&&no(u,"aria-label",u.dataset.geokitOriginalAriaLabel),u.dataset.geokitOriginalStyleBackgroundImage!==void 0&&ro(u,"background-image",u.dataset.geokitOriginalStyleBackgroundImage,u.dataset.geokitOriginalStyleBackgroundImagePriority),u.dataset.geokitOriginalStylePosition!==void 0&&ro(u,"position",u.dataset.geokitOriginalStylePosition,u.dataset.geokitOriginalStylePositionPriority),Array.from(u.children).forEach(h=>{h instanceof HTMLElement&&h.dataset.geokitToolButtonIcon==="true"&&h.remove()}),u.querySelectorAll(oo).forEach(h=>{h.hidden=!1}),u.removeAttribute("aria-expanded")}function no(u,a,n){n?u.setAttribute(a,n):u.removeAttribute(a)}function ro(u,a,n,h){n?u.style.setProperty(a,n,h):u.style.removeProperty(a)}function fr(u,a,n){var r;pr(u),u.__geokitToolButtonConfig=a,u.setAttribute("data-geokit-custom-tool-button","true"),a.title&&u.setAttribute("title",a.title);const h=(r=a.ariaLabel)!=null?r:a.title;h&&u.setAttribute("aria-label",h);const i=ke(a.className);i.length>0&&(u.classList.add(...i),u.dataset.geokitToolButtonClass=i.join(" ")),a.iconUrl?oi(u,a,{tool:n}):(a.iconHtml||a.renderIcon)&&oi(u,a,{tool:n})}function pr(u){var a,n;u.dataset.geokitOriginalTitle===void 0&&(u.dataset.geokitOriginalTitle=(a=u.getAttribute("title"))!=null?a:""),u.dataset.geokitOriginalAriaLabel===void 0&&(u.dataset.geokitOriginalAriaLabel=(n=u.getAttribute("aria-label"))!=null?n:""),u.dataset.geokitOriginalStyleBackgroundImage===void 0&&(u.dataset.geokitOriginalStyleBackgroundImage=u.style.getPropertyValue("background-image"),u.dataset.geokitOriginalStyleBackgroundImagePriority=u.style.getPropertyPriority("background-image")),u.dataset.geokitOriginalStylePosition===void 0&&(u.dataset.geokitOriginalStylePosition=u.style.getPropertyValue("position"),u.dataset.geokitOriginalStylePositionPriority=u.style.getPropertyPriority("position"))}function ke(u){return u?u.split(/\s+/).map(a=>a.trim()).filter(Boolean):[]}function oi(u,a,n={}){var p,_;const[h,i]=mr(a.iconSize);u.style.setProperty("background-image","none","important"),u.style.setProperty("position","relative","important"),u.querySelectorAll(oo).forEach(g=>{g.hidden=!0});const r=document.createElement("span");r.className=io,r.dataset.geokitToolButtonIcon="true",r.setAttribute("aria-hidden","true"),r.style.setProperty("position","absolute","important"),r.style.setProperty("display","block","important"),r.style.setProperty("left","50%","important"),r.style.setProperty("top","50%","important"),r.style.setProperty("width",`${h}px`,"important"),r.style.setProperty("height",`${i}px`,"important"),r.style.setProperty("transform","translate(-50%, -50%)","important"),r.style.setProperty("pointer-events","none","important");const l=(_=a.renderIcon)==null?void 0:_.call(a,{tool:(p=n.tool)!=null?p:"polygon",groupId:n.groupId,button:u});if(l instanceof HTMLElement||typeof SVGElement!="undefined"&&l instanceof SVGElement)r.appendChild(l);else if(typeof l=="string"&&l.trim())r.innerHTML=l;else if(a.iconHtml)r.innerHTML=a.iconHtml;else if(a.iconUrl){const g=document.createElement("img");g.src=a.iconUrl,g.alt="",g.decoding="async",g.draggable=!1,g.style.setProperty("display","block","important"),g.style.setProperty("width","100%","important"),g.style.setProperty("height","100%","important"),g.style.setProperty("object-fit","contain","important"),r.appendChild(g)}u.appendChild(r)}function mr(u){const a=u==null?void 0:u[0],n=u==null?void 0:u[1];return typeof a=="number"&&Number.isFinite(a)&&a>0&&typeof n=="number"&&Number.isFinite(n)&&n>0?[a,n]:[18,18]}function so(u,a,n){const h=i=>{var d;const r=_r(u),l=gr(u);r!=null&&r.popover?wr(u,a,r,{container:l,groupId:n.groupId}):ee(l),(d=n.onTrigger)==null||d.call(n,a,{source:n.source,groupId:n.groupId,activate:n.activate}),n.activate&&(i.preventDefault(),i.stopPropagation())};u.addEventListener("click",h),$e.set(u,h)}function _r(u){const a=u.__geokitToolButtonConfig;if(a)return a;const n=u.dataset.geokitToolButtonConfig;if(!n)return null;try{return JSON.parse(n)}catch{return null}}function gr(u){var n;const a=u.closest("[data-geokit-map-container]");return(n=a!=null?a:u.parentElement)!=null?n:u}function vr(u,a,n){var i;u.setAttribute("data-geokit-map-container","true"),u.querySelectorAll(lr).forEach(r=>r.remove()),((i=n.toolbarGroups)!=null?i:[]).forEach(r=>{var p;if(!(r!=null&&r.id)||!Array.isArray(r.tools)||r.tools.length===0)return;const l=document.createElement("div");l.dataset.geokitManagedToolbar="true",l.dataset.geokitToolbarGroup=r.id,l.className="leaflet-geokit-toolbar-group leaflet-bar",l.setAttribute("role","toolbar"),l.setAttribute("aria-label",(p=r.ariaLabel)!=null?p:r.id),Lr(l,r.position,r.offset);const d=ke(r.className);d.length>0&&l.classList.add(...d),r.tools.forEach((_,g)=>{const y=yr(_,r,g,a==null?void 0:a[_]);so(y,_,{source:"toolbar",activate:!0,groupId:r.id,onTrigger:n.onTrigger}),l.appendChild(y)}),u.appendChild(l)})}function yr(u,a,n,h){var d,p,_,g,y;const i=document.createElement("button");i.type="button",i.dataset.geokitTool=(p=(d=xe[u])==null?void 0:d.dataTool)!=null?p:u,i.dataset.geokitToolbarGroup=a.id,i.dataset.geokitToolbarPosition=(_=a.position)!=null?_:"topright",i.dataset.geokitToolInstance=Ar(a.id,u,n),i.className="leaflet-geokit-toolbar-button",i.style.setProperty("display","block","important"),i.style.setProperty("width","34px","important"),i.style.setProperty("height","34px","important"),i.style.setProperty("padding","0","important"),i.style.setProperty("border","0","important"),i.style.setProperty("border-bottom","1px solid #ccc","important"),i.style.setProperty("background","#fff","important"),i.style.setProperty("cursor","pointer","important"),i.style.setProperty("position","relative","important");const r=(g=h==null?void 0:h.title)!=null?g:ao(u);i.title=r,i.setAttribute("aria-label",(y=h==null?void 0:h.ariaLabel)!=null?y:r);const l=ke(h==null?void 0:h.className);if(l.length>0&&i.classList.add(...l),h&&(i.__geokitToolButtonConfig=h,oi(i,h,{tool:u,groupId:a.id})),!i.querySelector(`.${io}`)){const x=document.createElement("span");x.textContent=Mr(u),x.setAttribute("aria-hidden","true"),x.style.setProperty("display","grid","important"),x.style.setProperty("place-items","center","important"),x.style.setProperty("height","100%","important"),x.style.setProperty("font","600 14px system-ui","important"),i.appendChild(x)}return i}function Lr(u,a="topright",n){const[h,i]=Er(n);u.style.setProperty("position","absolute","important"),u.style.setProperty("z-index","1000","important"),u.style.setProperty("background","#fff","important"),u.style.setProperty("box-shadow","0 1px 5px rgba(0,0,0,0.35)","important");const[r,l]=a.startsWith("bottom")?["bottom",a.endsWith("right")?"right":"left"]:["top",a.endsWith("right")?"right":"left"];u.style.setProperty(r,`${i}px`,"important"),u.style.setProperty(l,`${h}px`,"important")}function wr(u,a,n,h){var d,p,_,g,y,x,T,E;if(!n.popover)return;ee(h.container);const i=document.createElement("div");if(i.dataset.geokitToolPopover="true",i.dataset.geokitTool=(p=(d=xe[a])==null?void 0:d.dataTool)!=null?p:a,u.dataset.geokitToolInstance&&(i.dataset.geokitToolInstance=u.dataset.geokitToolInstance),h.groupId&&(i.dataset.geokitToolbarGroup=h.groupId),i.setAttribute("role","dialog"),i.setAttribute("aria-label",(g=(_=n.popover.ariaLabel)!=null?_:n.popover.title)!=null?g:ao(a)),i.style.setProperty("position","absolute","important"),i.style.setProperty("z-index","10001","important"),i.style.setProperty("max-width","260px","important"),i.style.setProperty("padding","10px 12px","important"),i.style.setProperty("border","1px solid rgba(0,0,0,0.22)","important"),i.style.setProperty("border-radius","8px","important"),i.style.setProperty("background","#fff","important"),i.style.setProperty("box-shadow","0 8px 24px rgba(0,0,0,0.24)","important"),i.style.setProperty("font","13px system-ui, sans-serif","important"),i.style.setProperty("line-height","1.35","important"),n.popover.title){const A=document.createElement("strong");A.textContent=n.popover.title,A.style.setProperty("display","block","important"),A.style.setProperty("margin-bottom","4px","important"),i.appendChild(A)}if(n.popover.body){const A=document.createElement("div");A.textContent=n.popover.body,i.appendChild(A)}if(n.popover.html){const A=document.createElement("div");A.innerHTML=n.popover.html,i.appendChild(A)}const r=(x=(y=n.popover).render)==null?void 0:x.call(y,{tool:a,groupId:h.groupId,button:u,popover:i}),l=typeof DocumentFragment!="undefined"&&r instanceof DocumentFragment;if(r instanceof HTMLElement||l)i.appendChild(r);else if(typeof r=="string"&&r.trim()){const A=document.createElement("div");A.innerHTML=r,i.appendChild(A)}h.container.appendChild(i),br(h.container,u,i),u.setAttribute("aria-expanded","true"),ei.set(i,{tool:a,groupId:h.groupId,button:u,config:n}),xr(h.container,u,i),(E=(T=n.popover).onOpen)==null||E.call(T,{tool:a,groupId:h.groupId,button:u,popover:i})}function br(u,a,n){const h=u.getBoundingClientRect(),i=a.getBoundingClientRect(),r=Math.max(8,Math.min(i.left-h.left,h.width-n.offsetWidth-8)),l=Math.max(8,Math.min(i.bottom-h.top+8,h.height-n.offsetHeight-8));n.style.setProperty("left",`${r}px`,"important"),n.style.setProperty("top",`${l}px`,"important")}function xr(u,a,n){const h=l=>{l.key==="Escape"&&ee(u)},i=l=>{const d=l.target;d instanceof Node&&(n.contains(d)||a.contains(d)||ee(u))};document.addEventListener("keydown",h,!0);const r=window.setTimeout(()=>{n.isConnected&&document.addEventListener("pointerdown",i,!0)},0);ti.set(n,{keydown:h,pointerdown:i,pointerdownTimer:r})}function ee(u){u.querySelectorAll(hr).forEach(a=>{var i,r,l;const n=ei.get(a);n==null||n.button.removeAttribute("aria-expanded"),n||(i=kr(u,a))==null||i.removeAttribute("aria-expanded");const h=ti.get(a);h&&(window.clearTimeout(h.pointerdownTimer),document.removeEventListener("keydown",h.keydown,!0),document.removeEventListener("pointerdown",h.pointerdown,!0),ti.delete(a)),a.remove(),n&&((l=(r=n.config.popover)==null?void 0:r.onClose)==null||l.call(r,{tool:n.tool,groupId:n.groupId,button:n.button,popover:a}),ei.delete(a))})}function kr(u,a){const n=u.querySelectorAll(cr);for(const h of n)if(a.dataset.geokitToolInstance&&h.dataset.geokitToolInstance===a.dataset.geokitToolInstance||h.dataset.geokitTool===a.dataset.geokitTool&&h.dataset.geokitToolbarGroup===a.dataset.geokitToolbarGroup)return h;return null}function Ar(u,a,n){return`${u}:${a}:${n}`}function ao(u){return{polygon:"Draw polygon",polyline:"Draw line",rectangle:"Draw rectangle",circle:"Draw circle",marker:"Place marker",layerCake:"Draw layer cake",move:"Move feature",select:"Select feature",edit:"Edit features",delete:"Delete features",ruler:"Measure distance",measurementSettings:"Measurement settings",layerStyle:"Layer style"}[u]}function Mr(u){return{polygon:"P",polyline:"L",rectangle:"R",circle:"C",marker:"M",layerCake:"Z",move:"Mv",select:"S",edit:"E",delete:"D",ruler:"m",measurementSettings:"Ms",layerStyle:"A"}[u]}function Er(u){const a=u==null?void 0:u[0],n=u==null?void 0:u[1];return typeof a=="number"&&Number.isFinite(a)&&a>=0&&typeof n=="number"&&Number.isFinite(n)&&n>=0?[a,n]:[10,10]}const lo=new WeakSet;function Tr(u=we){var h;if(lo.has(u))return;const a=u.DrawToolbar;if(!((h=a==null?void 0:a.prototype)!=null&&h.getModeHandlers))return;const n=a.prototype.getModeHandlers;a.prototype.getModeHandlers=function(i){var l,d,p,_;const r=n.call(this,i);if((l=this.options)!=null&&l.cake){const g=(d=u.Draw)==null?void 0:d.Cake;if(!g)return r;r.push({enabled:!0,handler:new g(i,this.options.cake),title:"Draw Layer Cake (Subtractive Zones)"})}if((p=this.options)!=null&&p.move){const g=(_=u.Draw)==null?void 0:_.Move;if(!g)return r;r.push({enabled:!0,handler:new g(i,this.options.move),title:"Move/Translate Features"})}return r},lo.add(u)}const Ee=class Ee extends X.Draw.Circle{constructor(a,n){super(a,n),this.type=Ee.TYPE}addHooks(){super.addHooks();const a=this._tooltip;a!=null&&a.updateContent&&a.updateContent({text:"Click and drag to draw the Layer Cake base",subtext:"Release mouse to finish base layer"})}};k(Ee,"TYPE","cake");let Ae=Ee;X.Draw.Cake=Ae;function Pr(u){const a=u.Draw;if(!a||a.Cake)return;const h=class h extends a.Circle{constructor(r,l){super(r,l),this.type=h.TYPE}addHooks(){super.addHooks();const r=this._tooltip;r!=null&&r.updateContent&&r.updateContent({text:"Click and drag to draw the Layer Cake base",subtext:"Release mouse to finish base layer"})}};k(h,"TYPE","cake");let n=h;a.Cake=n}const Te=class Te extends X.Draw.Feature{constructor(n,h){super(n,h);k(this,"_featureGroup");k(this,"_selectedLayer",null);k(this,"_originalLatLngs",null);k(this,"_dragStartLatLng",null);k(this,"_isDragging",!1);k(this,"_pendingMove",null);this.type=Te.TYPE,this._featureGroup=(h==null?void 0:h.featureGroup)||new X.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const n=this._map;if(!n)return;X.DomUtil.addClass(n.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(i=>{this._enableLayerHover(i)});const h=this._tooltip;h!=null&&h.updateContent&&h.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const n=this._map;n&&(X.DomUtil.removeClass(n.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(h=>{this._disableLayerHover(h)}),this._cleanupDragging())}_enableLayerHover(n){n.on&&(n.on("mouseover",this._onLayerMouseOver,this),n.on("mouseout",this._onLayerMouseOut,this),n.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(n){n.off&&(n.off("mouseover",this._onLayerMouseOver,this),n.off("mouseout",this._onLayerMouseOut,this),n.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(n){if(this._isDragging)return;const h=n.target;if(h.getElement){const i=h.getElement();i&&(i.style.cursor="grab")}else h._path&&(h._path.style.cursor="grab")}_onLayerMouseOut(n){if(this._isDragging)return;const h=n.target;if(h.getElement){const i=h.getElement();i&&(i.style.cursor="")}else h._path&&(h._path.style.cursor="")}_onLayerMouseDown(n){if(this._isDragging)return;X.DomEvent.stopPropagation(n.originalEvent),X.DomEvent.preventDefault(n.originalEvent);const h=n.target;if(this._selectedLayer=h,this._isDragging=!0,this._dragStartLatLng=n.latlng,this._storeOriginalLatLngs(h),h.getElement){const r=h.getElement();r&&(r.style.cursor="grabbing")}else h._path&&(h._path.style.cursor="grabbing");this._map.on("mousemove",this._onMouseMove,this),this._map.on("mouseup",this._onMouseUp,this);const i=h.toGeoJSON();this._pendingMove={layer:h,originalGeoJSON:i,newGeoJSON:i}}_storeOriginalLatLngs(n){n.getLatLng?this._originalLatLngs=n.getLatLng():n.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(n.getLatLngs())))}_onMouseMove(n){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const h=this._selectedLayer,i={lat:n.latlng.lat-this._dragStartLatLng.lat,lng:n.latlng.lng-this._dragStartLatLng.lng};if(h.setLatLng){const r=X.latLng(this._originalLatLngs.lat+i.lat,this._originalLatLngs.lng+i.lng);h.setLatLng(r)}else if(h.setLatLngs){const r=this._offsetLatLngs(this._originalLatLngs,i);h.setLatLngs(r)}}_offsetLatLngs(n,h){return n instanceof X.LatLng||n.lat!==void 0&&n.lng!==void 0?X.latLng(n.lat+h.lat,n.lng+h.lng):Array.isArray(n)?n.map(i=>this._offsetLatLngs(i,h)):n}_onMouseUp(n){var i,r;if(!this._isDragging||!this._selectedLayer)return;this._pendingMove&&(this._pendingMove.newGeoJSON=this._selectedLayer.toGeoJSON());const h=this._selectedLayer;if(h.getElement){const l=h.getElement();l&&(l.style.cursor="grab")}else h._path&&(h._path.style.cursor="grab");this._map.fire("draw:moveend",{layer:this._selectedLayer,originalGeoJSON:(i=this._pendingMove)==null?void 0:i.originalGeoJSON,newGeoJSON:(r=this._pendingMove)==null?void 0:r.newGeoJSON}),this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._isDragging=!1}_cleanupDragging(){if(this._selectedLayer){const n=this._selectedLayer;if(n.getElement){const h=n.getElement();h&&(h.style.cursor="")}else n._path&&(n._path.style.cursor="")}this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._selectedLayer=null,this._originalLatLngs=null,this._dragStartLatLng=null,this._isDragging=!1,this._pendingMove=null}confirmMove(){this._pendingMove&&(this._map.fire("draw:moveconfirmed",{layer:this._pendingMove.layer,originalGeoJSON:this._pendingMove.originalGeoJSON,newGeoJSON:this._pendingMove.newGeoJSON}),this._cleanupDragging())}cancelMove(){if(!this._pendingMove)return;const n=this._pendingMove.layer;n.setLatLng&&this._originalLatLngs?n.setLatLng(this._originalLatLngs):n.setLatLngs&&this._originalLatLngs&&n.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(Te,"TYPE","move");let ni=Te;X.Draw.Move=ni;function Cr(u){const a=u.Draw;if(!a||a.Move)return;const h=class h extends a.Feature{constructor(l,d){super(l,d);k(this,"_featureGroup");k(this,"_selectedLayer",null);k(this,"_originalLatLngs",null);k(this,"_dragStartLatLng",null);k(this,"_isDragging",!1);k(this,"_pendingMove",null);this.type=h.TYPE,this._featureGroup=(d==null?void 0:d.featureGroup)||new X.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const l=this._map;if(!l)return;u.DomUtil.addClass(l.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(p=>{this._enableLayerHover(p)});const d=this._tooltip;d!=null&&d.updateContent&&d.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const l=this._map;l&&(u.DomUtil.removeClass(l.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(d=>{this._disableLayerHover(d)}),this._cleanupDragging())}_enableLayerHover(l){l.on&&(l.on("mouseover",this._onLayerMouseOver,this),l.on("mouseout",this._onLayerMouseOut,this),l.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(l){l.off&&(l.off("mouseover",this._onLayerMouseOver,this),l.off("mouseout",this._onLayerMouseOut,this),l.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(l){if(this._isDragging)return;const d=l.target;if(d.getElement){const p=d.getElement();p&&(p.style.cursor="grab")}else d._path&&(d._path.style.cursor="grab")}_onLayerMouseOut(l){if(this._isDragging)return;const d=l.target;if(d.getElement){const p=d.getElement();p&&(p.style.cursor="")}else d._path&&(d._path.style.cursor="")}_onLayerMouseDown(l){if(this._isDragging)return;u.DomEvent.stopPropagation(l.originalEvent),u.DomEvent.preventDefault(l.originalEvent);const d=l.target;if(this._selectedLayer=d,this._isDragging=!0,this._dragStartLatLng=l.latlng,this._storeOriginalLatLngs(d),d.getElement){const _=d.getElement();_&&(_.style.cursor="grabbing")}else d._path&&(d._path.style.cursor="grabbing");this._map.on("mousemove",this._onMouseMove,this),this._map.on("mouseup",this._onMouseUp,this);const p=d.toGeoJSON();this._pendingMove={layer:d,originalGeoJSON:p,newGeoJSON:p}}_storeOriginalLatLngs(l){l.getLatLng?this._originalLatLngs=l.getLatLng():l.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(l.getLatLngs())))}_onMouseMove(l){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const d=this._selectedLayer,p={lat:l.latlng.lat-this._dragStartLatLng.lat,lng:l.latlng.lng-this._dragStartLatLng.lng};if(d.setLatLng){const _=u.latLng(this._originalLatLngs.lat+p.lat,this._originalLatLngs.lng+p.lng);d.setLatLng(_)}else if(d.setLatLngs){const _=this._offsetLatLngs(this._originalLatLngs,p);d.setLatLngs(_)}}_offsetLatLngs(l,d){return l instanceof u.LatLng||l.lat!==void 0&&l.lng!==void 0?u.latLng(l.lat+d.lat,l.lng+d.lng):Array.isArray(l)?l.map(p=>this._offsetLatLngs(p,d)):l}_onMouseUp(l){var p,_;if(!this._isDragging||!this._selectedLayer)return;this._pendingMove&&(this._pendingMove.newGeoJSON=this._selectedLayer.toGeoJSON());const d=this._selectedLayer;if(d.getElement){const g=d.getElement();g&&(g.style.cursor="grab")}else d._path&&(d._path.style.cursor="grab");this._map.fire("draw:moveend",{layer:this._selectedLayer,originalGeoJSON:(p=this._pendingMove)==null?void 0:p.originalGeoJSON,newGeoJSON:(_=this._pendingMove)==null?void 0:_.newGeoJSON}),this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._isDragging=!1}_cleanupDragging(){if(this._selectedLayer){const l=this._selectedLayer;if(l.getElement){const d=l.getElement();d&&(d.style.cursor="")}else l._path&&(l._path.style.cursor="")}this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._selectedLayer=null,this._originalLatLngs=null,this._dragStartLatLng=null,this._isDragging=!1,this._pendingMove=null}confirmMove(){this._pendingMove&&(this._map.fire("draw:moveconfirmed",{layer:this._pendingMove.layer,originalGeoJSON:this._pendingMove.originalGeoJSON,newGeoJSON:this._pendingMove.newGeoJSON}),this._cleanupDragging())}cancelMove(){if(!this._pendingMove)return;const l=this._pendingMove.layer;l.setLatLng&&this._originalLatLngs?l.setLatLng(this._originalLatLngs):l.setLatLngs&&this._originalLatLngs&&l.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(h,"TYPE","move");let n=h;a.Move=n}const Ir=63710088e-1;function ri(u){return u*Math.PI/180}function ho(u){return u*180/Math.PI}function Sr(u,a,n){const h=a/Ir,i=ri(n),r=ri(u.lat),l=ri(u.lng),d=Math.sin(r),p=Math.cos(r),_=Math.sin(h),g=Math.cos(h),y=d*g+p*_*Math.cos(i),x=Math.asin(y),T=Math.sin(i)*_*p,E=g-d*y,A=l+Math.atan2(T,E);return{lat:ho(x),lng:ho(A)}}function Dr(u){let a=0;for(let n=0;n<u.length-1;n++){const[h,i]=u[n],[r,l]=u[n+1];a+=h*l-r*i}return a/2}function si(u){const a=u[0],n=u.at(-1);return!a||!n||a[0]===n[0]&&a[1]===n[1]?u:[...u,a]}function ai(u,a){const n=si(u);if(Dr(n)<0===a)return n;const r=[...n].reverse();return si(r)}function li(u,a,n){if(n<4)throw new Error("steps must be >= 4");const h=[];for(let i=0;i<n;i++){const r=i/n*360,l=Sr(u,a,r);h.push([l.lng,l.lat])}return si(h)}function Or(u){const{id:a,center:n,radiusMeters:h,layerIndex:i,steps:r}=u,l=ai(li(n,h,r),!1);return{type:"Feature",properties:{id:a,layer_index:i,radius_outer:h,type:"core",_meta:{lat:n.lat,lng:n.lng,radius:h}},geometry:{type:"Polygon",coordinates:[l]}}}function zr(u){const{id:a,center:n,radiusOuterMeters:h,radiusInnerMeters:i,layerIndex:r,steps:l}=u,d=ai(li(n,h,l),!1),p=ai(li(n,i,l),!0);return{type:"Feature",properties:{id:a,layer_index:r,radius_outer:h,type:"ring",_meta:{lat:n.lat,lng:n.lng,radius:h}},geometry:{type:"Polygon",coordinates:[d,p]}}}function Br(u){const{circles:a,steps:n=64}=u,h=[...a].sort((r,l)=>r.getRadius()-l.getRadius()),i=[];return h.forEach((r,l)=>{const d=r.getLatLng(),p=r.getRadius(),_=Xe();if(l===0){i.push(Or({id:_,center:d,radiusMeters:p,layerIndex:l,steps:n}));return}const y=h[l-1].getRadius();i.push(zr({id:_,center:d,radiusOuterMeters:p,radiusInnerMeters:y,layerIndex:l,steps:n}))}),{type:"FeatureCollection",features:i}}function ie(u){u.preventDefault(),u.stopPropagation()}function Rr(u){var _,g;const{root:a,addButtonId:n,saveButtonId:h,onAddRing:i,onSave:r}=u,l=(_=a.querySelector)==null?void 0:_.call(a,`#${n}`),d=(g=a.querySelector)==null?void 0:g.call(a,`#${h}`);if(!l||!d)return;const p="data-cake-controls-bound";if(!(l.hasAttribute(p)||d.hasAttribute(p))){l.setAttribute(p,"true"),d.setAttribute(p,"true");for(const y of[l,d])y.addEventListener("pointerdown",ie),y.addEventListener("mousedown",ie),y.addEventListener("touchstart",ie);l.addEventListener("click",y=>{ie(y),i()}),d.addEventListener("click",y=>{ie(y),r()})}}function Ur(u){var n;const a=(n=u.options)!=null?n:{};a.original||(a.original={...a}),a.editing||(a.editing={...a})}function oe(u,a){if(a==="imperial"){const n=u*3.28084;return n>=5280?`${(n/5280).toFixed(2)} mi`:`${Math.round(n)} ft`}return u>=1e3?`${(u/1e3).toFixed(2)} km`:`${Math.round(u)} m`}class Nr{constructor(a,n,h,i="metric"){k(this,"map");k(this,"layers",[]);k(this,"controlsGroup");k(this,"onSave");k(this,"sessionId",Xe().slice(0,8));k(this,"baseCircleOptions");k(this,"detachMapListeners",[]);k(this,"renderScheduled",!1);k(this,"measurementSystem");this.map=a,this.onSave=h,this.measurementSystem=i,this.controlsGroup=X.layerGroup().addTo(a),this.baseCircleOptions={...n.options},delete this.baseCircleOptions.editing,delete this.baseCircleOptions.original,this.addLayer(n),this.installEditEventBridges(),this.renderControls()}installEditEventBridges(){var g,y,x,T,E,A,U,F;const a=we,n=(y=(g=a==null?void 0:a.Draw)==null?void 0:g.Event)==null?void 0:y.EDITMOVE,h=(T=(x=a==null?void 0:a.Draw)==null?void 0:x.Event)==null?void 0:T.EDITRESIZE,i=(A=(E=a==null?void 0:a.Draw)==null?void 0:E.Event)==null?void 0:A.EDITSTART,r=(F=(U=a==null?void 0:a.Draw)==null?void 0:U.Event)==null?void 0:F.EDITSTOP;if(!n||!h)return;const l=C=>{const S=C==null?void 0:C.layer;S&&this.layers.includes(S)&&this.syncCenters(S)},d=C=>{const S=C==null?void 0:C.layer;S&&this.layers.includes(S)&&(this.updateLabels(S),this.requestRenderControls())},p=C=>{var Y;const S=C==null?void 0:C.layer;if(!S||!this.layers.includes(S))return;const G=S;((Y=G.getTooltip)==null?void 0:Y.call(G))&&this.updateLabels(G)},_=()=>{this.layers.forEach(C=>{var G;const S=(G=C.getTooltip)==null?void 0:G.call(C);S&&(C.setTooltipContent(oe(C.getRadius(),this.measurementSystem)),S.options.offset=[10,0],S.options.direction="right",C.closeTooltip(),C.openTooltip())})};this.map.on(n,l),this.map.on(h,d),i&&(this.map.on(i,p),this.detachMapListeners.push(()=>this.map.off(i,p))),r&&(this.map.on(r,_),this.detachMapListeners.push(()=>this.map.off(r,_))),this.detachMapListeners.push(()=>this.map.off(n,l)),this.detachMapListeners.push(()=>this.map.off(h,d))}requestRenderControls(){if(this.renderScheduled)return;this.renderScheduled=!0,(typeof requestAnimationFrame=="function"?requestAnimationFrame:n=>setTimeout(()=>n(0),0))(()=>{this.renderScheduled=!1,this.renderControls()})}addLayer(a){this.layers.push(a),a.addTo(this.map),a.bindTooltip(oe(a.getRadius(),this.measurementSystem),{permanent:!0,direction:"right",className:"cake-label",offset:[10,0]});const n=a.editing;setTimeout(()=>{var h,i,r,l,d;try{if((h=a.redraw)==null||h.call(a),Ur(a),(i=n==null?void 0:n.enabled)!=null&&i.call(n)){(r=n.updateMarkers)==null||r.call(n),this.requestRenderControls();return}(l=n==null?void 0:n.enable)==null||l.call(n),(d=n==null?void 0:n.updateMarkers)==null||d.call(n),this.requestRenderControls()}catch{}},0)}addRing(){if(this.layers.length>=10)return;const a=this.getLargestCircle();if(!a)return;const n=a.getRadius()*1.5,h=X.circle(a.getLatLng(),{...this.baseCircleOptions,radius:n});this.addLayer(h),this.renderControls()}save(){const a=Br({circles:this.layers});this.onSave(a),this.destroy()}getLargestCircle(){return this.layers.length===0?null:this.layers.reduce((a,n)=>a.getRadius()>n.getRadius()?a:n)}syncCenters(a){const n=a.getLatLng();this.layers.forEach(h=>{var i,r,l;h!==a&&(h.setLatLng(n),(i=h.redraw)==null||i.call(h),(l=(r=h.editing)==null?void 0:r.updateMarkers)==null||l.call(r))}),this.requestRenderControls()}updateLabels(a){var l;const n=a.getRadius();let h=oe(n,this.measurementSystem);const i=this.layers.filter(d=>d!==a&&d.getRadius()<n);if(i.length>0){const d=i.reduce((g,y)=>g.getRadius()>y.getRadius()?g:y),p=n-d.getRadius(),_=oe(p,this.measurementSystem);h=`${oe(n,this.measurementSystem)} (+${_})`}const r=(l=a.getTooltip)==null?void 0:l.call(a);if(r){a.setTooltipContent(h);const p=a.getBounds().getSouthWest();p.lat=a.getLatLng().lat,r.options.direction="left",r.options.offset=[-10,0],r.setLatLng(p),a.closeTooltip(),a.openTooltip()}}renderControls(){this.controlsGroup.clearLayers();const a=this.getLargestCircle();if(!a)return;const h=a.getBounds().getNorthEast(),i=`cake-add-${this.sessionId}`,r=`cake-save-${this.sessionId}`,l=X.divIcon({className:"layer-cake-controls",html:`
|
|
253
|
+
`,u.appendChild(n)}function Xn(){var u,a;(a=(u=Q.Icon.Default).mergeOptions)==null||a.call(u,{iconRetinaUrl:Gn,iconUrl:Vn,shadowUrl:Wn})}function Qn(u){const{root:a,skipStyles:n}=u;try{n||(Yn(a),Xn()),Kn(a)}catch{}}(function(u,a,n){function h(i,r){for(;(i=i.parentElement)&&!i.classList.contains(r););return i}L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(i,r){this._map=i,this._container=i._container,this._overlayPane=i._panes.overlayPane,this._popupPane=i._panes.popupPane,r&&r.shapeOptions&&(r.shapeOptions=L.Util.extend({},this.options.shapeOptions,r.shapeOptions)),L.setOptions(this,r);var l=L.version.split(".");parseInt(l[0],10)===1&&parseInt(l[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(L.DomUtil.disableTextSelection(),i.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(i){L.setOptions(this,i)},_fireCreatedEvent:function(i){this._map.fire(L.Draw.Event.CREATED,{layer:i,layerType:this.type})},_cancelDrawing:function(i){i.keyCode===27&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(i,r){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,r&&r.drawError&&(r.drawError=L.Util.extend({},this.options.drawError,r.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var i=this._markers.pop(),r=this._poly,l=r.getLatLngs(),d=l.splice(-1,1)[0];this._poly.setLatLngs(l),this._markerGroup.removeLayer(i),r.getLatLngs().length<2&&this._map.removeLayer(r),this._vertexChanged(d,!1)}},addVertex:function(i){if(this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(i))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(i)),this._poly.addLatLng(i),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._vertexChanged(i,!0)},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var i=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),r=this._poly.newLatLngIntersects(i[i.length-1]);if(!this.options.allowIntersection&&r||!this._shapeIsValid())return void this._showErrorTooltip();this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_shapeIsValid:function(){return!0},_onZoomEnd:function(){this._markers!==null&&this._updateGuide()},_onMouseMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent),l=this._map.layerPointToLatLng(r);this._currentLatLng=l,this._updateTooltip(l),this._updateGuide(r),this._mouseMarker.setLatLng(l),L.DomEvent.preventDefault(i.originalEvent)},_vertexChanged:function(i,r){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(i,r),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(i){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(i),this._clickHandled=!0,this._disableNewMarkers();var r=i.originalEvent,l=r.clientX,d=r.clientY;this._startPoint.call(this,l,d)}},_startPoint:function(i,r){this._mouseDownOrigin=L.point(i,r)},_onMouseUp:function(i){var r=i.originalEvent,l=r.clientX,d=r.clientY;this._endPoint.call(this,l,d,i),this._clickHandled=null},_endPoint:function(i,r,l){if(this._mouseDownOrigin){var d=L.point(i,r).distanceTo(this._mouseDownOrigin),p=this._calculateFinishDistance(l.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(l.latlng),this._finishShape()):p<10&&L.Browser.touch?this._finishShape():Math.abs(d)<9*(u.devicePixelRatio||1)&&this.addVertex(l.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(i){var r,l,d=i.originalEvent;!d.touches||!d.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(r=d.touches[0].clientX,l=d.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,r,l),this._endPoint.call(this,r,l,i),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(i){var r;if(this._markers.length>0){var l;if(this.type===L.Draw.Polyline.TYPE)l=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;l=this._markers[0]}var d=this._map.latLngToContainerPoint(l.getLatLng()),p=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),m=this._map.latLngToContainerPoint(p.getLatLng());r=d.distanceTo(m)}else r=1/0;return r},_updateFinishHandler:function(){var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_createMarker:function(i){var r=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(r),r},_updateGuide:function(i){var r=this._markers?this._markers.length:0;r>0&&(i=i||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[r-1].getLatLng()),i))},_updateTooltip:function(i){var r=this._getTooltipText();i&&this._tooltip.updatePosition(i),this._errorShown||this._tooltip.updateContent(r)},_drawGuide:function(i,r){var l,d,p,m=Math.floor(Math.sqrt(Math.pow(r.x-i.x,2)+Math.pow(r.y-i.y,2))),_=this.options.guidelineDistance,y=this.options.maxGuideLineLength,w=m>y?m-y:_;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));w<m;w+=this.options.guidelineDistance)l=w/m,d={x:Math.floor(i.x*(1-l)+l*r.x),y:Math.floor(i.y*(1-l)+l*r.y)},p=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer),p.style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(p,d)},_updateGuideColor:function(i){if(this._guidesContainer)for(var r=0,l=this._guidesContainer.childNodes.length;r<l;r++)this._guidesContainer.childNodes[r].style.backgroundColor=i},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var i,r,l=this.options.showLength;return this._markers.length===0?i={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(r=l?this._getMeasurementString():"",i=this._markers.length===1?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:r}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:r}),i},_updateRunningMeasure:function(i,r){var l,d,p=this._markers.length;this._markers.length===1?this._measurementRunningTotal=0:(l=p-(r?2:1),d=L.GeometryUtil.isVersion07x()?i.distanceTo(this._markers[l].getLatLng())*(this.options.factor||1):this._map.distance(i,this._markers[l].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=d*(r?1:-1))},_getMeasurementString:function(){var i,r=this._currentLatLng,l=this._markers[this._markers.length-1].getLatLng();return i=L.GeometryUtil.isVersion07x()?l&&r&&r.distanceTo?this._measurementRunningTotal+r.distanceTo(l)*(this.options.factor||1):this._measurementRunningTotal||0:l&&r?this._measurementRunningTotal+this._map.distance(r,l)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(i,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var i=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(i,r){L.Draw.Polyline.prototype.initialize.call(this,i,r),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var i=this._markers.length;i===1&&this._markers[0].on("click",this._finishShape,this),i>2&&(this._markers[i-1].on("dblclick",this._finishShape,this),i>3&&this._markers[i-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var i,r;return this._markers.length===0?i=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(i=L.drawLocal.draw.handlers.polygon.tooltip.cont,r=this._getMeasurementString()):(i=L.drawLocal.draw.handlers.polygon.tooltip.end,r=this._getMeasurementString()),{text:i,subtext:r}},_getMeasurementString:function(){var i=this._area,r="";return i||this.options.showLength?(this.options.showLength&&(r=L.Draw.Polyline.prototype._getMeasurementString.call(this)),i&&(r+="<br>"+L.GeometryUtil.readableArea(i,this.options.metric,this.options.precision)),r):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(i,r){var l;!this.options.allowIntersection&&this.options.showArea&&(l=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(l)),L.Draw.Polyline.prototype._vertexChanged.call(this,i,r)},_cleanUpShape:function(){var i=this._markers.length;i>0&&(this._markers[0].off("click",this._finishShape,this),i>2&&this._markers[i-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(i,r){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),a.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(a,"mouseup",this._onMouseUp,this),L.DomEvent.off(a,"touchend",this._onMouseUp,this),a.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(i){this._isDrawing=!0,this._startLatLng=i.latlng,L.DomEvent.on(a,"mouseup",this._onMouseUp,this).on(a,"touchend",this._onMouseUp,this).preventDefault(i.originalEvent)},_onMouseMove:function(i){var r=i.latlng;this._tooltip.updatePosition(r),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(r))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(i,r){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,r)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(i){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!h(i.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(i){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,i)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,i),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_getTooltipText:function(){var i,r,l,d=L.Draw.SimpleShape.prototype._getTooltipText.call(this),p=this._shape,m=this.options.showArea;return p&&(i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),r=L.GeometryUtil.geodesicArea(i),l=m?L.GeometryUtil.readableArea(r,this.options.metric):""),{text:d.text,subtext:l}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(i,r){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,r)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(i){var r=i.latlng;this._tooltip.updatePosition(r),this._mouseMarker.setLatLng(r),this._marker?(r=this._mouseMarker.getLatLng(),this._marker.setLatLng(r)):(this._marker=this._createMarker(r),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(i){return new L.Marker(i,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(i){this._onMouseMove(i),this._onClick()},_fireCreatedEvent:function(){var i=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(i,r){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,r)},_fireCreatedEvent:function(){var i=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)},_createMarker:function(i){return new L.CircleMarker(i,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(i,r){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,r)},_drawShape:function(i){if(L.GeometryUtil.isVersion07x())var r=this._startLatLng.distanceTo(i);else var r=this._map.distance(this._startLatLng,i);this._shape?this._shape.setRadius(r):(this._shape=new L.Circle(this._startLatLng,r,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_onMouseMove:function(i){var r,l=i.latlng,d=this.options.showRadius,p=this.options.metric;if(this._tooltip.updatePosition(l),this._isDrawing){this._drawShape(l),r=this._shape.getRadius().toFixed(1);var m="";d&&(m=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(r,p,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:m})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(i,r){this._marker=i,L.setOptions(this,r)},addHooks:function(){var i=this._marker;i.dragging.enable(),i.on("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},removeHooks:function(){var i=this._marker;i.dragging.disable(),i.off("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},_onDragEnd:function(i){var r=i.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_toggleMarkerHighlight:function(){var i=this._marker._icon;i&&(i.style.display="none",L.DomUtil.hasClass(i,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,-4)):(L.DomUtil.addClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,4)),i.style.display="")},_offsetMarker:function(i,r){var l=parseInt(i.style.marginTop,10)-r,d=parseInt(i.style.marginLeft,10)-r;i.style.marginTop=l+"px",i.style.marginLeft=d+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(i){this.latlngs=[i._latlngs],i._holes&&(this.latlngs=this.latlngs.concat(i._holes)),this._poly=i,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(i){for(var r=0;r<this._verticesHandlers.length;r++)i(this._verticesHandlers[r])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(i){i.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(i){i.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(i){i.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var i=0;i<this.latlngs.length;i++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[i],this._poly.options.poly))},_updateLatLngs:function(i){this.latlngs=[i.layer._latlngs],i.layer._holes&&(this.latlngs=this.latlngs.concat(i.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(i,r,l){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=i,l&&l.drawError&&(l.drawError=L.Util.extend({},this.options.drawError,l.drawError)),this._latlngs=r,L.setOptions(this,l)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var i=this._poly,r=i._path;i instanceof L.Polygon||(i.options.fill=!1,i.options.editing&&(i.options.editing.fill=!1)),r&&i.options.editing&&i.options.editing.className&&(i.options.original.className&&i.options.original.className.split(" ").forEach(function(l){L.DomUtil.removeClass(r,l)}),i.options.editing.className.split(" ").forEach(function(l){L.DomUtil.addClass(r,l)})),i.setStyle(i.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var i=this._poly,r=i._path;r&&i.options.editing&&i.options.editing.className&&(i.options.editing.className.split(" ").forEach(function(l){L.DomUtil.removeClass(r,l)}),i.options.original.className&&i.options.original.className.split(" ").forEach(function(l){L.DomUtil.addClass(r,l)})),i.setStyle(i.options.original),i._map&&(i._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var i,r,l,d,p=this._defaultShape();for(i=0,l=p.length;i<l;i++)d=this._createMarker(p[i],i),d.on("click",this._onMarkerClick,this),d.on("contextmenu",this._onContextMenu,this),this._markers.push(d);var m,_;for(i=0,r=l-1;i<l;r=i++)(i!==0||L.Polygon&&this._poly instanceof L.Polygon)&&(m=this._markers[r],_=this._markers[i],this._createMiddleMarker(m,_),this._updatePrevNext(m,_))},_createMarker:function(i,r){var l=new L.Marker.Touch(i,{draggable:!0,icon:this.options.icon});return l._origLatLng=i,l._index=r,l.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(l),l},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var i=this._defaultShape(),r=[].splice.apply(i,arguments);return this._poly._convertLatLngs(i,!0),this._poly.redraw(),r},_removeMarker:function(i){var r=i._index;this._markerGroup.removeLayer(i),this._markers.splice(r,1),this._spliceLatLngs(r,1),this._updateIndexes(r,-1),i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(i){var r=i.target,l=this._poly,d=L.LatLngUtil.cloneLatLng(r._origLatLng);if(L.extend(r._origLatLng,r._latlng),l.options.poly){var p=l._map._editTooltip;if(!l.options.poly.allowIntersection&&l.intersects()){L.extend(r._origLatLng,d),r.setLatLng(d);var m=l.options.color;l.setStyle({color:this.options.drawError.color}),p&&p.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){l.setStyle({color:m}),p&&p.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}r._middleLeft&&r._middleLeft.setLatLng(this._getMiddleLatLng(r._prev,r)),r._middleRight&&r._middleRight.setLatLng(this._getMiddleLatLng(r,r._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var _=this._poly.getLatLngs();this._poly._convertLatLngs(_,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(i){var r=L.Polygon&&this._poly instanceof L.Polygon?4:3,l=i.target;this._defaultShape().length<r||(this._removeMarker(l),this._updatePrevNext(l._prev,l._next),l._middleLeft&&this._markerGroup.removeLayer(l._middleLeft),l._middleRight&&this._markerGroup.removeLayer(l._middleRight),l._prev&&l._next?this._createMiddleMarker(l._prev,l._next):l._prev?l._next||(l._prev._middleRight=null):l._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(i){var r=i.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:r,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),l=this._map.layerPointToLatLng(r),d=i.target;L.extend(d._origLatLng,l),d._middleLeft&&d._middleLeft.setLatLng(this._getMiddleLatLng(d._prev,d)),d._middleRight&&d._middleRight.setLatLng(this._getMiddleLatLng(d,d._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(i,r){this._markerGroup.eachLayer(function(l){l._index>i&&(l._index+=r)})},_createMiddleMarker:function(i,r){var l,d,p,m=this._getMiddleLatLng(i,r),_=this._createMarker(m);_.setOpacity(.6),i._middleRight=r._middleLeft=_,d=function(){_.off("touchmove",d,this);var y=r._index;_._index=y,_.off("click",l,this).on("click",this._onMarkerClick,this),m.lat=_.getLatLng().lat,m.lng=_.getLatLng().lng,this._spliceLatLngs(y,0,m),this._markers.splice(y,0,_),_.setOpacity(1),this._updateIndexes(y,1),r._index++,this._updatePrevNext(i,_),this._updatePrevNext(_,r),this._poly.fire("editstart")},p=function(){_.off("dragstart",d,this),_.off("dragend",p,this),_.off("touchmove",d,this),this._createMiddleMarker(i,_),this._createMiddleMarker(_,r)},l=function(){d.call(this),p.call(this),this._fireEdit()},_.on("click",l,this).on("dragstart",d,this).on("dragend",p,this).on("touchmove",d,this),this._markerGroup.addLayer(_)},_updatePrevNext:function(i,r){i&&(i._next=r),r&&(r._prev=i)},_getMiddleLatLng:function(i,r){var l=this._poly._map,d=l.project(i.getLatLng()),p=l.project(r.getLatLng());return l.unproject(d._add(p)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(i,r){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=i,L.Util.setOptions(this,r)},addHooks:function(){var i=this._shape;this._shape._map&&(this._map=this._shape._map,i.setStyle(i.options.editing),i._map&&(this._map=i._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var i=this._shape;if(i.setStyle(i.options.original),i._map){this._unbindMarker(this._moveMarker);for(var r=0,l=this._resizeMarkers.length;r<l;r++)this._unbindMarker(this._resizeMarkers[r]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(i,r){var l=new L.Marker.Touch(i,{draggable:!0,icon:r,zIndexOffset:10});return this._bindMarker(l),this._markerGroup.addLayer(l),l},_bindMarker:function(i){i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(i){i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(i){i.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(i){var r=i.target,l=r.getLatLng();r===this._moveMarker?this._move(l):this._resize(l),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(i){i.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(i){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i),typeof this._getCorners=="function"){var r=this._getCorners(),l=i.target,d=l._cornerIndex;l.setOpacity(0),this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)}this._shape.fire("editstart")},_onTouchMove:function(i){var r=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),l=this._map.layerPointToLatLng(r);return i.target===this._moveMarker?this._move(l):this._resize(l),this._shape.redraw(),!1},_onTouchEnd:function(i){i.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getBounds(),r=i.getCenter();this._moveMarker=this._createMarker(r,this.options.moveIcon)},_createResizeMarker:function(){var i=this._getCorners();this._resizeMarkers=[];for(var r=0,l=i.length;r<l;r++)this._resizeMarkers.push(this._createMarker(i[r],this.options.resizeIcon)),this._resizeMarkers[r]._cornerIndex=r},_onMarkerDragStart:function(i){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i);var r=this._getCorners(),l=i.target,d=l._cornerIndex;this._oppositeCorner=r[(d+2)%4],this._toggleCornerMarkers(0,d)},_onMarkerDragEnd:function(i){var r,l,d=i.target;d===this._moveMarker&&(r=this._shape.getBounds(),l=r.getCenter(),d.setLatLng(l)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,i)},_move:function(i){for(var r,l=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),d=this._shape.getBounds(),p=d.getCenter(),m=[],_=0,y=l.length;_<y;_++)r=[l[_].lat-p.lat,l[_].lng-p.lng],m.push([i.lat+r[0],i.lng+r[1]]);this._shape.setLatLngs(m),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(i){var r;this._shape.setBounds(L.latLngBounds(i,this._oppositeCorner)),r=this._shape.getBounds(),this._moveMarker.setLatLng(r.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var i=this._shape.getBounds();return[i.getNorthWest(),i.getNorthEast(),i.getSouthEast(),i.getSouthWest()]},_toggleCornerMarkers:function(i){for(var r=0,l=this._resizeMarkers.length;r<l;r++)this._resizeMarkers[r].setOpacity(i)},_repositionCornerMarkers:function(){for(var i=this._getCorners(),r=0,l=this._resizeMarkers.length;r<l;r++)this._resizeMarkers[r].setLatLng(i[r])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getLatLng();this._moveMarker=this._createMarker(i,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(i){if(this._resizeMarkers.length){var r=this._getResizeMarkerPoint(i);this._resizeMarkers[0].setLatLng(r)}this._shape.setLatLng(i),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var i=this._shape.getLatLng(),r=this._getResizeMarkerPoint(i);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(r,this.options.resizeIcon))},_getResizeMarkerPoint:function(i){var r=this._shape._radius*Math.cos(Math.PI/4),l=this._map.project(i);return this._map.unproject([l.x+r,l.y-r])},_resize:function(i){var r=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=r.distanceTo(i):radius=this._map.distance(r,i),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(i){this._map=i,this._container=i._container,this._pane=i._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(i,r){var l={};if(i.touches!==void 0){if(!i.touches.length)return;l=i.touches[0]}else if(i.pointerType!=="touch"||(l=i,!this._filterClick(i)))return;var d=this._map.mouseEventToContainerPoint(l),p=this._map.mouseEventToLayerPoint(l),m=this._map.layerPointToLatLng(p);this._map.fire(r,{latlng:m,layerPoint:p,containerPoint:d,pageX:l.pageX,pageY:l.pageY,originalEvent:i})},_filterClick:function(i){var r=i.timeStamp||i.originalEvent.timeStamp,l=L.DomEvent._lastClick&&r-L.DomEvent._lastClick;return l&&l>100&&l<500||i.target._simulatedClick&&!i._simulated?(L.DomEvent.stop(i),!1):(L.DomEvent._lastClick=r,!0)},_onTouchStart:function(i){this._map._loaded&&this._touchEvent(i,"touchstart")},_onTouchEnd:function(i){this._map._loaded&&this._touchEvent(i,"touchend")},_onTouchCancel:function(i){if(this._map._loaded){var r="touchcancel";this._detectIE()&&(r="pointercancel"),this._touchEvent(i,r)}},_onTouchLeave:function(i){this._map._loaded&&this._touchEvent(i,"touchleave")},_onTouchMove:function(i){this._map._loaded&&this._touchEvent(i,"touchmove")},_detectIE:function(){var i=u.navigator.userAgent,r=i.indexOf("MSIE ");if(r>0)return parseInt(i.substring(r+5,i.indexOf(".",r)),10);if(i.indexOf("Trident/")>0){var l=i.indexOf("rv:");return parseInt(i.substring(l+3,i.indexOf(".",l)),10)}var d=i.indexOf("Edge/");return d>0&&parseInt(i.substring(d+5,i.indexOf(".",d)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var i=this._icon,r=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?r.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):r.concat(["touchcancel"]),L.DomUtil.addClass(i,"leaflet-clickable"),L.DomEvent.on(i,"click",this._onMouseClick,this),L.DomEvent.on(i,"keypress",this._onKeyPress,this);for(var l=0;l<r.length;l++)L.DomEvent.on(i,r[l],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var i=u.navigator.userAgent,r=i.indexOf("MSIE ");if(r>0)return parseInt(i.substring(r+5,i.indexOf(".",r)),10);if(i.indexOf("Trident/")>0){var l=i.indexOf("rv:");return parseInt(i.substring(l+3,i.indexOf(".",l)),10)}var d=i.indexOf("Edge/");return d>0&&parseInt(i.substring(d+5,i.indexOf(".",d)),10)}}),L.LatLngUtil={cloneLatLngs:function(i){for(var r=[],l=0,d=i.length;l<d;l++)Array.isArray(i[l])?r.push(L.LatLngUtil.cloneLatLngs(i[l])):r.push(this.cloneLatLng(i[l]));return r},cloneLatLng:function(i){return L.latLng(i.lat,i.lng)}},(function(){var i={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(r){var l,d,p=r.length,m=0,_=Math.PI/180;if(p>2){for(var y=0;y<p;y++)l=r[y],d=r[(y+1)%p],m+=(d.lng-l.lng)*_*(2+Math.sin(l.lat*_)+Math.sin(d.lat*_));m=6378137*m*6378137/2}return Math.abs(m)},formattedNumber:function(r,l){var d=parseFloat(r).toFixed(l),p=L.drawLocal.format&&L.drawLocal.format.numeric,m=p&&p.delimiters,_=m&&m.thousands,y=m&&m.decimal;if(_||y){var w=d.split(".");d=_?w[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+_):w[0],y=y||".",w.length>1&&(d=d+y+w[1])}return d},readableArea:function(r,l,_){var p,m,_=L.Util.extend({},i,_);return l?(m=["ha","m"],type=typeof l,type==="string"?m=[l]:type!=="boolean"&&(m=l),p=r>=1e6&&m.indexOf("km")!==-1?L.GeometryUtil.formattedNumber(1e-6*r,_.km)+" km²":r>=1e4&&m.indexOf("ha")!==-1?L.GeometryUtil.formattedNumber(1e-4*r,_.ha)+" ha":L.GeometryUtil.formattedNumber(r,_.m)+" m²"):(r/=.836127,p=r>=3097600?L.GeometryUtil.formattedNumber(r/3097600,_.mi)+" mi²":r>=4840?L.GeometryUtil.formattedNumber(r/4840,_.ac)+" acres":L.GeometryUtil.formattedNumber(r,_.yd)+" yd²"),p},readableDistance:function(r,l,d,p,y){var _,y=L.Util.extend({},i,y);switch(l?typeof l=="string"?l:"metric":d?"feet":p?"nauticalMile":"yards"){case"metric":_=r>1e3?L.GeometryUtil.formattedNumber(r/1e3,y.km)+" km":L.GeometryUtil.formattedNumber(r,y.m)+" m";break;case"feet":r*=3.28083,_=L.GeometryUtil.formattedNumber(r,y.ft)+" ft";break;case"nauticalMile":r*=.53996,_=L.GeometryUtil.formattedNumber(r/1e3,y.nm)+" nm";break;case"yards":default:r*=1.09361,_=r>1760?L.GeometryUtil.formattedNumber(r/1760,y.mi)+" miles":L.GeometryUtil.formattedNumber(r,y.yd)+" yd"}return _},isVersion07x:function(){var r=L.version.split(".");return parseInt(r[0],10)===0&&parseInt(r[1],10)===7}})})(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(i,r,l,d){return this._checkCounterclockwise(i,l,d)!==this._checkCounterclockwise(r,l,d)&&this._checkCounterclockwise(i,r,l)!==this._checkCounterclockwise(i,r,d)},_checkCounterclockwise:function(i,r,l){return(l.y-i.y)*(r.x-i.x)>(r.y-i.y)*(l.x-i.x)}}),L.Polyline.include({intersects:function(){var i,r,l,d=this._getProjectedPoints(),p=d?d.length:0;if(this._tooFewPointsForIntersection())return!1;for(i=p-1;i>=3;i--)if(r=d[i-1],l=d[i],this._lineSegmentsIntersectsRange(r,l,i-2))return!0;return!1},newLatLngIntersects:function(i,r){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(i),r)},newPointIntersects:function(i,r){var l=this._getProjectedPoints(),d=l?l.length:0,p=l?l[d-1]:null,m=d-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(p,i,m,r?1:0)},_tooFewPointsForIntersection:function(i){var r=this._getProjectedPoints(),l=r?r.length:0;return l+=i||0,!r||l<=3},_lineSegmentsIntersectsRange:function(i,r,l,d){var p,m,_=this._getProjectedPoints();d=d||0;for(var y=l;y>d;y--)if(p=_[y-1],m=_[y],L.LineUtil.segmentsIntersect(i,r,p,m))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var i=[],r=this._defaultShape(),l=0;l<r.length;l++)i.push(this._map.latLngToLayerPoint(r[l]));return i}}),L.Polygon.include({intersects:function(){var i,r,l,d,p=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(i=p.length,r=p[0],l=p[i-1],d=i-2,this._lineSegmentsIntersectsRange(l,r,d,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(i){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,i);var r;this._toolbars={},L.DrawToolbar&&this.options.draw&&(r=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=r,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(r=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=r,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(i){var r,l=L.DomUtil.create("div","leaflet-draw"),d=!1;for(var p in this._toolbars)this._toolbars.hasOwnProperty(p)&&(r=this._toolbars[p].addToolbar(i))&&(d||(L.DomUtil.hasClass(r,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(r.childNodes[0],"leaflet-draw-toolbar-top"),d=!0),l.appendChild(r));return l},onRemove:function(){for(var i in this._toolbars)this._toolbars.hasOwnProperty(i)&&this._toolbars[i].removeToolbar()},setDrawingOptions:function(i){for(var r in this._toolbars)this._toolbars[r]instanceof L.DrawToolbar&&this._toolbars[r].setOptions(i)},_toolbarEnabled:function(i){var r=i.target;for(var l in this._toolbars)this._toolbars[l]!==r&&this._toolbars[l].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(i){L.setOptions(this,i),this._modes={},this._actionButtons=[],this._activeMode=null;var r=L.version.split(".");parseInt(r[0],10)===1&&parseInt(r[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return this._activeMode!==null},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(i){var r,l=L.DomUtil.create("div","leaflet-draw-section"),d=0,p=this._toolbarClass||"",m=this.getModeHandlers(i);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=i,r=0;r<m.length;r++)m[r].enabled&&this._initModeHandler(m[r].handler,this._toolbarContainer,d++,p,m[r].title);if(d)return this._lastButtonIndex=--d,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),l.appendChild(this._toolbarContainer),l.appendChild(this._actionsContainer),l},removeToolbar:function(){for(var i in this._modes)this._modes.hasOwnProperty(i)&&(this._disposeButton(this._modes[i].button,this._modes[i].handler.enable,this._modes[i].handler),this._modes[i].handler.disable(),this._modes[i].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var r=0,l=this._actionButtons.length;r<l;r++)this._disposeButton(this._actionButtons[r].button,this._actionButtons[r].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(i,r,l,d,p){var m=i.type;this._modes[m]={},this._modes[m].handler=i,this._modes[m].button=this._createButton({type:m,title:p,className:d+"-"+m,container:r,callback:this._modes[m].handler.enable,context:this._modes[m].handler}),this._modes[m].buttonIndex=l,this._modes[m].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!u.MSStream},_createButton:function(i){var r=L.DomUtil.create("a",i.className||"",i.container),l=L.DomUtil.create("span","sr-only",i.container);r.href="#",r.appendChild(l),i.title&&(r.title=i.title,l.innerHTML=i.title),i.text&&(r.innerHTML=i.text,l.innerHTML=i.text);var d=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(r,"click",L.DomEvent.stopPropagation).on(r,"mousedown",L.DomEvent.stopPropagation).on(r,"dblclick",L.DomEvent.stopPropagation).on(r,"touchstart",L.DomEvent.stopPropagation).on(r,"click",L.DomEvent.preventDefault).on(r,d,i.callback,i.context),r},_disposeButton:function(i,r){var l=this._detectIOS()?"touchstart":"click";L.DomEvent.off(i,"click",L.DomEvent.stopPropagation).off(i,"mousedown",L.DomEvent.stopPropagation).off(i,"dblclick",L.DomEvent.stopPropagation).off(i,"touchstart",L.DomEvent.stopPropagation).off(i,"click",L.DomEvent.preventDefault).off(i,l,r)},_handlerActivated:function(i){this.disable(),this._activeMode=this._modes[i.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(i){var r,l,d,p,m=this._actionsContainer,_=this.getActions(i),y=_.length;for(l=0,d=this._actionButtons.length;l<d;l++)this._disposeButton(this._actionButtons[l].button,this._actionButtons[l].callback);for(this._actionButtons=[];m.firstChild;)m.removeChild(m.firstChild);for(var w=0;w<y;w++)"enabled"in _[w]&&!_[w].enabled||(r=L.DomUtil.create("li","",m),p=this._createButton({title:_[w].title,text:_[w].text,container:r,callback:_[w].callback,context:_[w].context}),this._actionButtons.push({button:p,callback:_[w].callback}))},_showActionsToolbar:function(){var i=this._activeMode.buttonIndex,r=this._lastButtonIndex,l=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=l+"px",i===0&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),i===r&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(i){this._map=i,this._popupPane=i._panes.popupPane,this._visible=!1,this._container=i.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(i){return this._container?(i.subtext=i.subtext||"",i.subtext.length!==0||this._singleLineLabel?i.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(i.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+i.subtext+"</span><br />":"")+"<span>"+i.text+"</span>",i.text||i.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(i){var r=this._map.latLngToLayerPoint(i),l=this._container;return this._container&&(this._visible&&(l.style.visibility="inherit"),L.DomUtil.setPosition(l,r)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(i){for(var r in this.options)this.options.hasOwnProperty(r)&&i[r]&&(i[r]=L.extend({},this.options[r],i[r]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,i)},getModeHandlers:function(i){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(i,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(i,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(i,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(i,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(i,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(i,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(i){return[{enabled:i.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:i.completeShape,context:i},{enabled:i.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:i.deleteLastVertex,context:i},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(i){L.setOptions(this,i);for(var r in this._modes)this._modes.hasOwnProperty(r)&&i.hasOwnProperty(r)&&this._modes[r].handler.setOptions(i[r])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(i){i.edit&&(i.edit.selectedPathOptions===void 0&&(i.edit.selectedPathOptions=this.options.edit.selectedPathOptions),i.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,i.edit.selectedPathOptions)),i.remove&&(i.remove=L.extend({},this.options.remove,i.remove)),i.poly&&(i.poly=L.extend({},this.options.poly,i.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,i),this._selectedFeatureCount=0},getModeHandlers:function(i){var r=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(i,{featureGroup:r,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(i,{featureGroup:r}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(i){var r=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return i.removeAllLayers&&r.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),r},addToolbar:function(i){var r=L.Toolbar.prototype.addToolbar.call(this,i);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),r},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var i,r=this.options.featureGroup,l=r.getLayers().length!==0;this.options.edit&&(i=this._modes[L.EditToolbar.Edit.TYPE].button,l?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",l?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(i=this._modes[L.EditToolbar.Delete.TYPE].button,l?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",l?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(i,r){if(L.Handler.prototype.initialize.call(this,i),L.setOptions(this,r),this._featureGroup=r.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var l=L.version.split(".");parseInt(l[0],10)===1&&parseInt(l[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),i._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(i){this._revertLayer(i)},this)},save:function(){var i=new L.LayerGroup;this._featureGroup.eachLayer(function(r){r.edited&&(i.addLayer(r),r.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:i})},_backupLayer:function(i){var r=L.Util.stamp(i);this._uneditedLayerProps[r]||(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?this._uneditedLayerProps[r]={latlngs:L.LatLngUtil.cloneLatLngs(i.getLatLngs())}:i instanceof L.Circle?this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng()),radius:i.getRadius()}:(i instanceof L.Marker||i instanceof L.CircleMarker)&&(this._uneditedLayerProps[r]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(i){var r=L.Util.stamp(i);i.edited=!1,this._uneditedLayerProps.hasOwnProperty(r)&&(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?i.setLatLngs(this._uneditedLayerProps[r].latlngs):i instanceof L.Circle?(i.setLatLng(this._uneditedLayerProps[r].latlng),i.setRadius(this._uneditedLayerProps[r].radius)):(i instanceof L.Marker||i instanceof L.CircleMarker)&&i.setLatLng(this._uneditedLayerProps[r].latlng),i.fire("revert-edited",{layer:i}))},_enableLayerEdit:function(i){var r,l,d=i.layer||i.target||i;this._backupLayer(d),this.options.poly&&(l=L.Util.extend({},this.options.poly),d.options.poly=l),this.options.selectedPathOptions&&(r=L.Util.extend({},this.options.selectedPathOptions),r.maintainColor&&(r.color=d.options.color,r.fillColor=d.options.fillColor),d.options.original=L.extend({},d.options),d.options.editing=r),d instanceof L.Marker?(d.editing&&d.editing.enable(),d.dragging.enable(),d.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):d.editing.enable()},_disableLayerEdit:function(i){var r=i.layer||i.target||i;r.edited=!1,r.editing&&r.editing.disable(),delete r.options.editing,delete r.options.original,this._selectedPathOptions&&(r instanceof L.Marker?this._toggleMarkerHighlight(r):(r.setStyle(r.options.previousOptions),delete r.options.previousOptions)),r instanceof L.Marker?(r.dragging.disable(),r.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):r.editing.disable()},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_onMarkerDragEnd:function(i){var r=i.target;r.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:r})},_onTouchMove:function(i){var r=i.originalEvent.changedTouches[0],l=this._map.mouseEventToLayerPoint(r),d=this._map.layerPointToLatLng(l);i.target.setLatLng(d)},_hasAvailableLayers:function(){return this._featureGroup.getLayers().length!==0}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(i,r){if(L.Handler.prototype.initialize.call(this,i),L.Util.setOptions(this,r),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var l=L.version.split(".");parseInt(l[0],10)===1&&parseInt(l[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(i){this._deletableLayers.addLayer(i),i.fire("revert-deleted",{layer:i})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(i){this._removeLayer({layer:i})},this),this.save()},_enableLayerDelete:function(i){(i.layer||i.target||i).on("click",this._removeLayer,this)},_disableLayerDelete:function(i){var r=i.layer||i.target||i;r.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(r)},_removeLayer:function(i){var r=i.layer||i.target||i;this._deletableLayers.removeLayer(r),this._deletedLayers.addLayer(r),r.fire("deleted")},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_hasAvailableLayers:function(){return this._deletableLayers.getLayers().length!==0}})})(window,document);var Qe={exports:{}},to;function $n(){return to||(to=1,(function(u,a){(function(n,h){u.exports=n(Qi()),typeof h!="undefined"&&h.L&&(h.L.Ruler=n(L))})(function(n){n.Control.Ruler=n.Control.extend({options:{position:"topright",circleMarker:{color:"red",radius:2},lineStyle:{color:"red",dashArray:"1,6"},lengthUnit:{display:"km",decimal:2,factor:null,label:"Distance:"},angleUnit:{display:"°",decimal:2,factor:null,label:"Bearing:"}},onAdd:function(h){return this._map=h,this._container=n.DomUtil.create("div","leaflet-bar"),this._container.classList.add("leaflet-ruler"),n.DomEvent.disableClickPropagation(this._container),n.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._choice=!1,this._defaultCursor=this._map._container.style.cursor,this._allLayers=n.layerGroup(),this._container},onRemove:function(){n.DomEvent.off(this._container,"click",this._toggleMeasure,this)},_toggleMeasure:function(){this._choice=!this._choice,this._clickedLatLong=null,this._clickedPoints=[],this._totalLength=0,this._choice?(this._map.doubleClickZoom.disable(),n.DomEvent.on(this._map._container,"keydown",this._escape,this),n.DomEvent.on(this._map._container,"dblclick",this._closePath,this),this._container.classList.add("leaflet-ruler-clicked"),this._clickCount=0,this._tempLine=n.featureGroup().addTo(this._allLayers),this._tempPoint=n.featureGroup().addTo(this._allLayers),this._pointLayer=n.featureGroup().addTo(this._allLayers),this._polylineLayer=n.featureGroup().addTo(this._allLayers),this._allLayers.addTo(this._map),this._map._container.style.cursor="crosshair",this._map.on("click",this._clicked,this),this._map.on("mousemove",this._moving,this)):(this._map.doubleClickZoom.enable(),n.DomEvent.off(this._map._container,"keydown",this._escape,this),n.DomEvent.off(this._map._container,"dblclick",this._closePath,this),this._container.classList.remove("leaflet-ruler-clicked"),this._map.removeLayer(this._allLayers),this._allLayers=n.layerGroup(),this._map._container.style.cursor=this._defaultCursor,this._map.off("click",this._clicked,this),this._map.off("mousemove",this._moving,this))},_clicked:function(h){if(this._clickedLatLong=h.latlng,this._clickedPoints.push(this._clickedLatLong),n.circleMarker(this._clickedLatLong,this.options.circleMarker).addTo(this._pointLayer),this._clickCount>0&&!h.latlng.equals(this._clickedPoints[this._clickedPoints.length-2])){this._movingLatLong&&n.polyline([this._clickedPoints[this._clickCount-1],this._movingLatLong],this.options.lineStyle).addTo(this._polylineLayer);var i;this._totalLength+=this._result.Distance,this._clickCount>1?i="<b>"+this.options.angleUnit.label+"</b> "+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+" "+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b> "+this._totalLength.toFixed(this.options.lengthUnit.decimal)+" "+this.options.lengthUnit.display:i="<b>"+this.options.angleUnit.label+"</b> "+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+" "+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b> "+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+" "+this.options.lengthUnit.display,n.circleMarker(this._clickedLatLong,this.options.circleMarker).bindTooltip(i,{permanent:!0,className:"result-tooltip"}).addTo(this._pointLayer).openTooltip()}this._clickCount++},_moving:function(h){if(this._clickedLatLong){n.DomEvent.off(this._container,"click",this._toggleMeasure,this),this._movingLatLong=h.latlng,this._tempLine&&(this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint));var i;this._addedLength=0,this._tempLine=n.featureGroup(),this._tempPoint=n.featureGroup(),this._tempLine.addTo(this._map),this._tempPoint.addTo(this._map),this._calculateBearingAndDistance(),this._addedLength=this._result.Distance+this._totalLength,n.polyline([this._clickedLatLong,this._movingLatLong],this.options.lineStyle).addTo(this._tempLine),this._clickCount>1?i="<b>"+this.options.angleUnit.label+"</b> "+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+" "+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b> "+this._addedLength.toFixed(this.options.lengthUnit.decimal)+" "+this.options.lengthUnit.display+'<br><div class="plus-length">(+'+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+")</div>":i="<b>"+this.options.angleUnit.label+"</b> "+this._result.Bearing.toFixed(this.options.angleUnit.decimal)+" "+this.options.angleUnit.display+"<br><b>"+this.options.lengthUnit.label+"</b> "+this._result.Distance.toFixed(this.options.lengthUnit.decimal)+" "+this.options.lengthUnit.display,n.circleMarker(this._movingLatLong,this.options.circleMarker).bindTooltip(i,{sticky:!0,offset:n.point(0,-40),className:"moving-tooltip"}).addTo(this._tempPoint).openTooltip()}},_escape:function(h){h.keyCode===27&&(this._clickCount>0?this._closePath():(this._choice=!0,this._toggleMeasure()))},_calculateBearingAndDistance:function(){var h=this._clickedLatLong.lat,i=this._clickedLatLong.lng,r=this._movingLatLong.lat,l=this._movingLatLong.lng,d=Math.PI/180,p=Math.sin((l-i)*d)*Math.cos(r*d),m=Math.cos(h*d)*Math.sin(r*d)-Math.sin(h*d)*Math.cos(r*d)*Math.cos((l-i)*d),_=Math.atan2(p,m)*((this.options.angleUnit.factor?this.options.angleUnit.factor/2:180)/Math.PI);_+=_<0?this.options.angleUnit.factor?this.options.angleUnit.factor:360:0;var y=this.options.lengthUnit.factor?6371*this.options.lengthUnit.factor:6371,w=(r-h)*d,T=(l-i)*d,E=Math.sin(w/2)*Math.sin(w/2)+Math.cos(h*d)*Math.cos(r*d)*Math.sin(T/2)*Math.sin(T/2),A=2*Math.atan2(Math.sqrt(E),Math.sqrt(1-E)),N=y*A;this._result={Bearing:_,Distance:N}},_closePath:function(){this._map.removeLayer(this._tempLine),this._map.removeLayer(this._tempPoint),this._clickCount<=1&&this._map.removeLayer(this._pointLayer),this._choice=!1,n.DomEvent.on(this._container,"click",this._toggleMeasure,this),this._toggleMeasure()}}),n.control.ruler=function(h){return new n.Control.Ruler(h)}},window)})(Qe)),Qe.exports}$n();const ot=[];for(let u=0;u<256;++u)ot.push((u+256).toString(16).slice(1));function tr(u,a=0){return(ot[u[a+0]]+ot[u[a+1]]+ot[u[a+2]]+ot[u[a+3]]+"-"+ot[u[a+4]]+ot[u[a+5]]+"-"+ot[u[a+6]]+ot[u[a+7]]+"-"+ot[u[a+8]]+ot[u[a+9]]+"-"+ot[u[a+10]]+ot[u[a+11]]+ot[u[a+12]]+ot[u[a+13]]+ot[u[a+14]]+ot[u[a+15]]).toLowerCase()}let $e;const er=new Uint8Array(16);function ir(){if(!$e){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");$e=crypto.getRandomValues.bind(crypto)}return $e(er)}const eo={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ti(u,a,n){var i,r,l;if(eo.randomUUID&&!u)return eo.randomUUID();u=u||{};const h=(l=(r=u.random)!=null?r:(i=u.rng)==null?void 0:i.call(u))!=null?l:ir();if(h.length<16)throw new Error("Random bytes length must be >= 16");return h[6]=h[6]&15|64,h[8]=h[8]&63|128,tr(h)}function xe(u){var n,h;const a=(h=u.id)!=null?h:(n=u.properties)==null?void 0:n.id;if(a!=null)return String(a)}const or=/^(.*)::(\d+)$/;function io(u){const a=xe(u);if(!a)return null;const n=or.exec(a);return n?{baseId:n[1],childIndex:Number(n[2]),feature:u}:null}function nr(u,a){const n=a&&typeof a=="object"?{...a}:{};return n.id=u,n}function rr(u,a){const n=[...a].sort((d,p)=>d.childIndex-p.childIndex),h=n[0].feature,i=nr(u,h.properties),r=n.map(d=>d.feature.geometry).filter(d=>d!=null);let l;return r.length===0?l={type:"GeometryCollection",geometries:[]}:r.length===1?l=r[0]:r.every(d=>d.type==="Point")?l={type:"MultiPoint",coordinates:r.map(d=>d.coordinates)}:r.every(d=>d.type==="LineString")?l={type:"MultiLineString",coordinates:r.map(d=>d.coordinates)}:r.every(d=>d.type==="Polygon")?l={type:"MultiPolygon",coordinates:r.map(d=>d.coordinates)}:l={type:"GeometryCollection",geometries:r},{type:"Feature",id:u,properties:i,geometry:l}}function ar(u,a){const n=h=>{switch(h.type){case"Point":a(h.coordinates);break;case"MultiPoint":case"LineString":for(const i of h.coordinates)a(i);break;case"MultiLineString":case"Polygon":for(const i of h.coordinates)for(const r of i)a(r);break;case"MultiPolygon":for(const i of h.coordinates)for(const r of i)for(const l of r)a(l);break;case"GeometryCollection":for(const i of h.geometries)n(i);break}};n(u)}function sr(u){const a=u.geometry;if(!a)return null;let n=1/0,h=1/0,i=-1/0,r=-1/0,l=!1;return ar(a,d=>{const[p,m]=d;typeof p!="number"||typeof m!="number"||(l=!0,p<n&&(n=p),m<h&&(h=m),p>i&&(i=p),m>r&&(r=m))}),l?[n,h,i,r]:null}function lr(u){let a=1/0,n=1/0,h=-1/0,i=-1/0,r=!1;for(const l of u.features){const d=sr(l);d&&(r=!0,a=Math.min(a,d[0]),n=Math.min(n,d[1]),h=Math.max(h,d[2]),i=Math.max(i,d[3]))}return r?[a,n,h,i]:null}function hr(u){const[a,n,h,i]=u;return[[n,a],[i,h]]}function cr(u){var n;const a=[];for(const h of u.features){if(!h||h.type!=="Feature")continue;const i=(n=h.properties)!=null?n:{},r=xe(h),l=(p,m)=>{const _=i&&typeof i=="object"?{...i}:{},y=r!==void 0?`${r}::${m}`:void 0;return y!==void 0&&(_.id=y),{type:"Feature",id:y,properties:_,geometry:p}},d=h.geometry;if(d)switch(d.type){case"MultiPolygon":for(const[p,m]of d.coordinates.entries())a.push(l({type:"Polygon",coordinates:m},p));break;case"MultiLineString":for(const[p,m]of d.coordinates.entries())a.push(l({type:"LineString",coordinates:m},p));break;case"MultiPoint":for(const[p,m]of d.coordinates.entries())a.push(l({type:"Point",coordinates:m},p));break;case"GeometryCollection":for(const[p,m]of d.geometries.entries())a.push(l(m,p));break;default:a.push(h);break}}return{type:"FeatureCollection",features:a}}function dr(u,a={}){var l;if(((l=a.adapter)!=null?l:"editing")!=="source")return u;const h=new Map;for(const d of u.features){const p=io(d);if(!p)continue;const m=h.get(p.baseId);m?m.push(p):h.set(p.baseId,[p])}if(h.size===0)return u;const i=new Set,r=[];for(const d of u.features){const p=io(d);if(!p){r.push(d);continue}i.has(p.baseId)||(i.add(p.baseId),r.push(rr(p.baseId,h.get(p.baseId))))}return{type:"FeatureCollection",features:r}}function oo(u){return(u==null?void 0:u.type)==="Polygon"}function no(u){return(u==null?void 0:u.type)==="MultiPolygon"}function ur(u){const a=u.geometry;return a?oo(a)?[a.coordinates]:no(a)?a.coordinates:[]:[]}function fr(u,a){var i,r;const n=[];for(const l of u){const d=ur(l);d.length>0&&n.push(...d)}if(n.length===0)return null;const h=(r=a!=null?a:(i=u[0])==null?void 0:i.properties)!=null?r:{};return n.length===1?{type:"Feature",properties:{...h},geometry:{type:"Polygon",coordinates:n[0]}}:{type:"Feature",properties:{...h},geometry:{type:"MultiPolygon",coordinates:n}}}class pr{constructor(a=be("feature-store","debug")){k(this,"log");k(this,"features");this.log=a,this.features=new Map}size(){return this.features.size}has(a){return this.features.has(a)}get(a){return this.features.get(a)}add(a){var r,l,d,p;const n=[],h=(l=(r=performance.now)==null?void 0:r.call(performance))!=null?l:Date.now();for(const m of a.features){const _=this.ensureId(m),y={...m,id:_};this.features.set(_,y),n.push(_)}const i=((p=(d=performance.now)==null?void 0:d.call(performance))!=null?p:Date.now())-h;return this.log.debug("add",{count:a.features.length,ids:n,elapsedMs:Math.round(i)}),n}update(a,n){if(!this.features.has(a)){this.log.warn("update:missing",{id:a});return}const h={...n,id:a};this.features.set(a,h),this.log.debug("update",{id:a})}remove(a){this.features.delete(a)?this.log.debug("remove",{id:a}):this.log.warn("remove:missing",{id:a})}clear(){const a=this.features.size;this.features.clear(),this.log.debug("clear",{count:a})}toFeatureCollection(){return{type:"FeatureCollection",features:Array.from(this.features.values())}}bounds(){const a=this.toFeatureCollection();if(a.features.length===0)return null;const n=lr(a);return n?hr(n):null}ensureId(a){const n=xe(a);if(n)return String(n);const h=ti();return a.id=h,a.properties&&typeof a.properties=="object"&&(a.properties.id=h),h}}const ke={polygon:{selectors:["a.leaflet-draw-draw-polygon"],dataTool:"polygon"},polyline:{selectors:["a.leaflet-draw-draw-polyline"],dataTool:"polyline"},rectangle:{selectors:["a.leaflet-draw-draw-rectangle"],dataTool:"rectangle"},circle:{selectors:["a.leaflet-draw-draw-circle"],dataTool:"circle"},marker:{selectors:["a.leaflet-draw-draw-marker"],dataTool:"marker"},layerCake:{selectors:["a.leaflet-draw-draw-cake"],dataTool:"layer-cake"},move:{selectors:["a.leaflet-draw-draw-move"],dataTool:"move"},select:{selectors:[],dataTool:"select"},edit:{selectors:["a.leaflet-draw-edit-edit"],dataTool:"edit"},delete:{selectors:["a.leaflet-draw-edit-remove"],dataTool:"delete"},ruler:{selectors:[".leaflet-ruler","a.leaflet-ruler"],dataTool:"ruler"},measurementSettings:{selectors:[".leaflet-ruler-settings-button"],dataTool:"measurement-settings"},layerStyle:{selectors:[],dataTool:"layer-style"},save:{selectors:[],dataTool:"save"}},mr=Object.keys(ke),ro="leaflet-geokit-tool-button-icon",ao=".leaflet-geokit-cake-icon, .leaflet-geokit-move-icon",gr="[data-geokit-managed-toolbar='true']",_r="[data-geokit-tool-popover='true']",vr="[data-geokit-tool][aria-expanded='true']",ei=new WeakMap,ii=new WeakMap,oi=new WeakMap;function ni(u,a,n={}){ee(u);for(const h of mr){const i=ke[h];for(const r of yr(u,i.selectors)){r.setAttribute("data-geokit-tool",i.dataTool),Lr(r);const l=a==null?void 0:a[h];l&&br(r,l,h),ho(r,h,{source:"leaflet-toolbar",activate:!1,onTrigger:n.onTrigger})}}Er(u,a,n)}function yr(u,a){const n=new Set;for(const h of a)u.querySelectorAll(h).forEach(i=>{n.add(i)});return[...n]}function Lr(u){const a=ei.get(u);a&&(u.removeEventListener("click",a),ei.delete(u)),delete u.__geokitToolButtonConfig;const n=Ae(u.dataset.geokitToolButtonClass);n.length>0&&u.classList.remove(...n),delete u.dataset.geokitToolButtonClass,u.removeAttribute("data-geokit-custom-tool-button"),u.dataset.geokitOriginalTitle!==void 0&&so(u,"title",u.dataset.geokitOriginalTitle),u.dataset.geokitOriginalAriaLabel!==void 0&&so(u,"aria-label",u.dataset.geokitOriginalAriaLabel),u.dataset.geokitOriginalStyleBackgroundImage!==void 0&&ri(u,"background-image",u.dataset.geokitOriginalStyleBackgroundImage,u.dataset.geokitOriginalStyleBackgroundImagePriority),u.dataset.geokitOriginalStylePosition!==void 0&&ri(u,"position",u.dataset.geokitOriginalStylePosition,u.dataset.geokitOriginalStylePositionPriority),Array.from(u.children).forEach(h=>{h instanceof HTMLElement&&h.dataset.geokitToolButtonIcon==="true"&&h.remove()}),u.querySelectorAll(ao).forEach(h=>{h.hidden=!1}),u.removeAttribute("aria-expanded")}function so(u,a,n){n?u.setAttribute(a,n):u.removeAttribute(a)}function ri(u,a,n,h){n?u.style.setProperty(a,n,h):u.style.removeProperty(a)}function br(u,a,n){var r;wr(u),u.__geokitToolButtonConfig=a,u.setAttribute("data-geokit-custom-tool-button","true"),a.title&&u.setAttribute("title",a.title);const h=(r=a.ariaLabel)!=null?r:a.title;h&&u.setAttribute("aria-label",h);const i=Ae(a.className);i.length>0&&(u.classList.add(...i),u.dataset.geokitToolButtonClass=i.join(" ")),a.iconUrl?Me(u,a,{tool:n}):(a.iconHtml||a.renderIcon)&&Me(u,a,{tool:n})}function wr(u){var a,n;u.dataset.geokitOriginalTitle===void 0&&(u.dataset.geokitOriginalTitle=(a=u.getAttribute("title"))!=null?a:""),u.dataset.geokitOriginalAriaLabel===void 0&&(u.dataset.geokitOriginalAriaLabel=(n=u.getAttribute("aria-label"))!=null?n:""),u.dataset.geokitOriginalStyleBackgroundImage===void 0&&(u.dataset.geokitOriginalStyleBackgroundImage=u.style.getPropertyValue("background-image"),u.dataset.geokitOriginalStyleBackgroundImagePriority=u.style.getPropertyPriority("background-image")),u.dataset.geokitOriginalStylePosition===void 0&&(u.dataset.geokitOriginalStylePosition=u.style.getPropertyValue("position"),u.dataset.geokitOriginalStylePositionPriority=u.style.getPropertyPriority("position"))}function Ae(u){return u?u.split(/\s+/).map(a=>a.trim()).filter(Boolean):[]}function xr(u){return!!(u.iconUrl||u.iconHtml||u.renderIcon)}function Me(u,a,n={}){var p,m;const[h,i]=kr(a.iconSize);u.style.setProperty("background-image","none","important"),u.style.setProperty("position","relative","important"),u.querySelectorAll(ao).forEach(_=>{_.hidden=!0});const r=document.createElement("span");r.className=ro,r.dataset.geokitToolButtonIcon="true",r.setAttribute("aria-hidden","true"),r.style.setProperty("position","absolute","important"),r.style.setProperty("display","block","important"),r.style.setProperty("left","50%","important"),r.style.setProperty("top","50%","important"),r.style.setProperty("width",`${h}px`,"important"),r.style.setProperty("height",`${i}px`,"important"),r.style.setProperty("transform","translate(-50%, -50%)","important"),r.style.setProperty("pointer-events","none","important");const l=(m=a.renderIcon)==null?void 0:m.call(a,{tool:(p=n.tool)!=null?p:"polygon",groupId:n.groupId,button:u});if(l instanceof HTMLElement||typeof SVGElement!="undefined"&&l instanceof SVGElement)r.appendChild(l);else if(typeof l=="string"&&l.trim())r.innerHTML=l,lo(r);else if(a.iconHtml)r.innerHTML=a.iconHtml,lo(r);else if(a.iconUrl){const _=document.createElement("img");_.src=a.iconUrl,_.alt="",_.decoding="async",_.draggable=!1,_.style.setProperty("display","block","important"),_.style.setProperty("width","100%","important"),_.style.setProperty("height","100%","important"),_.style.setProperty("object-fit","contain","important"),r.appendChild(_)}u.appendChild(r)}function lo(u){const a=u.firstElementChild;a&&(a.style.setProperty("display","block","important"),a.style.setProperty("width","100%","important"),a.style.setProperty("height","100%","important"),a.style.setProperty("color","currentColor","important"))}function kr(u){const a=u==null?void 0:u[0],n=u==null?void 0:u[1];return typeof a=="number"&&Number.isFinite(a)&&a>0&&typeof n=="number"&&Number.isFinite(n)&&n>0?[a,n]:[18,18]}function ho(u,a,n){const h=i=>{var d;const r=Ar(u),l=Mr(u);r!=null&&r.popover?Sr(u,a,r,{container:l,groupId:n.groupId}):ee(l),(d=n.onTrigger)==null||d.call(n,a,{source:n.source,groupId:n.groupId,activate:n.activate}),n.activate&&(i.preventDefault(),i.stopPropagation())};u.addEventListener("click",h),ei.set(u,h)}function Ar(u){const a=u.__geokitToolButtonConfig;if(a)return a;const n=u.dataset.geokitToolButtonConfig;if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Mr(u){var n;const a=u.closest("[data-geokit-map-container]");return(n=a!=null?a:u.parentElement)!=null?n:u}function Er(u,a,n){var r;u.setAttribute("data-geokit-map-container","true"),u.querySelectorAll(gr).forEach(l=>l.remove());const h=(r=n.toolbarGroups)!=null?r:[],i=h.some(l=>(l==null?void 0:l.hideDefaultToolbar)!==!1);Tr(u,i),h.forEach(l=>{var m;if(!(l!=null&&l.id)||!Array.isArray(l.tools)||l.tools.length===0)return;const d=document.createElement("div");d.dataset.geokitManagedToolbar="true",d.dataset.geokitToolbarGroup=l.id,d.className="leaflet-geokit-toolbar-group leaflet-bar",d.setAttribute("role","toolbar"),d.setAttribute("aria-label",(m=l.ariaLabel)!=null?m:l.id),Pr(d,l.position,l.offset);const p=Ae(l.className);p.length>0&&d.classList.add(...p),l.tools.forEach((_,y)=>{const w=Cr(_,l,y,a==null?void 0:a[_]);ho(w,_,{source:"toolbar",activate:!0,groupId:l.id,onTrigger:n.onTrigger}),d.appendChild(w)}),u.appendChild(d)})}function Tr(u,a){u.toggleAttribute("data-geokit-default-toolbar-hidden",a),u.querySelectorAll(".leaflet-draw-toolbar, .leaflet-ruler, .leaflet-ruler-settings-control").forEach(n=>{a?(n.dataset.geokitOriginalDisplay===void 0&&(n.dataset.geokitOriginalDisplay=n.style.display,n.dataset.geokitOriginalDisplayPriority=n.style.getPropertyPriority("display")),n.style.setProperty("display","none","important")):n.dataset.geokitOriginalDisplay!==void 0&&(ri(n,"display",n.dataset.geokitOriginalDisplay,n.dataset.geokitOriginalDisplayPriority),delete n.dataset.geokitOriginalDisplay,delete n.dataset.geokitOriginalDisplayPriority)})}function Cr(u,a,n,h){var d,p,m,_,y;const i=document.createElement("button");i.type="button",i.dataset.geokitTool=(p=(d=ke[u])==null?void 0:d.dataTool)!=null?p:u,i.dataset.geokitToolbarGroup=a.id,i.dataset.geokitToolbarPosition=(m=a.position)!=null?m:"topright",i.dataset.geokitToolInstance=zr(a.id,u,n),i.className="leaflet-geokit-toolbar-button",i.style.setProperty("display","block","important"),i.style.setProperty("width","34px","important"),i.style.setProperty("height","34px","important"),i.style.setProperty("padding","0","important"),i.style.setProperty("border","0","important"),i.style.setProperty("border-bottom","1px solid #ccc","important"),i.style.setProperty("background","#fff","important"),i.style.setProperty("cursor","pointer","important"),i.style.setProperty("position","relative","important");const r=(_=h==null?void 0:h.title)!=null?_:co(u);i.title=r,i.setAttribute("aria-label",(y=h==null?void 0:h.ariaLabel)!=null?y:r);const l=Ae(h==null?void 0:h.className);if(l.length>0&&i.classList.add(...l),h&&(i.__geokitToolButtonConfig=h,xr(h)&&Me(i,h,{tool:u,groupId:a.id})),!i.querySelector(`.${ro}`)){const w={iconHtml:Br(u),iconSize:[20,20]};Me(i,w,{tool:u,groupId:a.id})}return i}function Pr(u,a="topright",n){const[h,i]=Rr(n);u.style.setProperty("position","absolute","important"),u.style.setProperty("z-index","1000","important"),u.style.setProperty("background","#fff","important"),u.style.setProperty("box-shadow","0 1px 5px rgba(0,0,0,0.35)","important");const[r,l]=a.startsWith("bottom")?["bottom",a.endsWith("right")?"right":"left"]:["top",a.endsWith("right")?"right":"left"];u.style.setProperty(r,`${i}px`,"important"),u.style.setProperty(l,`${h}px`,"important")}function Sr(u,a,n,h){var d,p,m,_,y,w,T,E;if(!n.popover)return;ee(h.container);const i=document.createElement("div");if(i.dataset.geokitToolPopover="true",i.dataset.geokitTool=(p=(d=ke[a])==null?void 0:d.dataTool)!=null?p:a,u.dataset.geokitToolInstance&&(i.dataset.geokitToolInstance=u.dataset.geokitToolInstance),h.groupId&&(i.dataset.geokitToolbarGroup=h.groupId),i.setAttribute("role","dialog"),i.setAttribute("aria-label",(_=(m=n.popover.ariaLabel)!=null?m:n.popover.title)!=null?_:co(a)),i.style.setProperty("position","absolute","important"),i.style.setProperty("z-index","10001","important"),i.style.setProperty("max-width","260px","important"),i.style.setProperty("padding","10px 12px","important"),i.style.setProperty("border","1px solid rgba(0,0,0,0.22)","important"),i.style.setProperty("border-radius","8px","important"),i.style.setProperty("background","#fff","important"),i.style.setProperty("box-shadow","0 8px 24px rgba(0,0,0,0.24)","important"),i.style.setProperty("font","13px system-ui, sans-serif","important"),i.style.setProperty("line-height","1.35","important"),n.popover.title){const A=document.createElement("strong");A.textContent=n.popover.title,A.style.setProperty("display","block","important"),A.style.setProperty("margin-bottom","4px","important"),i.appendChild(A)}if(n.popover.body){const A=document.createElement("div");A.textContent=n.popover.body,i.appendChild(A)}if(n.popover.html){const A=document.createElement("div");A.innerHTML=n.popover.html,i.appendChild(A)}const r=(w=(y=n.popover).render)==null?void 0:w.call(y,{tool:a,groupId:h.groupId,button:u,popover:i}),l=typeof DocumentFragment!="undefined"&&r instanceof DocumentFragment;if(r instanceof HTMLElement||l)i.appendChild(r);else if(typeof r=="string"&&r.trim()){const A=document.createElement("div");A.innerHTML=r,i.appendChild(A)}h.container.appendChild(i),Ir(h.container,u,i),u.setAttribute("aria-expanded","true"),oi.set(i,{tool:a,groupId:h.groupId,button:u,config:n}),Dr(h.container,u,i),(E=(T=n.popover).onOpen)==null||E.call(T,{tool:a,groupId:h.groupId,button:u,popover:i})}function Ir(u,a,n){const h=u.getBoundingClientRect(),i=a.getBoundingClientRect(),r=Math.max(8,Math.min(i.left-h.left,h.width-n.offsetWidth-8)),l=Math.max(8,Math.min(i.bottom-h.top+8,h.height-n.offsetHeight-8));n.style.setProperty("left",`${r}px`,"important"),n.style.setProperty("top",`${l}px`,"important")}function Dr(u,a,n){const h=l=>{l.key==="Escape"&&ee(u)},i=l=>{const d=l.target;d instanceof Node&&(n.contains(d)||a.contains(d)||ee(u))};document.addEventListener("keydown",h,!0);const r=window.setTimeout(()=>{n.isConnected&&document.addEventListener("pointerdown",i,!0)},0);ii.set(n,{keydown:h,pointerdown:i,pointerdownTimer:r})}function ee(u){u.querySelectorAll(_r).forEach(a=>{var i,r,l;const n=oi.get(a);n==null||n.button.removeAttribute("aria-expanded"),n||(i=Or(u,a))==null||i.removeAttribute("aria-expanded");const h=ii.get(a);h&&(window.clearTimeout(h.pointerdownTimer),document.removeEventListener("keydown",h.keydown,!0),document.removeEventListener("pointerdown",h.pointerdown,!0),ii.delete(a)),a.remove(),n&&((l=(r=n.config.popover)==null?void 0:r.onClose)==null||l.call(r,{tool:n.tool,groupId:n.groupId,button:n.button,popover:a}),oi.delete(a))})}function Or(u,a){const n=u.querySelectorAll(vr);for(const h of n)if(a.dataset.geokitToolInstance&&h.dataset.geokitToolInstance===a.dataset.geokitToolInstance||h.dataset.geokitTool===a.dataset.geokitTool&&h.dataset.geokitToolbarGroup===a.dataset.geokitToolbarGroup)return h;return null}function zr(u,a,n){return`${u}:${a}:${n}`}function co(u){return{polygon:"Draw polygon",polyline:"Draw line",rectangle:"Draw rectangle",circle:"Draw circle",marker:"Place marker",layerCake:"Draw layer cake",move:"Move feature",select:"Select feature",edit:"Edit features",delete:"Delete features",ruler:"Measure distance",measurementSettings:"Measurement settings",layerStyle:"Layer style",save:"Save map geometry"}[u]}function Br(u){const a="currentColor",n="none";return{polygon:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8" stroke-linejoin="round"><path d="M5.5 7.2 9.2 4.8 18.5 8.3 16.1 18.2 6.3 15.7Z"/><circle cx="5.5" cy="7.2" r="1.2" fill="currentColor"/><circle cx="18.5" cy="8.3" r="1.2" fill="currentColor"/><circle cx="16.1" cy="18.2" r="1.2" fill="currentColor"/></svg>`,polyline:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.8 16.7 9.2 9.5 14.4 13.1 19 6.1"/><circle cx="4.8" cy="16.7" r="1.3" fill="currentColor"/><circle cx="14.4" cy="13.1" r="1.3" fill="currentColor"/><circle cx="19" cy="6.1" r="1.3" fill="currentColor"/></svg>`,rectangle:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8"><rect x="5.5" y="6.5" width="13" height="11" rx="2"/><path d="M8.5 10h7"/></svg>`,circle:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8"><circle cx="12" cy="12" r="6.8"/><circle cx="12" cy="12" r="2" fill="currentColor"/></svg>`,marker:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linejoin="round"><path d="M12 3.4a6 6 0 0 0-6 6c0 4.2 4.5 9.4 5.6 10.5a.6.6 0 0 0 .8 0C13.5 18.8 18 13.6 18 9.4a6 6 0 0 0-6-6Z"/><circle cx="12" cy="9.5" r="2.1" fill="currentColor" stroke="none"/></svg>`,layerCake:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linecap="round"><ellipse cx="12" cy="7.6" rx="6.8" ry="2.7"/><path d="M5.2 11c1.3 1.2 3.8 2 6.8 2s5.5-.8 6.8-2M6.3 15c1.3.9 3.3 1.5 5.7 1.5s4.4-.6 5.7-1.5"/></svg>`,move:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 4v16M4 12h16M12 4l-2 2M12 4l2 2M20 12l-2-2M20 12l-2 2M12 20l-2-2M12 20l2-2M4 12l2-2M4 12l2 2"/></svg>`,select:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8" stroke-linejoin="round"><path d="M6 4.8 18.5 12 13 13.4 10.2 19Z"/></svg>`,edit:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linejoin="round"><path d="m6 17.8 3.5-.7 7.7-7.7-2.8-2.8-7.7 7.7Z"/><path d="m12.9 7.9 2.8 2.8"/></svg>`,delete:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M7.5 8.2h9l-.8 10a1.7 1.7 0 0 1-1.7 1.5h-4a1.7 1.7 0 0 1-1.7-1.5Z"/><path d="M9.5 8.2V6.8c0-.7.6-1.3 1.3-1.3h2.4c.7 0 1.3.6 1.3 1.3v1.4M10.5 11.5v4.8M13.5 11.5v4.8"/></svg>`,ruler:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.7" stroke-linejoin="round"><path d="M5.2 17.8 17.8 5.2l1.7 1.7L6.9 19.5H5.2Z"/><path d="m12.2 8 1.5 1.5M9.9 10.3l1.5 1.5M7.6 12.6l1.5 1.5"/></svg>`,measurementSettings:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.6" stroke-linecap="round"><circle cx="12" cy="12" r="3.2"/><path d="M12 4.8v2M12 17.2v2M4.8 12h2M17.2 12h2M7 7l1.4 1.4M15.6 15.6 17 17M17 7l-1.4 1.4M8.4 15.6 7 17"/></svg>`,layerStyle:'<svg viewBox="0 0 24 24" fill="none"><path d="M5 6h14v3H5z" fill="currentColor" opacity=".9"/><path d="M5 11h14v3H5z" fill="currentColor" opacity=".65"/><path d="M5 16h14v3H5z" fill="currentColor" opacity=".4"/></svg>',save:`<svg viewBox="0 0 24 24" fill="${n}" stroke="${a}" stroke-width="1.8" stroke-linejoin="round" stroke-linecap="round"><path d="M5.5 4.8h11.2l1.8 1.8v12.6h-13Z"/><path d="M8 4.8v5h7v-5M8.2 19.2v-5.4h7.6v5.4"/><path d="M10 16.4h4"/></svg>`}[u]}function Rr(u){const a=u==null?void 0:u[0],n=u==null?void 0:u[1];return typeof a=="number"&&Number.isFinite(a)&&a>=0&&typeof n=="number"&&Number.isFinite(n)&&n>=0?[a,n]:[10,10]}const uo=new WeakSet;function Nr(u=we){var h;if(uo.has(u))return;const a=u.DrawToolbar;if(!((h=a==null?void 0:a.prototype)!=null&&h.getModeHandlers))return;const n=a.prototype.getModeHandlers;a.prototype.getModeHandlers=function(i){var l,d,p,m;const r=n.call(this,i);if((l=this.options)!=null&&l.cake){const _=(d=u.Draw)==null?void 0:d.Cake;if(!_)return r;r.push({enabled:!0,handler:new _(i,this.options.cake),title:"Draw Layer Cake (Subtractive Zones)"})}if((p=this.options)!=null&&p.move){const _=(m=u.Draw)==null?void 0:m.Move;if(!_)return r;r.push({enabled:!0,handler:new _(i,this.options.move),title:"Move/Translate Features"})}return r},uo.add(u)}const Ce=class Ce extends Q.Draw.Circle{constructor(a,n){super(a,n),this.type=Ce.TYPE}addHooks(){super.addHooks();const a=this._tooltip;a!=null&&a.updateContent&&a.updateContent({text:"Click and drag to draw the Layer Cake base",subtext:"Release mouse to finish base layer"})}};k(Ce,"TYPE","cake");let Ee=Ce;Q.Draw.Cake=Ee;function Ur(u){const a=u.Draw;if(!a||a.Cake)return;const h=class h extends a.Circle{constructor(r,l){super(r,l),this.type=h.TYPE}addHooks(){super.addHooks();const r=this._tooltip;r!=null&&r.updateContent&&r.updateContent({text:"Click and drag to draw the Layer Cake base",subtext:"Release mouse to finish base layer"})}};k(h,"TYPE","cake");let n=h;a.Cake=n}const Pe=class Pe extends Q.Draw.Feature{constructor(n,h){super(n,h);k(this,"_featureGroup");k(this,"_selectedLayer",null);k(this,"_originalLatLngs",null);k(this,"_dragStartLatLng",null);k(this,"_isDragging",!1);k(this,"_pendingMove",null);this.type=Pe.TYPE,this._featureGroup=(h==null?void 0:h.featureGroup)||new Q.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const n=this._map;if(!n)return;Q.DomUtil.addClass(n.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(i=>{this._enableLayerHover(i)});const h=this._tooltip;h!=null&&h.updateContent&&h.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const n=this._map;n&&(Q.DomUtil.removeClass(n.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(h=>{this._disableLayerHover(h)}),this._cleanupDragging())}_enableLayerHover(n){n.on&&(n.on("mouseover",this._onLayerMouseOver,this),n.on("mouseout",this._onLayerMouseOut,this),n.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(n){n.off&&(n.off("mouseover",this._onLayerMouseOver,this),n.off("mouseout",this._onLayerMouseOut,this),n.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(n){if(this._isDragging)return;const h=n.target;if(h.getElement){const i=h.getElement();i&&(i.style.cursor="grab")}else h._path&&(h._path.style.cursor="grab")}_onLayerMouseOut(n){if(this._isDragging)return;const h=n.target;if(h.getElement){const i=h.getElement();i&&(i.style.cursor="")}else h._path&&(h._path.style.cursor="")}_onLayerMouseDown(n){if(this._isDragging)return;Q.DomEvent.stopPropagation(n.originalEvent),Q.DomEvent.preventDefault(n.originalEvent);const h=n.target;if(this._selectedLayer=h,this._isDragging=!0,this._dragStartLatLng=n.latlng,this._storeOriginalLatLngs(h),h.getElement){const r=h.getElement();r&&(r.style.cursor="grabbing")}else h._path&&(h._path.style.cursor="grabbing");this._map.on("mousemove",this._onMouseMove,this),this._map.on("mouseup",this._onMouseUp,this);const i=h.toGeoJSON();this._pendingMove={layer:h,originalGeoJSON:i,newGeoJSON:i}}_storeOriginalLatLngs(n){n.getLatLng?this._originalLatLngs=n.getLatLng():n.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(n.getLatLngs())))}_onMouseMove(n){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const h=this._selectedLayer,i={lat:n.latlng.lat-this._dragStartLatLng.lat,lng:n.latlng.lng-this._dragStartLatLng.lng};if(h.setLatLng){const r=Q.latLng(this._originalLatLngs.lat+i.lat,this._originalLatLngs.lng+i.lng);h.setLatLng(r)}else if(h.setLatLngs){const r=this._offsetLatLngs(this._originalLatLngs,i);h.setLatLngs(r)}}_offsetLatLngs(n,h){return n instanceof Q.LatLng||n.lat!==void 0&&n.lng!==void 0?Q.latLng(n.lat+h.lat,n.lng+h.lng):Array.isArray(n)?n.map(i=>this._offsetLatLngs(i,h)):n}_onMouseUp(n){var i,r;if(!this._isDragging||!this._selectedLayer)return;this._pendingMove&&(this._pendingMove.newGeoJSON=this._selectedLayer.toGeoJSON());const h=this._selectedLayer;if(h.getElement){const l=h.getElement();l&&(l.style.cursor="grab")}else h._path&&(h._path.style.cursor="grab");this._map.fire("draw:moveend",{layer:this._selectedLayer,originalGeoJSON:(i=this._pendingMove)==null?void 0:i.originalGeoJSON,newGeoJSON:(r=this._pendingMove)==null?void 0:r.newGeoJSON}),this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._isDragging=!1}_cleanupDragging(){if(this._selectedLayer){const n=this._selectedLayer;if(n.getElement){const h=n.getElement();h&&(h.style.cursor="")}else n._path&&(n._path.style.cursor="")}this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._selectedLayer=null,this._originalLatLngs=null,this._dragStartLatLng=null,this._isDragging=!1,this._pendingMove=null}confirmMove(){this._pendingMove&&(this._map.fire("draw:moveconfirmed",{layer:this._pendingMove.layer,originalGeoJSON:this._pendingMove.originalGeoJSON,newGeoJSON:this._pendingMove.newGeoJSON}),this._cleanupDragging())}cancelMove(){if(!this._pendingMove)return;const n=this._pendingMove.layer;n.setLatLng&&this._originalLatLngs?n.setLatLng(this._originalLatLngs):n.setLatLngs&&this._originalLatLngs&&n.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(Pe,"TYPE","move");let ai=Pe;Q.Draw.Move=ai;function Zr(u){const a=u.Draw;if(!a||a.Move)return;const h=class h extends a.Feature{constructor(l,d){super(l,d);k(this,"_featureGroup");k(this,"_selectedLayer",null);k(this,"_originalLatLngs",null);k(this,"_dragStartLatLng",null);k(this,"_isDragging",!1);k(this,"_pendingMove",null);this.type=h.TYPE,this._featureGroup=(d==null?void 0:d.featureGroup)||new Q.FeatureGroup}enable(){this._enabled||super.enable()}disable(){this._enabled&&(this._cleanupDragging(),super.disable())}addHooks(){const l=this._map;if(!l)return;u.DomUtil.addClass(l.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(p=>{this._enableLayerHover(p)});const d=this._tooltip;d!=null&&d.updateContent&&d.updateContent({text:"Click and drag a feature to move it",subtext:""})}removeHooks(){const l=this._map;l&&(u.DomUtil.removeClass(l.getContainer(),"leaflet-draw-move-mode"),this._featureGroup.eachLayer(d=>{this._disableLayerHover(d)}),this._cleanupDragging())}_enableLayerHover(l){l.on&&(l.on("mouseover",this._onLayerMouseOver,this),l.on("mouseout",this._onLayerMouseOut,this),l.on("mousedown",this._onLayerMouseDown,this))}_disableLayerHover(l){l.off&&(l.off("mouseover",this._onLayerMouseOver,this),l.off("mouseout",this._onLayerMouseOut,this),l.off("mousedown",this._onLayerMouseDown,this))}_onLayerMouseOver(l){if(this._isDragging)return;const d=l.target;if(d.getElement){const p=d.getElement();p&&(p.style.cursor="grab")}else d._path&&(d._path.style.cursor="grab")}_onLayerMouseOut(l){if(this._isDragging)return;const d=l.target;if(d.getElement){const p=d.getElement();p&&(p.style.cursor="")}else d._path&&(d._path.style.cursor="")}_onLayerMouseDown(l){if(this._isDragging)return;u.DomEvent.stopPropagation(l.originalEvent),u.DomEvent.preventDefault(l.originalEvent);const d=l.target;if(this._selectedLayer=d,this._isDragging=!0,this._dragStartLatLng=l.latlng,this._storeOriginalLatLngs(d),d.getElement){const m=d.getElement();m&&(m.style.cursor="grabbing")}else d._path&&(d._path.style.cursor="grabbing");this._map.on("mousemove",this._onMouseMove,this),this._map.on("mouseup",this._onMouseUp,this);const p=d.toGeoJSON();this._pendingMove={layer:d,originalGeoJSON:p,newGeoJSON:p}}_storeOriginalLatLngs(l){l.getLatLng?this._originalLatLngs=l.getLatLng():l.getLatLngs&&(this._originalLatLngs=JSON.parse(JSON.stringify(l.getLatLngs())))}_onMouseMove(l){if(!this._isDragging||!this._selectedLayer||!this._dragStartLatLng)return;const d=this._selectedLayer,p={lat:l.latlng.lat-this._dragStartLatLng.lat,lng:l.latlng.lng-this._dragStartLatLng.lng};if(d.setLatLng){const m=u.latLng(this._originalLatLngs.lat+p.lat,this._originalLatLngs.lng+p.lng);d.setLatLng(m)}else if(d.setLatLngs){const m=this._offsetLatLngs(this._originalLatLngs,p);d.setLatLngs(m)}}_offsetLatLngs(l,d){return l instanceof u.LatLng||l.lat!==void 0&&l.lng!==void 0?u.latLng(l.lat+d.lat,l.lng+d.lng):Array.isArray(l)?l.map(p=>this._offsetLatLngs(p,d)):l}_onMouseUp(l){var p,m;if(!this._isDragging||!this._selectedLayer)return;this._pendingMove&&(this._pendingMove.newGeoJSON=this._selectedLayer.toGeoJSON());const d=this._selectedLayer;if(d.getElement){const _=d.getElement();_&&(_.style.cursor="grab")}else d._path&&(d._path.style.cursor="grab");this._map.fire("draw:moveend",{layer:this._selectedLayer,originalGeoJSON:(p=this._pendingMove)==null?void 0:p.originalGeoJSON,newGeoJSON:(m=this._pendingMove)==null?void 0:m.newGeoJSON}),this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._isDragging=!1}_cleanupDragging(){if(this._selectedLayer){const l=this._selectedLayer;if(l.getElement){const d=l.getElement();d&&(d.style.cursor="")}else l._path&&(l._path.style.cursor="")}this._map.off("mousemove",this._onMouseMove,this),this._map.off("mouseup",this._onMouseUp,this),this._selectedLayer=null,this._originalLatLngs=null,this._dragStartLatLng=null,this._isDragging=!1,this._pendingMove=null}confirmMove(){this._pendingMove&&(this._map.fire("draw:moveconfirmed",{layer:this._pendingMove.layer,originalGeoJSON:this._pendingMove.originalGeoJSON,newGeoJSON:this._pendingMove.newGeoJSON}),this._cleanupDragging())}cancelMove(){if(!this._pendingMove)return;const l=this._pendingMove.layer;l.setLatLng&&this._originalLatLngs?l.setLatLng(this._originalLatLngs):l.setLatLngs&&this._originalLatLngs&&l.setLatLngs(this._originalLatLngs),this._cleanupDragging()}hasPendingMove(){return this._pendingMove!==null}};k(h,"TYPE","move");let n=h;a.Move=n}const Hr=63710088e-1;function si(u){return u*Math.PI/180}function fo(u){return u*180/Math.PI}function Fr(u,a,n){const h=a/Hr,i=si(n),r=si(u.lat),l=si(u.lng),d=Math.sin(r),p=Math.cos(r),m=Math.sin(h),_=Math.cos(h),y=d*_+p*m*Math.cos(i),w=Math.asin(y),T=Math.sin(i)*m*p,E=_-d*y,A=l+Math.atan2(T,E);return{lat:fo(w),lng:fo(A)}}function Gr(u){let a=0;for(let n=0;n<u.length-1;n++){const[h,i]=u[n],[r,l]=u[n+1];a+=h*l-r*i}return a/2}function li(u){const a=u[0],n=u.at(-1);return!a||!n||a[0]===n[0]&&a[1]===n[1]?u:[...u,a]}function hi(u,a){const n=li(u);if(Gr(n)<0===a)return n;const r=[...n].reverse();return li(r)}function ci(u,a,n){if(n<4)throw new Error("steps must be >= 4");const h=[];for(let i=0;i<n;i++){const r=i/n*360,l=Fr(u,a,r);h.push([l.lng,l.lat])}return li(h)}function Vr(u){const{id:a,center:n,radiusMeters:h,layerIndex:i,steps:r}=u,l=hi(ci(n,h,r),!1);return{type:"Feature",properties:{id:a,layer_index:i,radius_outer:h,type:"core",_meta:{lat:n.lat,lng:n.lng,radius:h}},geometry:{type:"Polygon",coordinates:[l]}}}function Wr(u){const{id:a,center:n,radiusOuterMeters:h,radiusInnerMeters:i,layerIndex:r,steps:l}=u,d=hi(ci(n,h,l),!1),p=hi(ci(n,i,l),!0);return{type:"Feature",properties:{id:a,layer_index:r,radius_outer:h,type:"ring",_meta:{lat:n.lat,lng:n.lng,radius:h}},geometry:{type:"Polygon",coordinates:[d,p]}}}function Jr(u){const{circles:a,steps:n=64}=u,h=[...a].sort((r,l)=>r.getRadius()-l.getRadius()),i=[];return h.forEach((r,l)=>{const d=r.getLatLng(),p=r.getRadius(),m=ti();if(l===0){i.push(Vr({id:m,center:d,radiusMeters:p,layerIndex:l,steps:n}));return}const y=h[l-1].getRadius();i.push(Wr({id:m,center:d,radiusOuterMeters:p,radiusInnerMeters:y,layerIndex:l,steps:n}))}),{type:"FeatureCollection",features:i}}function ie(u){u.preventDefault(),u.stopPropagation()}function jr(u){var m,_;const{root:a,addButtonId:n,saveButtonId:h,onAddRing:i,onSave:r}=u,l=(m=a.querySelector)==null?void 0:m.call(a,`#${n}`),d=(_=a.querySelector)==null?void 0:_.call(a,`#${h}`);if(!l||!d)return;const p="data-cake-controls-bound";if(!(l.hasAttribute(p)||d.hasAttribute(p))){l.setAttribute(p,"true"),d.setAttribute(p,"true");for(const y of[l,d])y.addEventListener("pointerdown",ie),y.addEventListener("mousedown",ie),y.addEventListener("touchstart",ie);l.addEventListener("click",y=>{ie(y),i()}),d.addEventListener("click",y=>{ie(y),r()})}}function qr(u){var n;const a=(n=u.options)!=null?n:{};a.original||(a.original={...a}),a.editing||(a.editing={...a})}function oe(u,a){if(a==="imperial"){const n=u*3.28084;return n>=5280?`${(n/5280).toFixed(2)} mi`:`${Math.round(n)} ft`}return u>=1e3?`${(u/1e3).toFixed(2)} km`:`${Math.round(u)} m`}class Yr{constructor(a,n,h,i="metric"){k(this,"map");k(this,"layers",[]);k(this,"controlsGroup");k(this,"onSave");k(this,"sessionId",ti().slice(0,8));k(this,"baseCircleOptions");k(this,"detachMapListeners",[]);k(this,"renderScheduled",!1);k(this,"measurementSystem");this.map=a,this.onSave=h,this.measurementSystem=i,this.controlsGroup=Q.layerGroup().addTo(a),this.baseCircleOptions={...n.options},delete this.baseCircleOptions.editing,delete this.baseCircleOptions.original,this.addLayer(n),this.installEditEventBridges(),this.renderControls()}installEditEventBridges(){var _,y,w,T,E,A,N,F;const a=we,n=(y=(_=a==null?void 0:a.Draw)==null?void 0:_.Event)==null?void 0:y.EDITMOVE,h=(T=(w=a==null?void 0:a.Draw)==null?void 0:w.Event)==null?void 0:T.EDITRESIZE,i=(A=(E=a==null?void 0:a.Draw)==null?void 0:E.Event)==null?void 0:A.EDITSTART,r=(F=(N=a==null?void 0:a.Draw)==null?void 0:N.Event)==null?void 0:F.EDITSTOP;if(!n||!h)return;const l=P=>{const I=P==null?void 0:P.layer;I&&this.layers.includes(I)&&this.syncCenters(I)},d=P=>{const I=P==null?void 0:P.layer;I&&this.layers.includes(I)&&(this.updateLabels(I),this.requestRenderControls())},p=P=>{var q;const I=P==null?void 0:P.layer;if(!I||!this.layers.includes(I))return;const G=I;((q=G.getTooltip)==null?void 0:q.call(G))&&this.updateLabels(G)},m=()=>{this.layers.forEach(P=>{var G;const I=(G=P.getTooltip)==null?void 0:G.call(P);I&&(P.setTooltipContent(oe(P.getRadius(),this.measurementSystem)),I.options.offset=[10,0],I.options.direction="right",P.closeTooltip(),P.openTooltip())})};this.map.on(n,l),this.map.on(h,d),i&&(this.map.on(i,p),this.detachMapListeners.push(()=>this.map.off(i,p))),r&&(this.map.on(r,m),this.detachMapListeners.push(()=>this.map.off(r,m))),this.detachMapListeners.push(()=>this.map.off(n,l)),this.detachMapListeners.push(()=>this.map.off(h,d))}requestRenderControls(){if(this.renderScheduled)return;this.renderScheduled=!0,(typeof requestAnimationFrame=="function"?requestAnimationFrame:n=>setTimeout(()=>n(0),0))(()=>{this.renderScheduled=!1,this.renderControls()})}addLayer(a){this.layers.push(a),a.addTo(this.map),a.bindTooltip(oe(a.getRadius(),this.measurementSystem),{permanent:!0,direction:"right",className:"cake-label",offset:[10,0]});const n=a.editing;setTimeout(()=>{var h,i,r,l,d;try{if((h=a.redraw)==null||h.call(a),qr(a),(i=n==null?void 0:n.enabled)!=null&&i.call(n)){(r=n.updateMarkers)==null||r.call(n),this.requestRenderControls();return}(l=n==null?void 0:n.enable)==null||l.call(n),(d=n==null?void 0:n.updateMarkers)==null||d.call(n),this.requestRenderControls()}catch{}},0)}addRing(){if(this.layers.length>=10)return;const a=this.getLargestCircle();if(!a)return;const n=a.getRadius()*1.5,h=Q.circle(a.getLatLng(),{...this.baseCircleOptions,radius:n});this.addLayer(h),this.renderControls()}save(){const a=Jr({circles:this.layers});this.onSave(a),this.destroy()}getLargestCircle(){return this.layers.length===0?null:this.layers.reduce((a,n)=>a.getRadius()>n.getRadius()?a:n)}syncCenters(a){const n=a.getLatLng();this.layers.forEach(h=>{var i,r,l;h!==a&&(h.setLatLng(n),(i=h.redraw)==null||i.call(h),(l=(r=h.editing)==null?void 0:r.updateMarkers)==null||l.call(r))}),this.requestRenderControls()}updateLabels(a){var l;const n=a.getRadius();let h=oe(n,this.measurementSystem);const i=this.layers.filter(d=>d!==a&&d.getRadius()<n);if(i.length>0){const d=i.reduce((_,y)=>_.getRadius()>y.getRadius()?_:y),p=n-d.getRadius(),m=oe(p,this.measurementSystem);h=`${oe(n,this.measurementSystem)} (+${m})`}const r=(l=a.getTooltip)==null?void 0:l.call(a);if(r){a.setTooltipContent(h);const p=a.getBounds().getSouthWest();p.lat=a.getLatLng().lat,r.options.direction="left",r.options.offset=[-10,0],r.setLatLng(p),a.closeTooltip(),a.openTooltip()}}renderControls(){this.controlsGroup.clearLayers();const a=this.getLargestCircle();if(!a)return;const h=a.getBounds().getNorthEast(),i=`cake-add-${this.sessionId}`,r=`cake-save-${this.sessionId}`,l=Q.divIcon({className:"layer-cake-controls",html:`
|
|
206
254
|
<div class="layer-cake-controls__container">
|
|
207
255
|
<button id="${i}" type="button">➕ Ring</button>
|
|
208
256
|
<button id="${r}" type="button" class="layer-cake-controls__save">💾 Save</button>
|
|
209
257
|
</div>
|
|
210
|
-
`,iconSize:[140,40],iconAnchor:[-10,20]});
|
|
258
|
+
`,iconSize:[140,40],iconAnchor:[-10,20]});Q.marker(h,{icon:l,interactive:!0,keyboard:!1,bubblingMouseEvents:!1}).addTo(this.controlsGroup),setTimeout(()=>{const d=this.map.getContainer();jr({root:d,addButtonId:i,saveButtonId:r,onAddRing:()=>this.addRing(),onSave:()=>this.save()})},0)}destroy(){this.detachMapListeners.forEach(a=>{try{a()}catch{}}),this.detachMapListeners=[],this.layers.forEach(a=>this.map.removeLayer(a)),this.layers=[],this.controlsGroup.clearLayers(),this.map.removeLayer(this.controlsGroup)}}const Kr=`<?xml version="1.0" encoding="utf-8"?>
|
|
211
259
|
\r<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
212
260
|
<svg width="800px" height="800px" viewBox="0 -1.67 47.336 47.336" xmlns="http://www.w3.org/2000/svg">\r
|
|
213
261
|
<g id="Group_42" data-name="Group 42" transform="translate(-172.455 -364.36)">\r
|
|
@@ -218,7 +266,7 @@ ${Nn}
|
|
|
218
266
|
<path id="Path_91" data-name="Path 91" d="M211.234,370.794a3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778,3.778,3.778,0,0,1-3.778,3.778h0a3.779,3.779,0,0,1-3.778-3.778" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>\r
|
|
219
267
|
</g>\r
|
|
220
268
|
</g>\r
|
|
221
|
-
</svg>`,
|
|
269
|
+
</svg>`,Xr=`<?xml version="1.0" encoding="utf-8"?>
|
|
222
270
|
<!-- Four-way directional arrow icon for move tool -->
|
|
223
271
|
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
224
272
|
<g fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
@@ -238,7 +286,7 @@ ${Nn}
|
|
|
238
286
|
<path d="M22 12 L19 15"/>
|
|
239
287
|
</g>
|
|
240
288
|
</svg>
|
|
241
|
-
`,co=6378137,Ft=6356752314245e-6,Bt=1/298.257223563,Fr=Math.PI/180,Gr=180/Math.PI,Me=1e9;function Vr(u){const a=BigInt(Math.round(u*Me));return Number(a)/Me}function Gt(u){return Vr(u)*Fr}function uo(u){const a=u*Gr%360;return a<0?a+360:a}function hi(u){const a=BigInt(Math.round(u*Me));return Number(a)/Me}function Wr(u,a,n,h){const i=qr(u,a,n,h);if(i.converged)return{meters:hi(i.distanceMeters),bearingDegrees:uo(i.bearingRad),algorithm:"vincenty",iterations:i.iterations};const r=Yr(u,a,n,h);return{meters:hi(r.distanceMeters),bearingDegrees:uo(r.bearingRad),algorithm:"karney",iterations:i.iterations}}function qr(u,a,n,h){const i=Gt(u),r=Gt(n),l=Gt(h-a),d=Math.atan((1-Bt)*Math.tan(i)),p=Math.atan((1-Bt)*Math.tan(r)),_=Math.sin(d),g=Math.cos(d),y=Math.sin(p),x=Math.cos(p);let T=l,E=0,A=0;const U=200;let F=0,C=0,S=0,G=0,q=0;for(;Math.abs(T-E)>1e-12&&A<U;){const at=Math.sin(T),Ce=Math.cos(T);if(F=Math.sqrt((x*at)**2+(g*y-_*x*Ce)**2),F===0)return{distanceMeters:0,bearingRad:0,iterations:A,converged:!0};C=_*y+g*x*Ce,S=Math.atan2(F,C);const mt=g*x*at/F;G=1-mt**2,q=G===0?0:C-2*_*y/G;const ne=Bt/16*G*(4+Bt*(4-3*G));E=T,T=l+(1-ne)*Bt*mt*(S+ne*F*(q+ne*C*(-1+2*q**2))),A+=1}if(A>=U)return{distanceMeters:Number.NaN,bearingRad:0,iterations:A,converged:!1};const Y=(co**2-Ft**2)/Ft**2*G,nt=1+Y/16384*(4096+Y*(-768+Y*(320-175*Y))),rt=Y/1024*(256+Y*(-128+Y*(74-47*Y))),At=rt*F*(q+rt/4*(C*(-1+2*q**2)-rt/6*q*(-3+4*F**2)*(-3+4*q**2))),Pe=Ft*nt*(S-At),st=Math.atan2(x*Math.sin(T),g*y-_*x*Math.cos(T));return{distanceMeters:Pe,bearingRad:st,iterations:A,converged:!0}}function Yr(u,a,n,h){const i=Gt(u),r=Gt(n),l=Gt(h-a),d=Math.atan((1-Bt)*Math.tan(i)),p=Math.atan((1-Bt)*Math.tan(r)),_=Math.sin(d),g=Math.cos(d),y=Math.sin(p),x=Math.cos(p),T=Math.sqrt((x*Math.sin(l))**2+(g*y-_*x*Math.cos(l))**2),E=_*y+g*x*Math.cos(l),A=Math.atan2(T,E);if(A===0)return{distanceMeters:0,bearingRad:0};const F=1-(g*x*Math.sin(l)/Math.sin(A))**2,C=F===0?0:E-2*_*y/F,S=(co**2-Ft**2)/Ft**2*F,G=1+S/16384*(4096+S*(-768+S*(320-175*S))),q=S/1024*(256+S*(-128+S*(74-47*S))),Y=q*T*(C+q/4*(E*(-1+2*C**2)-q/6*C*(-3+4*T**2)*(-3+4*C**2))),nt=Ft*G*(A-Y),rt=Math.atan2(x*Math.sin(l),g*y-_*x*Math.cos(l));return{distanceMeters:nt,bearingRad:rt}}const jr={position:"topleft",circleMarker:{color:"red",radius:2},lineStyle:{color:"red",dashArray:"1,6"},angleUnit:{display:"°",decimal:2,factor:null,label:"Bearing:"}},Jr={display:"km",decimal:2,factor:null,label:"Distance (km):"},Kr={display:"mi",decimal:2,factor:.621371,label:"Distance (mi):"};function Xr(u){const a=u==="imperial"?{...Kr}:{...Jr};return{...jr,lengthUnit:a}}const Qr={metric:"Meters / Kilometers",imperial:"Feet / Miles"};function ci(u,a={}){var r,l;const n=!!((r=u==null?void 0:u.Control)!=null&&r.Draw),h=!!u.draw,i=n&&h;return i||(l=a.onError)==null||l.call(a,"Leaflet.draw is not available on the provided Leaflet instance"),i}let fo=!1;const $r={polygon:"tool:polygon:created",polyline:"tool:polyline:created",rectangle:"tool:rectangle:created",circle:"tool:circle:created",marker:"tool:marker:created"};class ts{constructor(a){k(this,"container");k(this,"logger");k(this,"options");k(this,"L");k(this,"store");k(this,"map",null);k(this,"tileLayer",null);k(this,"drawnItems",null);k(this,"drawControl",null);k(this,"rulerControl",null);k(this,"measurementControl",null);k(this,"measurementSystem","metric");k(this,"measurementModalOverlay",null);k(this,"measurementModalDialog",null);k(this,"measurementModalRadios",{});k(this,"measurementModalKeydownHandler",null);k(this,"detachPolygonFinishPatch",null);k(this,"vertexMenuEl",null);k(this,"vertexMenuCleanup",null);k(this,"vertexEditSurfaceCleanup",null);k(this,"activeCakeSession",null);k(this,"moveConfirmationUI",null);k(this,"activeMoveHandler",null);k(this,"markerIconConfig",null);k(this,"markerIcon",null);k(this,"toolButtonConfig",null);k(this,"toolbarGroups",null);var n,h,i,r;this.options=a,this.container=a.container,this.logger=((n=a.logger)!=null?n:Le("controller","debug")).child("map"),this.L=this.resolveLeaflet(a),this.store=new sr(this.logger.child("store")),this.setMarkerIconConfig((h=a.markerIconConfig)!=null?h:null,{reapplyExistingLayers:!1,syncDrawControl:!1}),this.toolButtonConfig=(i=a.toolButtonConfig)!=null?i:null,this.toolbarGroups=(r=a.toolbarGroups)!=null?r:null,this.logger.debug("ctor",{config:a.map,controls:a.controls,readOnly:a.readOnly,useExternalLeaflet:a.useExternalLeaflet}),Pr(this.L),Cr(this.L),Tr(this.L)}emitToolEvent(a,n){var i,r;try{(r=(i=this.options.toolHooks)==null?void 0:i[a])==null||r.call(i,n)}catch(l){this._error(`tool hook failed: ${a}`,l)}const h=this.options.toolEventEmitter;if(h)try{if(typeof h.emit=="function"){h.emit(a,n);return}typeof h.dispatchEvent=="function"&&h.dispatchEvent(new CustomEvent(a,{detail:n}))}catch(l){this._error(`tool emitter failed: ${a}`,l)}}setToolObservers(a){this.options.toolHooks=a.toolHooks,this.options.toolEventEmitter=a.toolEventEmitter}setMarkerIconConfig(a,n={}){const{reapplyExistingLayers:h=!0,syncDrawControl:i=!0}=n;this.options.markerIconConfig=a,this.markerIconConfig=a,this.markerIcon=this.createMarkerIcon(a),i&&this.syncDrawMarkerOptions(),h&&this.reapplyMarkerIconsToExistingLayers()}setToolButtonConfig(a){this.options.toolButtonConfig=a!=null?a:null,this.toolButtonConfig=a!=null?a:null,this.applyToolButtonCustomizations()}setToolbarGroups(a){this.options.toolbarGroups=a!=null?a:null,this.toolbarGroups=a!=null?a:null,this.applyToolButtonCustomizations()}activateTool(a,n={}){var i;const h=(i=n.source)!=null?i:"api";try{if(a==="select")return this.deactivateTool({source:h,groupId:n.groupId});if(a==="layerStyle")return this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0;if(a==="measurementSettings")return this.toggleMeasurementModal(!0),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0;if(a==="ruler"){const l=this.triggerRulerTool();return this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:l,error:l?void 0:"Ruler control is not available"}),l}const r=this.findLeafletDrawHandler(a);return!r||typeof r.enable!="function"?(this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!1,error:`Tool "${a}" is not available on this map`}),!1):(r.enable(),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0)}catch(r){const l=`Failed to activate tool "${a}"`;return this._error(l,r),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!1,error:r instanceof Error?r.message:l}),!1}}triggerTool(a,n={}){return this.activateTool(a,n)}deactivateTool(a={}){var h;const n=(h=a.source)!=null?h:"api";try{return this.disableActiveToolHandlers(),this.toggleMeasurementModal(!1),this.emitToolTrigger({tool:"select",source:n,groupId:a.groupId,handled:!0}),!0}catch(i){const r="Failed to deactivate active map tools";return this._error(r,i),this.emitToolTrigger({tool:"select",source:n,groupId:a.groupId,handled:!1,error:i instanceof Error?i.message:r}),!1}}resolveLeaflet(a){if(!a.useExternalLeaflet)return we;if(a.leaflet&&ci(a.leaflet))return this.logger.debug("leaflet-runtime:external-injected"),a.leaflet;const h=globalThis.L;return h&&ci(h)?(this.logger.debug("leaflet-runtime:external-global"),h):(this.logger.warn("leaflet-runtime:external-fallback-bundled",{message:"External Leaflet requested but Draw APIs were missing; falling back to bundled Leaflet/Draw"}),we)}async init(){var n,h,i,r,l,d;const a=(h=(n=performance.now)==null?void 0:n.call(performance))!=null?h:Date.now();try{await this.destroy();const{latitude:p,longitude:_,zoom:g,minZoom:y,maxZoom:x,tileUrl:T,tileAttribution:E,preferCanvas:A=!0,useExternalLeaflet:U}=this.options.map,F=[p,_],C=this.L;U&&ci(C,{onError:nt=>this.logger.warn("external-leaflet-missing-draw",{message:nt})}),this.map=C.map(this.container,{zoomControl:!0,minZoom:y,preferCanvas:A}).setView(F,g),this.setTileLayer({urlTemplate:T,attribution:E!=null?E:"",maxZoom:x},{onTileError:nt=>{var rt,At;(At=(rt=this.options.callbacks)==null?void 0:rt.onTileError)==null||At.call(rt,nt)}}),this.drawnItems=C.featureGroup().addTo(this.map);const S=this.buildDrawOptions(this.options.controls,!!this.options.readOnly),G=C.Control.Draw;this.drawControl=new G(S),this.map.addControl(this.drawControl),this.applyLayerCakeToolbarIcon(),this.applyMoveToolbarIcon(),this.restoreVisibleLayersFromStore(),this.options.controls.ruler&&(this.logger.debug("init:ruler",{available:typeof C.control.ruler=="function"}),typeof C.control.ruler=="function"?(this.addRulerControl(),this.installMeasurementSettingsControl()):this.logger.warn("init:ruler:missing",{msg:"L.control.ruler is not defined"})),this.applyToolButtonCustomizations(),this.patchLeafletDrawBugs(),this.installPolygonFinishPatch(),this.installVertexEditSurfaceMenu(),this.map.invalidateSize(),setTimeout(()=>{var nt;try{(nt=this.map)==null||nt.invalidateSize()}catch{}},0),this.bindDrawEvents();const q=((r=(i=performance.now)==null?void 0:i.call(performance))!=null?r:Date.now())-a;this.logger.debug("init:ready",{elapsedMs:Math.round(q)});const Y=this.store.bounds();(d=(l=this.options.callbacks)==null?void 0:l.onReady)==null||d.call(l,Y?{bounds:Y}:{})}catch(p){this._error("Failed to initialize Leaflet map",p)}}async destroy(){var a,n,h,i;try{ii(this.container,null,{toolbarGroups:null}),this.map&&(this.map.off(),this.map.remove())}catch(r){this._error("Failed to remove Leaflet map",r)}try{(a=this.detachPolygonFinishPatch)==null||a.call(this)}catch{}this.detachPolygonFinishPatch=null;try{(n=this.vertexMenuCleanup)==null||n.call(this)}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null;try{(h=this.vertexEditSurfaceCleanup)==null||h.call(this)}catch{}this.vertexEditSurfaceCleanup=null;try{this.hideMoveConfirmationUI()}catch{}this.drawControl=null,this.rulerControl=null,this.measurementControl=null,this.removeMeasurementModal(),this.drawnItems=null,this.tileLayer=null;try{(i=this.activeCakeSession)==null||i.destroy()}catch{}this.activeCakeSession=null,this.map=null}async getGeoJSON(){return this.store.toFeatureCollection()}async loadGeoJSON(a,n=!1){if(!this.map||!this.drawnItems)return;await this.clearLayers();const h=$i(a),i=this.store.add(h),r=this.createGeoJSONLayers(h);this.addGeoJSONLayersToDrawnItems(r),this.logger.debug("loadGeoJSON",{count:h.features.length,ids:i}),n&&await this.fitBoundsToData()}async clearLayers(){this.drawnItems&&this.drawnItems.clearLayers(),this.store.clear()}async addFeatures(a){if(!this.map||!this.drawnItems)return[];const n=$i(a),h=this.store.add(n),i=this.createGeoJSONLayers(n);return this.addGeoJSONLayersToDrawnItems(i),h}async updateFeature(a,n){if(!this.store.has(a)){this.logger.warn("updateFeature:missing",{id:a});return}if(this.store.update(a,n),!this.drawnItems)return;this.drawnItems.eachLayer(i=>{i._fid===a&&this.drawnItems.removeLayer(i)}),this.createGeoJSONLayers({type:"FeatureCollection",features:[{...n,id:a}]}).eachLayer(i=>{i._fid=a,this.drawnItems.addLayer(i),this.installVertexContextMenu(i)})}async removeFeature(a){this.drawnItems&&this.drawnItems.eachLayer(n=>{n._fid===a&&this.drawnItems.removeLayer(n)}),this.store.remove(a)}async fitBoundsToData(a=.05){if(!this.map)return;const n=this.store.bounds();if(!n)return;const h=n,i=this.L.latLngBounds(h);if(a>0){const r=i.getSouthWest(),l=i.getNorthEast(),d=(l.lat-r.lat)*a,p=(l.lng-r.lng)*a,_=this.L.latLngBounds(this.L.latLng(r.lat-d,r.lng-p),this.L.latLng(l.lat+d,l.lng+p));this.map.fitBounds(_)}else this.map.fitBounds(i)}async fitBounds(a,n=.05){if(!this.map)return;const h=this.L.latLngBounds(a);if(n>0){const i=h.getSouthWest(),r=h.getNorthEast(),l=(r.lat-i.lat)*n,d=(r.lng-i.lng)*n,p=this.L.latLngBounds(this.L.latLng(i.lat-l,i.lng-d),this.L.latLng(r.lat+l,r.lng+d));this.map.fitBounds(p)}else this.map.fitBounds(h)}async setView(a,n,h){this.map&&this.map.setView([a,n],h!=null?h:this.map.getZoom())}setTileLayer(a,n){if(!this.map){this.logger.warn("setTileLayer called before map initialization",{urlTemplate:a.urlTemplate});return}this.logger.debug("tile-layer:switch",{urlTemplate:a.urlTemplate,attribution:a.attribution,maxZoom:a.maxZoom,subdomains:a.subdomains}),this.tileLayer&&(this.map.removeLayer(this.tileLayer),this.tileLayer=null);const h={attribution:a.attribution,minZoom:this.options.map.minZoom,maxZoom:a.maxZoom};a.subdomains!==void 0?h.subdomains=a.subdomains:a.urlTemplate.includes("{s}")&&(h.subdomains=["a","b","c"]);const i=this.L.tileLayer(a.urlTemplate,h);let r=!1;i.on("tileerror",l=>{var d;this.logger.error("tile-layer:error",{error:l}),r||(r=!0,(d=n==null?void 0:n.onTileError)==null||d.call(n,l))}),i.addTo(this.map),this.tileLayer=i}async mergeVisiblePolygons(a){if(!this.map||!this.drawnItems)return null;const h=(await this.getGeoJSON()).features.filter(d=>{const p=d.geometry;return p&&(to(p)||eo(p))});if(h.length<=1){if(h.length===1){const d=h[0].id;return d?String(d):null}return null}const i=rr(h,a==null?void 0:a.properties);if(!i)return null;const r=[];for(const d of h){const p=d.id;p&&r.push(String(p))}for(const d of r)await this.removeFeature(d);const[l]=await this.addFeatures({type:"FeatureCollection",features:[i]});return l||null}setRulerUnits(a){if(this.measurementSystem===a)return;const n=this.measurementSystem;this.measurementSystem=a,this.logger.debug("ruler:units",{system:a}),this.emitToolEvent("tool:ruler:units-changed",{previous:n,current:a}),this.syncMeasurementModalState(),this.rebuildRulerControl()}buildDrawOptions(a,n){var r;const h={polygon:a.polygon?{allowIntersection:(r=this.options.map.polygonAllowIntersection)!=null?r:!1,showArea:!0,shapeOptions:{color:"#3388ff"}}:!1,polyline:a.polyline?{shapeOptions:{color:"#3388ff"}}:!1,rectangle:a.rectangle?{shapeOptions:{color:"#3388ff"}}:!1,circle:a.circle?{shapeOptions:{color:"#3388ff"}}:!1,cake:a.cake?{shapeOptions:{color:"#8A2BE2",fillOpacity:.2}}:!1,marker:a.marker?this.buildMarkerDrawOptions():!1,move:a.move?{featureGroup:this.drawnItems}:!1};let i={featureGroup:this.drawnItems};return a.edit?a.delete===!1&&(i.remove=!1):i=!1,n?{draw:!1,edit:!1}:{draw:h,edit:i}}buildMarkerDrawOptions(){return this.markerIcon?{icon:this.markerIcon}:{}}createMarkerIcon(a){return a?this.L.icon({iconUrl:a.iconUrl,iconRetinaUrl:a.iconRetinaUrl,shadowUrl:a.shadowUrl,iconSize:a.iconSize,iconAnchor:a.iconAnchor,popupAnchor:a.popupAnchor}):null}createDefaultMarkerIcon(){var n;const a=(n=this.L.Icon)==null?void 0:n.Default;return a?new a:null}createGeoJSONLayers(a){return this.L.geoJSON(a,{pointToLayer:(n,h)=>this.markerIcon?this.L.marker(h,{icon:this.markerIcon}):this.L.marker(h),onEachFeature:(n,h)=>{const i=Qe(n);i&&(h._fid=i)}})}addGeoJSONLayersToDrawnItems(a){this.drawnItems&&a.eachLayer(n=>{this.drawnItems.addLayer(n),this.installVertexContextMenu(n)})}restoreVisibleLayersFromStore(){if(!this.drawnItems)return;const a=this.store.toFeatureCollection();if(a.features.length===0)return;const n=this.createGeoJSONLayers(a);this.addGeoJSONLayersToDrawnItems(n)}syncDrawMarkerOptions(){var h,i,r,l;const a=this.drawControl;if(!a)return;const n=this.buildMarkerDrawOptions();(h=a.options)!=null||(a.options={}),(r=(i=a.options).draw)!=null||(i.draw={}),a.options.draw.marker=n,(l=a.setDrawingOptions)==null||l.call(a,{marker:n})}reapplyMarkerIconsToExistingLayers(){if(!this.drawnItems)return;const a=this.markerIcon?null:this.createDefaultMarkerIcon();this.drawnItems.eachLayer(n=>{if(!(typeof(n==null?void 0:n.setIcon)!="function"||typeof(n==null?void 0:n.getLatLng)!="function")){if(this.markerIcon){n.setIcon(this.markerIcon);return}a&&n.setIcon(a)}})}applyToolButtonCustomizations(){ii(this.container,this.toolButtonConfig,{toolbarGroups:this.toolbarGroups,onTrigger:(a,n)=>{if(n.activate){this.activateTool(a,{source:n.source,groupId:n.groupId});return}this.emitToolTrigger({tool:a,source:n.source,groupId:n.groupId,handled:!0})}}),setTimeout(()=>{ii(this.container,this.toolButtonConfig,{toolbarGroups:this.toolbarGroups,onTrigger:(a,n)=>{if(n.activate){this.activateTool(a,{source:n.source,groupId:n.groupId});return}this.emitToolTrigger({tool:a,source:n.source,groupId:n.groupId,handled:!0})}})},0)}emitToolTrigger(a){var n,h;(h=(n=this.options.callbacks)==null?void 0:n.onToolTrigger)==null||h.call(n,{...a,timestamp:Date.now()})}findLeafletDrawHandler(a){var l,d,p,_,g,y,x,T,E,A;const n={polygon:"polygon",polyline:"polyline",rectangle:"rectangle",circle:"circle",marker:"marker",layerCake:"cake",move:"move"},h={edit:"edit",delete:"remove"},i=n[a];if(i)return(g=(_=(p=(d=(l=this.drawControl)==null?void 0:l._toolbars)==null?void 0:d.draw)==null?void 0:p._modes)==null?void 0:_[i])==null?void 0:g.handler;const r=h[a];return r?(A=(E=(T=(x=(y=this.drawControl)==null?void 0:y._toolbars)==null?void 0:x.edit)==null?void 0:T._modes)==null?void 0:E[r])==null?void 0:A.handler:null}disableActiveToolHandlers(){var n;const a=(n=this.drawControl)==null?void 0:n._toolbars;a&&Object.values(a).forEach(h=>{var i;Object.values((i=h==null?void 0:h._modes)!=null?i:{}).forEach(r=>{const l=r==null?void 0:r.handler;l&&typeof l.disable=="function"&&l.disable()})})}triggerRulerTool(){const a=this.rulerControl;if(typeof(a==null?void 0:a._toggleMeasure)=="function")return a._toggleMeasure(),!0;const n=this.container.querySelector(".leaflet-ruler");return n?(n.click(),!0):!1}applyLayerCakeToolbarIcon(){if(!this.container)return;const a=()=>{const n=this.container.querySelector("a.leaflet-draw-draw-cake");if(!n)return;n.style.setProperty("background-image","none","important"),n.style.setProperty("background-color","#fff","important"),n.style.setProperty("position","relative","important");let h=n.querySelector(".leaflet-geokit-cake-icon");h||(h=document.createElement("span"),h.className="leaflet-geokit-cake-icon",h.setAttribute("aria-hidden","true"),n.appendChild(h)),h.style.setProperty("position","absolute","important"),h.style.setProperty("display","block","important"),h.style.setProperty("left","50%","important"),h.style.setProperty("top","50%","important"),h.style.setProperty("width","18px","important"),h.style.setProperty("height","18px","important"),h.style.setProperty("transform","translate(-50%, -50%)","important"),h.style.setProperty("pointer-events","none","important"),h.firstElementChild||(h.innerHTML=Zr);const i=h.firstElementChild;i&&(i.style.setProperty("width","100%","important"),i.style.setProperty("height","100%","important"),i.style.setProperty("display","block","important"))};a(),setTimeout(a,0)}applyMoveToolbarIcon(){if(!this.container)return;const a=()=>{const n=this.container.querySelector("a.leaflet-draw-draw-move");if(!n)return;n.style.setProperty("background-image","none","important"),n.style.setProperty("background-color","#fff","important"),n.style.setProperty("position","relative","important");let h=n.querySelector(".leaflet-geokit-move-icon");h||(h=document.createElement("span"),h.className="leaflet-geokit-move-icon",h.setAttribute("aria-hidden","true"),n.appendChild(h)),h.style.setProperty("position","absolute","important"),h.style.setProperty("display","block","important"),h.style.setProperty("left","50%","important"),h.style.setProperty("top","50%","important"),h.style.setProperty("width","18px","important"),h.style.setProperty("height","18px","important"),h.style.setProperty("transform","translate(-50%, -50%)","important"),h.style.setProperty("pointer-events","none","important"),h.firstElementChild||(h.innerHTML=Hr);const i=h.firstElementChild;i&&(i.style.setProperty("width","100%","important"),i.style.setProperty("height","100%","important"),i.style.setProperty("display","block","important"))};a(),setTimeout(a,0)}addRulerControl(){if(!this.map)return;this.installRulerPrecisionPatch();const a=Xr(this.measurementSystem);this.rulerControl=this.L.control.ruler(a),this.map.addControl(this.rulerControl)}installRulerPrecisionPatch(){if(fo)return;const a=this.L.Control.Ruler;if(!a||typeof a!="function")return;const n=a.prototype,h=n._calculateBearingAndDistance;if(typeof h!="function")return;const i=this.logger;n._calculateBearingAndDistance=function(){var l,d,p;h.call(this);try{const _=this._clickedLatLong,g=(l=this._movingLatLong)!=null?l:this._clickedLatLong;if(!_||!g)return;const{meters:y,bearingDegrees:x}=Wr(_.lat,_.lng,g.lat,g.lng),T=y/1e3,E=typeof((p=(d=this.options)==null?void 0:d.lengthUnit)==null?void 0:p.factor)=="number"?this.options.lengthUnit.factor:1,A=hi(T*E);this._result=this._result||{},this._result.Distance=A,this._result.Bearing=x,this._result.meters=y}catch(_){i==null||i.warn("ruler:precision-patch",_)}},fo=!0}rebuildRulerControl(){if(!(!this.map||!this.options.controls.ruler)){if(this.rulerControl){try{this.map.removeControl(this.rulerControl)}catch(a){this.logger.warn("ruler:remove-failed",a)}this.rulerControl=null}this.addRulerControl()}}installMeasurementSettingsControl(){if(!this.map||this.measurementControl)return;const a=this,n=this.L.Control.extend({options:{position:"topleft"},onAdd(){const h=a.L.DomUtil.create("div","leaflet-bar leaflet-ruler-settings-control"),i=a.L.DomUtil.create("button","leaflet-ruler-settings-button",h);return i.type="button",i.title="Measurement settings",i.setAttribute("aria-label","Measurement settings"),i.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation(),a.toggleMeasurementModal(!0)}),a.L.DomEvent.disableClickPropagation(h),a.L.DomEvent.disableScrollPropagation(h),h}});this.measurementControl=new n,this.map.addControl(this.measurementControl)}ensureMeasurementModal(){if(this.measurementModalOverlay)return this.measurementModalOverlay;if(typeof document=="undefined")throw new Error("Measurement modal requires a browser environment");const a=document.createElement("div");a.className="leaflet-ruler-modal-overlay",a.setAttribute("aria-hidden","true");const n=document.createElement("div");n.className="leaflet-ruler-modal",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.tabIndex=-1,a.addEventListener("click",p=>{p.target===a&&this.toggleMeasurementModal(!1)});const h=document.createElement("h2");h.className="leaflet-ruler-modal-title",h.textContent="Measurement Units",n.appendChild(h);const i=document.createElement("p");i.className="leaflet-ruler-modal-description",i.textContent="Choose how the measurement tool reports distances.",n.appendChild(i);const r=document.createElement("div");r.className="leaflet-ruler-modal-options",n.appendChild(r),["metric","imperial"].forEach(p=>{const _=document.createElement("label");_.className="leaflet-ruler-modal-option";const g=document.createElement("input");g.type="radio",g.name="leaflet-ruler-units",g.value=p,g.addEventListener("change",()=>{g.checked&&this.setRulerUnits(p)});const y=document.createElement("span");y.textContent=Qr[p],_.appendChild(g),_.appendChild(y),r.appendChild(_),this.measurementModalRadios[p]=g});const l=document.createElement("div");l.className="leaflet-ruler-modal-actions";const d=document.createElement("button");return d.type="button",d.className="leaflet-ruler-modal-close",d.textContent="Close",d.addEventListener("click",()=>this.toggleMeasurementModal(!1)),l.appendChild(d),n.appendChild(l),a.appendChild(n),this.container.appendChild(a),this.measurementModalOverlay=a,this.measurementModalDialog=n,this.syncMeasurementModalState(),a}toggleMeasurementModal(a){var h;if(!a){this.measurementModalOverlay&&(this.measurementModalOverlay.classList.remove("is-open"),this.measurementModalOverlay.setAttribute("aria-hidden","true")),this.detachMeasurementModalKeydown();return}const n=this.ensureMeasurementModal();n.classList.add("is-open"),n.setAttribute("aria-hidden","false"),this.syncMeasurementModalState(),this.attachMeasurementModalKeydown(),(h=this.measurementModalDialog)==null||h.focus()}syncMeasurementModalState(){for(const[a,n]of Object.entries(this.measurementModalRadios))n&&(n.checked=a===this.measurementSystem)}removeMeasurementModal(){this.measurementModalOverlay&&this.measurementModalOverlay.remove(),this.measurementModalOverlay=null,this.measurementModalDialog=null,this.measurementModalRadios={},this.detachMeasurementModalKeydown()}attachMeasurementModalKeydown(){this.measurementModalKeydownHandler||typeof document=="undefined"||(this.measurementModalKeydownHandler=a=>{a.key==="Escape"&&this.toggleMeasurementModal(!1)},document.addEventListener("keydown",this.measurementModalKeydownHandler))}detachMeasurementModalKeydown(){!this.measurementModalKeydownHandler||typeof document=="undefined"||(document.removeEventListener("keydown",this.measurementModalKeydownHandler),this.measurementModalKeydownHandler=null)}installPolygonFinishPatch(){var l,d,p,_,g;if(!this.map||!this.drawControl)return;try{(l=this.detachPolygonFinishPatch)==null||l.call(this)}catch{}this.detachPolygonFinishPatch=null;const a=this.map,n=(p=(d=this.drawControl)==null?void 0:d._toolbars)==null?void 0:p.draw;if(!n||!!!((g=(_=n._modes)==null?void 0:_.polygon)!=null&&g.handler))return;const i=10,r=y=>{var x,T,E,A,U,F,C,S;try{const G=(T=(x=n._modes)==null?void 0:x.polygon)==null?void 0:T.handler;if(!G||!G._enabled)return;const q=G._markers;if(!Array.isArray(q)||q.length<3)return;const Y=(A=(E=q[0])==null?void 0:E.getLatLng)==null?void 0:A.call(E);if(!Y)return;const nt=a.latLngToContainerPoint(Y),rt=a.latLngToContainerPoint(y.latlng);Math.hypot(nt.x-rt.x,nt.y-rt.y)<=i&&typeof G._finishShape=="function"&&((F=(U=y.originalEvent)==null?void 0:U.preventDefault)==null||F.call(U),(S=(C=y.originalEvent)==null?void 0:C.stopPropagation)==null||S.call(C),G._finishShape())}catch(G){this._error("polygon-finish-patch",G)}};a.on("click",r),this.detachPolygonFinishPatch=()=>{try{a.off("click",r)}catch{}}}patchLeafletDrawBugs(){var a,n,h,i,r;try{const l=this.L,d=l.GeometryUtil;if(!d)return;const p={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2},_=(n=(a=d.formattedNumber)==null?void 0:a.bind(d))!=null?n:((g,y)=>Number(g).toFixed(y));d.readableArea=(g,y,x)=>{var A;const T=(A=l.Util)!=null&&A.extend?l.Util.extend({},p,x||{}):{...p,...x||{}};let E;if(y){let U=["ha","m"];const F=typeof y;F==="string"?U=[y]:F!=="boolean"&&(U=Array.isArray(y)?y:U),g>=1e6&&U.indexOf("km")!==-1?E=`${_(1e-6*g,T.km)} km²`:g>=1e4&&U.indexOf("ha")!==-1?E=`${_(1e-4*g,T.ha)} ha`:E=`${_(g,T.m)} m²`}else g=g/.836127,g>=3097600?E=`${_(g/3097600,T.mi)} mi²`:g>=4840?E=`${_(g/4840,T.ac)} acres`:E=`${_(g,T.yd)} yd²`;return E}}catch(l){this.logger.warn("leaflet-draw-patch:readableArea",l)}try{const l=this.L,d=(h=l.Edit)==null?void 0:h.Circle,p=(i=l.Draw)==null?void 0:i.Event,_=l.GeometryUtil;if(!((r=d==null?void 0:d.prototype)!=null&&r._resize)||!p||!_)return;d.prototype._resize=function(y){var E,A,U;const x=this._moveMarker.getLatLng(),T=_.isVersion07x()?x.distanceTo(y):this._map.distance(x,y);this._shape.setRadius(T);try{(E=this._map)!=null&&E.editTooltip&&((U=(A=this._map)==null?void 0:A._editTooltip)!=null&&U.updateContent)&&this._map._editTooltip.updateContent({text:l.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+l.drawLocal.edit.handlers.edit.tooltip.text,subtext:l.drawLocal.draw.handlers.circle.radius+": "+_.readableDistance(T,!0,this.options.feet,this.options.nautic)})}catch{}this._map.fire(p.EDITRESIZE,{layer:this._shape})}}catch(l){this.logger.warn("leaflet-draw-patch:circle-resize",l)}}bindDrawEvents(){!this.map||!this.drawnItems||(this.map.on(this.L.Draw.Event.CREATED,a=>{var n,h,i;try{const{layer:r,layerType:l}=a;if(l===Ae.TYPE){try{(n=this.activeCakeSession)==null||n.destroy()}catch{}this.activeCakeSession=new Nr(this.map,r,y=>{if(!this.drawnItems)return;const x=this.store.add(y),T=this.L.geoJSON(y);let E=0;T.eachLayer(A=>{var F,C,S;const U=(F=x[E])!=null?F:x[x.length-1];A._fid=U,this.drawnItems.addLayer(A),this.installVertexContextMenu(A),(S=(C=this.options.callbacks)==null?void 0:C.onCreated)==null||S.call(C,{id:U,layerType:"polygon",geoJSON:A.toGeoJSON()}),E++}),this.activeCakeSession=null,this.emitToolEvent("tool:layer-cake:saved",{featureCollection:y})},this.measurementSystem),this.emitToolEvent("tool:layer-cake:session-started",{center:r.getLatLng(),radius:r.getRadius()});return}this.drawnItems.addLayer(r);const d=r.toGeoJSON(),_=this.store.add({type:"FeatureCollection",features:[d]})[0];r._fid=_,this.installVertexContextMenu(r),(i=(h=this.options.callbacks)==null?void 0:h.onCreated)==null||i.call(h,{id:_,layerType:l,geoJSON:d});const g=$r[l];g&&this.emitToolEvent(g,{id:_,geoJSON:d})}catch(r){this._error("onCreated handler failed",r)}}),this.map.on(this.L.Draw.Event.EDITED,a=>{var n,h;try{const i=[];a.layers.eachLayer(d=>{const p=d.toGeoJSON(),_=d._fid;if(_)this.store.update(_,p),i.push(_);else{const g=this.store.add({type:"FeatureCollection",features:[p]})[0];d._fid=g,i.push(g)}});const l=this.store.toFeatureCollection();(h=(n=this.options.callbacks)==null?void 0:n.onEdited)==null||h.call(n,{ids:i,geoJSON:l}),this.emitToolEvent("tool:edit:applied",{ids:i,geoJSON:l})}catch(i){this._error("onEdited handler failed",i)}}),this.map.on(this.L.Draw.Event.DELETED,a=>{var n,h;try{const i=[];a.layers.eachLayer(d=>{const p=d._fid;p&&(i.push(p),this.store.remove(p))});const l=this.store.toFeatureCollection();(h=(n=this.options.callbacks)==null?void 0:n.onDeleted)==null||h.call(n,{ids:i,geoJSON:l}),this.emitToolEvent("tool:delete:applied",{ids:i,geoJSON:l})}catch(i){this._error("onDeleted handler failed",i)}}),this.map.on("draw:moveend",a=>{var n;try{this.emitToolEvent("tool:move:pending",{layerId:(n=a==null?void 0:a.layer)==null?void 0:n._fid,originalGeoJSON:a==null?void 0:a.originalGeoJSON,newGeoJSON:a==null?void 0:a.newGeoJSON}),this.showMoveConfirmationUI(a.layer)}catch(h){this._error("draw:moveend handler failed",h)}}),this.map.on("draw:moveconfirmed",a=>{var n,h,i;try{this.emitToolEvent("tool:move:confirmed",{layerId:(n=a==null?void 0:a.layer)==null?void 0:n._fid,originalGeoJSON:a==null?void 0:a.originalGeoJSON,newGeoJSON:a==null?void 0:a.newGeoJSON});const r=a.layer,l=r._fid;if(l){const d=r.toGeoJSON();this.store.update(l,d),(i=(h=this.options.callbacks)==null?void 0:h.onEdited)==null||i.call(h,{ids:[l],geoJSON:this.store.toFeatureCollection()})}this.hideMoveConfirmationUI()}catch(r){this._error("draw:moveconfirmed handler failed",r)}}))}_error(a,n){var h,i;this.logger.error("error",{message:a,cause:n}),(i=(h=this.options.callbacks)==null?void 0:h.onError)==null||i.call(h,{message:a,cause:n})}installVertexEditSurfaceMenu(){var i;if(!this.map)return;try{(i=this.vertexEditSurfaceCleanup)==null||i.call(this)}catch{}const a=this.map.getContainer(),n=r=>{this.openNearestEditableVertexMenuFromDomEvent(r)},h=r=>{(r.ctrlKey||r.metaKey)&&this.openNearestEditableVertexMenuFromDomEvent(r)};a.addEventListener("contextmenu",n,{capture:!0}),a.addEventListener("click",h,{capture:!0}),this.vertexEditSurfaceCleanup=()=>{a.removeEventListener("contextmenu",n,{capture:!0}),a.removeEventListener("click",h,{capture:!0})}}openNearestEditableVertexMenuFromDomEvent(a){try{if(!this.map||!this.drawnItems)return;const n=this.map.mouseEventToContainerPoint(a),h=this.map.containerPointToLatLng(n);let i=null;if(this.drawnItems.eachLayer(r=>{if(i)return;const l=r.editing;if(!(l&&typeof l.enabled=="function"&&l.enabled()))return;const p=this.findNearestVertex(r,h,16);p&&(i={layer:r,...p})}),!i)return;a.preventDefault(),a.stopPropagation(),this.showVertexMenu(n,async()=>{await this.deleteVertex(i.layer,i.pathIndex,i.vertexIndex)})}catch(n){this._error("openNearestEditableVertexMenuFromDomEvent",n)}}installVertexContextMenu(a){if(!a||typeof a.on!="function")return;const n=i=>{var r,l,d,p;try{(l=(r=i==null?void 0:i.originalEvent)==null?void 0:r.preventDefault)==null||l.call(r),(p=(d=i==null?void 0:i.originalEvent)==null?void 0:d.stopPropagation)==null||p.call(d)}catch{}this.openVertexMenu(a,i)},h=i=>{const r=i==null?void 0:i.originalEvent;r&&(r.ctrlKey||r.metaKey)&&this.openVertexMenu(a,i)};try{a.on("contextmenu",n),a.on("click",h)}catch{}}openVertexMenu(a,n){try{if(!this.map||!(typeof a.getLatLngs=="function"&&(a instanceof this.L.Polygon||a instanceof this.L.Polyline)))return;const i=a.editing;if(!i||typeof i.enabled!="function"||!i.enabled())return;const r=n==null?void 0:n.latlng,l=this.map.latLngToContainerPoint(r),d=this.findNearestVertex(a,r,12);if(!d)return;this.showVertexMenu(l,async()=>{await this.deleteVertex(a,d.pathIndex,d.vertexIndex)})}catch(h){this._error("openVertexMenu",h)}}showVertexMenu(a,n){var h;try{try{(h=this.vertexMenuCleanup)==null||h.call(this)}catch{}if(this.vertexMenuCleanup=null,!this.container)return;const i=document.createElement("div");i.style.position="absolute",i.style.top=`${a.y}px`,i.style.left=`${a.x}px`,i.style.transform="translate(-50%, -100%)",i.style.background="#fff",i.style.border="1px solid rgba(0,0,0,0.15)",i.style.borderRadius="6px",i.style.boxShadow="0 4px 12px rgba(0,0,0,0.15)",i.style.padding="6px",i.style.zIndex="10000",i.style.fontSize="12px",i.style.userSelect="none";const r=document.createElement("button");r.textContent="Delete vertex",r.style.padding="6px 10px",r.style.border="none",r.style.background="#da1e28",r.style.color="#fff",r.style.borderRadius="4px",r.style.cursor="pointer",r.addEventListener("click",p=>{p.stopPropagation(),p.preventDefault();try{n()}finally{l()}}),i.appendChild(r);const l=()=>{try{window.removeEventListener("pointerdown",d),this.container.removeEventListener("scroll",l,!0),i.remove()}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null},d=p=>{!(typeof p.composedPath=="function"?p.composedPath():[]).includes(i)&&!i.contains(p.target)&&l()};window.addEventListener("pointerdown",d,{capture:!0}),this.container.addEventListener("scroll",l,!0),this.container.appendChild(i),this.vertexMenuEl=i,this.vertexMenuCleanup=l}catch(i){this._error("showVertexMenu",i)}}findNearestVertex(a,n,h){if(!this.map)return null;const i=x=>this.map.latLngToContainerPoint(x),r=(x,T)=>Math.hypot(x.x-T.x,x.y-T.y),l=i(n);let d=1/0,p=-1,_=-1;const g=a.getLatLngs();return(Array.isArray(g[0])?g:[g]).forEach((x,T)=>{x.forEach((E,A)=>{const U=i(E),F=r(U,l);F<d&&(d=F,p=T,_=A)})}),p===-1||d>h?null:{pathIndex:p,vertexIndex:_}}async deleteVertex(a,n,h){var i,r,l;try{if(!(typeof a.getLatLngs=="function"&&(a instanceof this.L.Polygon||a instanceof this.L.Polyline)))return;const p=a.getLatLngs(),_=Array.isArray(p[0])?p:[p],g=_[n];if(!g)return;const x=a instanceof this.L.Polygon?3:2;if(g.length<=x)return;if(g.splice(h,1),_.length===1)a.setLatLngs(g);else{const E=_.map((A,U)=>U===n?g:A);a.setLatLngs(E)}(i=a.redraw)==null||i.call(a);const T=a._fid;if(T){const E=a.toGeoJSON();this.store.update(T,E),(l=(r=this.options.callbacks)==null?void 0:r.onEdited)==null||l.call(r,{ids:[T],geoJSON:this.store.toFeatureCollection()})}}catch(d){this._error("deleteVertex",d)}}showMoveConfirmationUI(a){var n,h;try{if(this.hideMoveConfirmationUI(),!this.container||!this.map)return;const i=this.drawControl;if(!i)return;const r=(n=i==null?void 0:i._toolbars)==null?void 0:n.draw;if(!r)return;const l=r._modes||{};let d=null;for(const y in l){const x=l[y];if(((h=x==null?void 0:x.handler)==null?void 0:h.type)==="move"){d=x.handler;break}}this.activeMoveHandler=d;const p=document.createElement("div");p.style.position="absolute",p.style.bottom="60px",p.style.left="50%",p.style.transform="translateX(-50%)",p.style.display="flex",p.style.gap="8px",p.style.background="#fff",p.style.border="2px solid #3388ff",p.style.borderRadius="8px",p.style.padding="12px 16px",p.style.boxShadow="0 4px 12px rgba(0,0,0,0.2)",p.style.zIndex="10000",p.style.fontSize="14px",p.style.fontFamily="system-ui, sans-serif";const _=document.createElement("button");_.textContent="✓ Save",_.style.padding="8px 16px",_.style.border="none",_.style.background="#28a745",_.style.color="#fff",_.style.borderRadius="4px",_.style.cursor="pointer",_.style.fontWeight="600",_.style.fontSize="14px",_.addEventListener("click",y=>{y.stopPropagation(),y.preventDefault(),d!=null&&d.confirmMove&&d.confirmMove()});const g=document.createElement("button");g.textContent="✕ Cancel",g.style.padding="8px 16px",g.style.border="1px solid #ccc",g.style.background="#fff",g.style.color="#333",g.style.borderRadius="4px",g.style.cursor="pointer",g.style.fontWeight="600",g.style.fontSize="14px",g.addEventListener("click",y=>{y.stopPropagation(),y.preventDefault(),this.emitToolEvent("tool:move:cancelled",{layerId:a==null?void 0:a._fid}),d!=null&&d.cancelMove&&d.cancelMove(),this.hideMoveConfirmationUI()}),p.appendChild(_),p.appendChild(g),this.container.appendChild(p),this.moveConfirmationUI=p,this.logger.debug("showMoveConfirmationUI",{layerId:a._fid})}catch(i){this._error("showMoveConfirmationUI",i)}}hideMoveConfirmationUI(){try{this.moveConfirmationUI&&(this.moveConfirmationUI.remove(),this.moveConfirmationUI=null),this.activeMoveHandler=null}catch(a){this._error("hideMoveConfirmationUI",a)}}}const po=[25,41],mo=[12,41],_o=[1,-34];function Vt(u,a){var h,i,r,l;if(u==null)return null;const n=typeof u=="string"?u.trim():"";if(!n)return(h=a.reportError)==null||h.call(a,a.errorMessage,a.cause),null;try{return new URL(n,(i=a.baseUrl)!=null?i:document.baseURI).toString()}catch(d){return(l=a.reportError)==null||l.call(a,a.errorMessage,(r=a.cause)!=null?r:d),null}}function di(u,a,n){var p,_;if(u==null)return[...a];if(!Array.isArray(u)||u.length!==2)return(p=n.reportError)==null||p.call(n,n.errorMessage,n.cause),[...a];const[h,i]=u,r=Number(h),l=Number(i);return Number.isFinite(r)&&Number.isFinite(l)&&(!n.positiveOnly||r>0&&l>0)?[r,l]:((_=n.reportError)==null||_.call(n,n.errorMessage,n.cause),[...a])}function ui(u,a,n){var p,_,g,y,x;if(u==null)return[...a];const h=typeof u=="string"?u.trim():"";if(!h)return(p=n.reportError)==null||p.call(n,n.errorMessage,n.cause),[...a];const i=h.split(",");if(i.length!==2)return(_=n.reportError)==null||_.call(n,n.errorMessage,n.cause),[...a];const r=Number((g=i[0])==null?void 0:g.trim()),l=Number((y=i[1])==null?void 0:y.trim());return Number.isFinite(r)&&Number.isFinite(l)&&(!n.positiveOnly||r>0&&l>0)?[r,l]:((x=n.reportError)==null||x.call(n,n.errorMessage,n.cause),[...a])}function es(u,a={}){var r,l;if(!u||typeof u!="object")return null;const n=Vt(u.iconUrl,{...a,errorMessage:"Invalid marker icon config: iconUrl must be a valid URL",cause:{field:"iconUrl",value:u.iconUrl}});if(!n)return null;const h=(r=Vt(u.iconRetinaUrl,{...a,errorMessage:"Invalid marker icon config: iconRetinaUrl must be a valid URL",cause:{field:"iconRetinaUrl",value:u.iconRetinaUrl}}))!=null?r:n,i=(l=Vt(u.shadowUrl,{...a,errorMessage:"Invalid marker icon config: shadowUrl must be a valid URL",cause:{field:"shadowUrl",value:u.shadowUrl}}))!=null?l:void 0;return{iconUrl:n,iconRetinaUrl:h,shadowUrl:i,iconSize:di(u.iconSize,po,{...a,positiveOnly:!0,errorMessage:"Invalid marker icon config: iconSize must be a [width, height] tuple of positive finite numbers",cause:{field:"iconSize",value:u.iconSize}}),iconAnchor:di(u.iconAnchor,mo,{...a,errorMessage:"Invalid marker icon config: iconAnchor must be a [x, y] tuple of finite numbers",cause:{field:"iconAnchor",value:u.iconAnchor}}),popupAnchor:di(u.popupAnchor,_o,{...a,errorMessage:"Invalid marker icon config: popupAnchor must be a [x, y] tuple of finite numbers",cause:{field:"popupAnchor",value:u.popupAnchor}})}}function is(u,a={}){var r,l;const n=Vt(u.iconUrl,{...a,errorMessage:'Invalid "marker-icon-url" attribute; falling back to default markers',cause:{attribute:"marker-icon-url",value:u.iconUrl}});if(!n)return null;const h=(r=Vt(u.iconRetinaUrl,{...a,errorMessage:'Invalid "marker-icon-retina-url" attribute; using "marker-icon-url" instead',cause:{attribute:"marker-icon-retina-url",value:u.iconRetinaUrl}}))!=null?r:n,i=(l=Vt(u.shadowUrl,{...a,errorMessage:'Invalid "marker-shadow-url" attribute; dropping the custom marker shadow',cause:{attribute:"marker-shadow-url",value:u.shadowUrl}}))!=null?l:void 0;return{iconUrl:n,iconRetinaUrl:h,shadowUrl:i,iconSize:ui(u.iconSize,po,{...a,positiveOnly:!0,errorMessage:'Invalid "marker-icon-size" attribute; using the default marker size',cause:{attribute:"marker-icon-size",value:u.iconSize}}),iconAnchor:ui(u.iconAnchor,mo,{...a,errorMessage:'Invalid "marker-icon-anchor" attribute; using the default marker anchor',cause:{attribute:"marker-icon-anchor",value:u.iconAnchor}}),popupAnchor:ui(u.popupAnchor,_o,{...a,errorMessage:'Invalid "marker-popup-anchor" attribute; using the default popup anchor',cause:{attribute:"marker-popup-anchor",value:u.popupAnchor}})}}const It={osm:{urlTemplate:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:19,subdomains:["a","b","c"]},here:{styles:{"lite.day":"lite.day","normal.day":"normal.day","satellite.day":"satellite.day"},defaultStyle:"lite.day",attribution:'Map Tiles © <a href="https://www.here.com">HERE</a>',maxZoom:20}};function go(u){return typeof u=="string"?u.trim().toLowerCase():""}function vo(u){if(typeof u!="string")return;const a=u.trim();return a.length>0?a:void 0}function os(u){const{style:a,attribution:n}=u,h=go(u.provider),i=vo(u.apiKey);switch(h){case"osm":return{urlTemplate:It.osm.urlTemplate,attribution:n||It.osm.attribution,maxZoom:It.osm.maxZoom,subdomains:[...It.osm.subdomains]};case"here":{if(!i)throw new Error("HERE Maps requires an API key");const r=typeof a=="string"?a.trim():"",l=r&&r in It.here.styles?r:It.here.defaultStyle;return{urlTemplate:`https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/png8?style=${encodeURIComponent(l)}&apiKey=${encodeURIComponent(i)}`,attribution:n||It.here.attribution,maxZoom:It.here.maxZoom,subdomains:void 0}}default:throw new Error(`Unknown tile provider: ${u.provider}`)}}function ns(u){const a=go(u.provider),n=vo(u.apiKey);return a?a==="here"&&!n?{valid:!1,error:"HERE Maps requires an API key"}:{valid:!0}:{valid:!1,error:"Provider is required"}}class fi extends HTMLElement{constructor(){super();k(this,"_root");k(this,"_container");k(this,"_logger",Le("component:leaflet-geokit","debug"));k(this,"_latitude",0);k(this,"_longitude",0);k(this,"_zoom",2);k(this,"_minZoom");k(this,"_maxZoom");k(this,"_tileUrl","https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png");k(this,"_tileAttribution");k(this,"_tileProvider");k(this,"_tileStyle");k(this,"_apiKey");k(this,"_activeTileProvider","tile-url");k(this,"_readOnly",!1);k(this,"_logLevel","debug");k(this,"_devOverlay",!1);k(this,"_polygonAllowIntersection",!1);k(this,"_preferCanvas",!0);k(this,"_themeUrl");k(this,"_themeCss","");k(this,"_themeLinkEl",null);k(this,"_themeStyleEl",null);k(this,"_controller",null);k(this,"_useExternalLeaflet",!1);k(this,"_skipLeafletStyles",!1);k(this,"_leafletInstance");k(this,"_toolHooks");k(this,"_toolEventEmitter");k(this,"_markerIconConfig");k(this,"_toolButtonConfig");k(this,"_toolbarGroups");k(this,"_externalToolTriggerListener",n=>{var i,r;const h=n.detail;if((h==null?void 0:h.action)==="deactivate"||(h==null?void 0:h.active)===!1){this.deactivateTool({source:(i=h.source)!=null?i:"event",groupId:h.groupId});return}h!=null&&h.tool&&this.activateTool(h.tool,{source:(r=h.source)!=null?r:"event",groupId:h.groupId})});k(this,"_externalToolDeactivateListener",n=>{var i;const h=n.detail;this.deactivateTool({source:(i=h==null?void 0:h.source)!=null?i:"event",groupId:h==null?void 0:h.groupId})});this._root=this.attachShadow({mode:"open"}),this._root.innerHTML=`
|
|
289
|
+
`,po=6378137,Ft=6356752314245e-6,Bt=1/298.257223563,Qr=Math.PI/180,$r=180/Math.PI,Te=1e9;function ta(u){const a=BigInt(Math.round(u*Te));return Number(a)/Te}function Gt(u){return ta(u)*Qr}function mo(u){const a=u*$r%360;return a<0?a+360:a}function di(u){const a=BigInt(Math.round(u*Te));return Number(a)/Te}function ea(u,a,n,h){const i=ia(u,a,n,h);if(i.converged)return{meters:di(i.distanceMeters),bearingDegrees:mo(i.bearingRad),algorithm:"vincenty",iterations:i.iterations};const r=oa(u,a,n,h);return{meters:di(r.distanceMeters),bearingDegrees:mo(r.bearingRad),algorithm:"karney",iterations:i.iterations}}function ia(u,a,n,h){const i=Gt(u),r=Gt(n),l=Gt(h-a),d=Math.atan((1-Bt)*Math.tan(i)),p=Math.atan((1-Bt)*Math.tan(r)),m=Math.sin(d),_=Math.cos(d),y=Math.sin(p),w=Math.cos(p);let T=l,E=0,A=0;const N=200;let F=0,P=0,I=0,G=0,j=0;for(;Math.abs(T-E)>1e-12&&A<N;){const lt=Math.sin(T),Ie=Math.cos(T);if(F=Math.sqrt((w*lt)**2+(_*y-m*w*Ie)**2),F===0)return{distanceMeters:0,bearingRad:0,iterations:A,converged:!0};P=m*y+_*w*Ie,I=Math.atan2(F,P);const gt=_*w*lt/F;G=1-gt**2,j=G===0?0:P-2*m*y/G;const ne=Bt/16*G*(4+Bt*(4-3*G));E=T,T=l+(1-ne)*Bt*gt*(I+ne*F*(j+ne*P*(-1+2*j**2))),A+=1}if(A>=N)return{distanceMeters:Number.NaN,bearingRad:0,iterations:A,converged:!1};const q=(po**2-Ft**2)/Ft**2*G,rt=1+q/16384*(4096+q*(-768+q*(320-175*q))),at=q/1024*(256+q*(-128+q*(74-47*q))),Mt=at*F*(j+at/4*(P*(-1+2*j**2)-at/6*j*(-3+4*F**2)*(-3+4*j**2))),Se=Ft*rt*(I-Mt),st=Math.atan2(w*Math.sin(T),_*y-m*w*Math.cos(T));return{distanceMeters:Se,bearingRad:st,iterations:A,converged:!0}}function oa(u,a,n,h){const i=Gt(u),r=Gt(n),l=Gt(h-a),d=Math.atan((1-Bt)*Math.tan(i)),p=Math.atan((1-Bt)*Math.tan(r)),m=Math.sin(d),_=Math.cos(d),y=Math.sin(p),w=Math.cos(p),T=Math.sqrt((w*Math.sin(l))**2+(_*y-m*w*Math.cos(l))**2),E=m*y+_*w*Math.cos(l),A=Math.atan2(T,E);if(A===0)return{distanceMeters:0,bearingRad:0};const F=1-(_*w*Math.sin(l)/Math.sin(A))**2,P=F===0?0:E-2*m*y/F,I=(po**2-Ft**2)/Ft**2*F,G=1+I/16384*(4096+I*(-768+I*(320-175*I))),j=I/1024*(256+I*(-128+I*(74-47*I))),q=j*T*(P+j/4*(E*(-1+2*P**2)-j/6*P*(-3+4*T**2)*(-3+4*P**2))),rt=Ft*G*(A-q),at=Math.atan2(w*Math.sin(l),_*y-m*w*Math.cos(l));return{distanceMeters:rt,bearingRad:at}}const na={position:"topleft",circleMarker:{color:"red",radius:2},lineStyle:{color:"red",dashArray:"1,6"},angleUnit:{display:"°",decimal:2,factor:null,label:"Bearing:"}},ra={display:"km",decimal:2,factor:null,label:"Distance (km):"},aa={display:"mi",decimal:2,factor:.621371,label:"Distance (mi):"};function sa(u){const a=u==="imperial"?{...aa}:{...ra};return{...na,lengthUnit:a}}const la={metric:"Meters / Kilometers",imperial:"Feet / Miles"};function ui(u,a={}){var r,l;const n=!!((r=u==null?void 0:u.Control)!=null&&r.Draw),h=!!u.draw,i=n&&h;return i||(l=a.onError)==null||l.call(a,"Leaflet.draw is not available on the provided Leaflet instance"),i}let go=!1;const ha={polygon:"tool:polygon:created",polyline:"tool:polyline:created",rectangle:"tool:rectangle:created",circle:"tool:circle:created",marker:"tool:marker:created"};class ca{constructor(a){k(this,"container");k(this,"logger");k(this,"options");k(this,"L");k(this,"store");k(this,"map",null);k(this,"tileLayer",null);k(this,"drawnItems",null);k(this,"drawControl",null);k(this,"rulerControl",null);k(this,"measurementControl",null);k(this,"measurementSystem","metric");k(this,"measurementModalOverlay",null);k(this,"measurementModalDialog",null);k(this,"measurementModalRadios",{});k(this,"measurementModalKeydownHandler",null);k(this,"detachPolygonFinishPatch",null);k(this,"vertexMenuEl",null);k(this,"vertexMenuCleanup",null);k(this,"vertexEditSurfaceCleanup",null);k(this,"activeCakeSession",null);k(this,"moveConfirmationUI",null);k(this,"activeMoveHandler",null);k(this,"markerIconConfig",null);k(this,"markerIcon",null);k(this,"toolButtonConfig",null);k(this,"toolbarGroups",null);var n,h,i,r;this.options=a,this.container=a.container,this.logger=((n=a.logger)!=null?n:be("controller","debug")).child("map"),this.L=this.resolveLeaflet(a),this.store=new pr(this.logger.child("store")),this.setMarkerIconConfig((h=a.markerIconConfig)!=null?h:null,{reapplyExistingLayers:!1,syncDrawControl:!1}),this.toolButtonConfig=(i=a.toolButtonConfig)!=null?i:null,this.toolbarGroups=(r=a.toolbarGroups)!=null?r:null,this.logger.debug("ctor",{config:a.map,controls:a.controls,readOnly:a.readOnly,useExternalLeaflet:a.useExternalLeaflet}),Ur(this.L),Zr(this.L),Nr(this.L)}emitToolEvent(a,n){var i,r;try{(r=(i=this.options.toolHooks)==null?void 0:i[a])==null||r.call(i,n)}catch(l){this._error(`tool hook failed: ${a}`,l)}const h=this.options.toolEventEmitter;if(h)try{if(typeof h.emit=="function"){h.emit(a,n);return}typeof h.dispatchEvent=="function"&&h.dispatchEvent(new CustomEvent(a,{detail:n}))}catch(l){this._error(`tool emitter failed: ${a}`,l)}}setToolObservers(a){this.options.toolHooks=a.toolHooks,this.options.toolEventEmitter=a.toolEventEmitter}setMarkerIconConfig(a,n={}){const{reapplyExistingLayers:h=!0,syncDrawControl:i=!0}=n;this.options.markerIconConfig=a,this.markerIconConfig=a,this.markerIcon=this.createMarkerIcon(a),i&&this.syncDrawMarkerOptions(),h&&this.reapplyMarkerIconsToExistingLayers()}setToolButtonConfig(a){this.options.toolButtonConfig=a!=null?a:null,this.toolButtonConfig=a!=null?a:null,this.applyToolButtonCustomizations()}setToolbarGroups(a){this.options.toolbarGroups=a!=null?a:null,this.toolbarGroups=a!=null?a:null,this.applyToolButtonCustomizations()}activateTool(a,n={}){var i,r,l;const h=(i=n.source)!=null?i:"api";try{if(a==="select")return this.deactivateTool({source:h,groupId:n.groupId});if(a==="save"){const p=this.store.toFeatureCollection();return(l=(r=this.options.callbacks)==null?void 0:r.onSaved)==null||l.call(r,{geoJSON:p,featureCount:p.features.length}),this.emitToolEvent("tool:save",{geoJSON:p,featureCount:p.features.length}),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0}if(a==="layerStyle")return this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0;if(a==="measurementSettings")return this.toggleMeasurementModal(!0),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0;if(a==="ruler"){const p=this.triggerRulerTool();return this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:p,error:p?void 0:"Ruler control is not available"}),p}const d=this.findLeafletDrawHandler(a);return!d||typeof d.enable!="function"?(this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!1,error:`Tool "${a}" is not available on this map`}),!1):(d.enable(),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!0}),!0)}catch(d){const p=`Failed to activate tool "${a}"`;return this._error(p,d),this.emitToolTrigger({tool:a,source:h,groupId:n.groupId,handled:!1,error:d instanceof Error?d.message:p}),!1}}triggerTool(a,n={}){return this.activateTool(a,n)}deactivateTool(a={}){var h;const n=(h=a.source)!=null?h:"api";try{return this.disableActiveToolHandlers(),this.toggleMeasurementModal(!1),this.emitToolTrigger({tool:"select",source:n,groupId:a.groupId,handled:!0}),!0}catch(i){const r="Failed to deactivate active map tools";return this._error(r,i),this.emitToolTrigger({tool:"select",source:n,groupId:a.groupId,handled:!1,error:i instanceof Error?i.message:r}),!1}}resolveLeaflet(a){if(!a.useExternalLeaflet)return we;if(a.leaflet&&ui(a.leaflet))return this.logger.debug("leaflet-runtime:external-injected"),a.leaflet;const h=globalThis.L;return h&&ui(h)?(this.logger.debug("leaflet-runtime:external-global"),h):(this.logger.warn("leaflet-runtime:external-fallback-bundled",{message:"External Leaflet requested but Draw APIs were missing; falling back to bundled Leaflet/Draw"}),we)}async init(){var n,h,i,r,l,d;const a=(h=(n=performance.now)==null?void 0:n.call(performance))!=null?h:Date.now();try{await this.destroy();const{latitude:p,longitude:m,zoom:_,minZoom:y,maxZoom:w,tileUrl:T,tileAttribution:E,preferCanvas:A=!0,useExternalLeaflet:N}=this.options.map,F=[p,m],P=this.L;N&&ui(P,{onError:rt=>this.logger.warn("external-leaflet-missing-draw",{message:rt})}),this.map=P.map(this.container,{zoomControl:!0,minZoom:y,preferCanvas:A}).setView(F,_),this.setTileLayer({urlTemplate:T,attribution:E!=null?E:"",maxZoom:w},{onTileError:rt=>{var at,Mt;(Mt=(at=this.options.callbacks)==null?void 0:at.onTileError)==null||Mt.call(at,rt)}}),this.drawnItems=P.featureGroup().addTo(this.map);const I=this.buildDrawOptions(this.options.controls,!!this.options.readOnly),G=P.Control.Draw;this.drawControl=new G(I),this.map.addControl(this.drawControl),this.applyLayerCakeToolbarIcon(),this.applyMoveToolbarIcon(),this.restoreVisibleLayersFromStore(),this.options.controls.ruler&&(this.logger.debug("init:ruler",{available:typeof P.control.ruler=="function"}),typeof P.control.ruler=="function"?(this.addRulerControl(),this.installMeasurementSettingsControl()):this.logger.warn("init:ruler:missing",{msg:"L.control.ruler is not defined"})),this.applyToolButtonCustomizations(),this.patchLeafletDrawBugs(),this.installPolygonFinishPatch(),this.installVertexEditSurfaceMenu(),this.map.invalidateSize(),setTimeout(()=>{var rt;try{(rt=this.map)==null||rt.invalidateSize()}catch{}},0),this.bindDrawEvents();const j=((r=(i=performance.now)==null?void 0:i.call(performance))!=null?r:Date.now())-a;this.logger.debug("init:ready",{elapsedMs:Math.round(j)});const q=this.store.bounds();(d=(l=this.options.callbacks)==null?void 0:l.onReady)==null||d.call(l,q?{bounds:q}:{})}catch(p){this._error("Failed to initialize Leaflet map",p,{code:"map_init_failed",recoverable:!1})}}async destroy(){var a,n,h,i;try{ni(this.container,null,{toolbarGroups:null}),this.map&&(this.map.off(),this.map.remove())}catch(r){this._error("Failed to remove Leaflet map",r)}try{(a=this.detachPolygonFinishPatch)==null||a.call(this)}catch{}this.detachPolygonFinishPatch=null;try{(n=this.vertexMenuCleanup)==null||n.call(this)}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null;try{(h=this.vertexEditSurfaceCleanup)==null||h.call(this)}catch{}this.vertexEditSurfaceCleanup=null;try{this.hideMoveConfirmationUI()}catch{}this.drawControl=null,this.rulerControl=null,this.measurementControl=null,this.removeMeasurementModal(),this.drawnItems=null,this.tileLayer=null;try{(i=this.activeCakeSession)==null||i.destroy()}catch{}this.activeCakeSession=null,this.map=null}async getGeoJSON(){return this.store.toFeatureCollection()}async exportGeoJSON(a={}){return dr(await this.getGeoJSON(),a)}async importGeoJSON(a,n={}){var d;if(!this.map||!this.drawnItems)return[];const h=(d=n.behavior)!=null?d:"replace";h==="replace"&&await this.clearLayers();const i=cr(a),r=this.store.add(i),l=this.createGeoJSONLayers(i);return this.addGeoJSONLayersToDrawnItems(l),this.logger.debug("importGeoJSON",{behavior:h,count:i.features.length,ids:r}),n.fitToData&&await this.fitBoundsToData(),r}async loadGeoJSON(a,n=!1){await this.importGeoJSON(a,{behavior:"replace",fitToData:n})}async clearLayers(){this.drawnItems&&this.drawnItems.clearLayers(),this.store.clear()}async addFeatures(a){return this.importGeoJSON(a,{behavior:"add"})}async updateFeature(a,n){if(!this.store.has(a)){this.logger.warn("updateFeature:missing",{id:a});return}if(this.store.update(a,n),!this.drawnItems)return;this.drawnItems.eachLayer(i=>{i._fid===a&&this.drawnItems.removeLayer(i)}),this.createGeoJSONLayers({type:"FeatureCollection",features:[{...n,id:a}]}).eachLayer(i=>{i._fid=a,this.drawnItems.addLayer(i),this.installVertexContextMenu(i)})}async removeFeature(a){this.drawnItems&&this.drawnItems.eachLayer(n=>{n._fid===a&&this.drawnItems.removeLayer(n)}),this.store.remove(a)}async fitBoundsToData(a=.05){if(!this.map)return;const n=this.store.bounds();if(!n)return;const h=n,i=this.L.latLngBounds(h);if(a>0){const r=i.getSouthWest(),l=i.getNorthEast(),d=(l.lat-r.lat)*a,p=(l.lng-r.lng)*a,m=this.L.latLngBounds(this.L.latLng(r.lat-d,r.lng-p),this.L.latLng(l.lat+d,l.lng+p));this.map.fitBounds(m)}else this.map.fitBounds(i)}async fitBounds(a,n=.05){if(!this.map)return;const h=this.L.latLngBounds(a);if(n>0){const i=h.getSouthWest(),r=h.getNorthEast(),l=(r.lat-i.lat)*n,d=(r.lng-i.lng)*n,p=this.L.latLngBounds(this.L.latLng(i.lat-l,i.lng-d),this.L.latLng(r.lat+l,r.lng+d));this.map.fitBounds(p)}else this.map.fitBounds(h)}async setView(a,n,h){this.map&&this.map.setView([a,n],h!=null?h:this.map.getZoom())}setTileLayer(a,n){if(!this.map){this.logger.warn("setTileLayer called before map initialization",{urlTemplate:a.urlTemplate});return}this.logger.debug("tile-layer:switch",{urlTemplate:a.urlTemplate,attribution:a.attribution,maxZoom:a.maxZoom,subdomains:a.subdomains}),this.tileLayer&&(this.map.removeLayer(this.tileLayer),this.tileLayer=null);const h={attribution:a.attribution,minZoom:this.options.map.minZoom,maxZoom:a.maxZoom};a.subdomains!==void 0?h.subdomains=a.subdomains:a.urlTemplate.includes("{s}")&&(h.subdomains=["a","b","c"]);const i=this.L.tileLayer(a.urlTemplate,h);let r=!1;i.on("tileerror",l=>{var d;this.logger.error("tile-layer:error",{error:l}),r||(r=!0,(d=n==null?void 0:n.onTileError)==null||d.call(n,l))}),i.addTo(this.map),this.tileLayer=i}async mergeVisiblePolygons(a){if(!this.map||!this.drawnItems)return null;const h=(await this.getGeoJSON()).features.filter(d=>{const p=d.geometry;return p&&(oo(p)||no(p))});if(h.length<=1){if(h.length===1){const d=h[0].id;return d?String(d):null}return null}const i=fr(h,a==null?void 0:a.properties);if(!i)return null;const r=[];for(const d of h){const p=d.id;p&&r.push(String(p))}for(const d of r)await this.removeFeature(d);const[l]=await this.addFeatures({type:"FeatureCollection",features:[i]});return l||null}setRulerUnits(a){if(this.measurementSystem===a)return;const n=this.measurementSystem;this.measurementSystem=a,this.logger.debug("ruler:units",{system:a}),this.emitToolEvent("tool:ruler:units-changed",{previous:n,current:a}),this.syncMeasurementModalState(),this.rebuildRulerControl()}buildDrawOptions(a,n){var r;const h={polygon:a.polygon?{allowIntersection:(r=this.options.map.polygonAllowIntersection)!=null?r:!1,showArea:!0,shapeOptions:{color:"#3388ff"}}:!1,polyline:a.polyline?{shapeOptions:{color:"#3388ff"}}:!1,rectangle:a.rectangle?{shapeOptions:{color:"#3388ff"}}:!1,circle:a.circle?{shapeOptions:{color:"#3388ff"}}:!1,cake:a.cake?{shapeOptions:{color:"#8A2BE2",fillOpacity:.2}}:!1,marker:a.marker?this.buildMarkerDrawOptions():!1,move:a.move?{featureGroup:this.drawnItems}:!1};let i={featureGroup:this.drawnItems};return a.edit?a.delete===!1&&(i.remove=!1):i=!1,n?{draw:!1,edit:!1}:{draw:h,edit:i}}buildMarkerDrawOptions(){return this.markerIcon?{icon:this.markerIcon}:{}}createMarkerIcon(a){return a?this.L.icon({iconUrl:a.iconUrl,iconRetinaUrl:a.iconRetinaUrl,shadowUrl:a.shadowUrl,iconSize:a.iconSize,iconAnchor:a.iconAnchor,popupAnchor:a.popupAnchor}):null}createDefaultMarkerIcon(){var n;const a=(n=this.L.Icon)==null?void 0:n.Default;return a?new a:null}createGeoJSONLayers(a){return this.L.geoJSON(a,{pointToLayer:(n,h)=>this.markerIcon?this.L.marker(h,{icon:this.markerIcon}):this.L.marker(h),onEachFeature:(n,h)=>{const i=xe(n);i&&(h._fid=i)}})}addGeoJSONLayersToDrawnItems(a){this.drawnItems&&a.eachLayer(n=>{this.drawnItems.addLayer(n),this.installVertexContextMenu(n)})}restoreVisibleLayersFromStore(){if(!this.drawnItems)return;const a=this.store.toFeatureCollection();if(a.features.length===0)return;const n=this.createGeoJSONLayers(a);this.addGeoJSONLayersToDrawnItems(n)}syncDrawMarkerOptions(){var h,i,r,l;const a=this.drawControl;if(!a)return;const n=this.buildMarkerDrawOptions();(h=a.options)!=null||(a.options={}),(r=(i=a.options).draw)!=null||(i.draw={}),a.options.draw.marker=n,(l=a.setDrawingOptions)==null||l.call(a,{marker:n})}reapplyMarkerIconsToExistingLayers(){if(!this.drawnItems)return;const a=this.markerIcon?null:this.createDefaultMarkerIcon();this.drawnItems.eachLayer(n=>{if(!(typeof(n==null?void 0:n.setIcon)!="function"||typeof(n==null?void 0:n.getLatLng)!="function")){if(this.markerIcon){n.setIcon(this.markerIcon);return}a&&n.setIcon(a)}})}applyToolButtonCustomizations(){ni(this.container,this.toolButtonConfig,{toolbarGroups:this.toolbarGroups,onTrigger:(a,n)=>{if(n.activate){this.activateTool(a,{source:n.source,groupId:n.groupId});return}this.emitToolTrigger({tool:a,source:n.source,groupId:n.groupId,handled:!0})}}),setTimeout(()=>{ni(this.container,this.toolButtonConfig,{toolbarGroups:this.toolbarGroups,onTrigger:(a,n)=>{if(n.activate){this.activateTool(a,{source:n.source,groupId:n.groupId});return}this.emitToolTrigger({tool:a,source:n.source,groupId:n.groupId,handled:!0})}})},0)}emitToolTrigger(a){var n,h;(h=(n=this.options.callbacks)==null?void 0:n.onToolTrigger)==null||h.call(n,{...a,timestamp:Date.now()})}findLeafletDrawHandler(a){var l,d,p,m,_,y,w,T,E,A;const n={polygon:"polygon",polyline:"polyline",rectangle:"rectangle",circle:"circle",marker:"marker",layerCake:"cake",move:"move"},h={edit:"edit",delete:"remove"},i=n[a];if(i)return(_=(m=(p=(d=(l=this.drawControl)==null?void 0:l._toolbars)==null?void 0:d.draw)==null?void 0:p._modes)==null?void 0:m[i])==null?void 0:_.handler;const r=h[a];return r?(A=(E=(T=(w=(y=this.drawControl)==null?void 0:y._toolbars)==null?void 0:w.edit)==null?void 0:T._modes)==null?void 0:E[r])==null?void 0:A.handler:null}disableActiveToolHandlers(){var n;const a=(n=this.drawControl)==null?void 0:n._toolbars;a&&Object.values(a).forEach(h=>{var i;Object.values((i=h==null?void 0:h._modes)!=null?i:{}).forEach(r=>{const l=r==null?void 0:r.handler;l&&typeof l.disable=="function"&&l.disable()})})}triggerRulerTool(){const a=this.rulerControl;if(typeof(a==null?void 0:a._toggleMeasure)=="function")return a._toggleMeasure(),!0;const n=this.container.querySelector(".leaflet-ruler");return n?(n.click(),!0):!1}applyLayerCakeToolbarIcon(){if(!this.container)return;const a=()=>{const n=this.container.querySelector("a.leaflet-draw-draw-cake");if(!n)return;n.style.setProperty("background-image","none","important"),n.style.setProperty("background-color","#fff","important"),n.style.setProperty("position","relative","important");let h=n.querySelector(".leaflet-geokit-cake-icon");h||(h=document.createElement("span"),h.className="leaflet-geokit-cake-icon",h.setAttribute("aria-hidden","true"),n.appendChild(h)),h.style.setProperty("position","absolute","important"),h.style.setProperty("display","block","important"),h.style.setProperty("left","50%","important"),h.style.setProperty("top","50%","important"),h.style.setProperty("width","18px","important"),h.style.setProperty("height","18px","important"),h.style.setProperty("transform","translate(-50%, -50%)","important"),h.style.setProperty("pointer-events","none","important"),h.firstElementChild||(h.innerHTML=Kr);const i=h.firstElementChild;i&&(i.style.setProperty("width","100%","important"),i.style.setProperty("height","100%","important"),i.style.setProperty("display","block","important"))};a(),setTimeout(a,0)}applyMoveToolbarIcon(){if(!this.container)return;const a=()=>{const n=this.container.querySelector("a.leaflet-draw-draw-move");if(!n)return;n.style.setProperty("background-image","none","important"),n.style.setProperty("background-color","#fff","important"),n.style.setProperty("position","relative","important");let h=n.querySelector(".leaflet-geokit-move-icon");h||(h=document.createElement("span"),h.className="leaflet-geokit-move-icon",h.setAttribute("aria-hidden","true"),n.appendChild(h)),h.style.setProperty("position","absolute","important"),h.style.setProperty("display","block","important"),h.style.setProperty("left","50%","important"),h.style.setProperty("top","50%","important"),h.style.setProperty("width","18px","important"),h.style.setProperty("height","18px","important"),h.style.setProperty("transform","translate(-50%, -50%)","important"),h.style.setProperty("pointer-events","none","important"),h.firstElementChild||(h.innerHTML=Xr);const i=h.firstElementChild;i&&(i.style.setProperty("width","100%","important"),i.style.setProperty("height","100%","important"),i.style.setProperty("display","block","important"))};a(),setTimeout(a,0)}addRulerControl(){if(!this.map)return;this.installRulerPrecisionPatch();const a=sa(this.measurementSystem);this.rulerControl=this.L.control.ruler(a),this.map.addControl(this.rulerControl)}installRulerPrecisionPatch(){if(go)return;const a=this.L.Control.Ruler;if(!a||typeof a!="function")return;const n=a.prototype,h=n._calculateBearingAndDistance;if(typeof h!="function")return;const i=this.logger;n._calculateBearingAndDistance=function(){var l,d,p;h.call(this);try{const m=this._clickedLatLong,_=(l=this._movingLatLong)!=null?l:this._clickedLatLong;if(!m||!_)return;const{meters:y,bearingDegrees:w}=ea(m.lat,m.lng,_.lat,_.lng),T=y/1e3,E=typeof((p=(d=this.options)==null?void 0:d.lengthUnit)==null?void 0:p.factor)=="number"?this.options.lengthUnit.factor:1,A=di(T*E);this._result=this._result||{},this._result.Distance=A,this._result.Bearing=w,this._result.meters=y}catch(m){i==null||i.warn("ruler:precision-patch",m)}},go=!0}rebuildRulerControl(){if(!(!this.map||!this.options.controls.ruler)){if(this.rulerControl){try{this.map.removeControl(this.rulerControl)}catch(a){this.logger.warn("ruler:remove-failed",a)}this.rulerControl=null}this.addRulerControl()}}installMeasurementSettingsControl(){if(!this.map||this.measurementControl)return;const a=this,n=this.L.Control.extend({options:{position:"topleft"},onAdd(){const h=a.L.DomUtil.create("div","leaflet-bar leaflet-ruler-settings-control"),i=a.L.DomUtil.create("button","leaflet-ruler-settings-button",h);return i.type="button",i.title="Measurement settings",i.setAttribute("aria-label","Measurement settings"),i.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation(),a.toggleMeasurementModal(!0)}),a.L.DomEvent.disableClickPropagation(h),a.L.DomEvent.disableScrollPropagation(h),h}});this.measurementControl=new n,this.map.addControl(this.measurementControl)}ensureMeasurementModal(){if(this.measurementModalOverlay)return this.measurementModalOverlay;if(typeof document=="undefined")throw new Error("Measurement modal requires a browser environment");const a=document.createElement("div");a.className="leaflet-ruler-modal-overlay",a.setAttribute("aria-hidden","true");const n=document.createElement("div");n.className="leaflet-ruler-modal",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.tabIndex=-1,a.addEventListener("click",p=>{p.target===a&&this.toggleMeasurementModal(!1)});const h=document.createElement("h2");h.className="leaflet-ruler-modal-title",h.textContent="Measurement Units",n.appendChild(h);const i=document.createElement("p");i.className="leaflet-ruler-modal-description",i.textContent="Choose how the measurement tool reports distances.",n.appendChild(i);const r=document.createElement("div");r.className="leaflet-ruler-modal-options",n.appendChild(r),["metric","imperial"].forEach(p=>{const m=document.createElement("label");m.className="leaflet-ruler-modal-option";const _=document.createElement("input");_.type="radio",_.name="leaflet-ruler-units",_.value=p,_.addEventListener("change",()=>{_.checked&&this.setRulerUnits(p)});const y=document.createElement("span");y.textContent=la[p],m.appendChild(_),m.appendChild(y),r.appendChild(m),this.measurementModalRadios[p]=_});const l=document.createElement("div");l.className="leaflet-ruler-modal-actions";const d=document.createElement("button");return d.type="button",d.className="leaflet-ruler-modal-close",d.textContent="Close",d.addEventListener("click",()=>this.toggleMeasurementModal(!1)),l.appendChild(d),n.appendChild(l),a.appendChild(n),this.container.appendChild(a),this.measurementModalOverlay=a,this.measurementModalDialog=n,this.syncMeasurementModalState(),a}toggleMeasurementModal(a){var h;if(!a){this.measurementModalOverlay&&(this.measurementModalOverlay.classList.remove("is-open"),this.measurementModalOverlay.setAttribute("aria-hidden","true")),this.detachMeasurementModalKeydown();return}const n=this.ensureMeasurementModal();n.classList.add("is-open"),n.setAttribute("aria-hidden","false"),this.syncMeasurementModalState(),this.attachMeasurementModalKeydown(),(h=this.measurementModalDialog)==null||h.focus()}syncMeasurementModalState(){for(const[a,n]of Object.entries(this.measurementModalRadios))n&&(n.checked=a===this.measurementSystem)}removeMeasurementModal(){this.measurementModalOverlay&&this.measurementModalOverlay.remove(),this.measurementModalOverlay=null,this.measurementModalDialog=null,this.measurementModalRadios={},this.detachMeasurementModalKeydown()}attachMeasurementModalKeydown(){this.measurementModalKeydownHandler||typeof document=="undefined"||(this.measurementModalKeydownHandler=a=>{a.key==="Escape"&&this.toggleMeasurementModal(!1)},document.addEventListener("keydown",this.measurementModalKeydownHandler))}detachMeasurementModalKeydown(){!this.measurementModalKeydownHandler||typeof document=="undefined"||(document.removeEventListener("keydown",this.measurementModalKeydownHandler),this.measurementModalKeydownHandler=null)}installPolygonFinishPatch(){var l,d,p,m,_;if(!this.map||!this.drawControl)return;try{(l=this.detachPolygonFinishPatch)==null||l.call(this)}catch{}this.detachPolygonFinishPatch=null;const a=this.map,n=(p=(d=this.drawControl)==null?void 0:d._toolbars)==null?void 0:p.draw;if(!n||!!!((_=(m=n._modes)==null?void 0:m.polygon)!=null&&_.handler))return;const i=10,r=y=>{var w,T,E,A,N,F,P,I;try{const G=(T=(w=n._modes)==null?void 0:w.polygon)==null?void 0:T.handler;if(!G||!G._enabled)return;const j=G._markers;if(!Array.isArray(j)||j.length<3)return;const q=(A=(E=j[0])==null?void 0:E.getLatLng)==null?void 0:A.call(E);if(!q)return;const rt=a.latLngToContainerPoint(q),at=a.latLngToContainerPoint(y.latlng);Math.hypot(rt.x-at.x,rt.y-at.y)<=i&&typeof G._finishShape=="function"&&((F=(N=y.originalEvent)==null?void 0:N.preventDefault)==null||F.call(N),(I=(P=y.originalEvent)==null?void 0:P.stopPropagation)==null||I.call(P),G._finishShape())}catch(G){this._error("polygon-finish-patch",G)}};a.on("click",r),this.detachPolygonFinishPatch=()=>{try{a.off("click",r)}catch{}}}patchLeafletDrawBugs(){var a,n,h,i,r;try{const l=this.L,d=l.GeometryUtil;if(!d)return;const p={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2},m=(n=(a=d.formattedNumber)==null?void 0:a.bind(d))!=null?n:((_,y)=>Number(_).toFixed(y));d.readableArea=(_,y,w)=>{var A;const T=(A=l.Util)!=null&&A.extend?l.Util.extend({},p,w||{}):{...p,...w||{}};let E;if(y){let N=["ha","m"];const F=typeof y;F==="string"?N=[y]:F!=="boolean"&&(N=Array.isArray(y)?y:N),_>=1e6&&N.indexOf("km")!==-1?E=`${m(1e-6*_,T.km)} km²`:_>=1e4&&N.indexOf("ha")!==-1?E=`${m(1e-4*_,T.ha)} ha`:E=`${m(_,T.m)} m²`}else _=_/.836127,_>=3097600?E=`${m(_/3097600,T.mi)} mi²`:_>=4840?E=`${m(_/4840,T.ac)} acres`:E=`${m(_,T.yd)} yd²`;return E}}catch(l){this.logger.warn("leaflet-draw-patch:readableArea",l)}try{const l=this.L,d=(h=l.Edit)==null?void 0:h.Circle,p=(i=l.Draw)==null?void 0:i.Event,m=l.GeometryUtil;if(!((r=d==null?void 0:d.prototype)!=null&&r._resize)||!p||!m)return;d.prototype._resize=function(y){var E,A,N;const w=this._moveMarker.getLatLng(),T=m.isVersion07x()?w.distanceTo(y):this._map.distance(w,y);this._shape.setRadius(T);try{(E=this._map)!=null&&E.editTooltip&&((N=(A=this._map)==null?void 0:A._editTooltip)!=null&&N.updateContent)&&this._map._editTooltip.updateContent({text:l.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+l.drawLocal.edit.handlers.edit.tooltip.text,subtext:l.drawLocal.draw.handlers.circle.radius+": "+m.readableDistance(T,!0,this.options.feet,this.options.nautic)})}catch{}this._map.fire(p.EDITRESIZE,{layer:this._shape})}}catch(l){this.logger.warn("leaflet-draw-patch:circle-resize",l)}}bindDrawEvents(){!this.map||!this.drawnItems||(this.map.on(this.L.Draw.Event.CREATED,a=>{var n,h,i;try{const{layer:r,layerType:l}=a;if(l===Ee.TYPE){try{(n=this.activeCakeSession)==null||n.destroy()}catch{}this.activeCakeSession=new Yr(this.map,r,y=>{if(!this.drawnItems)return;const w=this.store.add(y),T=this.L.geoJSON(y);let E=0;T.eachLayer(A=>{var F,P,I;const N=(F=w[E])!=null?F:w[w.length-1];A._fid=N,this.drawnItems.addLayer(A),this.installVertexContextMenu(A),(I=(P=this.options.callbacks)==null?void 0:P.onCreated)==null||I.call(P,{id:N,layerType:"polygon",geoJSON:A.toGeoJSON()}),E++}),this.activeCakeSession=null,this.emitToolEvent("tool:layer-cake:saved",{featureCollection:y})},this.measurementSystem),this.emitToolEvent("tool:layer-cake:session-started",{center:r.getLatLng(),radius:r.getRadius()});return}this.drawnItems.addLayer(r);const d=r.toGeoJSON(),m=this.store.add({type:"FeatureCollection",features:[d]})[0];r._fid=m,this.installVertexContextMenu(r),(i=(h=this.options.callbacks)==null?void 0:h.onCreated)==null||i.call(h,{id:m,layerType:l,geoJSON:d});const _=ha[l];_&&this.emitToolEvent(_,{id:m,geoJSON:d})}catch(r){this._error("onCreated handler failed",r)}}),this.map.on(this.L.Draw.Event.EDITED,a=>{var n,h;try{const i=[];a.layers.eachLayer(d=>{const p=d.toGeoJSON(),m=d._fid;if(m)this.store.update(m,p),i.push(m);else{const _=this.store.add({type:"FeatureCollection",features:[p]})[0];d._fid=_,i.push(_)}});const l=this.store.toFeatureCollection();(h=(n=this.options.callbacks)==null?void 0:n.onEdited)==null||h.call(n,{ids:i,geoJSON:l}),this.emitToolEvent("tool:edit:applied",{ids:i,geoJSON:l})}catch(i){this._error("onEdited handler failed",i)}}),this.map.on(this.L.Draw.Event.DELETED,a=>{var n,h;try{const i=[];a.layers.eachLayer(d=>{const p=d._fid;p&&(i.push(p),this.store.remove(p))});const l=this.store.toFeatureCollection();(h=(n=this.options.callbacks)==null?void 0:n.onDeleted)==null||h.call(n,{ids:i,geoJSON:l}),this.emitToolEvent("tool:delete:applied",{ids:i,geoJSON:l})}catch(i){this._error("onDeleted handler failed",i)}}),this.map.on("draw:moveend",a=>{var n;try{this.emitToolEvent("tool:move:pending",{layerId:(n=a==null?void 0:a.layer)==null?void 0:n._fid,originalGeoJSON:a==null?void 0:a.originalGeoJSON,newGeoJSON:a==null?void 0:a.newGeoJSON}),this.showMoveConfirmationUI(a.layer)}catch(h){this._error("draw:moveend handler failed",h)}}),this.map.on("draw:moveconfirmed",a=>{var n,h,i;try{this.emitToolEvent("tool:move:confirmed",{layerId:(n=a==null?void 0:a.layer)==null?void 0:n._fid,originalGeoJSON:a==null?void 0:a.originalGeoJSON,newGeoJSON:a==null?void 0:a.newGeoJSON});const r=a.layer,l=r._fid;if(l){const d=r.toGeoJSON();this.store.update(l,d),(i=(h=this.options.callbacks)==null?void 0:h.onEdited)==null||i.call(h,{ids:[l],geoJSON:this.store.toFeatureCollection()})}this.hideMoveConfirmationUI()}catch(r){this._error("draw:moveconfirmed handler failed",r)}}))}_error(a,n,h){var r,l,d,p;const i={code:(r=h==null?void 0:h.code)!=null?r:"controller_error",message:a,recoverable:(l=h==null?void 0:h.recoverable)!=null?l:!0,cause:n,timestamp:Date.now()};this.logger.error("error",i),(p=(d=this.options.callbacks)==null?void 0:d.onError)==null||p.call(d,i)}installVertexEditSurfaceMenu(){var i;if(!this.map)return;try{(i=this.vertexEditSurfaceCleanup)==null||i.call(this)}catch{}const a=this.map.getContainer(),n=r=>{this.openNearestEditableVertexMenuFromDomEvent(r)},h=r=>{(r.ctrlKey||r.metaKey)&&this.openNearestEditableVertexMenuFromDomEvent(r)};a.addEventListener("contextmenu",n,{capture:!0}),a.addEventListener("click",h,{capture:!0}),this.vertexEditSurfaceCleanup=()=>{a.removeEventListener("contextmenu",n,{capture:!0}),a.removeEventListener("click",h,{capture:!0})}}openNearestEditableVertexMenuFromDomEvent(a){try{if(!this.map||!this.drawnItems)return;const n=this.map.mouseEventToContainerPoint(a),h=this.map.containerPointToLatLng(n);let i=null;if(this.drawnItems.eachLayer(r=>{if(i)return;const l=r.editing;if(!(l&&typeof l.enabled=="function"&&l.enabled()))return;const p=this.findNearestVertex(r,h,16);p&&(i={layer:r,...p})}),!i)return;a.preventDefault(),a.stopPropagation(),this.showVertexMenu(n,async()=>{await this.deleteVertex(i.layer,i.pathIndex,i.vertexIndex)})}catch(n){this._error("openNearestEditableVertexMenuFromDomEvent",n)}}installVertexContextMenu(a){if(!a||typeof a.on!="function")return;const n=i=>{var r,l,d,p;try{(l=(r=i==null?void 0:i.originalEvent)==null?void 0:r.preventDefault)==null||l.call(r),(p=(d=i==null?void 0:i.originalEvent)==null?void 0:d.stopPropagation)==null||p.call(d)}catch{}this.openVertexMenu(a,i)},h=i=>{const r=i==null?void 0:i.originalEvent;r&&(r.ctrlKey||r.metaKey)&&this.openVertexMenu(a,i)};try{a.on("contextmenu",n),a.on("click",h)}catch{}}openVertexMenu(a,n){try{if(!this.map||!(typeof a.getLatLngs=="function"&&(a instanceof this.L.Polygon||a instanceof this.L.Polyline)))return;const i=a.editing;if(!i||typeof i.enabled!="function"||!i.enabled())return;const r=n==null?void 0:n.latlng,l=this.map.latLngToContainerPoint(r),d=this.findNearestVertex(a,r,12);if(!d)return;this.showVertexMenu(l,async()=>{await this.deleteVertex(a,d.pathIndex,d.vertexIndex)})}catch(h){this._error("openVertexMenu",h)}}showVertexMenu(a,n){var h;try{try{(h=this.vertexMenuCleanup)==null||h.call(this)}catch{}if(this.vertexMenuCleanup=null,!this.container)return;const i=document.createElement("div");i.style.position="absolute",i.style.top=`${a.y}px`,i.style.left=`${a.x}px`,i.style.transform="translate(-50%, -100%)",i.style.background="#fff",i.style.border="1px solid rgba(0,0,0,0.15)",i.style.borderRadius="6px",i.style.boxShadow="0 4px 12px rgba(0,0,0,0.15)",i.style.padding="6px",i.style.zIndex="10000",i.style.fontSize="12px",i.style.userSelect="none";const r=document.createElement("button");r.textContent="Delete vertex",r.style.padding="6px 10px",r.style.border="none",r.style.background="#da1e28",r.style.color="#fff",r.style.borderRadius="4px",r.style.cursor="pointer",r.addEventListener("click",p=>{p.stopPropagation(),p.preventDefault();try{n()}finally{l()}}),i.appendChild(r);const l=()=>{try{window.removeEventListener("pointerdown",d),this.container.removeEventListener("scroll",l,!0),i.remove()}catch{}this.vertexMenuEl=null,this.vertexMenuCleanup=null},d=p=>{!(typeof p.composedPath=="function"?p.composedPath():[]).includes(i)&&!i.contains(p.target)&&l()};window.addEventListener("pointerdown",d,{capture:!0}),this.container.addEventListener("scroll",l,!0),this.container.appendChild(i),this.vertexMenuEl=i,this.vertexMenuCleanup=l}catch(i){this._error("showVertexMenu",i)}}findNearestVertex(a,n,h){if(!this.map)return null;const i=w=>this.map.latLngToContainerPoint(w),r=(w,T)=>Math.hypot(w.x-T.x,w.y-T.y),l=i(n);let d=1/0,p=-1,m=-1;const _=a.getLatLngs();return(Array.isArray(_[0])?_:[_]).forEach((w,T)=>{w.forEach((E,A)=>{const N=i(E),F=r(N,l);F<d&&(d=F,p=T,m=A)})}),p===-1||d>h?null:{pathIndex:p,vertexIndex:m}}async deleteVertex(a,n,h){var i,r,l;try{if(!(typeof a.getLatLngs=="function"&&(a instanceof this.L.Polygon||a instanceof this.L.Polyline)))return;const p=a.getLatLngs(),m=Array.isArray(p[0])?p:[p],_=m[n];if(!_)return;const w=a instanceof this.L.Polygon?3:2;if(_.length<=w)return;if(_.splice(h,1),m.length===1)a.setLatLngs(_);else{const E=m.map((A,N)=>N===n?_:A);a.setLatLngs(E)}(i=a.redraw)==null||i.call(a);const T=a._fid;if(T){const E=a.toGeoJSON();this.store.update(T,E),(l=(r=this.options.callbacks)==null?void 0:r.onEdited)==null||l.call(r,{ids:[T],geoJSON:this.store.toFeatureCollection()})}}catch(d){this._error("deleteVertex",d)}}showMoveConfirmationUI(a){var n,h;try{if(this.hideMoveConfirmationUI(),!this.container||!this.map)return;const i=this.drawControl;if(!i)return;const r=(n=i==null?void 0:i._toolbars)==null?void 0:n.draw;if(!r)return;const l=r._modes||{};let d=null;for(const y in l){const w=l[y];if(((h=w==null?void 0:w.handler)==null?void 0:h.type)==="move"){d=w.handler;break}}this.activeMoveHandler=d;const p=document.createElement("div");p.style.position="absolute",p.style.bottom="60px",p.style.left="50%",p.style.transform="translateX(-50%)",p.style.display="flex",p.style.gap="8px",p.style.background="#fff",p.style.border="2px solid #3388ff",p.style.borderRadius="8px",p.style.padding="12px 16px",p.style.boxShadow="0 4px 12px rgba(0,0,0,0.2)",p.style.zIndex="10000",p.style.fontSize="14px",p.style.fontFamily="system-ui, sans-serif";const m=document.createElement("button");m.textContent="✓ Save",m.style.padding="8px 16px",m.style.border="none",m.style.background="#28a745",m.style.color="#fff",m.style.borderRadius="4px",m.style.cursor="pointer",m.style.fontWeight="600",m.style.fontSize="14px",m.addEventListener("click",y=>{y.stopPropagation(),y.preventDefault(),d!=null&&d.confirmMove&&d.confirmMove()});const _=document.createElement("button");_.textContent="✕ Cancel",_.style.padding="8px 16px",_.style.border="1px solid #ccc",_.style.background="#fff",_.style.color="#333",_.style.borderRadius="4px",_.style.cursor="pointer",_.style.fontWeight="600",_.style.fontSize="14px",_.addEventListener("click",y=>{y.stopPropagation(),y.preventDefault(),this.emitToolEvent("tool:move:cancelled",{layerId:a==null?void 0:a._fid}),d!=null&&d.cancelMove&&d.cancelMove(),this.hideMoveConfirmationUI()}),p.appendChild(m),p.appendChild(_),this.container.appendChild(p),this.moveConfirmationUI=p,this.logger.debug("showMoveConfirmationUI",{layerId:a._fid})}catch(i){this._error("showMoveConfirmationUI",i)}}hideMoveConfirmationUI(){try{this.moveConfirmationUI&&(this.moveConfirmationUI.remove(),this.moveConfirmationUI=null),this.activeMoveHandler=null}catch(a){this._error("hideMoveConfirmationUI",a)}}}const _o=[25,41],vo=[12,41],yo=[1,-34];function Vt(u,a){var h,i,r,l;if(u==null)return null;const n=typeof u=="string"?u.trim():"";if(!n)return(h=a.reportError)==null||h.call(a,a.errorMessage,a.cause),null;try{return new URL(n,(i=a.baseUrl)!=null?i:document.baseURI).toString()}catch(d){return(l=a.reportError)==null||l.call(a,a.errorMessage,(r=a.cause)!=null?r:d),null}}function fi(u,a,n){var p,m;if(u==null)return[...a];if(!Array.isArray(u)||u.length!==2)return(p=n.reportError)==null||p.call(n,n.errorMessage,n.cause),[...a];const[h,i]=u,r=Number(h),l=Number(i);return Number.isFinite(r)&&Number.isFinite(l)&&(!n.positiveOnly||r>0&&l>0)?[r,l]:((m=n.reportError)==null||m.call(n,n.errorMessage,n.cause),[...a])}function pi(u,a,n){var p,m,_,y,w;if(u==null)return[...a];const h=typeof u=="string"?u.trim():"";if(!h)return(p=n.reportError)==null||p.call(n,n.errorMessage,n.cause),[...a];const i=h.split(",");if(i.length!==2)return(m=n.reportError)==null||m.call(n,n.errorMessage,n.cause),[...a];const r=Number((_=i[0])==null?void 0:_.trim()),l=Number((y=i[1])==null?void 0:y.trim());return Number.isFinite(r)&&Number.isFinite(l)&&(!n.positiveOnly||r>0&&l>0)?[r,l]:((w=n.reportError)==null||w.call(n,n.errorMessage,n.cause),[...a])}function da(u,a={}){var r,l;if(!u||typeof u!="object")return null;const n=Vt(u.iconUrl,{...a,errorMessage:"Invalid marker icon config: iconUrl must be a valid URL",cause:{field:"iconUrl",value:u.iconUrl}});if(!n)return null;const h=(r=Vt(u.iconRetinaUrl,{...a,errorMessage:"Invalid marker icon config: iconRetinaUrl must be a valid URL",cause:{field:"iconRetinaUrl",value:u.iconRetinaUrl}}))!=null?r:n,i=(l=Vt(u.shadowUrl,{...a,errorMessage:"Invalid marker icon config: shadowUrl must be a valid URL",cause:{field:"shadowUrl",value:u.shadowUrl}}))!=null?l:void 0;return{iconUrl:n,iconRetinaUrl:h,shadowUrl:i,iconSize:fi(u.iconSize,_o,{...a,positiveOnly:!0,errorMessage:"Invalid marker icon config: iconSize must be a [width, height] tuple of positive finite numbers",cause:{field:"iconSize",value:u.iconSize}}),iconAnchor:fi(u.iconAnchor,vo,{...a,errorMessage:"Invalid marker icon config: iconAnchor must be a [x, y] tuple of finite numbers",cause:{field:"iconAnchor",value:u.iconAnchor}}),popupAnchor:fi(u.popupAnchor,yo,{...a,errorMessage:"Invalid marker icon config: popupAnchor must be a [x, y] tuple of finite numbers",cause:{field:"popupAnchor",value:u.popupAnchor}})}}function ua(u,a={}){var r,l;const n=Vt(u.iconUrl,{...a,errorMessage:'Invalid "marker-icon-url" attribute; falling back to default markers',cause:{attribute:"marker-icon-url",value:u.iconUrl}});if(!n)return null;const h=(r=Vt(u.iconRetinaUrl,{...a,errorMessage:'Invalid "marker-icon-retina-url" attribute; using "marker-icon-url" instead',cause:{attribute:"marker-icon-retina-url",value:u.iconRetinaUrl}}))!=null?r:n,i=(l=Vt(u.shadowUrl,{...a,errorMessage:'Invalid "marker-shadow-url" attribute; dropping the custom marker shadow',cause:{attribute:"marker-shadow-url",value:u.shadowUrl}}))!=null?l:void 0;return{iconUrl:n,iconRetinaUrl:h,shadowUrl:i,iconSize:pi(u.iconSize,_o,{...a,positiveOnly:!0,errorMessage:'Invalid "marker-icon-size" attribute; using the default marker size',cause:{attribute:"marker-icon-size",value:u.iconSize}}),iconAnchor:pi(u.iconAnchor,vo,{...a,errorMessage:'Invalid "marker-icon-anchor" attribute; using the default marker anchor',cause:{attribute:"marker-icon-anchor",value:u.iconAnchor}}),popupAnchor:pi(u.popupAnchor,yo,{...a,errorMessage:'Invalid "marker-popup-anchor" attribute; using the default popup anchor',cause:{attribute:"marker-popup-anchor",value:u.popupAnchor}})}}const It={osm:{urlTemplate:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:19,subdomains:["a","b","c"]},here:{styles:{"lite.day":"lite.day","normal.day":"normal.day","satellite.day":"satellite.day"},defaultStyle:"lite.day",attribution:'Map Tiles © <a href="https://www.here.com">HERE</a>',maxZoom:20}};function Lo(u){return typeof u=="string"?u.trim().toLowerCase():""}function bo(u){if(typeof u!="string")return;const a=u.trim();return a.length>0?a:void 0}function fa(u){const{style:a,attribution:n}=u,h=Lo(u.provider),i=bo(u.apiKey);switch(h){case"osm":return{urlTemplate:It.osm.urlTemplate,attribution:n||It.osm.attribution,maxZoom:It.osm.maxZoom,subdomains:[...It.osm.subdomains]};case"here":{if(!i)throw new Error("HERE Maps requires an API key");const r=typeof a=="string"?a.trim():"",l=r&&r in It.here.styles?r:It.here.defaultStyle;return{urlTemplate:`https://maps.hereapi.com/v3/base/mc/{z}/{x}/{y}/png8?style=${encodeURIComponent(l)}&apiKey=${encodeURIComponent(i)}`,attribution:n||It.here.attribution,maxZoom:It.here.maxZoom,subdomains:void 0}}default:throw new Error(`Unknown tile provider: ${u.provider}`)}}function pa(u){const a=Lo(u.provider),n=bo(u.apiKey);return a?a==="here"&&!n?{valid:!1,error:"HERE Maps requires an API key"}:{valid:!0}:{valid:!1,error:"Provider is required"}}class mi extends HTMLElement{constructor(){super();k(this,"_root");k(this,"_container");k(this,"_logger",be("component:leaflet-geokit","debug"));k(this,"_latitude",0);k(this,"_longitude",0);k(this,"_zoom",2);k(this,"_minZoom");k(this,"_maxZoom");k(this,"_tileUrl","https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png");k(this,"_tileAttribution");k(this,"_tileProvider");k(this,"_tileStyle");k(this,"_apiKey");k(this,"_activeTileProvider","tile-url");k(this,"_readOnly",!1);k(this,"_logLevel","debug");k(this,"_devOverlay",!1);k(this,"_polygonAllowIntersection",!1);k(this,"_preferCanvas",!0);k(this,"_themeUrl");k(this,"_themeCss","");k(this,"_themeLinkEl",null);k(this,"_themeStyleEl",null);k(this,"_controller",null);k(this,"_useExternalLeaflet",!1);k(this,"_skipLeafletStyles",!1);k(this,"_leafletInstance");k(this,"_toolHooks");k(this,"_toolEventEmitter");k(this,"_markerIconConfig");k(this,"_toolButtonConfig");k(this,"_toolbarGroups");k(this,"_status",{state:"uninitialized",ready:!1,busy:!1,featureCount:0,timestamp:Date.now()});k(this,"_externalToolTriggerListener",n=>{var i,r;const h=n.detail;if((h==null?void 0:h.action)==="deactivate"||(h==null?void 0:h.active)===!1){this.deactivateTool({source:(i=h.source)!=null?i:"event",groupId:h.groupId});return}h!=null&&h.tool&&this.activateTool(h.tool,{source:(r=h.source)!=null?r:"event",groupId:h.groupId})});k(this,"_externalToolDeactivateListener",n=>{var i;const h=n.detail;this.deactivateTool({source:(i=h==null?void 0:h.source)!=null?i:"event",groupId:h==null?void 0:h.groupId})});this._root=this.attachShadow({mode:"open"}),this._root.innerHTML=`
|
|
242
290
|
<style>
|
|
243
291
|
:host {
|
|
244
292
|
display: block;
|
|
@@ -251,5 +299,5 @@ ${Nn}
|
|
|
251
299
|
}
|
|
252
300
|
</style>
|
|
253
301
|
<div class="map-container" part="map"></div>
|
|
254
|
-
`;const n=this._root.querySelector(".map-container");if(!(n instanceof HTMLDivElement))throw new Error("Failed to initialize map container");this._container=n;const h=this.getAttribute("log-level");h&&(this._logLevel=h,this._logger.setLevel(h))}_controlsFromAttributes(){return{polygon:this.hasAttribute("draw-polygon"),polyline:this.hasAttribute("draw-polyline"),rectangle:this.hasAttribute("draw-rectangle"),circle:this.hasAttribute("draw-circle"),cake:this.hasAttribute("draw-layer-cake"),marker:this.hasAttribute("draw-marker"),move:this.hasAttribute("draw-move"),edit:this.hasAttribute("edit-features"),delete:this.hasAttribute("delete-features"),ruler:this.hasAttribute("draw-ruler")}}_mapConfig(){return{latitude:this._latitude,longitude:this._longitude,zoom:this._zoom,minZoom:this._minZoom,maxZoom:this._maxZoom,tileUrl:this._tileUrl,tileAttribution:this._tileAttribution,readOnly:this._readOnly,fitToDataOnLoad:!1,logLevel:this._logLevel,devOverlay:this._devOverlay,polygonAllowIntersection:this._polygonAllowIntersection,preferCanvas:this._preferCanvas,useExternalLeaflet:this._useExternalLeaflet,skipLeafletStyles:this._skipLeafletStyles}}async connectedCallback(){var n;this._logger.debug("connectedCallback",this._currentConfig()),Jn({root:this._root,skipStyles:this._skipLeafletStyles}),this._applyThemeStyles(),this._controller=new ts({container:this._container,map:this._mapConfig(),controls:this._controlsFromAttributes(),readOnly:this._readOnly,logger:this._logger.child("controller"),callbacks:{onReady:h=>{this.dispatchEvent(new CustomEvent("leaflet-draw:ready",{detail:h}))},onCreated:h=>{this.dispatchEvent(new CustomEvent("leaflet-draw:created",{detail:h}))},onEdited:h=>{this.dispatchEvent(new CustomEvent("leaflet-draw:edited",{detail:h}))},onDeleted:h=>{this.dispatchEvent(new CustomEvent("leaflet-draw:deleted",{detail:h}))},onError:h=>{this.dispatchEvent(new CustomEvent("leaflet-draw:error",{detail:h}))},onTileError:h=>{if(this._tileProvider)return;const i=this._describeTileLayerError(h,"tile-url");this._handleTileProviderError("tile_load_failed",i,"tile-url")},onToolTrigger:h=>{this._emitToolTriggerResult(h)}},leaflet:(n=this._leafletInstance)!=null?n:void 0,useExternalLeaflet:this._useExternalLeaflet,toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter,markerIconConfig:this._effectiveMarkerIconConfig(),toolButtonConfig:this._effectiveToolButtonConfig(),toolbarGroups:this._effectiveToolbarGroups()}),this.addEventListener("leaflet-geokit:trigger-tool",this._externalToolTriggerListener),this.addEventListener("leaflet-geokit:activate-tool",this._externalToolTriggerListener),this.addEventListener("leaflet-geokit:deactivate-tool",this._externalToolDeactivateListener),await this._controller.init(),this._tileProvider&&this._updateTileLayer()}async disconnectedCallback(){this._logger.debug("disconnectedCallback"),this._controller&&(await this._controller.destroy(),this._controller=null),this.removeEventListener("leaflet-geokit:trigger-tool",this._externalToolTriggerListener),this.removeEventListener("leaflet-geokit:activate-tool",this._externalToolTriggerListener),this.removeEventListener("leaflet-geokit:deactivate-tool",this._externalToolDeactivateListener)}static get observedAttributes(){return["latitude","longitude","zoom","min-zoom","max-zoom","tile-url","tile-attribution","tile-provider","tile-style","api-key","here-api-key","read-only","log-level","dev-overlay","prefer-canvas","use-external-leaflet","skip-leaflet-styles","marker-icon-url","marker-icon-retina-url","marker-shadow-url","marker-icon-size","marker-icon-anchor","marker-popup-anchor","tool-button-config","toolbar-groups","theme-url","draw-polygon","draw-polyline","draw-rectangle","draw-circle","draw-layer-cake","draw-marker","draw-move","draw-ruler","edit-features","delete-features","polygon-allow-intersection"]}attributeChangedCallback(n,h,i){switch(this._logger.debug("attributeChanged",{name:n,value:i}),n){case"latitude":this._latitude=this._coerceNumber(i,0);break;case"longitude":this._longitude=this._coerceNumber(i,0);break;case"zoom":this._zoom=this._coerceNumber(i,2);break;case"min-zoom":this._minZoom=i!=null?this._coerceNumber(i):void 0;break;case"max-zoom":this._maxZoom=i!=null?this._coerceNumber(i):void 0;break;case"tile-url":this._tileUrl=i!=null?i:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",this._controller&&this._updateTileLayer();break;case"tile-attribution":this._tileAttribution=i!=null?i:void 0,this._controller&&this._updateTileLayer();break;case"tile-provider":this._tileProvider=this._normalizeText(i,{lowercase:!0}),this._controller&&this._updateTileLayer();break;case"tile-style":this._tileStyle=this._normalizeText(i),this._controller&&this._updateTileLayer();break;case"api-key":case"here-api-key":this._syncApiKeyFromAttributes(),this._controller&&this._updateTileLayer();break;case"theme-url":this._themeUrl=i!=null?i:void 0,this.isConnected&&this._applyThemeStyles();break;case"read-only":this._readOnly=i!==null;break;case"log-level":this._logLevel=i!=null?i:this._logLevel,this._logger.setLevel(this._logLevel);break;case"dev-overlay":this._devOverlay=i!==null;break;case"polygon-allow-intersection":this._polygonAllowIntersection=i!==null;break;case"prefer-canvas":this._preferCanvas=i!==null;break;case"use-external-leaflet":this._useExternalLeaflet=i!==null;break;case"skip-leaflet-styles":this._skipLeafletStyles=i!==null;break}this._controller&&(n==="latitude"||n==="longitude"||n==="zoom"?this._controller.setView(this._latitude,this._longitude,this._zoom):this._isMarkerIconAttribute(n)?this._syncMarkerIconConfig():n==="tool-button-config"?this._syncToolButtonConfig():n==="toolbar-groups"?this._syncToolbarGroups():(n==="min-zoom"||n==="max-zoom"||n==="read-only"||n==="dev-overlay"||n==="log-level"||n==="prefer-canvas"||n==="use-external-leaflet"||n==="skip-leaflet-styles"||n.startsWith("draw-")||n==="edit-features"||n==="delete-features")&&this._controller.destroy().then(()=>this._controller.init()))}_updateTileLayer(){var h,i,r,l;if(!this._controller)return;const n=this._controller;if(typeof n.setTileLayer!="function"){this._logger.warn("setTileLayer is not available on MapController yet");return}try{if(this._tileProvider){const d=this._tileProvider,p={provider:d,style:this._tileStyle,apiKey:this._apiKey,attribution:this._tileAttribution},_=ns(p);if(!_.valid){const x=(h=_.error)!=null&&h.toLowerCase().includes("api key")?"missing_api_key":"tile_load_failed";this._handleTileProviderError(x,(i=_.error)!=null?i:"Invalid tile provider configuration",d);return}const g=os(p),y=this._activeTileProvider;n.setTileLayer(g,{onTileError:x=>{if(this._tileProvider!==d)return;const T=this._describeTileLayerError(x,d),E=d==="here"?this._resolveHereTileLayerErrorCode(T):"tile_load_failed";this._handleTileProviderError(E,T,d)}}),this._activeTileProvider=d,this._emitTileProviderChanged(d,this._tileStyle,y);return}n.setTileLayer({urlTemplate:this._tileUrl,attribution:(r=this._tileAttribution)!=null?r:"",maxZoom:this._maxZoom,subdomains:["a","b","c"]},{onTileError:d=>{const p=this._describeTileLayerError(d,"tile-url");this._handleTileProviderError("tile_load_failed",p,"tile-url")}}),this._activeTileProvider="tile-url"}catch(d){const p=this._resolveTileProviderErrorCode(d);this._logger.error("Failed to update tile layer",{error:d,code:p}),this._handleTileProviderError(p,d instanceof Error?d.message:"Unknown tile layer error",(l=this._tileProvider)!=null?l:"unknown")}}_handleTileProviderError(n,h,i){this._logger.error(`Tile provider error (${n}): ${h}`),this.dispatchEvent(new CustomEvent("tile-provider-error",{bubbles:!0,detail:{code:n,message:h,provider:i,timestamp:Date.now()}}));const r=this._controller;typeof r.setTileLayer=="function"&&(r.setTileLayer({urlTemplate:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:19,subdomains:["a","b","c"]}),this._activeTileProvider="osm")}_emitTileProviderChanged(n,h,i){this.dispatchEvent(new CustomEvent("tile-provider-changed",{bubbles:!0,detail:{provider:n,style:h,previousProvider:i,timestamp:Date.now()}}))}_isMarkerIconAttribute(n){return n==="marker-icon-url"||n==="marker-icon-retina-url"||n==="marker-shadow-url"||n==="marker-icon-size"||n==="marker-icon-anchor"||n==="marker-popup-anchor"}_effectiveMarkerIconConfig(){const n=(i,r)=>{this.dispatchEvent(new CustomEvent("leaflet-draw:error",{detail:{message:i,cause:r}}))};if(this._markerIconConfig===null)return null;if(this._markerIconConfig!==void 0)return es(this._markerIconConfig,{reportError:n});const h=this.getAttribute("marker-icon-url");return h==null?null:is({iconUrl:h,iconRetinaUrl:this.getAttribute("marker-icon-retina-url"),shadowUrl:this.getAttribute("marker-shadow-url"),iconSize:this.getAttribute("marker-icon-size"),iconAnchor:this.getAttribute("marker-icon-anchor"),popupAnchor:this.getAttribute("marker-popup-anchor")},{reportError:n})}_syncMarkerIconConfig(){const n=this._controller;typeof(n==null?void 0:n.setMarkerIconConfig)=="function"&&n.setMarkerIconConfig(this._effectiveMarkerIconConfig())}_effectiveToolButtonConfig(){if(this._toolButtonConfig!==void 0)return this._toolButtonConfig;const n=this.getAttribute("tool-button-config");if(n==null||n.trim()==="")return null;try{const h=JSON.parse(n);if(!h||typeof h!="object"||Array.isArray(h))throw new Error("tool-button-config must be a JSON object");return h}catch(h){return this.dispatchEvent(new CustomEvent("leaflet-draw:error",{detail:{message:"Failed to parse tool-button-config",cause:h}})),null}}_syncToolButtonConfig(){const n=this._controller;typeof(n==null?void 0:n.setToolButtonConfig)=="function"&&n.setToolButtonConfig(this._effectiveToolButtonConfig())}_effectiveToolbarGroups(){if(this._toolbarGroups!==void 0)return this._toolbarGroups;const n=this.getAttribute("toolbar-groups");if(n==null||n.trim()==="")return null;try{const h=JSON.parse(n);if(!Array.isArray(h))throw new Error("toolbar-groups must be a JSON array");return h}catch(h){return this.dispatchEvent(new CustomEvent("leaflet-draw:error",{detail:{message:"Failed to parse toolbar-groups",cause:h}})),null}}_syncToolbarGroups(){const n=this._controller;typeof(n==null?void 0:n.setToolbarGroups)=="function"&&n.setToolbarGroups(this._effectiveToolbarGroups())}get latitude(){return this._latitude}set latitude(n){this._latitude=Number(n),this._reflect("latitude",String(this._latitude))}get longitude(){return this._longitude}set longitude(n){this._longitude=Number(n),this._reflect("longitude",String(this._longitude))}get zoom(){return this._zoom}set zoom(n){this._zoom=Number(n),this._reflect("zoom",String(this._zoom))}get minZoom(){return this._minZoom}set minZoom(n){this._minZoom=n,this._reflect("min-zoom",n!=null?String(n):null)}get maxZoom(){return this._maxZoom}set maxZoom(n){this._maxZoom=n,this._reflect("max-zoom",n!=null?String(n):null)}get tileUrl(){return this._tileUrl}set tileUrl(n){this._tileUrl=n,this._reflect("tile-url",n),this._controller&&this._updateTileLayer()}get tileProvider(){return this._tileProvider}set tileProvider(n){var h;this._tileProvider=this._normalizeText(n!=null?n:null,{lowercase:!0}),this._reflect("tile-provider",(h=this._tileProvider)!=null?h:null),this._controller&&this._updateTileLayer()}get tileStyle(){return this._tileStyle}set tileStyle(n){var h;this._tileStyle=this._normalizeText(n!=null?n:null),this._reflect("tile-style",(h=this._tileStyle)!=null?h:null),this._controller&&this._updateTileLayer()}get apiKey(){return this._apiKey}set apiKey(n){var h;this._apiKey=this._normalizeText(n!=null?n:null),this._reflect("api-key",(h=this._apiKey)!=null?h:null),this.hasAttribute("here-api-key")&&this.removeAttribute("here-api-key"),this._controller&&this._updateTileLayer()}get tileAttribution(){return this._tileAttribution}set tileAttribution(n){this._tileAttribution=n,this._reflect("tile-attribution",n!=null?n:null),this._controller&&this._updateTileLayer()}get readOnly(){return this._readOnly}set readOnly(n){this._readOnly=!!n,this._booleanReflect("read-only",this._readOnly)}get logLevel(){return this._logLevel}set logLevel(n){this._logLevel=n,this._logger.setLevel(n),this._reflect("log-level",n)}get devOverlay(){return this._devOverlay}set devOverlay(n){this._devOverlay=!!n,this._booleanReflect("dev-overlay",this._devOverlay)}get preferCanvas(){return this._preferCanvas}set preferCanvas(n){this._preferCanvas=!!n,this._booleanReflect("prefer-canvas",this._preferCanvas)}get useExternalLeaflet(){return this._useExternalLeaflet}set useExternalLeaflet(n){this._useExternalLeaflet=!!n,this._booleanReflect("use-external-leaflet",this._useExternalLeaflet)}get skipLeafletStyles(){return this._skipLeafletStyles}set skipLeafletStyles(n){this._skipLeafletStyles=!!n,this._booleanReflect("skip-leaflet-styles",this._skipLeafletStyles)}get markerIconConfig(){return this._markerIconConfig}set markerIconConfig(n){this._markerIconConfig=n,this._syncMarkerIconConfig()}get toolButtonConfig(){return this._toolButtonConfig}set toolButtonConfig(n){this._toolButtonConfig=n,this._syncToolButtonConfig()}get toolbarGroups(){return this._toolbarGroups}set toolbarGroups(n){this._toolbarGroups=n,this._syncToolbarGroups()}get leafletInstance(){return this._leafletInstance}set leafletInstance(n){this._leafletInstance=n}get toolHooks(){return this._toolHooks}set toolHooks(n){this._toolHooks=n;const h=this._controller;typeof(h==null?void 0:h.setToolObservers)=="function"&&h.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get toolEventEmitter(){return this._toolEventEmitter}set toolEventEmitter(n){this._toolEventEmitter=n;const h=this._controller;typeof(h==null?void 0:h.setToolObservers)=="function"&&h.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get themeCss(){return this._themeCss}set themeCss(n){this._themeCss=typeof n=="string"?n:"",this.isConnected&&this._applyThemeStyles()}async getGeoJSON(){return this._logger.debug("getGeoJSON"),this._controller?this._controller.getGeoJSON():{type:"FeatureCollection",features:[]}}async loadGeoJSON(n){var r,l;if(this._logger.debug("loadGeoJSON",{features:(l=(r=n==null?void 0:n.features)==null?void 0:r.length)!=null?l:0}),!this._controller)return;const h={fc:n,mode:"load"};this.dispatchEvent(new CustomEvent("leaflet-draw:ingest",{detail:h}));const i=h.fc&&h.fc.type==="FeatureCollection"?h.fc:n;await this._controller.loadGeoJSON(i,!1)}async clearLayers(){this._logger.debug("clearLayers"),this._controller&&await this._controller.clearLayers()}async addFeatures(n){var r,l;if(this._logger.debug("addFeatures",{count:(l=(r=n==null?void 0:n.features)==null?void 0:r.length)!=null?l:0}),!this._controller)return[];const h={fc:n,mode:"add"};this.dispatchEvent(new CustomEvent("leaflet-draw:ingest",{detail:h}));const i=h.fc&&h.fc.type==="FeatureCollection"?h.fc:n;return this._controller.addFeatures(i)}async updateFeature(n,h){this._logger.debug("updateFeature",{id:n}),this._controller&&await this._controller.updateFeature(n,h)}async removeFeature(n){this._logger.debug("removeFeature",{id:n}),this._controller&&await this._controller.removeFeature(n)}async fitBoundsToData(n){this._logger.debug("fitBoundsToData",{padding:n}),this._controller&&await this._controller.fitBoundsToData(typeof n=="number"?n:.05)}async fitBounds(n,h){this._logger.debug("fitBounds",{bounds:n,padding:h}),this._controller&&await this._controller.fitBounds(n,typeof h=="number"?h:.05)}async setView(n,h,i){this._logger.debug("setView",{lat:n,lng:h,zoom:i}),this.latitude=n,this.longitude=h,typeof i=="number"&&(this.zoom=i),this._controller&&await this._controller.setView(n,h,i)}async exportGeoJSON(){if(this._logger.debug("exportGeoJSON"),!this._controller)return{type:"FeatureCollection",features:[]};const n=await this._controller.getGeoJSON(),h={geoJSON:n,featureCount:n.features.length};return this.dispatchEvent(new CustomEvent("leaflet-draw:export",{detail:h})),n}async mergePolygons(n){if(this._logger.debug("mergePolygons"),!this._controller)return null;const i=(await this._controller.getGeoJSON()).features.length,r=await this._controller.mergeVisiblePolygons(n);if(r){const l=await this._controller.getGeoJSON(),d={id:r,mergedFeatureCount:i-l.features.length+1,geoJSON:l};this.dispatchEvent(new CustomEvent("leaflet-draw:merged",{detail:d}))}return r}async setMeasurementUnits(n){this._logger.debug("setMeasurementUnits",{system:n}),this._controller&&this._controller.setRulerUnits(n)}async activateTool(n,h={}){var d,p;const i=(d=h.source)!=null?d:"api";if(this.dispatchEvent(new CustomEvent("leaflet-geokit:tool-trigger-requested",{bubbles:!0,composed:!0,detail:{tool:n,source:i,groupId:h.groupId,handled:!1,timestamp:Date.now()}})),!this._controller)return this._emitToolTriggerResult({tool:n,source:i,groupId:h.groupId,handled:!1,timestamp:Date.now(),error:"Map controller is not initialized"}),!1;const r=this._controller,l=typeof r.activateTool=="function"?r.activateTool.bind(r):(p=r.triggerTool)==null?void 0:p.bind(r);return l?l(n,{source:i,groupId:h.groupId}):(this._emitToolTriggerResult({tool:n,source:i,groupId:h.groupId,handled:!1,timestamp:Date.now(),error:"Map controller cannot activate tools"}),!1)}async triggerTool(n,h={}){return this.activateTool(n,h)}async deactivateTool(n={}){var l,d;const h=(l=n.source)!=null?l:"api";if(this.dispatchEvent(new CustomEvent("leaflet-geokit:tool-trigger-requested",{bubbles:!0,composed:!0,detail:{tool:"select",source:h,groupId:n.groupId,handled:!1,timestamp:Date.now()}})),!this._controller)return this._emitToolTriggerResult({tool:"select",source:h,groupId:n.groupId,handled:!1,timestamp:Date.now(),error:"Map controller is not initialized"}),!1;const i=this._controller;if(typeof i.deactivateTool=="function")return i.deactivateTool({source:h,groupId:n.groupId});const r=typeof i.activateTool=="function"?i.activateTool.bind(i):(d=i.triggerTool)==null?void 0:d.bind(i);return r?r("select",{source:h,groupId:n.groupId}):(this._emitToolTriggerResult({tool:"select",source:h,groupId:n.groupId,handled:!1,timestamp:Date.now(),error:"Map controller cannot deactivate tools"}),!1)}async loadGeoJSONFromUrl(n){if(this._logger.debug("loadGeoJSONFromUrl",{url:n}),!this._controller)return;const h=await fetch(n,{headers:{Accept:"application/json"}});if(!h.ok){const d=new Error(`Failed to fetch GeoJSON from ${n}: ${h.status} ${h.statusText}`);throw this.dispatchEvent(new CustomEvent("leaflet-draw:error",{detail:{message:d.message,cause:d}})),d}const i=await h.json(),r={fc:i,mode:"load"};this.dispatchEvent(new CustomEvent("leaflet-draw:ingest",{detail:r}));const l=r.fc&&r.fc.type==="FeatureCollection"?r.fc:i;await this._controller.loadGeoJSON(l,!0)}async loadGeoJSONFromText(n){var l;if(this._logger.debug("loadGeoJSONFromText",{length:(l=n==null?void 0:n.length)!=null?l:0}),!this._controller)return;let h;try{h=JSON.parse(n)}catch(d){const p=new Error("Failed to parse GeoJSON text");throw this.dispatchEvent(new CustomEvent("leaflet-draw:error",{detail:{message:p.message,cause:d}})),p}const i={fc:h,mode:"load"};this.dispatchEvent(new CustomEvent("leaflet-draw:ingest",{detail:i}));const r=i.fc&&i.fc.type==="FeatureCollection"?i.fc:h;await this._controller.loadGeoJSON(r,!0)}_currentConfig(){return{latitude:this._latitude,longitude:this._longitude,zoom:this._zoom,minZoom:this._minZoom,maxZoom:this._maxZoom,tileUrl:this._tileUrl,tileAttribution:this._tileAttribution,readOnly:this._readOnly,fitToDataOnLoad:!1,logLevel:this._logLevel,devOverlay:this._devOverlay,polygonAllowIntersection:this._polygonAllowIntersection,preferCanvas:this._preferCanvas,useExternalLeaflet:this._useExternalLeaflet,skipLeafletStyles:this._skipLeafletStyles}}_applyThemeStyles(){var i;const n=(i=this._themeUrl)==null?void 0:i.trim();if(n){if(!this._themeLinkEl){const r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("data-geokit-theme-url","true"),this._root.appendChild(r),this._themeLinkEl=r}this._themeLinkEl.getAttribute("href")!==n&&this._themeLinkEl.setAttribute("href",n)}else this._themeLinkEl&&(this._themeLinkEl.remove(),this._themeLinkEl=null);const h=this._themeCss;if(h.trim().length>0){if(!this._themeStyleEl){const r=document.createElement("style");r.setAttribute("data-geokit-theme-css","true"),this._root.appendChild(r),this._themeStyleEl=r}this._themeStyleEl.textContent!==h&&(this._themeStyleEl.textContent=h)}else this._themeStyleEl&&(this._themeStyleEl.remove(),this._themeStyleEl=null)}_emitToolTriggerResult(n){this.dispatchEvent(new CustomEvent(n.handled?"leaflet-geokit:tool-triggered":"leaflet-geokit:tool-trigger-failed",{bubbles:!0,composed:!0,detail:n}))}_syncApiKeyFromAttributes(){const n=this._normalizeText(this.getAttribute("api-key")),h=this._normalizeText(this.getAttribute("here-api-key"));this._apiKey=n!=null?n:h}_normalizeText(n,h){if(typeof n!="string")return;const i=n.trim();if(i)return h!=null&&h.lowercase?i.toLowerCase():i}_resolveTileProviderErrorCode(n){return n instanceof Error&&n.message.toLowerCase().includes("unknown tile provider")?"unknown_provider":"tile_load_failed"}_resolveHereTileLayerErrorCode(n){const h=n.toLowerCase();return h.includes("permission")||h.includes("forbidden")||h.includes("403")||h.includes("unauthorized")||h.includes("not authorized")||h.includes("not authorised")||h.includes("access denied")?"permission_denied":"invalid_api_key"}_describeTileLayerError(n,h){if(n&&typeof n=="object"&&"error"in n&&n.error instanceof Error)return n.error.message;if(n instanceof Error&&n.message)return n.message;if(n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"){const i=n.message.trim();if(i.length>0)return i}return h==="here"?`Failed to load HERE tiles; verify API key, project permissions, and allowed localhost origin/referrer.${this._tileStyle==="satellite.day"?" If satellite.day fails, try lite.day.":""}`:"Failed to load tile layer"}_reflect(n,h){h===null?this.removeAttribute(n):this.getAttribute(n)!==h&&this.setAttribute(n,h)}_booleanReflect(n,h){h?this.hasAttribute(n)||this.setAttribute(n,""):this.hasAttribute(n)&&this.removeAttribute(n)}_coerceNumber(n,h){if(n==null)return h!=null?h:NaN;const i=Number(n);return Number.isFinite(i)?i:h!=null?h:NaN}}const rs={Ready:"leaflet-draw:ready",Created:"leaflet-draw:created",Edited:"leaflet-draw:edited",Deleted:"leaflet-draw:deleted",Error:"leaflet-draw:error",Ingest:"leaflet-draw:ingest",Export:"leaflet-draw:export",DrawStart:"leaflet-draw:drawstart",DrawStop:"leaflet-draw:drawstop",EditStart:"leaflet-draw:editstart",EditStop:"leaflet-draw:editstop"},yo="leaflet-geokit";customElements.get(yo)||customElements.define(yo,fi);const Lo="leaflet-draw-map";if(!customElements.get(Lo)){class u extends fi{}customElements.define(Lo,u)}ut.DrawEvent=rs,ut.LeafletDrawMapElement=fi,Object.defineProperty(ut,Symbol.toStringTag,{value:"Module"})}));
|
|
302
|
+
`;const n=this._root.querySelector(".map-container");if(!(n instanceof HTMLDivElement))throw new Error("Failed to initialize map container");this._container=n;const h=this.getAttribute("log-level");h&&(this._logLevel=h,this._logger.setLevel(h))}_controlsFromAttributes(){return{polygon:this.hasAttribute("draw-polygon"),polyline:this.hasAttribute("draw-polyline"),rectangle:this.hasAttribute("draw-rectangle"),circle:this.hasAttribute("draw-circle"),cake:this.hasAttribute("draw-layer-cake"),marker:this.hasAttribute("draw-marker"),move:this.hasAttribute("draw-move"),edit:this.hasAttribute("edit-features"),delete:this.hasAttribute("delete-features"),ruler:this.hasAttribute("draw-ruler")}}_mapConfig(){return{latitude:this._latitude,longitude:this._longitude,zoom:this._zoom,minZoom:this._minZoom,maxZoom:this._maxZoom,tileUrl:this._tileUrl,tileAttribution:this._tileAttribution,readOnly:this._readOnly,fitToDataOnLoad:!1,logLevel:this._logLevel,devOverlay:this._devOverlay,polygonAllowIntersection:this._polygonAllowIntersection,preferCanvas:this._preferCanvas,useExternalLeaflet:this._useExternalLeaflet,skipLeafletStyles:this._skipLeafletStyles}}async connectedCallback(){var n;this._logger.debug("connectedCallback",this._currentConfig()),this._setStatus({state:"initializing",ready:!1,busy:!0,featureCount:0,lastEvent:"connected",lastError:null}),Qn({root:this._root,skipStyles:this._skipLeafletStyles}),this._applyThemeStyles(),this._controller=new ca({container:this._container,map:this._mapConfig(),controls:this._controlsFromAttributes(),readOnly:this._readOnly,logger:this._logger.child("controller"),callbacks:{onReady:h=>{this.dispatchEvent(new CustomEvent(J.Ready,{detail:h})),this._syncStatusFromController({state:"ready",ready:!0,busy:!1,lastEvent:J.Ready,clearLastError:!0})},onCreated:h=>{this.dispatchEvent(new CustomEvent(J.Created,{detail:h})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:this._status.featureCount+1,lastEvent:J.Created,lastError:null})},onEdited:h=>{this.dispatchEvent(new CustomEvent(J.Edited,{detail:h})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:h.geoJSON.features.length,lastEvent:J.Edited,lastError:null})},onDeleted:h=>{this.dispatchEvent(new CustomEvent(J.Deleted,{detail:h})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:h.geoJSON.features.length,lastEvent:J.Deleted,lastError:null})},onError:h=>{this._emitError(h,{state:h.recoverable?this._status.ready?"ready":this._status.state:"error",lastEvent:J.Error})},onTileError:h=>{if(this._tileProvider)return;const i=this._describeTileLayerError(h,"tile-url");this._handleTileProviderError("tile_load_failed",i,"tile-url")},onToolTrigger:h=>{this._emitToolTriggerResult(h)},onSaved:h=>{this.dispatchEvent(new CustomEvent(J.Export,{detail:{geoJSON:h.geoJSON,featureCount:h.featureCount,adapter:"editing"}})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:h.featureCount,lastEvent:J.Export,lastError:null})}},leaflet:(n=this._leafletInstance)!=null?n:void 0,useExternalLeaflet:this._useExternalLeaflet,toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter,markerIconConfig:this._effectiveMarkerIconConfig(),toolButtonConfig:this._effectiveToolButtonConfig(),toolbarGroups:this._effectiveToolbarGroups()}),this.addEventListener("leaflet-geokit:trigger-tool",this._externalToolTriggerListener),this.addEventListener("leaflet-geokit:activate-tool",this._externalToolTriggerListener),this.addEventListener("leaflet-geokit:deactivate-tool",this._externalToolDeactivateListener),await this._controller.init(),this._status.state!=="error"&&this._tileProvider&&this._updateTileLayer()}async disconnectedCallback(){this._logger.debug("disconnectedCallback"),this._controller&&(await this._controller.destroy(),this._controller=null),this.removeEventListener("leaflet-geokit:trigger-tool",this._externalToolTriggerListener),this.removeEventListener("leaflet-geokit:activate-tool",this._externalToolTriggerListener),this.removeEventListener("leaflet-geokit:deactivate-tool",this._externalToolDeactivateListener),this._setStatus({state:"uninitialized",ready:!1,busy:!1,featureCount:0,lastEvent:"disconnected",lastError:null})}static get observedAttributes(){return["latitude","longitude","zoom","min-zoom","max-zoom","tile-url","tile-attribution","tile-provider","tile-style","api-key","here-api-key","read-only","log-level","dev-overlay","prefer-canvas","use-external-leaflet","skip-leaflet-styles","marker-icon-url","marker-icon-retina-url","marker-shadow-url","marker-icon-size","marker-icon-anchor","marker-popup-anchor","tool-button-config","toolbar-groups","theme-url","draw-polygon","draw-polyline","draw-rectangle","draw-circle","draw-layer-cake","draw-marker","draw-move","draw-ruler","edit-features","delete-features","polygon-allow-intersection"]}attributeChangedCallback(n,h,i){switch(this._logger.debug("attributeChanged",{name:n,value:i}),n){case"latitude":this._latitude=this._coerceNumber(i,0);break;case"longitude":this._longitude=this._coerceNumber(i,0);break;case"zoom":this._zoom=this._coerceNumber(i,2);break;case"min-zoom":this._minZoom=i!=null?this._coerceNumber(i):void 0;break;case"max-zoom":this._maxZoom=i!=null?this._coerceNumber(i):void 0;break;case"tile-url":this._tileUrl=i!=null?i:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",this._controller&&this._updateTileLayer();break;case"tile-attribution":this._tileAttribution=i!=null?i:void 0,this._controller&&this._updateTileLayer();break;case"tile-provider":this._tileProvider=this._normalizeText(i,{lowercase:!0}),this._controller&&this._updateTileLayer();break;case"tile-style":this._tileStyle=this._normalizeText(i),this._controller&&this._updateTileLayer();break;case"api-key":case"here-api-key":this._syncApiKeyFromAttributes(),this._controller&&this._updateTileLayer();break;case"theme-url":this._themeUrl=i!=null?i:void 0,this.isConnected&&this._applyThemeStyles();break;case"read-only":this._readOnly=i!==null;break;case"log-level":this._logLevel=i!=null?i:this._logLevel,this._logger.setLevel(this._logLevel);break;case"dev-overlay":this._devOverlay=i!==null;break;case"polygon-allow-intersection":this._polygonAllowIntersection=i!==null;break;case"prefer-canvas":this._preferCanvas=i!==null;break;case"use-external-leaflet":this._useExternalLeaflet=i!==null;break;case"skip-leaflet-styles":this._skipLeafletStyles=i!==null;break}this._controller&&(n==="latitude"||n==="longitude"||n==="zoom"?this._controller.setView(this._latitude,this._longitude,this._zoom):this._isMarkerIconAttribute(n)?this._syncMarkerIconConfig():n==="tool-button-config"?this._syncToolButtonConfig():n==="toolbar-groups"?this._syncToolbarGroups():(n==="min-zoom"||n==="max-zoom"||n==="read-only"||n==="dev-overlay"||n==="log-level"||n==="prefer-canvas"||n==="use-external-leaflet"||n==="skip-leaflet-styles"||n.startsWith("draw-")||n==="edit-features"||n==="delete-features")&&this._controller.destroy().then(()=>this._controller.init()))}_updateTileLayer(){var h,i,r,l;if(!this._controller)return;const n=this._controller;if(typeof n.setTileLayer!="function"){this._logger.warn("setTileLayer is not available on MapController yet");return}try{if(this._tileProvider){const d=this._tileProvider,p={provider:d,style:this._tileStyle,apiKey:this._apiKey,attribution:this._tileAttribution},m=pa(p);if(!m.valid){const w=(h=m.error)!=null&&h.toLowerCase().includes("api key")?"missing_api_key":"tile_load_failed";this._handleTileProviderError(w,(i=m.error)!=null?i:"Invalid tile provider configuration",d);return}const _=fa(p),y=this._activeTileProvider;n.setTileLayer(_,{onTileError:w=>{if(this._tileProvider!==d)return;const T=this._describeTileLayerError(w,d),E=d==="here"?this._resolveHereTileLayerErrorCode(T):"tile_load_failed";this._handleTileProviderError(E,T,d)}}),this._activeTileProvider=d,this._emitTileProviderChanged(d,this._tileStyle,y);return}n.setTileLayer({urlTemplate:this._tileUrl,attribution:(r=this._tileAttribution)!=null?r:"",maxZoom:this._maxZoom,subdomains:["a","b","c"]},{onTileError:d=>{const p=this._describeTileLayerError(d,"tile-url");this._handleTileProviderError("tile_load_failed",p,"tile-url")}}),this._activeTileProvider="tile-url"}catch(d){const p=this._resolveTileProviderErrorCode(d);this._logger.error("Failed to update tile layer",{error:d,code:p}),this._handleTileProviderError(p,d instanceof Error?d.message:"Unknown tile layer error",(l=this._tileProvider)!=null?l:"unknown")}}_handleTileProviderError(n,h,i){this._logger.error(`Tile provider error (${n}): ${h}`);const r=Date.now();this.dispatchEvent(new CustomEvent("tile-provider-error",{bubbles:!0,detail:{code:n,message:h,provider:i,timestamp:r}})),this._emitDiagnostic({code:n,message:h,recoverable:!0,severity:"warn",timestamp:r},{state:this._status.ready?"ready":this._status.state,lastEvent:"tile-provider-error"});const l=this._controller;typeof l.setTileLayer=="function"&&(l.setTileLayer({urlTemplate:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:19,subdomains:["a","b","c"]}),this._activeTileProvider="osm")}_emitTileProviderChanged(n,h,i){this.dispatchEvent(new CustomEvent("tile-provider-changed",{bubbles:!0,detail:{provider:n,style:h,previousProvider:i,timestamp:Date.now()}}))}_isMarkerIconAttribute(n){return n==="marker-icon-url"||n==="marker-icon-retina-url"||n==="marker-shadow-url"||n==="marker-icon-size"||n==="marker-icon-anchor"||n==="marker-popup-anchor"}_effectiveMarkerIconConfig(){const n=(i,r)=>{this._emitError({code:"invalid_marker_icon_config",message:i,recoverable:!0,cause:r},{state:this._status.ready?"ready":this._status.state})};if(this._markerIconConfig===null)return null;if(this._markerIconConfig!==void 0)return da(this._markerIconConfig,{reportError:n});const h=this.getAttribute("marker-icon-url");return h==null?null:ua({iconUrl:h,iconRetinaUrl:this.getAttribute("marker-icon-retina-url"),shadowUrl:this.getAttribute("marker-shadow-url"),iconSize:this.getAttribute("marker-icon-size"),iconAnchor:this.getAttribute("marker-icon-anchor"),popupAnchor:this.getAttribute("marker-popup-anchor")},{reportError:n})}_syncMarkerIconConfig(){const n=this._controller;typeof(n==null?void 0:n.setMarkerIconConfig)=="function"&&n.setMarkerIconConfig(this._effectiveMarkerIconConfig())}_effectiveToolButtonConfig(){if(this._toolButtonConfig!==void 0)return this._toolButtonConfig;const n=this.getAttribute("tool-button-config");if(n==null||n.trim()==="")return null;try{const h=JSON.parse(n);if(!h||typeof h!="object"||Array.isArray(h))throw new Error("tool-button-config must be a JSON object");return h}catch(h){return this._emitError({code:"invalid_tool_button_config",message:"Failed to parse tool-button-config",recoverable:!0,cause:h},{state:this._status.ready?"ready":this._status.state}),null}}_syncToolButtonConfig(){const n=this._controller;typeof(n==null?void 0:n.setToolButtonConfig)=="function"&&n.setToolButtonConfig(this._effectiveToolButtonConfig())}_effectiveToolbarGroups(){if(this._toolbarGroups!==void 0)return this._toolbarGroups;const n=this.getAttribute("toolbar-groups");if(n==null||n.trim()==="")return null;try{const h=JSON.parse(n);if(!Array.isArray(h))throw new Error("toolbar-groups must be a JSON array");return h}catch(h){return this._emitError({code:"invalid_toolbar_groups",message:"Failed to parse toolbar-groups",recoverable:!0,cause:h},{state:this._status.ready?"ready":this._status.state}),null}}_syncToolbarGroups(){const n=this._controller;typeof(n==null?void 0:n.setToolbarGroups)=="function"&&n.setToolbarGroups(this._effectiveToolbarGroups())}get latitude(){return this._latitude}set latitude(n){this._latitude=Number(n),this._reflect("latitude",String(this._latitude))}get longitude(){return this._longitude}set longitude(n){this._longitude=Number(n),this._reflect("longitude",String(this._longitude))}get zoom(){return this._zoom}set zoom(n){this._zoom=Number(n),this._reflect("zoom",String(this._zoom))}get minZoom(){return this._minZoom}set minZoom(n){this._minZoom=n,this._reflect("min-zoom",n!=null?String(n):null)}get maxZoom(){return this._maxZoom}set maxZoom(n){this._maxZoom=n,this._reflect("max-zoom",n!=null?String(n):null)}get tileUrl(){return this._tileUrl}set tileUrl(n){this._tileUrl=n,this._reflect("tile-url",n),this._controller&&this._updateTileLayer()}get tileProvider(){return this._tileProvider}set tileProvider(n){var h;this._tileProvider=this._normalizeText(n!=null?n:null,{lowercase:!0}),this._reflect("tile-provider",(h=this._tileProvider)!=null?h:null),this._controller&&this._updateTileLayer()}get tileStyle(){return this._tileStyle}set tileStyle(n){var h;this._tileStyle=this._normalizeText(n!=null?n:null),this._reflect("tile-style",(h=this._tileStyle)!=null?h:null),this._controller&&this._updateTileLayer()}get apiKey(){return this._apiKey}set apiKey(n){var h;this._apiKey=this._normalizeText(n!=null?n:null),this._reflect("api-key",(h=this._apiKey)!=null?h:null),this.hasAttribute("here-api-key")&&this.removeAttribute("here-api-key"),this._controller&&this._updateTileLayer()}get status(){return this._cloneStatus(this._status)}get tileAttribution(){return this._tileAttribution}set tileAttribution(n){this._tileAttribution=n,this._reflect("tile-attribution",n!=null?n:null),this._controller&&this._updateTileLayer()}get readOnly(){return this._readOnly}set readOnly(n){this._readOnly=!!n,this._booleanReflect("read-only",this._readOnly)}get logLevel(){return this._logLevel}set logLevel(n){this._logLevel=n,this._logger.setLevel(n),this._reflect("log-level",n)}get devOverlay(){return this._devOverlay}set devOverlay(n){this._devOverlay=!!n,this._booleanReflect("dev-overlay",this._devOverlay)}get preferCanvas(){return this._preferCanvas}set preferCanvas(n){this._preferCanvas=!!n,this._booleanReflect("prefer-canvas",this._preferCanvas)}get useExternalLeaflet(){return this._useExternalLeaflet}set useExternalLeaflet(n){this._useExternalLeaflet=!!n,this._booleanReflect("use-external-leaflet",this._useExternalLeaflet)}get skipLeafletStyles(){return this._skipLeafletStyles}set skipLeafletStyles(n){this._skipLeafletStyles=!!n,this._booleanReflect("skip-leaflet-styles",this._skipLeafletStyles)}get markerIconConfig(){return this._markerIconConfig}set markerIconConfig(n){this._markerIconConfig=n,this._syncMarkerIconConfig()}get toolButtonConfig(){return this._toolButtonConfig}set toolButtonConfig(n){this._toolButtonConfig=n,this._syncToolButtonConfig()}get toolbarGroups(){return this._toolbarGroups}set toolbarGroups(n){this._toolbarGroups=n,this._syncToolbarGroups()}get leafletInstance(){return this._leafletInstance}set leafletInstance(n){this._leafletInstance=n}get toolHooks(){return this._toolHooks}set toolHooks(n){this._toolHooks=n;const h=this._controller;typeof(h==null?void 0:h.setToolObservers)=="function"&&h.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get toolEventEmitter(){return this._toolEventEmitter}set toolEventEmitter(n){this._toolEventEmitter=n;const h=this._controller;typeof(h==null?void 0:h.setToolObservers)=="function"&&h.setToolObservers({toolHooks:this._toolHooks,toolEventEmitter:this._toolEventEmitter})}get themeCss(){return this._themeCss}set themeCss(n){this._themeCss=typeof n=="string"?n:"",this.isConnected&&this._applyThemeStyles()}async getGeoJSON(){return this._logger.debug("getGeoJSON"),this._controller?this._controller.getGeoJSON():{type:"FeatureCollection",features:[]}}async importGeoJSON(n,h={}){var l,d,p,m;const i=(l=h.behavior)!=null?l:"replace";if(this._logger.debug("importGeoJSON",{behavior:i,fitToData:(d=h.fitToData)!=null?d:!1,features:(m=(p=n==null?void 0:n.features)==null?void 0:p.length)!=null?m:0}),!this._controller)return[];const r=this.status;return this._setImportLoadingStatus(r),this._performImport(n,h,r,i==="add"?"Failed to add GeoJSON features to the map":"Failed to load GeoJSON into the map")}async loadGeoJSON(n){var h,i;this._logger.debug("loadGeoJSON",{features:(i=(h=n==null?void 0:n.features)==null?void 0:h.length)!=null?i:0}),await this.importGeoJSON(n,{behavior:"replace"})}async clearLayers(){this._logger.debug("clearLayers"),this._controller&&(await this._controller.clearLayers(),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:0,lastEvent:"clearLayers",lastError:null}))}async addFeatures(n){var h,i;return this._logger.debug("addFeatures",{count:(i=(h=n==null?void 0:n.features)==null?void 0:h.length)!=null?i:0}),this.importGeoJSON(n,{behavior:"add"})}async updateFeature(n,h){this._logger.debug("updateFeature",{id:n}),this._controller&&await this._controller.updateFeature(n,h)}async removeFeature(n){this._logger.debug("removeFeature",{id:n}),this._controller&&(await this._controller.removeFeature(n),await this._syncStatusFromController({state:"ready",ready:!0,busy:!1,lastEvent:"removeFeature",clearLastError:!0}))}async fitBoundsToData(n){this._logger.debug("fitBoundsToData",{padding:n}),this._controller&&await this._controller.fitBoundsToData(typeof n=="number"?n:.05)}async fitBounds(n,h){this._logger.debug("fitBounds",{bounds:n,padding:h}),this._controller&&await this._controller.fitBounds(n,typeof h=="number"?h:.05)}async setView(n,h,i){this._logger.debug("setView",{lat:n,lng:h,zoom:i}),this.latitude=n,this.longitude=h,typeof i=="number"&&(this.zoom=i),this._controller&&await this._controller.setView(n,h,i)}async exportGeoJSON(n={}){var l;const h=(l=n.adapter)!=null?l:"editing";if(this._logger.debug("exportGeoJSON",{adapter:h}),!this._controller)return{type:"FeatureCollection",features:[]};const i=await this._exportWithController(n),r={geoJSON:i,featureCount:i.features.length,adapter:h};return this.dispatchEvent(new CustomEvent(J.Export,{detail:r})),i}async mergePolygons(n){if(this._logger.debug("mergePolygons"),!this._controller)return null;const i=(await this._controller.getGeoJSON()).features.length,r=await this._controller.mergeVisiblePolygons(n);if(r){const l=await this._controller.getGeoJSON(),d={id:r,mergedFeatureCount:i-l.features.length+1,geoJSON:l};this.dispatchEvent(new CustomEvent("leaflet-draw:merged",{detail:d})),this._setStatus({state:"ready",ready:!0,busy:!1,featureCount:l.features.length,lastEvent:"leaflet-draw:merged",lastError:null})}return r}async setMeasurementUnits(n){this._logger.debug("setMeasurementUnits",{system:n}),this._controller&&this._controller.setRulerUnits(n)}async activateTool(n,h={}){var d,p;const i=(d=h.source)!=null?d:"api";if(this.dispatchEvent(new CustomEvent("leaflet-geokit:tool-trigger-requested",{bubbles:!0,composed:!0,detail:{tool:n,source:i,groupId:h.groupId,handled:!1,timestamp:Date.now()}})),!this._controller)return this._emitToolTriggerResult({tool:n,source:i,groupId:h.groupId,handled:!1,timestamp:Date.now(),error:"Map controller is not initialized"}),!1;const r=this._controller,l=typeof r.activateTool=="function"?r.activateTool.bind(r):(p=r.triggerTool)==null?void 0:p.bind(r);return l?l(n,{source:i,groupId:h.groupId}):(this._emitToolTriggerResult({tool:n,source:i,groupId:h.groupId,handled:!1,timestamp:Date.now(),error:"Map controller cannot activate tools"}),!1)}async triggerTool(n,h={}){return this.activateTool(n,h)}async deactivateTool(n={}){var l,d;const h=(l=n.source)!=null?l:"api";if(this.dispatchEvent(new CustomEvent("leaflet-geokit:tool-trigger-requested",{bubbles:!0,composed:!0,detail:{tool:"select",source:h,groupId:n.groupId,handled:!1,timestamp:Date.now()}})),!this._controller)return this._emitToolTriggerResult({tool:"select",source:h,groupId:n.groupId,handled:!1,timestamp:Date.now(),error:"Map controller is not initialized"}),!1;const i=this._controller;if(typeof i.deactivateTool=="function")return i.deactivateTool({source:h,groupId:n.groupId});const r=typeof i.activateTool=="function"?i.activateTool.bind(i):(d=i.triggerTool)==null?void 0:d.bind(i);return r?r("select",{source:h,groupId:n.groupId}):(this._emitToolTriggerResult({tool:"select",source:h,groupId:n.groupId,handled:!1,timestamp:Date.now(),error:"Map controller cannot deactivate tools"}),!1)}async loadGeoJSONFromUrl(n,h={}){var p,m,_;const i=(p=h.behavior)!=null?p:"replace";if(this._logger.debug("loadGeoJSONFromUrl",{url:n,behavior:i,fitToData:(m=h.fitToData)!=null?m:!0}),!this._controller)return;const r=this.status;this._setImportLoadingStatus(r);let l;try{l=await fetch(n,{headers:{Accept:"application/json"}})}catch(y){const w=new Error(`Failed to fetch GeoJSON from ${n}`);throw this._emitError({code:"data_fetch_failed",message:w.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),w}if(!l.ok){const y=new Error(`Failed to fetch GeoJSON from ${n}: ${l.status} ${l.statusText}`);throw this._emitError({code:"data_fetch_failed",message:y.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),y}let d;try{d=await l.json()}catch(y){const w=new Error(`Failed to parse GeoJSON from ${n}`);throw this._emitError({code:"data_parse_failed",message:w.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),w}await this._performImport(d,{behavior:i,fitToData:(_=h.fitToData)!=null?_:!0},r,i==="add"?`Failed to add GeoJSON from ${n}`:`Failed to load GeoJSON from ${n}`)}async loadGeoJSONFromText(n,h={}){var d,p,m,_;const i=(d=h.behavior)!=null?d:"replace";if(this._logger.debug("loadGeoJSONFromText",{behavior:i,fitToData:(p=h.fitToData)!=null?p:!0,length:(m=n==null?void 0:n.length)!=null?m:0}),!this._controller)return;const r=this.status;this._setImportLoadingStatus(r);let l;try{l=JSON.parse(n)}catch(y){const w=new Error("Failed to parse GeoJSON text");throw this._emitError({code:"data_parse_failed",message:w.message,recoverable:!0,cause:y},{state:r.ready?"ready":r.state,featureCount:r.featureCount}),w}await this._performImport(l,{behavior:i,fitToData:(_=h.fitToData)!=null?_:!0},r,i==="add"?"Failed to add parsed GeoJSON into the map":"Failed to load parsed GeoJSON into the map")}_setImportLoadingStatus(n){this._setStatus({state:"loading",ready:n.ready,busy:!0,featureCount:n.featureCount,lastEvent:J.Ingest,lastError:null})}async _performImport(n,h,i,r){var m,_;const l=(m=h.behavior)!=null?m:"replace",d={fc:n,mode:l==="add"?"add":"load"};this.dispatchEvent(new CustomEvent(J.Ingest,{detail:d}));const p=d.fc&&d.fc.type==="FeatureCollection"?d.fc:n;try{const y=await this._importWithController(p,{behavior:l,fitToData:(_=h.fitToData)!=null?_:!1});return await this._syncStatusFromController({state:"ready",ready:!0,busy:!1,lastEvent:J.Ingest,clearLastError:!0}),y}catch(y){throw this._emitError({code:l==="add"?"data_add_failed":"data_load_failed",message:r,recoverable:!0,cause:y},{state:i.ready?"ready":i.state,featureCount:i.featureCount}),y}}async _importWithController(n,h){var d,p;if(!this._controller)return[];const i=(d=h.behavior)!=null?d:"replace",r=(p=h.fitToData)!=null?p:!1,l=this._controller;return typeof l.importGeoJSON=="function"?l.importGeoJSON(n,{behavior:i,fitToData:r}):i==="add"?l.addFeatures(n):(await l.loadGeoJSON(n,r),[])}async _exportWithController(n){if(!this._controller)return{type:"FeatureCollection",features:[]};const h=this._controller;return typeof h.exportGeoJSON=="function"?h.exportGeoJSON(n):h.getGeoJSON()}_currentConfig(){return{latitude:this._latitude,longitude:this._longitude,zoom:this._zoom,minZoom:this._minZoom,maxZoom:this._maxZoom,tileUrl:this._tileUrl,tileAttribution:this._tileAttribution,readOnly:this._readOnly,fitToDataOnLoad:!1,logLevel:this._logLevel,devOverlay:this._devOverlay,polygonAllowIntersection:this._polygonAllowIntersection,preferCanvas:this._preferCanvas,useExternalLeaflet:this._useExternalLeaflet,skipLeafletStyles:this._skipLeafletStyles}}_applyThemeStyles(){var i;const n=(i=this._themeUrl)==null?void 0:i.trim();if(n){if(!this._themeLinkEl){const r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("data-geokit-theme-url","true"),this._root.appendChild(r),this._themeLinkEl=r}this._themeLinkEl.getAttribute("href")!==n&&this._themeLinkEl.setAttribute("href",n)}else this._themeLinkEl&&(this._themeLinkEl.remove(),this._themeLinkEl=null);const h=this._themeCss;if(h.trim().length>0){if(!this._themeStyleEl){const r=document.createElement("style");r.setAttribute("data-geokit-theme-css","true"),this._root.appendChild(r),this._themeStyleEl=r}this._themeStyleEl.textContent!==h&&(this._themeStyleEl.textContent=h)}else this._themeStyleEl&&(this._themeStyleEl.remove(),this._themeStyleEl=null)}_emitToolTriggerResult(n){this.dispatchEvent(new CustomEvent(n.handled?"leaflet-geokit:tool-triggered":"leaflet-geokit:tool-trigger-failed",{bubbles:!0,composed:!0,detail:n}))}_syncStatusFromController(n){const h=this._controller;return!h||typeof h.getGeoJSON!="function"?(this._setStatus({state:n.state,ready:n.ready,busy:n.busy,featureCount:this._status.featureCount,lastEvent:n.lastEvent,lastError:n.clearLastError?null:void 0}),Promise.resolve()):h.getGeoJSON().then(i=>{this._setStatus({state:n.state,ready:n.ready,busy:n.busy,featureCount:i.features.length,lastEvent:n.lastEvent,lastError:n.clearLastError?null:void 0})}).catch(()=>{this._setStatus({state:n.state,ready:n.ready,busy:n.busy,lastEvent:n.lastEvent,lastError:n.clearLastError?null:void 0})})}_emitError(n,h){var r;const i={...n,timestamp:Date.now()};return this.dispatchEvent(new CustomEvent(J.Error,{detail:i})),this._emitDiagnostic({code:i.code,message:i.message,recoverable:i.recoverable,severity:i.recoverable?"warn":"error",cause:i.cause,timestamp:i.timestamp},{state:h.state,featureCount:h.featureCount,lastEvent:(r=h.lastEvent)!=null?r:J.Error}),i}_emitDiagnostic(n,h){var r,l;const i={...n,state:h.state};return this.dispatchEvent(new CustomEvent(Le.Diagnostic,{detail:i})),this._setStatus({state:h.state,ready:h.state==="ready",busy:h.state==="initializing"||h.state==="loading",featureCount:(r=h.featureCount)!=null?r:this._status.featureCount,lastEvent:(l=h.lastEvent)!=null?l:Le.Diagnostic,lastError:{code:i.code,message:i.message,recoverable:i.recoverable,timestamp:i.timestamp}}),i}_setStatus(n){const h={...this._status,...n,lastError:n.lastError===null?void 0:n.lastError!==void 0?{...n.lastError}:this._status.lastError?{...this._status.lastError}:void 0,timestamp:Date.now()};this._status=h,this.dispatchEvent(new CustomEvent(Le.Status,{detail:this._cloneStatus(h)}))}_cloneStatus(n){return{...n,lastError:n.lastError?{...n.lastError}:void 0}}_syncApiKeyFromAttributes(){const n=this._normalizeText(this.getAttribute("api-key")),h=this._normalizeText(this.getAttribute("here-api-key"));this._apiKey=n!=null?n:h}_normalizeText(n,h){if(typeof n!="string")return;const i=n.trim();if(i)return h!=null&&h.lowercase?i.toLowerCase():i}_resolveTileProviderErrorCode(n){return n instanceof Error&&n.message.toLowerCase().includes("unknown tile provider")?"unknown_provider":"tile_load_failed"}_resolveHereTileLayerErrorCode(n){const h=n.toLowerCase();return h.includes("permission")||h.includes("forbidden")||h.includes("403")||h.includes("unauthorized")||h.includes("not authorized")||h.includes("not authorised")||h.includes("access denied")?"permission_denied":"invalid_api_key"}_describeTileLayerError(n,h){if(n&&typeof n=="object"&&"error"in n&&n.error instanceof Error)return n.error.message;if(n instanceof Error&&n.message)return n.message;if(n&&typeof n=="object"&&"message"in n&&typeof n.message=="string"){const i=n.message.trim();if(i.length>0)return i}return h==="here"?`Failed to load HERE tiles; verify API key, project permissions, and allowed localhost origin/referrer.${this._tileStyle==="satellite.day"?" If satellite.day fails, try lite.day.":""}`:"Failed to load tile layer"}_reflect(n,h){h===null?this.removeAttribute(n):this.getAttribute(n)!==h&&this.setAttribute(n,h)}_booleanReflect(n,h){h?this.hasAttribute(n)||this.setAttribute(n,""):this.hasAttribute(n)&&this.removeAttribute(n)}_coerceNumber(n,h){if(n==null)return h!=null?h:NaN;const i=Number(n);return Number.isFinite(i)?i:h!=null?h:NaN}}const wo="leaflet-geokit";customElements.get(wo)||customElements.define(wo,mi);const xo="leaflet-draw-map";if(!customElements.get(xo)){class u extends mi{}customElements.define(xo,u)}ct.DrawEvent=J,ct.GeoKitEvent=Le,ct.LeafletDrawMapElement=mi,Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"})}));
|
|
255
303
|
//# sourceMappingURL=leaflet-geokit.umd.js.map
|