- * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
- * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
- */var ue=Y((function(t,e){!function(t){var e="1.7.1";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var r=0;function s(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function a(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)}}function l(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function u(){return!1}function c(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return h(t).split(/\s+/)}function f(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function p(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_-]+) *\}/g;function g(t,e){return t.replace(m,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var _=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var T=window.requestAnimationFrame||b("RequestAnimationFrame")||x,C=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function E(t,e,n){if(!n||T!==x)return T.call(window,o(t,e));t.call(e)}function k(t){t&&C.call(window,t)}var P={extend:n,create:i,bind:o,lastId:r,stamp:s,throttle:a,wrapNum:l,falseFn:u,formatNum:c,trim:h,splitWords:d,setOptions:f,getParamString:p,template:g,isArray:_,indexOf:v,emptyImageUrl:y,requestFn:T,cancelFn:C,requestAnimFrame:E,cancelAnimFrame:k};function S(){}function M(t){if("undefined"!=typeof L&&L&&L.Mixin){t=_(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)}}S.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(M(t.includes),n.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=n(i(r.options),t.options)),n(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},S.include=function(t){return n(this.prototype,t),this},S.mergeOptions=function(t){return n(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var A={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var s=i[o];if(s.ctx===n&&s.fn===e)return s.fn=u,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=u;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var l=r[s];l.fn.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var r=o((function(){this.off(t,e,n).off(t,r,n)}),this);return this.on(t,e,n).on(t,r,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var z=S.extend(A);function D(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var N=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function j(t,e,n){return t instanceof D?t:_(t)?new D(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new D(t.x,t.y):new D(t,e,n)}function O(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function I(t,e){return!t||t instanceof O?t:new O(t,e)}function B(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function R(t,e){return t instanceof B?t:new B(t,e)}function Z(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function H(t,e,n){return t instanceof Z?t:_(t)&&"object"!=typeof t[0]?3===t.length?new Z(t[0],t[1],t[2]):2===t.length?new Z(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new Z(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new Z(t,e,n)}D.prototype={clone:function(){return new D(this.x,this.y)},add:function(t){return this.clone()._add(j(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(j(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 D(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new D(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=N(this.x),this.y=N(this.y),this},distanceTo:function(t){var e=(t=j(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=j(t)).x===this.x&&t.y===this.y},contains:function(t){return t=j(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},O.prototype={extend:function(t){return t=j(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new D(this.min.x,this.max.y)},getTopRight:function(){return new 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,n;return(t="number"==typeof t[0]||t instanceof D?j(t):I(t))instanceof O?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=I(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,s=o.y>=e.y&&i.y<=n.y;return r&&s},overlaps:function(t){t=I(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof Z)e=t,n=t;else{if(!(t instanceof B))return t?this.extend(H(t)||R(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new Z(e.lat,e.lng),this._northEast=new Z(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new B(new Z(e.lat-i,e.lng-o),new Z(n.lat+i,n.lng+o))},getCenter:function(){return new Z((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 Z(this.getNorth(),this.getWest())},getSouthEast:function(){return new Z(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){t="number"==typeof t[0]||t instanceof Z||"lat"in t?H(t):R(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof B?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=R(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=R(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=R(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},Z.prototype={equals:function(t,e){return!!t&&(t=H(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return W.distance(this,H(t))},wrap:function(){return W.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return R([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new Z(this.lat,this.lng,this.alt)}};var q,F={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},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,n=this.scale(t);return new O(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new Z(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new B(new Z(r.lat-i,r.lng-o),new Z(s.lat-i,s.lng-o))}},W=n({},F,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),$=6378137,U={R:$,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new D(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new Z((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(q=$*Math.PI,new O([-q,-q],[q,q]))};function V(t,e,n,i){if(_(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function G(t,e,n,i){return new V(t,e,n,i)}V.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 D((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=n({},W,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return G(t,.5,-t,.5)}()}),Y=n({},K,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var n,i,o,r,s,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)l+=(i?"L":"M")+(a=s[i]).x+" "+a.y;l+=e?Mt?"z":"x":""}return l||"M0 0"}var J=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),it=zt("webkit"),ot=zt("android"),rt=zt("android 2")||zt("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&zt("Google")&&st<537&&!("AudioNode"in window),lt=!!window.opera,ut=!nt&&zt("chrome"),ct=zt("gecko")&&!it&&!lt&&!tt,ht=!ut&&zt("safari"),dt=zt("phantom"),ft="OTransition"in J,pt=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in J,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,_t="MozPerspective"in J,vt=!window.L_DISABLE_3D&&(mt||gt||_t)&&!ft&&!dt,yt="undefined"!=typeof orientation||zt("mobile"),bt=yt&&it,wt=yt&>,xt=!window.PointerEvent&&window.MSPointerEvent,Tt=!(!window.PointerEvent&&!xt),Ct=!window.L_NO_TOUCH&&(Tt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Et=yt&<,Lt=yt&&ct,kt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Pt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),St=!!document.createElement("canvas").getContext,Mt=!(!document.createElementNS||!X("svg").createSVGRect),At=!Mt&&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&&"object"==typeof e.adj}catch(t){return!1}}();function zt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Dt={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:rt,androidStock:at,opera:lt,chrome:ut,gecko:ct,safari:ht,phantom:dt,opera12:ft,win:pt,ie3d:mt,webkit3d:gt,gecko3d:_t,any3d:vt,mobile:yt,mobileWebkit:bt,mobileWebkit3d:wt,msPointer:xt,pointer:Tt,touch:Ct,mobileOpera:Et,mobileGecko:Lt,retina:kt,passiveEvents:Pt,canvas:St,svg:Mt,vml:At},Nt=xt?"MSPointerDown":"pointerdown",jt=xt?"MSPointerMove":"pointermove",Ot=xt?"MSPointerUp":"pointerup",It=xt?"MSPointerCancel":"pointercancel",Bt={},Rt=!1;function Zt(t,e,n,i){return"touchstart"===e?qt(t,n,i):"touchmove"===e?Vt(t,n,i):"touchend"===e&&Gt(t,n,i),this}function Ht(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(Nt,i,!1):"touchmove"===e?t.removeEventListener(jt,i,!1):"touchend"===e&&(t.removeEventListener(Ot,i,!1),t.removeEventListener(It,i,!1)),this}function qt(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&We(t),Ut(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(Nt,i,!1),Rt||(document.addEventListener(Nt,Ft,!0),document.addEventListener(jt,Wt,!0),document.addEventListener(Ot,$t,!0),document.addEventListener(It,$t,!0),Rt=!0)}function Ft(t){Bt[t.pointerId]=t}function Wt(t){Bt[t.pointerId]&&(Bt[t.pointerId]=t)}function $t(t){delete Bt[t.pointerId]}function Ut(t,e){for(var n in t.touches=[],Bt)t.touches.push(Bt[n]);t.changedTouches=[t],e(t)}function Vt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(jt,i,!1)}function Gt(t,e,n){var i=function(t){Ut(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Ot,i,!1),t.addEventListener(It,i,!1)}var Kt=xt?"MSPointerDown":Tt?"pointerdown":"touchstart",Yt=xt?"MSPointerUp":Tt?"pointerup":"touchend",Xt="_leaflet_";function Qt(t,e,n){var i,o,r=!1,s=250;function a(t){if(Tt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,r=n>0&&n<=s,i=e}function l(t){if(r&&!o.cancelBubble){if(Tt){if("mouse"===t.pointerType)return;var n,s,a={};for(s in o)n=o[s],a[s]=n&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Xt+Kt+n]=a,t[Xt+Yt+n]=l,t[Xt+"dblclick"+n]=e,t.addEventListener(Kt,a,!!Pt&&{passive:!1}),t.addEventListener(Yt,l,!!Pt&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function Jt(t,e){var n=t[Xt+Kt+e],i=t[Xt+Yt+e],o=t[Xt+"dblclick"+e];return t.removeEventListener(Kt,n,!!Pt&&{passive:!1}),t.removeEventListener(Yt,i,!!Pt&&{passive:!1}),t.removeEventListener("dblclick",o,!1),this}var te,ee,ne,ie,oe,re=xe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),se=xe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===se||"OTransition"===se?se+"End":"transitionend";function le(t){return"string"==typeof t?document.getElementById(t):t}function ue(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function ce(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function he(t){var e=t.parentNode;e&&e.removeChild(t)}function de(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function pe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ye(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ge(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!me(t,e)){var r=ye(t);ve(t,(r?r+" ":"")+e)}}function _e(t,e){void 0!==t.classList?t.classList.remove(e):ve(t,h((" "+ye(t)+" ").replace(" "+e+" "," ")))}function ve(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ye(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&we(t,e)}function we(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function xe(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Te(t,e,n){var i=e||new D(0,0);t.style[re]=(mt?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Ce(t,e){t._leaflet_pos=e,vt?Te(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ee(t){return t._leaflet_pos||new D(0,0)}if("onselectstart"in document)te=function(){Ne(window,"selectstart",We)},ee=function(){Oe(window,"selectstart",We)};else{var Le=xe(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Le){var t=document.documentElement.style;ne=t[Le],t[Le]="none"}},ee=function(){Le&&(document.documentElement.style[Le]=ne,ne=void 0)}}function ke(){Ne(window,"dragstart",We)}function Pe(){Oe(window,"dragstart",We)}function Se(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Me(),ie=t,oe=t.style.outline,t.style.outline="none",Ne(window,"keydown",Me))}function Me(){ie&&(ie.style.outline=oe,ie=void 0,oe=void 0,Oe(window,"keydown",Me))}function Ae(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function ze(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var De={TRANSFORM:re,TRANSITION:se,TRANSITION_END:ae,get:le,getStyle:ue,create:ce,remove:he,empty:de,toFront:fe,toBack:pe,hasClass:me,addClass:ge,removeClass:_e,setClass:ve,getClass:ye,setOpacity:be,testProp:xe,setTransform:Te,setPosition:Ce,getPosition:Ee,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:ke,enableImageDrag:Pe,preventOutline:Se,restoreOutline:Me,getSizedParentNode:Ae,getScale:ze};function Ne(t,e,n,i){if("object"==typeof e)for(var o in e)Re(t,o,e[o],n);else for(var r=0,s=(e=d(e)).length;r<s;r++)Re(t,e[r],n,i);return this}var je="_leaflet_events";function Oe(t,e,n,i){if("object"==typeof e)for(var o in e)Ze(t,o,e[o],n);else if(e)for(var r=0,s=(e=d(e)).length;r<s;r++)Ze(t,e[r],n,i);else{for(var a in t[je])Ze(t,a,t[je][a]);delete t[je]}return this}function Ie(){if(Tt)return!(nt||ht)}var Be={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Re(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):"");if(t[je]&&t[je][o])return this;var r=function(e){return n.call(i||t,e||window.event)},a=r;Tt&&0===e.indexOf("touch")?Zt(t,e,r,o):Ct&&"dblclick"===e&&!Ie()?Qt(t,r,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Be[e]||e,r,!!Pt&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Qe(t,e)&&a(e)},t.addEventListener(Be[e],r,!1)):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[je]=t[je]||{},t[je][o]=r}function Ze(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):""),r=t[je]&&t[je][o];if(!r)return this;Tt&&0===e.indexOf("touch")?Ht(t,e,o):Ct&&"dblclick"===e&&!Ie()?Jt(t,o):"removeEventListener"in t?t.removeEventListener(Be[e]||e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[je][o]=null}function He(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Xe(t),this}function qe(t){return Re(t,"wheel",He),this}function Fe(t){return Ne(t,"mousedown touchstart dblclick",He),Re(t,"click",Ye),this}function We(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function $e(t){return We(t),He(t),this}function Ue(t,e){if(!e)return new D(t.clientX,t.clientY);var n=ze(e),i=n.boundingClientRect;return new D((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ve=pt&&ut?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function Ge(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ve:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var Ke={};function Ye(t){Ke[t.type]=!0}function Xe(t){var e=Ke[t.type];return Ke[t.type]=!1,e}function Qe(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var Je={on:Ne,off:Oe,stopPropagation:He,disableScrollPropagation:qe,disableClickPropagation:Fe,preventDefault:We,stop:$e,getMousePosition:Ue,getWheelDelta:Ge,fakeStop:Ye,skipped:Xe,isExternalTarget:Qe,addListener:Ne,removeListener:Oe},tn=z.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Ee(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=E(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),Ce(this._el,n),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),en=z.extend({options:{crs:K,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=f(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(H(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=se&&vt&&!Et&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ne(this._proxy,ae,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(H(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),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||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof D?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():R(t);var n=j(e.paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=R(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.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(e=e||{},!(t=j(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!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"),!1!==e.animate){ge(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!vt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=H(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),l=a*this.getZoomScale(s,e),u=o.distanceTo(i)||1,c=1.42,h=c*c;function d(t){var e=(l*l-a*a+(t?-1:1)*h*h*u*u)/(2*(t?l:a)*h*u),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function f(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return f(t)/p(t)}var g=d(0);function _(t){return a*(p(g)/p(g+c*t))}function v(t){return a*(p(g)*m(g+c*t)-f(g))/h}function y(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(d(1)-g)/c,x=n.duration?1e3*n.duration:1e3*w*.8;function T(){var n=(Date.now()-b)/x,r=y(n)*w;n<=1?(this._flyToFrame=E(T,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(v(r)/u)),s),this.getScaleZoom(a/_(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),T.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=R(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},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 n=this.getCenter(),i=this._limitCenter(n,this._zoom,R(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=j((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=j(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),r=this.project(o),s=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),u=I([a.min.add(n),a.max.subtract(i)]);if(!u.contains(s)){this._enforcingBounds=!0;var c=r.subtract(s),h=j(s.x+c.x,s.y+c.y);(s.x<u.min.x||s.x>u.max.x)&&(h.x=r.x-c.x,c.x>0?h.x+=l.x-n.x:h.x-=l.x-i.x),(s.y<u.min.y||s.y>u.max.y)&&(h.y=r.y-c.y,c.y>0?h.y+=l.y-n.y:h.y-=l.y-i.y),this.panTo(this.unproject(h),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=e.divideBy(2).round(),s=i.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,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){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=new Z(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),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(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),he(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)he(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ce("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new B(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=R(t),n=j(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),u=I(this.project(a,i),this.project(s,i)).getSize(),c=vt?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new D(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new O(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(H(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(j(t),e)},layerPointToLatLng:function(t){var e=j(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(H(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(H(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,e){return this.options.crs.distance(H(t),H(e))},containerPointToLayerPoint:function(t){return j(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return j(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(j(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(H(t)))},mouseEventToContainerPoint:function(t){return Ue(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=le(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ne(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,ge(t,"leaflet-container"+(Ct?" leaflet-touch":"")+(kt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ht?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ue(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(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),Ce(this._mapPane,new D(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ge(t.markerPane,"leaflet-zoom-hide"),ge(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Ce(this._mapPane,new D(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ce(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[s(this._container)]=this;var e=t?Oe:Ne;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),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=E((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 n,i=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((n=this._targets[s(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Qe(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||a||o||!Qe(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Xe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Se(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var r=i[0];"contextmenu"===e&&r.listens(e,!0)&&We(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var l=0;l<i.length;l++)if(i[l].fire(e,s,!0),s.originalEvent._stopped||!1===i[l].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).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 Ee(this._mapPane)||new D(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return I([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new O(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return s.round().equals([0,0])?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new O(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=I(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new D(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_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(),n=this.getMaxZoom(),i=vt?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){_e(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=ce("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=re,n=this._proxy.style[e];Te(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){he(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Te(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,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(E((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ge(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_e(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),E((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=S.extend({options:{position:"topright"},initialize:function(t){f(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),n=this.getPosition(),i=t._controlCorners[n];return ge(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(he(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()}}),rn=function(t){return new on(t)};en.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=ce("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=ce("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)he(this._controlCorners[t]);he(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var sn=on.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in f(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!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 on.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(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ge(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?(ge(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):_e(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return _e(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ce("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Fe(e),qe(e);var i=this._section=ce("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ot||Ne(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ce("a",t+"-toggle",e);o.href="#",o.title="Layers",Ct?(Ne(o,"click",$e),Ne(o,"click",this.expand,this)):Ne(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ce("div",t+"-base",i),this._separator=ce("div",t+"-separator",i),this._overlaysList=ce("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.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,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>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(s(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+s(this),i),this._layerControlInputs.push(e),e.layerId=s(t.layer),Ne(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new sn(t,e,n)},ln=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ce("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},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,n,i,o){var r=ce("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Fe(r),Ne(r,"click",$e),Ne(r,"click",o,this),Ne(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";_e(this._zoomInButton,e),_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ge(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ge(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ln,this.addControl(this.zoomControl))}));var un=function(t){return new ln(t)},cn=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ce("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ce("div",e,n)),t.imperial&&(this._iScale=ce("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_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),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),hn=function(t){return new cn(t)},dn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ce("div","leaflet-control-attribution"),Fe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},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 n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new dn).addTo(this)}));var fn=function(t){return new dn(t)};on.Layers=sn,on.Zoom=ln,on.Scale=cn,on.Attribution=dn,rn.layers=an,rn.zoom=un,rn.scale=hn,rn.attribution=fn;var pn=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});pn.addTo=function(t,e){return t.addHandler(e,this),this};var mn,gn={Events:A},_n=Ct?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},yn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=z.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){f(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Ne(this._dragStartTarget,_n,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Oe(this._dragStartTarget,_n,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!me(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Se(this._element),ke(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Ae(this._element);this._startPoint=new D(e.clientX,e.clientY),this._parentScale=ze(n),Ne(document,yn[t.type],this._onMove,this),Ne(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new D(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,We(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Ee(this._element).subtract(n),ge(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ge(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,k(this._animRequest),this._lastEvent=t,this._animRequest=E(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ce(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in _e(document.body,"leaflet-dragging"),this._lastTarget&&(_e(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),yn)Oe(document,yn[t],this._onMove,this),Oe(document,vn[t],this._onUp,this);Pe(),ee(),this._moved&&this._moving&&(k(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,bn._dragging=!1}});function wn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Cn(t=Ln(t,n),n)}function xn(t,e,n){return Math.sqrt(An(t,e,n,!0))}function Tn(t,e,n){return An(t,e,n)}function Cn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,En(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function En(t,e,n,i,o){var r,s,a,l=0;for(s=i+1;s<=o-1;s++)(a=An(t[s],t[i],t[o],!0))>l&&(r=s,l=a);l>n&&(e[r]=1,En(t,e,n,i,r),En(t,e,n,r,o))}function Ln(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)Mn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function kn(t,e,n,i,o){var r,s,a,l=i?mn:Sn(t,n),u=Sn(e,n);for(mn=u;;){if(!(l|u))return[t,e];if(l&u)return!1;a=Sn(s=Pn(t,e,r=l||u,n,o),n),r===l?(t=s,l=a):(e=s,u=a)}}function Pn(t,e,n,i,o){var r,s,a=e.x-t.x,l=e.y-t.y,u=i.min,c=i.max;return 8&n?(r=t.x+a*(c.y-t.y)/l,s=c.y):4&n?(r=t.x+a*(u.y-t.y)/l,s=u.y):2&n?(r=c.x,s=t.y+l*(c.x-t.x)/a):1&n&&(r=u.x,s=t.y+l*(u.x-t.x)/a),new D(r,s,o)}function Sn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function Mn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function An(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,l=n.y-s,u=a*a+l*l;return u>0&&((o=((t.x-r)*a+(t.y-s)*l)/u)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=l*o)),a=t.x-r,l=t.y-s,i?a*a+l*l:new D(r,s)}function zn(t){return!_(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Dn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zn(t)}var Nn={simplify:wn,pointToSegmentDistance:xn,closestPointOnSegment:Tn,clipSegment:kn,_getEdgeIntersection:Pn,_getBitCode:Sn,_sqClosestPointOnSegment:An,isFlat:zn,_flat:Dn};function jn(t,e,n){var i,o,r,s,a,l,u,c,h,d=[1,4,2,8];for(o=0,u=t.length;o<u;o++)t[o]._code=Sn(t[o],e);for(s=0;s<4;s++){for(c=d[s],i=[],o=0,r=(u=t.length)-1;o<u;r=o++)a=t[o],l=t[r],a._code&c?l._code&c||((h=Pn(l,a,c,e,n))._code=Sn(h,e),i.push(h)):(l._code&c&&((h=Pn(l,a,c,e,n))._code=Sn(h,e),i.push(h)),i.push(a));t=i}return t}var On={clipPolygon:jn},In={project:function(t){return new D(t.lng,t.lat)},unproject:function(t){return new Z(t.y,t.x)},bounds:new O([-180,-90],[180,90])},Bn={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new D(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=u=Math.PI/2-2*Math.atan(s*e)-a;return new Z(a*n,t.x*n/i)}},Rn={LonLat:In,Mercator:Bn,SphericalMercator:U},Zn=n({},W,{code:"EPSG:3395",projection:Bn,transformation:function(){var t=.5/(Math.PI*Bn.R);return G(t,.5,-t,.5)}()}),Hn=n({},W,{code:"EPSG:4326",projection:In,transformation:G(1/180,1,-1/180,.5)}),qn=n({},F,{projection:In,transformation:G(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 n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});F.Earth=W,F.EPSG3395=Zn,F.EPSG3857=K,F.EPSG900913=Y,F.EPSG4326=Hn,F.Simple=qn;var Fn=z.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[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(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 n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),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!!t&&s(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?_(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Wn=Fn.extend({initialize:function(t,e){var n,i;if(f(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},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){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);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 s(t)}}),$n=function(t,e){return new Wn(t,e)},Un=Wn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Wn.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),Wn.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 B;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Vn=function(t,e){return new Un(t,e)},Gn=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){f(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=j(i),r=j("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return kt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Kn(t){return new Gn(t)}var Yn=Gn.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 Yn.imagePath||(Yn.imagePath=this._detectIconPath()),(this.options.imagePath||Yn.imagePath)+Gn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ce("div","leaflet-default-icon-path",document.body),e=ue(t,"background-image")||ue(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Xn=pn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ge(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&&_e(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=Ee(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=I(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!l.contains(r)){var u=j((Math.max(l.max.x,r.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Ce(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=E(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&&(k(this._panRequest),this._panRequest=E(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Ee(e._icon),o=e._map.layerPointToLatLng(i);n&&Ce(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Qn=Fn.extend({options:{icon:new Yn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){f(this,e),this._latlng=H(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=H(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"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),ge(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ge(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),he(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&he(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Ce(this._icon,t),this._shadow&&Ce(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&&(ge(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Xn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Xn(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&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Jn(t,e){return new Qn(t,e)}var ti=Fn.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 f(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}}),ei=ti.extend({options:{fill:!0,radius:10},initialize:function(t,e){f(this,e),this._latlng=H(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=H(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 ti.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,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new O(this._point.subtract(i),this._point.add(i))},_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 ni(t,e){return new ei(t,e)}var ii=ei.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),f(this,e),this._latlng=H(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 B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ti.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===W.distance){var o=Math.PI/180,r=this._mRadius/W.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),l=s.add(a).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(u*o))/(Math.cos(e*o)*Math.cos(u*o)))/o;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,t-c]).x,this._radiusY=l.y-s.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});function oi(t,e,n){return new ii(t,e,n)}var ri=ti.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){f(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,n,i=1/0,o=null,r=An,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],u=1,c=l.length;u<c;u++){var h=r(t,e=l[u-1],n=l[u],!0);h<i&&(i=h,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,i,o,r,s,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<l-1;t++)if(o=a[t],r=a[t+1],(i+=n=o.distanceTo(r))>e)return s=(i-e)/n,this._map.layerPointToLatLng([r.x-s*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=H(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return zn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=zn(t),i=0,o=t.length;i<o;i++)n?(e[i]=H(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new O;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 D(t,t);this._pxBounds=new O([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof Z,s=t.length;if(r){for(o=[],i=0;i<s;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<s;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,s,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=kn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(l[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=wn(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&xn(t,a[o],a[i])<=l)return!0;return!1}});function si(t,e){return new ri(t,e)}ri._flat=Dn;var ai=ri.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()");var t,e,n,i,o,r,s,a,l,u=this._rings[0],c=u.length;if(!c)return null;for(r=s=a=0,t=0,e=c-1;t<c;e=t++)n=u[t],i=u[e],o=n.y*i.x-i.y*n.x,s+=(n.x+i.x)*o,a+=(n.y+i.y)*o,r+=3*o;return l=0===r?u[0]:[s/r,a/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=ri.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof Z&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ri.prototype._setLatLngs.call(this,t),zn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new D(e,e);if(t=new O(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=jn(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,s,a,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(l=(e=this._parts[o]).length)-1;r<l;s=r++)n=e[r],i=e[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||ri.prototype._containsPoint.call(this,t,!0)}});function li(t,e){return new ai(t,e)}var ui=Un.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=_(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=ci(t,r);return s?(s.feature=_i(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},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&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function ci(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||di;if(!a&&!s)return null;switch(s.type){case"Point":return hi(u,t,n=c(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=c(a[o]),l.push(hi(u,t,n,e));return new Un(l);case"LineString":case"MultiLineString":return i=fi(a,"LineString"===s.type?0:1,c),new ri(i,e);case"Polygon":case"MultiPolygon":return i=fi(a,"Polygon"===s.type?1:2,c),new ai(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var h=ci({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Un(l);default:throw new Error("Invalid GeoJSON object.")}}function hi(t,e,n,i){return t?t(e,n):new Qn(n,i&&i.markersInheritOptions&&i)}function di(t){return new Z(t[1],t[0],t[2])}function fi(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?fi(t[r],e-1,n):(n||di)(t[r]),o.push(i);return o}function pi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function mi(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?mi(t[r],e-1,n,i):pi(t[r],i));return!e&&n&&o.push(o[0]),o}function gi(t,e){return t.feature?n({},t.feature,{geometry:e}):_i(e)}function _i(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var vi={toGeoJSON:function(t){return gi(this,{type:"Point",coordinates:pi(this.getLatLng(),t)})}};function yi(t,e){return new ui(t,e)}Qn.include(vi),ii.include(vi),ei.include(vi),ri.include({toGeoJSON:function(t){var e=!zn(this._latlngs);return gi(this,{type:(e?"Multi":"")+"LineString",coordinates:mi(this._latlngs,e?1:0,!1,t)})}}),ai.include({toGeoJSON:function(t){var e=!zn(this._latlngs),n=e&&!zn(this._latlngs[0]),i=mi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),gi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Wn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),gi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=_i(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?gi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var bi=yi,wi=Fn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=R(e),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ge(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){he(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&&fe(this._image),this},bringToBack:function(){return this._map&&pe(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(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="IMG"===this._url.tagName,e=this._image=t?this._url:ce("img");ge(e,"leaflet-image-layer"),this._zoomAnimated&&ge(e,"leaflet-zoom-animated"),this.options.className&&ge(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Te(this._image,n,e)},_reset:function(){var t=this._image,e=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Ce(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){be(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(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)}}),xi=function(t,e,n){return new wi(t,e,n)},Ti=wi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ce("video");if(ge(e,"leaflet-image-layer"),this._zoomAnimated&&ge(e,"leaflet-zoom-animated"),this.options.className&&ge(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{_(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;for(var s=0;s<this._url.length;s++){var a=ce("source");a.src=this._url[s],e.appendChild(a)}}}});function Ci(t,e,n){return new Ti(t,e,n)}var Ei=wi.extend({_initImage:function(){var t=this._image=this._url;ge(t,"leaflet-image-layer"),this._zoomAnimated&&ge(t,"leaflet-zoom-animated"),this.options.className&&ge(t,this.options.className),t.onselectstart=u,t.onmousemove=u}});function Li(t,e,n){return new Ei(t,e,n)}var ki=Fn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){f(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(o(he,void 0,this._container),200)):he(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=H(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&&fe(this._container),this},bringToBack:function(){return this._map&&pe(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof Fn||(n=e,e=t),e instanceof Un)for(var i in t._layers){e=t._layers[i];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=j(this.options.offset),n=this._getAnchor();this._zoomAnimated?Ce(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),Pi=ki.extend({options:{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.openPopup(this),this},onAdd:function(t){ki.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ti||this._source.on("preclick",He))},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ti||this._source.off("preclick",He))},getEvents:function(){var t=ki.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ce("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ce("div",t+"-content-wrapper",e);if(this._contentNode=ce("div",t+"-content",n),Fe(e),qe(this._contentNode),Ne(e,"contextmenu",He),this._tipContainer=ce("div",t+"-tip-container",e),this._tip=ce("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ce("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",Ne(i,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,r="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",ge(t,r)):_e(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Ce(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ue(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new D(this._containerLeft,-n-this._containerBottom);o._add(Ee(this._container));var r=t.layerPointToContainerPoint(o),s=j(this.options.autoPanPadding),a=j(this.options.autoPanPaddingTopLeft||s),l=j(this.options.autoPanPaddingBottomRight||s),u=t.getSize(),c=0,h=0;r.x+i+l.x>u.x&&(c=r.x+i-u.x+l.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+n+l.y>u.y&&(h=r.y+n-u.y+l.y),r.y-h-a.y<0&&(h=r.y-a.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),$e(t)},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Si=function(t,e){return new Pi(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof Pi||(t=new Pi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Fn.include({bindPopup:function(t,e){return t instanceof Pi?(f(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new Pi(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&($e(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Mi=ki.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ki.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){ki.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ki.prototype.getEvents.call(this);return Ct&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ce("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,u=o.offsetHeight,c=j(this.options.offset),h=this._getAnchor();"top"===a?(e=l/2,n=u):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=u/2):"right"===a?(e=0,n=u/2):"left"===a?(e=l,n=u/2):s.x<r.x?(a="right",e=0,n=u/2):(a="left",e=l+2*(c.x+h.x),n=u/2),t=t.subtract(j(e,n,!0)).add(c).add(h),_e(o,"leaflet-tooltip-right"),_e(o,"leaflet-tooltip-left"),_e(o,"leaflet-tooltip-top"),_e(o,"leaflet-tooltip-bottom"),ge(o,"leaflet-tooltip-"+a),Ce(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&be(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ai=function(t,e){return new Mi(t,e)};en.include({openTooltip:function(t,e,n){return t instanceof Mi||(t=new Mi(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Fn.include({bindTooltip:function(t,e){return t instanceof Mi?(f(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Mi(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Ct&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ge(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(_e(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var zi=Gn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(de(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=j(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Di(t){return new zi(t)}Gn.Default=Yn;var Ni=Fn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,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){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),he(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(pe(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(){return this._map&&(this._removeAllTiles(),this._update()),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=a(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 D?t:new D(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!et){be(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);be(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=ce("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(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(he(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=ce("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),u(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.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)he(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),s=n-1,a=new D(+o,+r);a.z=+s;var l=this._tileCoordsToKey(a),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new D(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_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 void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();vt?Te(t.el,o,i):Ce(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new O(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),s=[],a=this.options.keepBuffer,l=new O(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new D(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var f=new D(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:s.push(f)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new B(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new D(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(he(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ge(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&E(o(this._tileReady,this,t,null,r)),Ce(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(be(n.el,0),k(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ge(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?E(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new D(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new O(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 ji(t){return new Ni(t)}var Oi=Ni.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=f(this,e)).detectRetina&&kt&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Ne(n,"load",o(this._tileOnLoad,this,e,n)),Ne(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:kt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return g(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_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)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,e.complete||(e.src=y,he(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",y),Ni.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return Ni.prototype._tileReady.call(this,t,e,n)}});function Ii(t,e){return new Oi(t,e)}var Bi=Oi.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 i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var r=(e=f(this,e)).detectRetina&&kt?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,this.wmsParams=i},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,Oi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=I(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===Hn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Oi.prototype.getTileUrl.call(this,t);return a+p(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Ri(t,e){return new Bi(t,e)}Oi.WMS=Bi,Ii.wms=Ri;var Zi=Fn.extend({options:{padding:.1,tolerance:0},initialize:function(t){f(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ge(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 n=this._map.getZoomScale(e,this._zoom),i=Ee(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=o.multiplyBy(-n).add(i).add(o).subtract(s);vt?Te(this._container,a,n):Ce(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),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(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new O(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Hi=Zi.extend({getEvents:function(){var t=Zi.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Zi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ne(t,"mousemove",this._onMouseMove,this),Ne(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ne(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,he(this._container),Oe(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Zi.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=kt?2:1;Ce(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",kt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Zi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(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,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[s(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("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||E(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,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 n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)r=s[n][i],l[i?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"===t.type||!this._map._draggableMoved(e))&&(n=e);n&&(Ye(t),this._fireEvent([n],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&&(_e(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(ge(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),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 n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function qi(t){return St?new Hi(t):null}var Fi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),Wi={_initContainer:function(){this._container=ce("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Zi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Fi("shape");ge(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Fi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(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;he(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Fi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=_(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Fi("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){fe(t._container)},_bringToBack:function(t){pe(t._container)}},$i=At?Fi:X,Ui=Zi.extend({getEvents:function(){var t=Zi.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=$i("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=$i("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){he(this._container),Oe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Zi.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Ce(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=$i("path");t.options.className&&ge(e,t.options.className),t.options.interactive&&ge(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){he(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){fe(t._path)},_bringToBack:function(t){pe(t._path)}});function Vi(t){return Mt||At?new Ui(t):null}At&&Ui.include(Wi),en.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("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&qi(t)||Vi(t)}});var Gi=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ki(t,e){return new Gi(t,e)}Ui.create=$i,Ui.pointsToPath=Q,ui.geometryToLayer=ci,ui.coordsToLatLng=di,ui.coordsToLatLngs=fi,ui.latLngToCoords=pi,ui.latLngsToCoords=mi,ui.getFeature=gi,ui.asFeature=_i,en.mergeOptions({boxZoom:!0});var Yi=pn.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(){Ne(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Oe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){he(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),te(),ke(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ne(document,{contextmenu:$e,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ce("div","leaflet-zoom-box",this._container),ge(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new O(this._point,this._startPoint),n=e.getSize();Ce(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(he(this._box),_e(this._container,"leaflet-crosshair")),ee(),Pe(),Oe(document,{contextmenu:$e,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new B(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Xi=pn.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,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});en.addInitHook("addHandler","doubleClickZoom",Xi),en.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Qi=pn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(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))}ge(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_e(this._map._container,"leaflet-grab"),_e(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=R(this._map.options.maxBounds);this._offsetLimit=I(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,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),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),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=o.multiplyBy(s/r),l=a.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=a.multiplyBy(u/l),h=u/(n.inertiaDeceleration*s),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),E((function(){e.panBy(d,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});en.addInitHook("addHandler","dragging",Qi),en.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Ji=pn.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"),Ne(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(),Oe(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,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){Ne(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Oe(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=j(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}$e(t)}}});en.addInitHook("addHandler","keyboard",Ji),en.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=pn.extend({addHooks:function(){Ne(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Oe(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ge(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),$e(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=pn.extend({addHooks:function(){Ne(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Oe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(We(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new D(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&ge(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Ne(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Oe(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new D(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Ct||Tt&&!ht||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Ct&&!rt,bounceAtZoomLimits:!0});var no=pn.extend({addHooks:function(){ge(this._map._container,"leaflet-touch-zoom"),Ne(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),Oe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ne(document,"touchmove",this._onTouchMove,this),Ne(document,"touchend",this._onTouchEnd,this),We(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=E(a,this,!0),We(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Oe(document,"touchmove",this._onTouchMove,this),Oe(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Xi,en.Drag=Qi,en.Keyboard=Ji,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=rn,t.Browser=Dt,t.Evented=z,t.Mixin=gn,t.Util=P,t.Class=S,t.Handler=pn,t.extend=n,t.bind=o,t.stamp=s,t.setOptions=f,t.DomEvent=Je,t.DomUtil=De,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=Nn,t.PolyUtil=On,t.Point=D,t.point=j,t.Bounds=O,t.bounds=I,t.Transformation=V,t.transformation=G,t.Projection=Rn,t.LatLng=Z,t.latLng=H,t.LatLngBounds=B,t.latLngBounds=R,t.CRS=F,t.GeoJSON=ui,t.geoJSON=yi,t.geoJson=bi,t.Layer=Fn,t.LayerGroup=Wn,t.layerGroup=$n,t.FeatureGroup=Un,t.featureGroup=Vn,t.ImageOverlay=wi,t.imageOverlay=xi,t.VideoOverlay=Ti,t.videoOverlay=Ci,t.SVGOverlay=Ei,t.svgOverlay=Li,t.DivOverlay=ki,t.Popup=Pi,t.popup=Si,t.Tooltip=Mi,t.tooltip=Ai,t.Icon=Gn,t.icon=Kn,t.DivIcon=zi,t.divIcon=Di,t.Marker=Qn,t.marker=Jn,t.TileLayer=Oi,t.tileLayer=Ii,t.GridLayer=Ni,t.gridLayer=ji,t.SVG=Ui,t.svg=Vi,t.Renderer=Zi,t.Canvas=Hi,t.canvas=qi,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=ri,t.polyline=si,t.Polygon=ai,t.polygon=li,t.Rectangle=Gi,t.rectangle=Ki,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t}(e)}));function ce(e){let n,i,o,r,s,c,p,g,_,b,w,x,T,C,E,L,k,P,S,M,A,z,D,N,j,O,I,B;return{c(){n=h("div"),i=h("div"),o=d("map center: "),r=d(e[0]),s=f(),c=h("a"),p=d("view on osm.org"),g=f(),_=h("br"),b=d("\n map zoom: "),w=d(e[1]),x=f(),T=h("br"),C=d("\n viewbox: "),E=d(e[2]),L=f(),k=h("br"),P=d("\n last click: "),S=d(e[4]),M=f(),A=h("br"),z=d("\n mouse position: "),D=d(e[5]),N=f(),j=h("div"),O=h("a"),O.textContent="hide",v(c,"target","_blank"),v(c,"href",e[3]),v(i,"id","map-position-inner"),v(O,"href","#"),v(j,"id","map-position-close"),v(j,"class","svelte-1b30dq3"),v(n,"id","map-position"),v(n,"class","svelte-1b30dq3")},m(t,e){l(t,n,e),a(n,i),a(i,o),a(i,r),a(i,s),a(i,c),a(c,p),a(i,g),a(i,_),a(i,b),a(i,w),a(i,x),a(i,T),a(i,C),a(i,E),a(i,L),a(i,k),a(i,P),a(i,S),a(i,M),a(i,A),a(i,z),a(i,D),a(n,N),a(n,j),a(j,O),I||(B=m(O,"click",he),I=!0)},p(t,[e]){1&e&&y(r,t[0]),8&e&&v(c,"href",t[3]),2&e&&y(w,t[1]),4&e&&y(E,t[2]),16&e&&y(S,t[4]),32&e&&y(D,t[5])},i:t,o:t,d(t){t&&u(n),I=!1,B()}}}function he(t){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function de(t,e,n){let i,o,r,s,a,l,u;function c(t,e){n(0,o=t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),n(3,a=function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),n(1,r=t.getZoom()),n(2,s=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),n(5,u="-"),e&&n(5,u=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return tt.subscribe((t=>{t&&(t.on("move",(function(){c(t)})),t.on("mousemove",(function(e){c(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,c(t)})),t.on("load",(function(){c(t)})))})),[o,r,s,a,l,u]}Y((function(t,e){!function(e,n){t.exports=e(ue),void 0!==n&&n.L&&(n.L.Control.MiniMap=e(L),n.L.control.minimap=function(t,e){return new n.L.Control.MiniMap(t,e)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,n){t.Util.setOptions(this,n),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return n=t.Util.extend(this.options.mapOptions,n),this._miniMap=new t.Map(this._container,n),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var n=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,n,i,o,r,s){var a=t.DomUtil.create("a",i,o);a.innerHTML=e,a.href="#",a.title=n;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",r,s),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),n=this._miniMap.latLngToContainerPoint(e.getSouthWest()),i=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:n,ne:i}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,n=this._miniMap.getZoom()-this._mainMap.getZoom(),i=this._miniMap.getZoom()-this.options.zoomLevelOffset;return n>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset?this._miniMap.getZoom()>this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=i,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window)}));class fe extends G{constructor(t){super(),V(this,t,de,ce,r,{})}}function pe(e){let n,r,s,a,c,d,p,g;return n=new fe({}),{c(){F(n.$$.fragment),r=f(),s=h("div"),a=f(),c=h("div"),c.textContent="show map bounds",v(s,"id","map"),v(s,"class","svelte-1vbvdrk"),v(c,"id","show-map-position"),v(c,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(i,u){var h;W(n,i,u),l(i,r,u),l(i,s,u),l(i,a,u),l(i,c,u),d=!0,p||(g=[(h=e[0].call(null,s),h&&o(h.destroy)?h.destroy:t),m(c,"click",_(me))],p=!0)},p:t,i(t){d||(H(n.$$.fragment,t),d=!0)},o(t){q(n.$$.fragment,t),d=!1},d(t){$(n,t),t&&u(r),t&&u(s),t&&u(a),t&&u(c),p=!1,i(g)}}}function me(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function ge(t,e,n){let{display_minimap:i=!1}=e,o=[];function r(t){let e=s(tt);if(!e)return;!function(){let t=s(tt);t&&o.forEach((function(e){t.removeLayer(e)}))}();let n=s(it);if(n){let t=ue.circleMarker(n,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.addTo(e),o.push(t)}var i=new URLSearchParams(window.location.search).get("viewbox");if(i){let t=i.split(","),n=ue.latLngBounds([t[1],t[0]],[t[3],t[2]]);ue.rectangle(n,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let r=t.centroid?t.centroid.coordinates[1]:t.lat,a=t.centroid?t.centroid.coordinates[0]:t.lon,l=t.geometry||t.geojson;if(r&&a){let t=ue.circleMarker([r,a],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});e.addLayer(t),o.push(t)}if(l){var u=ue.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:l,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(u),o.push(u),e.fitBounds(u.getBounds())}else r&&a?e.setView([r,a],10):e.fitWorld()}return nt.subscribe((t=>{r(t)})),t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap)},[function(t){let e=function(t){const e=dt("Map_Tile_Attribution")||null;let n=new ue.map(t,{attributionControl:e&&e.length,scrollWheelZoom:!0,touchZoom:!1,center:[dt("Map_Default_Lat"),dt("Map_Default_Lon")],zoom:dt("Map_Default_Zoom")});if(ue.tileLayer(dt("Map_Tile_URL"),{attribution:e}).addTo(n),i){let t=new ue.TileLayer(dt("Map_Tile_URL"),{minZoom:0,maxZoom:13,attribution:e});new ue.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=ue.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return tt.set(e),r(s(nt)),{destroy:()=>{e.remove()}}},i]}class _e extends G{constructor(t){super(),V(this,t,ge,pe,r,{display_minimap:1})}}function ve(t){let e,n,i,o,r,s,c,d,p;return e=new Ut({props:{reverse_search:t[0],api_request_params:t[1],bStructuredSearch:t[2]}}),r=new le({props:{reverse_search:t[0]}}),d=new _e({props:{display_minimap:!0}}),{c(){F(e.$$.fragment),n=f(),i=h("div"),o=h("div"),F(r.$$.fragment),s=f(),c=h("div"),F(d.$$.fragment),v(o,"class","sidebar svelte-1wb4w3"),v(c,"id","map-wrapper"),v(c,"class","svelte-1wb4w3"),v(i,"id","content"),v(i,"class","svelte-1wb4w3")},m(t,u){W(e,t,u),l(t,n,u),l(t,i,u),a(i,o),W(r,o,null),a(i,s),a(i,c),W(d,c,null),p=!0},p(t,[n]){const i={};1&n&&(i.reverse_search=t[0]),2&n&&(i.api_request_params=t[1]),e.$set(i);const o={};1&n&&(o.reverse_search=t[0]),r.$set(o)},i(t){p||(H(e.$$.fragment,t),H(r.$$.fragment,t),H(d.$$.fragment,t),p=!0)},o(t){q(e.$$.fragment,t),q(r.$$.fragment,t),q(d.$$.fragment,t),p=!1},d(t){$(e,t),t&&u(n),t&&u(i),$(r),$(d)}}}function ye(t,e,n){let i,{reverse_search:o=!1}=e;return C((function(){let t=new URLSearchParams(window.location.search);if(vt(),o)n(1,i={lat:t.get("lat"),lon:t.get("lon"),zoom:t.get("zoom")>1?Number(t.get("zoom")):Number(dt("Reverse_Default_Search_Zoom")),format:"jsonv2"}),(i.lat||i.lat)&&pt("reverse",i,(function(t){t&&!t.error?(it.set([i.lat,i.lon]),et.set([t])):et.set([]),vt("Reverse result for "+i.lat+","+i.lon),document.querySelector("input[name=lat]").focus()}));else{n(1,i={q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:dt("Search_AreaPolygons",!1)?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.get("dedupe"),"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=i.street||i.city||i.county||i.state||i.country||i.postalcode;(i.q||e)&&pt("search",i,(function(t){et.set(t),vt("Result for "+i.q),document.querySelector("input[name=q]").focus()}))}})),t.$$set=t=>{"reverse_search"in t&&n(0,o=t.reverse_search)},[o,i,undefined]}class be extends G{constructor(t){super(),V(this,t,ye,ve,r,{reverse_search:0})}}function we(e){let n,o,r,s,c,d,p,_,y,b,w,x,T,C,E,L,k,P;return{c(){n=h("div"),o=h("div"),r=h("div"),s=h("h1"),s.textContent="Show details for place",c=f(),d=h("div"),d.innerHTML='<h4 class="svelte-k5v90i">Search by place id</h4> \n\n <form class="form-inline" action="details.html"><input type="edit" class="form-control form-control-sm svelte-k5v90i" pattern="^[0-9]+$" name="place_id" placeholder="12345"/> \n <input type="submit" class="btn btn-primary btn-sm" value="Show"/></form>',p=f(),_=h("div"),y=h("h4"),y.textContent="Search by OSM type and OSM id",b=f(),w=h("form"),w.innerHTML='<input type="edit" class="form-control form-control-sm svelte-k5v90i" pattern="^[NWR][0-9]+$" placeholder="N123 or W123 or R123"/> \n <input type="hidden" name="osmtype"/> \n <input type="hidden" name="osmid"/> \n <input type="submit" class="btn btn-primary btn-sm" value="Show"/>',x=f(),T=h("div"),C=h("h4"),C.textContent="Search by openstreetmap.org URL",E=f(),L=h("form"),L.innerHTML='<input type="edit" class="form-control form-control-sm svelte-k5v90i" pattern=".*openstreetmap.*" placeholder="https://www.openstreetmap.org/relation/123"/> \n <input type="hidden" name="osmtype"/> \n <input type="hidden" name="osmid"/> \n <input type="submit" class="btn btn-primary btn-sm" value="Show"/>',v(d,"class","search-form svelte-k5v90i"),v(y,"class","svelte-k5v90i"),v(w,"id","form-by-type-and-id"),v(w,"class","form-inline"),v(w,"action","details.html"),v(_,"class","search-form svelte-k5v90i"),v(C,"class","svelte-k5v90i"),v(L,"id","form-by-osm-url"),v(L,"class","form-inline"),v(L,"action","details.html"),v(T,"class","search-form svelte-k5v90i"),v(r,"class","col-md-12"),v(o,"class","row"),v(n,"class","container"),v(n,"id","details-index-page")},m(t,e){l(t,n,e),a(n,o),a(o,r),a(r,s),a(r,c),a(r,d),a(r,p),a(r,_),a(_,y),a(_,b),a(_,w),a(r,x),a(r,T),a(T,C),a(T,E),a(T,L),k||(P=[m(w,"submit",g(xe)),m(L,"submit",g(xe))],k=!0)},p:t,i:t,o:t,d(t){t&&u(n),k=!1,i(P)}}}function xe(t){let e=t.target,n=e.querySelector("input[type=edit]").value,i=n.match(/^\s*([NWR])(\d+)\s*$/i);i||(i=n.match(/\/(relation|way|node)\/(\d+)\s*$/)),i?(e.querySelector("input[name=osmtype]").setAttribute("value",i[1].charAt(0).toUpperCase()),e.querySelector("input[name=osmid]").setAttribute("value",i[2]),e.submit()):alert("invalid input")}class Te extends G{constructor(t){super(),V(this,t,null,we,r,{})}}function Ce(e){let n;return{c(){n=h("span"),n.textContent="No Name",v(n,"class","noname svelte-rtfpp8")},m(t,e){l(t,n,e)},p:t,d(t){t&&u(n)}}}function Ee(t){let e,n=t[0].localname+"";return{c(){e=d(n)},m(t,n){l(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&y(e,n)},d(t){t&&u(e)}}}function Le(t){let e,n,i;return{c(){e=h("a"),n=d("details"),v(e,"href",i=Ct(t[0]))},m(t,i){l(t,e,i),a(e,n)},p(t,n){1&n&&i!==(i=Ct(t[0]))&&v(e,"href",i)},d(t){t&&u(e)}}}function ke(e){let n,i,o,r,s,c,p,m,g,_,b,x,T,C,E,L,k,P=St(e[0])+"",S=xt(e[0])+"",M=e[0].rank_address+"",A=Mt(e[0].admin_level)+"",z=At(e[0].distance,e[1])+"";function D(t,e){return t[0].localname?Ee:Ce}let N=D(e),j=N(e),O=e[0].osm_id&&Le(e);return{c(){n=h("tr"),i=h("td"),j.c(),o=f(),r=h("td"),s=d(P),c=f(),p=h("td"),m=f(),g=h("td"),_=d(M),b=f(),x=h("td"),T=d(A),C=f(),E=h("td"),L=f(),k=h("td"),O&&O.c(),v(i,"class","name svelte-rtfpp8"),v(n,"class","svelte-rtfpp8"),w(n,"notused",!e[2])},m(t,e){l(t,n,e),a(n,i),j.m(i,null),a(n,o),a(n,r),a(r,s),a(n,c),a(n,p),p.innerHTML=S,a(n,m),a(n,g),a(g,_),a(n,b),a(n,x),a(x,T),a(n,C),a(n,E),E.innerHTML=z,a(n,L),a(n,k),O&&O.m(k,null)},p(t,[e]){N===(N=D(t))&&j?j.p(t,e):(j.d(1),j=N(t),j&&(j.c(),j.m(i,null))),1&e&&P!==(P=St(t[0])+"")&&y(s,P),1&e&&S!==(S=xt(t[0])+"")&&(p.innerHTML=S),1&e&&M!==(M=t[0].rank_address+"")&&y(_,M),1&e&&A!==(A=Mt(t[0].admin_level)+"")&&y(T,A),3&e&&z!==(z=At(t[0].distance,t[1])+"")&&(E.innerHTML=z),t[0].osm_id?O?O.p(t,e):(O=Le(t),O.c(),O.m(k,null)):O&&(O.d(1),O=null),4&e&&w(n,"notused",!t[2])},i:t,o:t,d(t){t&&u(n),j.d(),O&&O.d()}}}function Pe(t,e,n){let i,{addressLine:o}=e,{bDistanceInMeters:r}=e;return t.$$set=t=>{"addressLine"in t&&n(0,o=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters)},t.$$.update=()=>{1&t.$$.dirty&&n(2,i=o.isaddress)},[o,r,i]}class Se extends G{constructor(t){super(),V(this,t,Pe,ke,r,{addressLine:0,bDistanceInMeters:1})}}function Me(t,e,n){const i=t.slice();return i[3]=e[n],i}function Ae(t,e,n){const i=t.slice();return i[6]=e[n],i}function ze(t,e,n){const i=t.slice();return i[9]=e[n],i}function De(t,e,n){const i=t.slice();return i[9]=e[n],i}function Ne(t,e,n){const i=t.slice();return i[14]=e[n],i}function je(t,e,n){const i=t.slice();return i[14]=e[n],i}function Oe(t,e,n){const i=t.slice();return i[19]=e[n],i}function Ie(t,e,n){const i=t.slice();return i[19]=e[n],i}function Be(t,e,n){const i=t.slice();return i[19]=e[n],i}function Re(e){let n;return{c(){n=d("No such place found.")},m(t,e){l(t,n,e)},p:t,i:t,o:t,d(t){t&&u(n)}}}function Ze(e){let n,i;return n=new Te({}),{c(){F(n.$$.fragment)},m(t,e){W(n,t,e),i=!0},p:t,i(t){i||(H(n.$$.fragment,t),i=!0)},o(t){q(n.$$.fragment,t),i=!1},d(t){$(n,t)}}}function He(t){let e,n,i,o,r,s,p,m,g,_,b,w,x,T,C,E,L,k,P,S,M,A,z,D,N,j,O,I,B,U,V,G,K,Y,X,Q,J,tt,et,nt,it,ot,rt,st,at,lt,ut,ct,ht,dt,ft,pt,mt,gt,_t,vt,yt,bt,wt,Tt,Et,St,Mt,At,zt,Dt,Nt,jt,Ot,It,Bt,Rt,Zt,Ht,qt,Ft,Wt,$t,Ut,Vt,Gt,Kt,Yt,Qt,Jt,te,ee,ne,ie,oe,re,se,ae,le,ue,ce,he,de,fe,pe,me,ge,ve,ye,be,we,xe,Te,Ce,Ee,Le,ke,Pe,Se,Me,Ae,ze,De,Ne=t[0].localname+"",je=t[0].category+"",Re=t[0].type+"",Ze=t[0].indexed_date+"",He=kt(t[0]),$e=t[0].rank_search+"",Ye=t[0].rank_address+"",Qe=Pt(t[0].rank_address)+"",en=Lt(t[0])+"",nn=t[0].centroid.coordinates[1]+"",on=t[0].centroid.coordinates[0]+"",rn=xt(t[0])+"",ln=t[0].place_id+"",un=t[0].calculated_postcode+"";x=new Xt({props:{aPlace:t[0]}});let cn=Object.keys(t[0].names),hn=[];for(let e=0;e<cn.length;e+=1)hn[e]=qe(Be(t,cn,e));let dn=He&&Fe(t),fn=t[0].calculated_importance&&We(t),pn=t[0].calculated_wikipedia&&Ue(t),mn=Object.keys(t[0].addresstags),gn=[];for(let e=0;e<mn.length;e+=1)gn[e]=Ve(Ie(t,mn,e));let _n=Object.keys(t[0].extratags),vn=[];for(let e=0;e<_n.length;e+=1)vn[e]=Ge(Oe(t,_n,e));fe=new _e({});let yn=t[0].address&&Ke(t),bn=t[0].linked_places&&Xe(t);function wn(t,e){return t[0].keywords?tn:Je}let xn=wn(t),Tn=xn(t);const Cn=[an,sn],En=[];function Ln(t,e){return t[0].hierarchy?0:1}return Ae=Ln(t),ze=En[Ae]=Cn[Ae](t),{c(){e=h("div"),n=h("div"),i=h("div"),o=h("h1"),r=d(Ne),s=f(),p=h("small"),m=h("a"),g=d("link to this page"),b=f(),w=h("div"),F(x.$$.fragment),T=f(),C=h("div"),E=h("div"),L=h("table"),k=h("tbody"),P=h("tr"),S=h("td"),S.textContent="Name",M=f(),A=h("td");for(let t=0;t<hn.length;t+=1)hn[t].c();z=f(),D=h("tr"),N=h("td"),N.textContent="Type",j=f(),O=h("td"),I=d(je),B=d(":"),U=d(Re),V=f(),G=h("tr"),K=h("td"),K.textContent="Last Updated",Y=f(),X=h("td"),Q=d(Ze),J=f(),dn&&dn.c(),tt=f(),et=h("tr"),nt=h("td"),nt.textContent="Search Rank",it=f(),ot=h("td"),rt=d($e),st=f(),at=h("tr"),lt=h("td"),lt.textContent="Address Rank",ut=f(),ct=h("td"),ht=d(Ye),dt=d(" ("),ft=d(Qe),pt=d(")"),mt=f(),fn&&fn.c(),gt=f(),_t=h("tr"),vt=h("td"),vt.textContent="Coverage",yt=f(),bt=h("td"),wt=d(en),Tt=f(),Et=h("tr"),St=h("td"),St.textContent="Centre Point (lat,lon)",Mt=f(),At=h("td"),zt=d(nn),Dt=d(","),Nt=d(on),jt=f(),Ot=h("tr"),It=h("td"),It.textContent="OSM",Bt=f(),Rt=h("td"),Zt=f(),Ht=h("tr"),qt=h("td"),qt.innerHTML='Place Id\n (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)',Ft=f(),Wt=h("td"),$t=d(ln),Ut=f(),pn&&pn.c(),Vt=f(),Gt=h("tr"),Kt=h("td"),Kt.textContent="Computed Postcode",Yt=f(),Qt=h("td"),Jt=d(un),te=f(),ee=h("tr"),ne=h("td"),ne.textContent="Address Tags",ie=f(),oe=h("td");for(let t=0;t<gn.length;t+=1)gn[t].c();re=f(),se=h("tr"),ae=h("td"),ae.textContent="Extra Tags",le=f(),ue=h("td");for(let t=0;t<vn.length;t+=1)vn[t].c();ce=f(),he=h("div"),de=h("div"),F(fe.$$.fragment),pe=f(),me=h("div"),ge=h("div"),ve=h("h2"),ve.textContent="Address",ye=f(),be=h("table"),we=h("thead"),we.innerHTML='<tr class="svelte-j6zgmy"><th class="svelte-j6zgmy">Local name</th> \n <th class="svelte-j6zgmy">Type</th> \n <th class="svelte-j6zgmy">OSM</th> \n <th class="svelte-j6zgmy">Address rank</th> \n <th class="svelte-j6zgmy">Admin level</th> \n <th class="svelte-j6zgmy">Distance</th> \n <th class="svelte-j6zgmy"></th></tr>',xe=f(),Te=h("tbody"),yn&&yn.c(),Ce=f(),bn&&bn.c(),Ee=f(),Le=h("tr"),Le.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h2 class="svelte-j6zgmy">Keywords</h2></td>',ke=f(),Tn.c(),Pe=f(),Se=h("tr"),Se.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h2 class="svelte-j6zgmy">Parent Of</h2></td>',Me=f(),ze.c(),v(m,"href",_=Ct(t[0])),v(m,"class","svelte-j6zgmy"),v(o,"class","svelte-j6zgmy"),v(i,"class","col-sm-10"),v(w,"class","col-sm-2 text-right"),v(n,"class","row"),v(S,"class","svelte-j6zgmy"),v(A,"class","svelte-j6zgmy"),v(P,"class","svelte-j6zgmy"),v(N,"class","svelte-j6zgmy"),v(O,"class","svelte-j6zgmy"),v(D,"class","svelte-j6zgmy"),v(K,"class","svelte-j6zgmy"),v(X,"class","svelte-j6zgmy"),v(G,"class","svelte-j6zgmy"),v(nt,"class","svelte-j6zgmy"),v(ot,"class","svelte-j6zgmy"),v(et,"class","svelte-j6zgmy"),v(lt,"class","svelte-j6zgmy"),v(ct,"class","svelte-j6zgmy"),v(at,"class","svelte-j6zgmy"),v(vt,"class","svelte-j6zgmy"),v(bt,"class","svelte-j6zgmy"),v(_t,"class","svelte-j6zgmy"),v(St,"class","svelte-j6zgmy"),v(At,"class","svelte-j6zgmy"),v(Et,"class","svelte-j6zgmy"),v(It,"class","svelte-j6zgmy"),v(Rt,"class","svelte-j6zgmy"),v(Ot,"class","svelte-j6zgmy"),v(qt,"class","svelte-j6zgmy"),v(Wt,"class","svelte-j6zgmy"),v(Ht,"class","svelte-j6zgmy"),v(Kt,"class","svelte-j6zgmy"),v(Qt,"class","svelte-j6zgmy"),v(Gt,"class","svelte-j6zgmy"),v(ne,"class","svelte-j6zgmy"),v(oe,"class","svelte-j6zgmy"),v(ee,"class","svelte-j6zgmy"),v(ae,"class","svelte-j6zgmy"),v(ue,"class","svelte-j6zgmy"),v(se,"class","svelte-j6zgmy"),v(k,"class","svelte-j6zgmy"),v(L,"id","locationdetails"),v(L,"class","table table-striped svelte-j6zgmy"),v(E,"class","col-md-6"),v(de,"id","map-wrapper"),v(de,"class","svelte-j6zgmy"),v(he,"class","col-md-6"),v(C,"class","row"),v(ve,"class","svelte-j6zgmy"),v(we,"class","svelte-j6zgmy"),v(Le,"class","all-columns svelte-j6zgmy"),v(Se,"class","all-columns svelte-j6zgmy"),v(Te,"class","svelte-j6zgmy"),v(be,"id","address"),v(be,"class","table table-striped table-small svelte-j6zgmy"),v(ge,"class","col-md-12"),v(me,"class","row"),v(e,"class","container")},m(t,u){l(t,e,u),a(e,n),a(n,i),a(i,o),a(o,r),a(o,s),a(o,p),a(p,m),a(m,g),a(n,b),a(n,w),W(x,w,null),a(e,T),a(e,C),a(C,E),a(E,L),a(L,k),a(k,P),a(P,S),a(P,M),a(P,A);for(let t=0;t<hn.length;t+=1)hn[t].m(A,null);a(k,z),a(k,D),a(D,N),a(D,j),a(D,O),a(O,I),a(O,B),a(O,U),a(k,V),a(k,G),a(G,K),a(G,Y),a(G,X),a(X,Q),a(k,J),dn&&dn.m(k,null),a(k,tt),a(k,et),a(et,nt),a(et,it),a(et,ot),a(ot,rt),a(k,st),a(k,at),a(at,lt),a(at,ut),a(at,ct),a(ct,ht),a(ct,dt),a(ct,ft),a(ct,pt),a(k,mt),fn&&fn.m(k,null),a(k,gt),a(k,_t),a(_t,vt),a(_t,yt),a(_t,bt),a(bt,wt),a(k,Tt),a(k,Et),a(Et,St),a(Et,Mt),a(Et,At),a(At,zt),a(At,Dt),a(At,Nt),a(k,jt),a(k,Ot),a(Ot,It),a(Ot,Bt),a(Ot,Rt),Rt.innerHTML=rn,a(k,Zt),a(k,Ht),a(Ht,qt),a(Ht,Ft),a(Ht,Wt),a(Wt,$t),a(k,Ut),pn&&pn.m(k,null),a(k,Vt),a(k,Gt),a(Gt,Kt),a(Gt,Yt),a(Gt,Qt),a(Qt,Jt),a(k,te),a(k,ee),a(ee,ne),a(ee,ie),a(ee,oe);for(let t=0;t<gn.length;t+=1)gn[t].m(oe,null);a(k,re),a(k,se),a(se,ae),a(se,le),a(se,ue);for(let t=0;t<vn.length;t+=1)vn[t].m(ue,null);a(C,ce),a(C,he),a(he,de),W(fe,de,null),a(e,pe),a(e,me),a(me,ge),a(ge,ve),a(ge,ye),a(ge,be),a(be,we),a(be,xe),a(be,Te),yn&&yn.m(Te,null),a(Te,Ce),bn&&bn.m(Te,null),a(Te,Ee),a(Te,Le),a(Te,ke),Tn.m(Te,null),a(Te,Pe),a(Te,Se),a(Te,Me),En[Ae].m(Te,null),De=!0},p(t,e){(!De||1&e)&&Ne!==(Ne=t[0].localname+"")&&y(r,Ne),(!De||1&e&&_!==(_=Ct(t[0])))&&v(m,"href",_);const n={};if(1&e&&(n.aPlace=t[0]),x.$set(n),1&e){let n;for(cn=Object.keys(t[0].names),n=0;n<cn.length;n+=1){const i=Be(t,cn,n);hn[n]?hn[n].p(i,e):(hn[n]=qe(i),hn[n].c(),hn[n].m(A,null))}for(;n<hn.length;n+=1)hn[n].d(1);hn.length=cn.length}if((!De||1&e)&&je!==(je=t[0].category+"")&&y(I,je),(!De||1&e)&&Re!==(Re=t[0].type+"")&&y(U,Re),(!De||1&e)&&Ze!==(Ze=t[0].indexed_date+"")&&y(Q,Ze),1&e&&(He=kt(t[0])),He?dn?dn.p(t,e):(dn=Fe(t),dn.c(),dn.m(k,tt)):dn&&(dn.d(1),dn=null),(!De||1&e)&&$e!==($e=t[0].rank_search+"")&&y(rt,$e),(!De||1&e)&&Ye!==(Ye=t[0].rank_address+"")&&y(ht,Ye),(!De||1&e)&&Qe!==(Qe=Pt(t[0].rank_address)+"")&&y(ft,Qe),t[0].calculated_importance?fn?fn.p(t,e):(fn=We(t),fn.c(),fn.m(k,gt)):fn&&(fn.d(1),fn=null),(!De||1&e)&&en!==(en=Lt(t[0])+"")&&y(wt,en),(!De||1&e)&&nn!==(nn=t[0].centroid.coordinates[1]+"")&&y(zt,nn),(!De||1&e)&&on!==(on=t[0].centroid.coordinates[0]+"")&&y(Nt,on),(!De||1&e)&&rn!==(rn=xt(t[0])+"")&&(Rt.innerHTML=rn),(!De||1&e)&&ln!==(ln=t[0].place_id+"")&&y($t,ln),t[0].calculated_wikipedia?pn?pn.p(t,e):(pn=Ue(t),pn.c(),pn.m(k,Vt)):pn&&(pn.d(1),pn=null),(!De||1&e)&&un!==(un=t[0].calculated_postcode+"")&&y(Jt,un),1&e){let n;for(mn=Object.keys(t[0].addresstags),n=0;n<mn.length;n+=1){const i=Ie(t,mn,n);gn[n]?gn[n].p(i,e):(gn[n]=Ve(i),gn[n].c(),gn[n].m(oe,null))}for(;n<gn.length;n+=1)gn[n].d(1);gn.length=mn.length}if(1&e){let n;for(_n=Object.keys(t[0].extratags),n=0;n<_n.length;n+=1){const i=Oe(t,_n,n);vn[n]?vn[n].p(i,e):(vn[n]=Ge(i),vn[n].c(),vn[n].m(ue,null))}for(;n<vn.length;n+=1)vn[n].d(1);vn.length=_n.length}t[0].address?yn?(yn.p(t,e),1&e&&H(yn,1)):(yn=Ke(t),yn.c(),H(yn,1),yn.m(Te,Ce)):yn&&(R(),q(yn,1,1,(()=>{yn=null})),Z()),t[0].linked_places?bn?(bn.p(t,e),1&e&&H(bn,1)):(bn=Xe(t),bn.c(),H(bn,1),bn.m(Te,Ee)):bn&&(R(),q(bn,1,1,(()=>{bn=null})),Z()),xn===(xn=wn(t))&&Tn?Tn.p(t,e):(Tn.d(1),Tn=xn(t),Tn&&(Tn.c(),Tn.m(Te,Pe)));let i=Ae;Ae=Ln(t),Ae===i?En[Ae].p(t,e):(R(),q(En[i],1,1,(()=>{En[i]=null})),Z(),ze=En[Ae],ze?ze.p(t,e):(ze=En[Ae]=Cn[Ae](t),ze.c()),H(ze,1),ze.m(Te,null))},i(t){De||(H(x.$$.fragment,t),H(fe.$$.fragment,t),H(yn),H(bn),H(ze),De=!0)},o(t){q(x.$$.fragment,t),q(fe.$$.fragment,t),q(yn),q(bn),q(ze),De=!1},d(t){t&&u(e),$(x),c(hn,t),dn&&dn.d(),fn&&fn.d(),pn&&pn.d(),c(gn,t),c(vn,t),$(fe),yn&&yn.d(),bn&&bn.d(),Tn.d(),En[Ae].d()}}}function qe(t){let e,n,i,o,r,s,c=t[0].names[t[19]]+"",f=t[19]+"";return{c(){e=h("div"),n=h("span"),i=d(c),o=d(" ("),r=d(f),s=d(")\n "),v(n,"class","name svelte-j6zgmy"),v(e,"class","line")},m(t,u){l(t,e,u),a(e,n),a(n,i),a(e,o),a(e,r),a(e,s)},p(t,e){1&e&&c!==(c=t[0].names[t[19]]+"")&&y(i,c),1&e&&f!==(f=t[19]+"")&&y(r,f)},d(t){t&&u(e)}}}function Fe(t){let e,n,i,o,r,s=t[0].admin_level+"";return{c(){e=h("tr"),n=h("td"),n.textContent="Admin Level",i=f(),o=h("td"),r=d(s),v(n,"class","svelte-j6zgmy"),v(o,"class","svelte-j6zgmy"),v(e,"class","svelte-j6zgmy")},m(t,s){l(t,e,s),a(e,n),a(e,i),a(e,o),a(o,r)},p(t,e){1&e&&s!==(s=t[0].admin_level+"")&&y(r,s)},d(t){t&&u(e)}}}function We(t){let e,n,i,o,r,s,c=t[0].calculated_importance+"",p=!t[0].importance&&$e();return{c(){e=h("tr"),n=h("td"),n.textContent="Importance",i=f(),o=h("td"),r=d(c),s=f(),p&&p.c(),v(n,"class","svelte-j6zgmy"),v(o,"class","svelte-j6zgmy"),v(e,"class","svelte-j6zgmy")},m(t,u){l(t,e,u),a(e,n),a(e,i),a(e,o),a(o,r),a(o,s),p&&p.m(o,null)},p(t,e){1&e&&c!==(c=t[0].calculated_importance+"")&&y(r,c),t[0].importance?p&&(p.d(1),p=null):p||(p=$e(),p.c(),p.m(o,null))},d(t){t&&u(e),p&&p.d()}}}function $e(t){let e;return{c(){e=d("(estimated)")},m(t,n){l(t,e,n)},d(t){t&&u(e)}}}function Ue(t){let e,n,i,o,r=Et(t[0])+"";return{c(){e=h("tr"),n=h("td"),n.textContent="Wikipedia Calculated",i=f(),o=h("td"),v(n,"class","svelte-j6zgmy"),v(o,"class","svelte-j6zgmy"),v(e,"class","svelte-j6zgmy")},m(t,s){l(t,e,s),a(e,n),a(e,i),a(e,o),o.innerHTML=r},p(t,e){1&e&&r!==(r=Et(t[0])+"")&&(o.innerHTML=r)},d(t){t&&u(e)}}}function Ve(t){let e,n,i,o,r,s,c=t[0].addresstags[t[19]]+"",f=t[19]+"";return{c(){e=h("div"),n=h("span"),i=d(c),o=d(" ("),r=d(f),s=d(")\n "),v(n,"class","name svelte-j6zgmy"),v(e,"class","line")},m(t,u){l(t,e,u),a(e,n),a(n,i),a(e,o),a(e,r),a(e,s)},p(t,e){1&e&&c!==(c=t[0].addresstags[t[19]]+"")&&y(i,c),1&e&&f!==(f=t[19]+"")&&y(r,f)},d(t){t&&u(e)}}}function Ge(t){let e,n,i,o,r,s,c=t[0].extratags[t[19]]+"",f=t[19]+"";return{c(){e=h("div"),n=h("span"),i=d(c),o=d(" ("),r=d(f),s=d(")\n "),v(n,"class","name svelte-j6zgmy"),v(e,"class","line")},m(t,u){l(t,e,u),a(e,n),a(n,i),a(e,o),a(e,r),a(e,s)},p(t,e){1&e&&c!==(c=t[0].extratags[t[19]]+"")&&y(i,c),1&e&&f!==(f=t[19]+"")&&y(r,f)},d(t){t&&u(e)}}}function Ke(t){let e,n,i=t[0].address,o=[];for(let e=0;e<i.length;e+=1)o[e]=Ye(je(t,i,e));const r=t=>q(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=p()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);l(t,e,i),n=!0},p(t,n){if(1&n){let s;for(i=t[0].address,s=0;s<i.length;s+=1){const r=je(t,i,s);o[s]?(o[s].p(r,n),H(o[s],1)):(o[s]=Ye(r),o[s].c(),H(o[s],1),o[s].m(e.parentNode,e))}for(R(),s=i.length;s<o.length;s+=1)r(s);Z()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)H(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)q(o[t]);n=!1},d(t){c(o,t),t&&u(e)}}}function Ye(t){let e,n;return e=new Se({props:{addressLine:t[14],bDistanceInMeters:"false"}}),{c(){F(e.$$.fragment)},m(t,i){W(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[14]),e.$set(i)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){q(e.$$.fragment,t),n=!1},d(t){$(e,t)}}}function Xe(t){let e,n,i,o,r=t[0].linked_places,s=[];for(let e=0;e<r.length;e+=1)s[e]=Qe(Ne(t,r,e));const a=t=>q(s[t],1,1,(()=>{s[t]=null}));return{c(){e=h("tr"),e.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h2 class="svelte-j6zgmy">Linked Places</h2></td>',n=f();for(let t=0;t<s.length;t+=1)s[t].c();i=p(),v(e,"class","all-columns svelte-j6zgmy")},m(t,r){l(t,e,r),l(t,n,r);for(let e=0;e<s.length;e+=1)s[e].m(t,r);l(t,i,r),o=!0},p(t,e){if(1&e){let n;for(r=t[0].linked_places,n=0;n<r.length;n+=1){const o=Ne(t,r,n);s[n]?(s[n].p(o,e),H(s[n],1)):(s[n]=Qe(o),s[n].c(),H(s[n],1),s[n].m(i.parentNode,i))}for(R(),n=r.length;n<s.length;n+=1)a(n);Z()}},i(t){if(!o){for(let t=0;t<r.length;t+=1)H(s[t]);o=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)q(s[t]);o=!1},d(t){t&&u(e),t&&u(n),c(s,t),t&&u(i)}}}function Qe(t){let e,n;return e=new Se({props:{addressLine:t[14],bDistanceInMeters:"true"}}),{c(){F(e.$$.fragment)},m(t,i){W(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[14]),e.$set(i)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){q(e.$$.fragment,t),n=!1},d(t){$(e,t)}}}function Je(e){let n,i,o,r;return{c(){n=h("tr"),i=h("td"),o=h("a"),r=d("display keywords"),v(o,"class","btn btn-outline-secondary btn-sm"),v(o,"href",e[1]+"&keywords=1"),v(i,"class","svelte-j6zgmy"),v(n,"class","svelte-j6zgmy")},m(t,e){l(t,n,e),a(n,i),a(i,o),a(o,r)},p:t,d(t){t&&u(n)}}}function tn(t){let e,n,i,o,r,s,a=t[0].keywords.name,d=[];for(let e=0;e<a.length;e+=1)d[e]=nn(De(t,a,e));let m=t[0].keywords.address,g=[];for(let e=0;e<m.length;e+=1)g[e]=rn(ze(t,m,e));return{c(){e=h("tr"),e.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h3 class="svelte-j6zgmy">Name Keywords</h3></td>',n=f();for(let t=0;t<d.length;t+=1)d[t].c();i=f(),o=h("tr"),o.innerHTML='<td colspan="6" class="svelte-j6zgmy"><h3 class="svelte-j6zgmy">Address Keywords</h3></td>',r=f();for(let t=0;t<g.length;t+=1)g[t].c();s=p(),v(e,"class","all-columns svelte-j6zgmy"),v(o,"class","all-columns svelte-j6zgmy")},m(t,a){l(t,e,a),l(t,n,a);for(let e=0;e<d.length;e+=1)d[e].m(t,a);l(t,i,a),l(t,o,a),l(t,r,a);for(let e=0;e<g.length;e+=1)g[e].m(t,a);l(t,s,a)},p(t,e){if(1&e){let n;for(a=t[0].keywords.name,n=0;n<a.length;n+=1){const o=De(t,a,n);d[n]?d[n].p(o,e):(d[n]=nn(o),d[n].c(),d[n].m(i.parentNode,i))}for(;n<d.length;n+=1)d[n].d(1);d.length=a.length}if(1&e){let n;for(m=t[0].keywords.address,n=0;n<m.length;n+=1){const i=ze(t,m,n);g[n]?g[n].p(i,e):(g[n]=rn(i),g[n].c(),g[n].m(s.parentNode,s))}for(;n<g.length;n+=1)g[n].d(1);g.length=m.length}},d(t){t&&u(e),t&&u(n),c(d,t),t&&u(i),t&&u(o),t&&u(r),c(g,t),t&&u(s)}}}function en(t){let e,n,i,o=t[9].id+"";return{c(){e=h("td"),n=d("word id: "),i=d(o),v(e,"class","svelte-j6zgmy")},m(t,o){l(t,e,o),a(e,n),a(e,i)},p(t,e){1&e&&o!==(o=t[9].id+"")&&y(i,o)},d(t){t&&u(e)}}}function nn(t){let e,n,i,o,r=zt(t[9].token)+"",s=t[9].id&&en(t);return{c(){e=h("tr"),n=h("td"),i=d(r),o=f(),s&&s.c(),v(n,"class","svelte-j6zgmy"),v(e,"class","svelte-j6zgmy")},m(t,r){l(t,e,r),a(e,n),a(n,i),a(e,o),s&&s.m(e,null)},p(t,n){1&n&&r!==(r=zt(t[9].token)+"")&&y(i,r),t[9].id?s?s.p(t,n):(s=en(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(t){t&&u(e),s&&s.d()}}}function on(t){let e,n,i,o=t[9].id+"";return{c(){e=h("td"),n=d("word id: "),i=d(o),v(e,"class","svelte-j6zgmy")},m(t,o){l(t,e,o),a(e,n),a(e,i)},p(t,e){1&e&&o!==(o=t[9].id+"")&&y(i,o)},d(t){t&&u(e)}}}function rn(t){let e,n,i,o,r,s=zt(t[9].token)+"",c=t[9].id&&on(t);return{c(){e=h("tr"),n=h("td"),i=d(s),o=f(),c&&c.c(),r=f(),v(n,"class","svelte-j6zgmy"),v(e,"class","svelte-j6zgmy")},m(t,s){l(t,e,s),a(e,n),a(n,i),a(e,o),c&&c.m(e,null),a(e,r)},p(t,n){1&n&&s!==(s=zt(t[9].token)+"")&&y(i,s),t[9].id?c?c.p(t,n):(c=on(t),c.c(),c.m(e,r)):c&&(c.d(1),c=null)},d(t){t&&u(e),c&&c.d()}}}function sn(e){let n,i,o,r;return{c(){n=h("tr"),i=h("td"),o=h("a"),r=d("display child places"),v(o,"class","btn btn-outline-secondary btn-sm"),v(o,"href",e[1]+"&hierarchy=1"),v(i,"class","svelte-j6zgmy"),v(n,"class","svelte-j6zgmy")},m(t,e){l(t,n,e),a(n,i),a(i,o),a(o,r)},p:t,i:t,o:t,d(t){t&&u(n)}}}function an(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,r=Object.keys(t[0].hierarchy),s=[];for(let e=0;e<r.length;e+=1)s[e]=un(Me(t,r,e));const a=t=>q(s[t],1,1,(()=>{s[t]=null}));let h=o&&cn();return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=f(),h&&h.c(),n=p()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);l(t,e,o),h&&h.m(t,o),l(t,n,o),i=!0},p(t,i){if(1&i){let n;for(r=Object.keys(t[0].hierarchy),n=0;n<r.length;n+=1){const o=Me(t,r,n);s[n]?(s[n].p(o,i),H(s[n],1)):(s[n]=un(o),s[n].c(),H(s[n],1),s[n].m(e.parentNode,e))}for(R(),n=r.length;n<s.length;n+=1)a(n);Z()}1&i&&(o=Object.keys(t[0].hierarchy)>500),o?h||(h=cn(),h.c(),h.m(n.parentNode,n)):h&&(h.d(1),h=null)},i(t){if(!i){for(let t=0;t<r.length;t+=1)H(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)q(s[t]);i=!1},d(t){c(s,t),t&&u(e),h&&h.d(t),t&&u(n)}}}function ln(t){let e,n;return e=new Se({props:{addressLine:t[6],bDistanceInMeters:"true"}}),{c(){F(e.$$.fragment)},m(t,i){W(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[6]),e.$set(i)},i(t){n||(H(e.$$.fragment,t),n=!0)},o(t){q(e.$$.fragment,t),n=!1},d(t){$(e,t)}}}function un(t){let e,n,i,o,r,s,m,g=t[3]+"",_=t[0].hierarchy[t[3]],b=[];for(let e=0;e<_.length;e+=1)b[e]=ln(Ae(t,_,e));const w=t=>q(b[t],1,1,(()=>{b[t]=null}));return{c(){e=h("tr"),n=h("td"),i=h("h3"),o=d(g),r=f();for(let t=0;t<b.length;t+=1)b[t].c();s=p(),v(i,"class","svelte-j6zgmy"),v(n,"colspan","6"),v(n,"class","svelte-j6zgmy"),v(e,"class","all-columns svelte-j6zgmy")},m(t,u){l(t,e,u),a(e,n),a(n,i),a(i,o),l(t,r,u);for(let e=0;e<b.length;e+=1)b[e].m(t,u);l(t,s,u),m=!0},p(t,e){if((!m||1&e)&&g!==(g=t[3]+"")&&y(o,g),1&e){let n;for(_=t[0].hierarchy[t[3]],n=0;n<_.length;n+=1){const i=Ae(t,_,n);b[n]?(b[n].p(i,e),H(b[n],1)):(b[n]=ln(i),b[n].c(),H(b[n],1),b[n].m(s.parentNode,s))}for(R(),n=_.length;n<b.length;n+=1)w(n);Z()}},i(t){if(!m){for(let t=0;t<_.length;t+=1)H(b[t]);m=!0}},o(t){b=b.filter(Boolean);for(let t=0;t<b.length;t+=1)q(b[t]);m=!1},d(t){t&&u(e),t&&u(r),c(b,t),t&&u(s)}}}function cn(t){let e;return{c(){e=h("p"),e.textContent="There are more child objects which are not shown."},m(t,n){l(t,e,n)},d(t){t&&u(e)}}}function hn(t){let e,n,i,o;const r=[He,Ze,Re],s=[];function a(t,e){return t[0]?0:""===location.search?1:2}return e=a(t),n=s[e]=r[e](t),{c(){n.c(),i=p()},m(t,n){s[e].m(t,n),l(t,i,n),o=!0},p(t,[o]){let l=e;e=a(t),e===l?s[e].p(t,o):(R(),q(s[l],1,1,(()=>{s[l]=null})),Z(),n=s[e],n?n.p(t,o):(n=s[e]=r[e](t),n.c()),H(n,1),n.m(i.parentNode,i))},i(t){o||(H(n),o=!0)},o(t){q(n),o=!1},d(t){s[e].d(t),t&&u(i)}}}function dn(t,e,n){let i,o=window.location.search;return C((function(){var t=new URLSearchParams(window.location.search),e={place_id:t.get("place_id"),osmtype:t.get("osmtype"),osmid:t.get("osmid"),class:t.get("class"),keywords:t.get("keywords"),addressdetails:1,hierarchy:"1"===t.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"};e.place_id||e.osmtype&&e.osmid?(vt(e.place_id?"Details for "+e.place_id:"Details for "+e.osmtype+e.osmid),pt("details",e,(function(t){n(0,i=t),nt.set(t)}))):n(0,i=void 0)})),[i,o]}class fn extends G{constructor(t){super(),V(this,t,dn,hn,r,{})}}function pn(t,e,n){const i=t.slice();return i[2]=e[n],i}function mn(t){let e,n,i,o,r,s,c,p,m,g,_,b,w,x,T,C,E,L,k,P,S,M,A,z,D,N,j,O,I,B=t[2].osm_type+"",R=xt(t[2])+"",Z=t[2].class+"",H=t[2].type+"",q=t[2].name+"",F=(t[2].country_code||"")+"",W=t[2].errormessage+"",$=t[2].updated+"";return{c(){e=h("tr"),n=h("td"),i=d(B),o=f(),r=h("td"),s=f(),c=h("td"),p=d(Z),m=f(),g=h("td"),_=d(H),b=f(),w=h("td"),x=d(q),T=f(),C=h("td"),E=d(F),L=f(),k=h("td"),P=d(W),S=f(),M=h("td"),A=d($),z=f(),D=h("td"),N=h("a"),j=d("josm"),I=f(),v(N,"href",O="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+wt(t[2].osm_type)+"/"+t[2].osm_id+"/full"),v(N,"target","josm")},m(t,u){l(t,e,u),a(e,n),a(n,i),a(e,o),a(e,r),r.innerHTML=R,a(e,s),a(e,c),a(c,p),a(e,m),a(e,g),a(g,_),a(e,b),a(e,w),a(w,x),a(e,T),a(e,C),a(C,E),a(e,L),a(e,k),a(k,P),a(e,S),a(e,M),a(M,A),a(e,z),a(e,D),a(D,N),a(N,j),a(e,I)},p(t,e){1&e&&B!==(B=t[2].osm_type+"")&&y(i,B),1&e&&R!==(R=xt(t[2])+"")&&(r.innerHTML=R),1&e&&Z!==(Z=t[2].class+"")&&y(p,Z),1&e&&H!==(H=t[2].type+"")&&y(_,H),1&e&&q!==(q=t[2].name+"")&&y(x,q),1&e&&F!==(F=(t[2].country_code||"")+"")&&y(E,F),1&e&&W!==(W=t[2].errormessage+"")&&y(P,W),1&e&&$!==($=t[2].updated+"")&&y(A,$),1&e&&O!==(O="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+wt(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&v(N,"href",O)},d(t){t&&u(e)}}}function gn(e){let n,i,o,r,s,p,m,g,_,b,w,x,T,C,E=e[0].length+"",L=e[0],k=[];for(let t=0;t<L.length;t+=1)k[t]=mn(pn(e,L,t));return{c(){n=h("div"),i=h("div"),o=h("div"),r=h("h1"),r.textContent="Broken polygons",s=f(),p=h("p"),m=d("Total number of broken polygons: "),g=d(E),_=d("."),b=f(),w=h("table"),x=h("thead"),x.innerHTML="<th>OSM type</th> \n <th>OSM id</th> \n <th>Class</th> \n <th>Type</th> \n <th>Name</th> \n <th>Country Code</th> \n <th>Error message</th> \n <th>Updated</th> \n <th></th>",T=f(),C=h("tbody");for(let t=0;t<k.length;t+=1)k[t].c();v(w,"class","table table-striped table-hover"),v(o,"class","col-sm-12"),v(i,"class","row"),v(n,"class","container")},m(t,e){l(t,n,e),a(n,i),a(i,o),a(o,r),a(o,s),a(o,p),a(p,m),a(p,g),a(p,_),a(o,b),a(o,w),a(w,x),a(w,T),a(w,C);for(let t=0;t<k.length;t+=1)k[t].m(C,null)},p(t,[e]){if(1&e&&E!==(E=t[0].length+"")&&y(g,E),1&e){let n;for(L=t[0],n=0;n<L.length;n+=1){const i=pn(t,L,n);k[n]?k[n].p(i,e):(k[n]=mn(i),k[n].c(),k[n].m(C,null))}for(;n<k.length;n+=1)k[n].d(1);k.length=L.length}},i:t,o:t,d(t){t&&u(n),c(k,t)}}}function _n(t,e,n){let i=[];return C((function(){pt("polygons",{format:"json"},(function(t){n(0,i=t)})),vt("Broken polygons")})),[i]}class vn extends G{constructor(t){super(),V(this,t,_n,gn,r,{})}}function yn(t,e,n){const i=t.slice();return i[2]=e[n],i}function bn(t){let e,n,i,o,r,s,c,p,m,g,_,b,w,x,T,C,E,L,k,P,S,M,A,z=t[2].place_id+"",D=t[2].country_code+"",N=t[2].name+"",j=xt(t[2])+"",O=t[2].osm_type+"",I=t[2].class+"",B=t[2].type+"";return{c(){e=h("tr"),n=h("td"),i=h("a"),o=d(z),s=f(),c=h("td"),p=d(D),m=f(),g=h("td"),_=d(N),b=f(),w=h("td"),x=f(),T=h("td"),C=d(O),E=f(),L=h("td"),k=d(I),P=f(),S=h("td"),M=d(B),A=f(),v(i,"href",r=Ct(t[2]))},m(t,r){l(t,e,r),a(e,n),a(n,i),a(i,o),a(e,s),a(e,c),a(c,p),a(e,m),a(e,g),a(g,_),a(e,b),a(e,w),w.innerHTML=j,a(e,x),a(e,T),a(T,C),a(e,E),a(e,L),a(L,k),a(e,P),a(e,S),a(S,M),a(e,A)},p(t,e){1&e&&z!==(z=t[2].place_id+"")&&y(o,z),1&e&&r!==(r=Ct(t[2]))&&v(i,"href",r),1&e&&D!==(D=t[2].country_code+"")&&y(p,D),1&e&&N!==(N=t[2].name+"")&&y(_,N),1&e&&j!==(j=xt(t[2])+"")&&(w.innerHTML=j),1&e&&O!==(O=t[2].osm_type+"")&&y(C,O),1&e&&I!==(I=t[2].class+"")&&y(k,I),1&e&&B!==(B=t[2].type+"")&&y(M,B)},d(t){t&&u(e)}}}function wn(e){let n,i,o,r,s,p,m,g,_,b,w,x,T,C=e[0].length+"",E=e[0],L=[];for(let t=0;t<E.length;t+=1)L[t]=bn(yn(e,E,t));return{c(){n=h("div"),i=h("div"),o=h("div"),r=h("h1"),r.textContent="Deletable",s=f(),p=h("p"),m=d(C),g=d(" objects have been deleted in OSM but are still in the Nominatim database."),_=f(),b=h("table"),w=h("thead"),w.innerHTML="<th>Place id</th> \n <th>Country Code</th> \n <th>Name</th> \n <th>OSM id</th> \n <th>OSM type</th> \n <th>Class</th> \n <th>Type</th>",x=f(),T=h("tbody");for(let t=0;t<L.length;t+=1)L[t].c();v(b,"class","table table-striped table-hover"),v(o,"class","col-sm-12"),v(i,"class","row"),v(n,"class","container")},m(t,e){l(t,n,e),a(n,i),a(i,o),a(o,r),a(o,s),a(o,p),a(p,m),a(p,g),a(o,_),a(o,b),a(b,w),a(b,x),a(b,T);for(let t=0;t<L.length;t+=1)L[t].m(T,null)},p(t,[e]){if(1&e&&C!==(C=t[0].length+"")&&y(m,C),1&e){let n;for(E=t[0],n=0;n<E.length;n+=1){const i=yn(t,E,n);L[n]?L[n].p(i,e):(L[n]=bn(i),L[n].c(),L[n].m(T,null))}for(;n<L.length;n+=1)L[n].d(1);L.length=E.length}},i:t,o:t,d(t){t&&u(n),c(L,t)}}}function xn(t,e,n){let i=[];return C((function(){pt("deletable",{format:"json"},(function(t){n(0,i=t)})),vt("Deletable objects")})),[i]}class Tn extends G{constructor(t){super(),V(this,t,xn,wn,r,{})}}let Cn=[];function En(){let t=function(){var t=window.location.pathname.replace(".html","").replace(/^.*\//,"");return""===t?"search":"-1"!=["search","reverse","details","deletable","polygons"].indexOf(t)?t:void 0}();document.getElementById("main").replaceChildren(),"search"===t||"reverse"===t?new be({target:document.getElementById("main"),props:{reverse_search:"reverse"===t}}):"details"===t?new fn({target:document.getElementById("main")}):"deletable"===t?new Tn({target:document.getElementById("main")}):"polygons"===t&&new vn({target:document.getElementById("main")})}new class extends G{constructor(t){super(),V(this,t,null,ht,r,{})}}({target:document.body}),En(),document.addEventListener("submit",(function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches("form")){t.preventDefault();var n=gt(e);n=_t(n),window.history.pushState(Cn,"","?"+n),En();break}})),document.addEventListener("click",(function(t){for(var e=t.target;e&&e!=this;e=e.parentNode)if(e.matches("a")){var n=e.href;if(!(i=n)||0!==i.indexOf("?")&&0!==i.indexOf("/")&&(0===i.indexOf("#")||i.match(/^http/)||i.match(/\.html/)))return;t.preventDefault(),t.stopPropagation(),window.history.pushState(Cn,"",n),En();break}var i})),window.onpopstate=function(){En()}}();
+ * Leaflet 1.9.1, a JS library for interactive maps. https://leafletjs.com
+ * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade
+ */var en="1.9.1";function nn(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var on=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function sn(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var rn=0;function an(t){return"_leaflet_id"in t||(t._leaflet_id=++rn),t._leaflet_id}function ln(t,e,n){var i,o,s,r;return r=function(){i=!1,o&&(s.apply(n,o),o=!1)},s=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(r,e),i=!0)},s}function cn(t,e,n){var i=e[1],o=e[0],s=i-o;return t===i&&n?t:((t-o)%s+s)%s+o}function hn(){return!1}function un(t,e){if(!1===e)return t;var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function dn(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function pn(t){return dn(t).split(/\s+/)}function mn(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?on(t.options):{}),e)t.options[n]=e[n];return t.options}function fn(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var _n=/\{ *([\w_ -]+) *\}/g;function gn(t,e){return t.replace(_n,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var vn=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function yn(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var bn="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function wn(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var xn=0;function $n(t){var e=+new Date,n=Math.max(0,16-(e-xn));return xn=e+n,window.setTimeout(t,n)}var Ln=window.requestAnimationFrame||wn("RequestAnimationFrame")||$n,Tn=window.cancelAnimationFrame||wn("CancelAnimationFrame")||wn("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function Pn(t,e,n){if(!n||Ln!==$n)return Ln.call(window,sn(t,e));t.call(e)}function Mn(t){t&&Tn.call(window,t)}var kn={__proto__:null,extend:nn,create:on,bind:sn,get lastId(){return rn},stamp:an,throttle:ln,wrapNum:cn,falseFn:hn,formatNum:un,trim:dn,splitWords:pn,setOptions:mn,getParamString:fn,template:gn,isArray:vn,indexOf:yn,emptyImageUrl:bn,requestFn:Ln,cancelFn:Tn,requestAnimFrame:Pn,cancelAnimFrame:Mn};function Cn(){}Cn.extend=function(t){var e=function(){mn(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=e.__super__=this.prototype,i=on(n);for(var o in i.constructor=e,e.prototype=i,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(e[o]=this[o]);return t.statics&&nn(e,t.statics),t.includes&&(!function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=vn(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)}(t.includes),nn.apply(null,[i].concat(t.includes))),nn(i,t),delete i.statics,delete i.includes,i.options&&(i.options=n.options?on(n.options):{},nn(i.options,t.options)),i._initHooks=[],i.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=i._initHooks.length;t<e;t++)i._initHooks[t].call(this)}},e},Cn.include=function(t){var e=this.prototype.options;return nn(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},Cn.mergeOptions=function(t){return nn(this.prototype.options,t),this},Cn.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var En={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,s=(t=pn(t)).length;o<s;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=pn(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var o={fn:e,ctx:n};i&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,n){var i,o,s;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var r=this._listens(t,e,n);if(!1!==r){var a=i[r];this._firingCount&&(a.fn=hn,this._events[t]=i=i.slice()),i.splice(r,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(o=0,s=i.length;o<s;o++)i[o].fn=hn;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var i=nn({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,r=o.length;s<r;s++){var a=o[s],l=a.fn;a.once&&this.off(t,l,a.ctx),l.call(a.ctx||this,i)}this._firingCount--}}return n&&this._propagateEvent(i),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(i=!!e,o=void 0,n=void 0);var s=this._events&&this._events[t];if(s&&s.length&&!1!==this._listens(t,o,n))return!0;if(i)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var o=0,s=i.length;o<s;o++)if(i[o].fn===e&&i[o].ctx===n)return o;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var o=0,s=(t=pn(t)).length;o<s;o++)this._on(t[o],e,n,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[an(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[an(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,nn({layer:t.target,propagatedFrom:t.target},t),!0)}};En.addEventListener=En.on,En.removeEventListener=En.clearAllEventListeners=En.off,En.addOneTimeEventListener=En.once,En.fireEvent=En.fire,En.hasEventListeners=En.listens;var An=Cn.extend(En);function On(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var Sn=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function zn(t,e,n){return t instanceof On?t:vn(t)?new On(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new On(t.x,t.y):new On(t,e,n)}function In(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function Dn(t,e){return!t||t instanceof In?t:new In(t,e)}function Bn(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function Nn(t,e){return t instanceof Bn?t:new Bn(t,e)}function Zn(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function jn(t,e,n){return t instanceof Zn?t:vn(t)&&"object"!=typeof t[0]?3===t.length?new Zn(t[0],t[1],t[2]):2===t.length?new Zn(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new Zn(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new Zn(t,e,n)}On.prototype={clone:function(){return new On(this.x,this.y)},add:function(t){return this.clone()._add(zn(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(zn(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 On(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new On(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=Sn(this.x),this.y=Sn(this.y),this},distanceTo:function(t){var e=(t=zn(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=zn(t)).x===this.x&&t.y===this.y},contains:function(t){return t=zn(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+un(this.x)+", "+un(this.y)+")"}},In.prototype={extend:function(t){var e,n;if(!t)return this;if(t instanceof On||"number"==typeof t[0]||"x"in t)e=n=zn(t);else if(e=(t=Dn(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return zn((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return zn(this.min.x,this.max.y)},getTopRight:function(){return zn(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,n;return(t="number"==typeof t[0]||t instanceof On?zn(t):Dn(t))instanceof In?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=Dn(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>=e.x&&i.x<=n.x,r=o.y>=e.y&&i.y<=n.y;return s&&r},overlaps:function(t){t=Dn(t);var e=this.min,n=this.max,i=t.min,o=t.max,s=o.x>e.x&&i.x<n.x,r=o.y>e.y&&i.y<n.y;return s&&r},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,o=Math.abs(e.y-n.y)*t;return Dn(zn(e.x-i,e.y-o),zn(n.x+i,n.y+o))},equals:function(t){return!!t&&(t=Dn(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},Bn.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof Zn)e=t,n=t;else{if(!(t instanceof Bn))return t?this.extend(jn(t)||Nn(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new Zn(e.lat,e.lng),this._northEast=new Zn(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new Bn(new Zn(e.lat-i,e.lng-o),new Zn(n.lat+i,n.lng+o))},getCenter:function(){return new Zn((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 Zn(this.getNorth(),this.getWest())},getSouthEast:function(){return new Zn(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){t="number"==typeof t[0]||t instanceof Zn||"lat"in t?jn(t):Nn(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof Bn?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=Nn(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&i.lat<=n.lat,r=o.lng>=e.lng&&i.lng<=n.lng;return s&&r},overlaps:function(t){t=Nn(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&i.lat<n.lat,r=o.lng>e.lng&&i.lng<n.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=Nn(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},Zn.prototype={equals:function(t,e){return!!t&&(t=jn(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+un(this.lat,t)+", "+un(this.lng,t)+")"},distanceTo:function(t){return Fn.distance(this,jn(t))},wrap:function(){return Fn.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return Nn([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new Zn(this.lat,this.lng,this.alt)}};var Rn,Hn={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},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,n=this.scale(t);return new In(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?cn(t.lng,this.wrapLng,!0):t.lng;return new Zn(this.wrapLat?cn(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new Bn(new Zn(s.lat-i,s.lng-o),new Zn(r.lat-i,r.lng-o))}},Fn=nn({},Hn,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,s=Math.sin((e.lat-t.lat)*n/2),r=Math.sin((e.lng-t.lng)*n/2),a=s*s+Math.cos(i)*Math.cos(o)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),Wn=6378137,qn={R:Wn,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new On(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new Zn((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(Rn=Wn*Math.PI,new In([-Rn,-Rn],[Rn,Rn]))};function Un(t,e,n,i){if(vn(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function Vn(t,e,n,i){return new Un(t,e,n,i)}Un.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 On((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var Gn=nn({},Fn,{code:"EPSG:3857",projection:qn,transformation:function(){var t=.5/(Math.PI*qn.R);return Vn(t,.5,-t,.5)}()}),Kn=nn({},Gn,{code:"EPSG:900913"});function Yn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Xn(t,e){var n,i,o,s,r,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,s=(r=t[n]).length;i<s;i++)l+=(i?"L":"M")+(a=r[i]).x+" "+a.y;l+=e?Ii.svg?"z":"x":""}return l||"M0 0"}var Jn,Qn=document.documentElement.style,ti="ActiveXObject"in window,ei=ti&&!document.addEventListener,ni="msLaunchUri"in navigator&&!("documentMode"in document),ii=zi("webkit"),oi=zi("android"),si=zi("android 2")||zi("android 3"),ri=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ai=oi&&zi("Google")&&ri<537&&!("AudioNode"in window),li=!!window.opera,ci=!ni&&zi("chrome"),hi=zi("gecko")&&!ii&&!li&&!ti,ui=!ci&&zi("safari"),di=zi("phantom"),pi="OTransition"in Qn,mi=0===navigator.platform.indexOf("Win"),fi=ti&&"transition"in Qn,_i="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!si,gi="MozPerspective"in Qn,vi=!window.L_DISABLE_3D&&(fi||_i||gi)&&!pi&&!di,yi="undefined"!=typeof orientation||zi("mobile"),bi=yi&&ii,wi=yi&&_i,xi=!window.PointerEvent&&window.MSPointerEvent,$i=!(!window.PointerEvent&&!xi),Li="ontouchstart"in window||!!window.TouchEvent,Ti=!window.L_NO_TOUCH&&(Li||$i),Pi=yi&&li,Mi=yi&&hi,ki=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ci=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",hn,e),window.removeEventListener("testPassiveEventSupport",hn,e)}catch(t){}return t}(),Ei=!!document.createElement("canvas").getContext,Ai=!(!document.createElementNS||!Yn("svg").createSVGRect),Oi=!!Ai&&((Jn=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Jn.firstChild&&Jn.firstChild.namespaceURI)),Si=!Ai&&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&&"object"==typeof e.adj}catch(t){return!1}}();function zi(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ii={ie:ti,ielt9:ei,edge:ni,webkit:ii,android:oi,android23:si,androidStock:ai,opera:li,chrome:ci,gecko:hi,safari:ui,phantom:di,opera12:pi,win:mi,ie3d:fi,webkit3d:_i,gecko3d:gi,any3d:vi,mobile:yi,mobileWebkit:bi,mobileWebkit3d:wi,msPointer:xi,pointer:$i,touch:Ti,touchNative:Li,mobileOpera:Pi,mobileGecko:Mi,retina:ki,passiveEvents:Ci,canvas:Ei,svg:Ai,vml:Si,inlineSvg:Oi,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Di=Ii.msPointer?"MSPointerDown":"pointerdown",Bi=Ii.msPointer?"MSPointerMove":"pointermove",Ni=Ii.msPointer?"MSPointerUp":"pointerup",Zi=Ii.msPointer?"MSPointerCancel":"pointercancel",ji={touchstart:Di,touchmove:Bi,touchend:Ni,touchcancel:Zi},Ri={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Zo(e);Gi(t,e)},touchmove:Gi,touchend:Gi,touchcancel:Gi},Hi={},Fi=!1;function Wi(t,e,n){return"touchstart"===e&&(Fi||(document.addEventListener(Di,qi,!0),document.addEventListener(Bi,Ui,!0),document.addEventListener(Ni,Vi,!0),document.addEventListener(Zi,Vi,!0),Fi=!0)),Ri[e]?(n=Ri[e].bind(this,n),t.addEventListener(ji[e],n,!1),n):(console.warn("wrong event specified:",e),L.Util.falseFn)}function qi(t){Hi[t.pointerId]=t}function Ui(t){Hi[t.pointerId]&&(Hi[t.pointerId]=t)}function Vi(t){delete Hi[t.pointerId]}function Gi(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Hi)e.touches.push(Hi[n]);e.changedTouches=[e],t(e)}}var Ki,Yi,Xi,Ji,Qi,to=go(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),eo=go(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),no="webkitTransition"===eo||"OTransition"===eo?eo+"End":"transitionend";function io(t){return"string"==typeof t?document.getElementById(t):t}function oo(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function so(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ro(t){var e=t.parentNode;e&&e.removeChild(t)}function ao(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function lo(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function co(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ho(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=fo(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function uo(t,e){if(void 0!==t.classList)for(var n=pn(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!ho(t,e)){var s=fo(t);mo(t,(s?s+" ":"")+e)}}function po(t,e){void 0!==t.classList?t.classList.remove(e):mo(t,dn((" "+fo(t)+" ").replace(" "+e+" "," ")))}function mo(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function fo(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function _o(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}(t,e)}function go(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function vo(t,e,n){var i=e||new On(0,0);t.style[to]=(Ii.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function yo(t,e){t._leaflet_pos=e,Ii.any3d?vo(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function bo(t){return t._leaflet_pos||new On(0,0)}if("onselectstart"in document)Ki=function(){Co(window,"selectstart",Zo)},Yi=function(){Ao(window,"selectstart",Zo)};else{var wo=go(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Ki=function(){if(wo){var t=document.documentElement.style;Xi=t[wo],t[wo]="none"}},Yi=function(){wo&&(document.documentElement.style[wo]=Xi,Xi=void 0)}}function xo(){Co(window,"dragstart",Zo)}function $o(){Ao(window,"dragstart",Zo)}function Lo(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(To(),Ji=t,Qi=t.style.outline,t.style.outline="none",Co(window,"keydown",To))}function To(){Ji&&(Ji.style.outline=Qi,Ji=void 0,Qi=void 0,Ao(window,"keydown",To))}function Po(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Mo(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var ko={__proto__:null,TRANSFORM:to,TRANSITION:eo,TRANSITION_END:no,get:io,getStyle:oo,create:so,remove:ro,empty:ao,toFront:lo,toBack:co,hasClass:ho,addClass:uo,removeClass:po,setClass:mo,getClass:fo,setOpacity:_o,testProp:go,setTransform:vo,setPosition:yo,getPosition:bo,get disableTextSelection(){return Ki},get enableTextSelection(){return Yi},disableImageDrag:xo,enableImageDrag:$o,preventOutline:Lo,restoreOutline:To,getSizedParentNode:Po,getScale:Mo};function Co(t,e,n,i){if(e&&"object"==typeof e)for(var o in e)zo(t,o,e[o],n);else for(var s=0,r=(e=pn(e)).length;s<r;s++)zo(t,e[s],n,i);return this}var Eo="_leaflet_events";function Ao(t,e,n,i){if(1===arguments.length)Oo(t),delete t[Eo];else if(e&&"object"==typeof e)for(var o in e)Io(t,o,e[o],n);else if(e=pn(e),2===arguments.length)Oo(t,(function(t){return-1!==yn(e,t)}));else for(var s=0,r=e.length;s<r;s++)Io(t,e[s],n,i);return this}function Oo(t,e){for(var n in t[Eo]){var i=n.split(/\d/)[0];e&&!e(i)||Io(t,i,null,null,n)}}var So={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function zo(t,e,n,i){var o=e+an(n)+(i?"_"+an(i):"");if(t[Eo]&&t[Eo][o])return this;var s=function(e){return n.call(i||t,e||window.event)},r=s;!Ii.touchNative&&Ii.pointer&&0===e.indexOf("touch")?s=Wi(t,e,s):Ii.touch&&"dblclick"===e?s=function(t,e){t.addEventListener("dblclick",e);var n,i=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Ro(t);if(!o.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||o.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var s=Date.now();s-i<=200?2==++n&&e(function(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(t)):n=1,i=s}}}else n=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(So[e]||e,s,!!Ii.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,qo(t,e)&&r(e)},t.addEventListener(So[e],s,!1)):t.addEventListener(e,r,!1):t.attachEvent("on"+e,s),t[Eo]=t[Eo]||{},t[Eo][o]=s}function Io(t,e,n,i,o){o=o||e+an(n)+(i?"_"+an(i):"");var s=t[Eo]&&t[Eo][o];if(!s)return this;!Ii.touchNative&&Ii.pointer&&0===e.indexOf("touch")?function(t,e,n){ji[e]?t.removeEventListener(ji[e],n,!1):console.warn("wrong event specified:",e)}(t,e,s):Ii.touch&&"dblclick"===e?function(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}(t,s):"removeEventListener"in t?t.removeEventListener(So[e]||e,s,!1):t.detachEvent("on"+e,s),t[Eo][o]=null}function Do(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Bo(t){return zo(t,"wheel",Do),this}function No(t){return Co(t,"mousedown touchstart dblclick contextmenu",Do),t._leaflet_disable_click=!0,this}function Zo(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function jo(t){return Zo(t),Do(t),this}function Ro(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Ho(t,e){if(!e)return new On(t.clientX,t.clientY);var n=Mo(e),i=n.boundingClientRect;return new On((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Fo=Ii.linux&&Ii.chrome?window.devicePixelRatio:Ii.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Wo(t){return Ii.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Fo:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function qo(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var Uo={__proto__:null,on:Co,off:Ao,stopPropagation:Do,disableScrollPropagation:Bo,disableClickPropagation:No,preventDefault:Zo,stop:jo,getPropagationPath:Ro,getMousePosition:Ho,getWheelDelta:Wo,isExternalTarget:qo,addListener:Co,removeListener:Ao},Vo=An.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=bo(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=Pn(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),yo(this._el,n),this.fire("step")},_complete:function(){Mn(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Go=An.extend({options:{crs:Gn,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=mn(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=sn(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(jn(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=eo&&Ii.any3d&&!Ii.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Co(this._proxy,no,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){if((e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(jn(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n)&&(void 0!==n.animate&&(n.zoom=nn({animate:n.animate},n.zoom),n.pan=nn({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,e,n.pan&&n.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||(Ii.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Ii.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),s=(t instanceof On?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),r=this.containerPointToLatLng(o.add(s));return this.setView(r,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Nn(t);var n=zn(e.paddingTopLeft||e.padding||[0,0]),i=zn(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=i.subtract(n).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,e){if(!(t=Nn(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.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(e=e||{},!(t=zn(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Vo,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){uo(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!Ii.any3d)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),r=this._zoom;t=jn(t),e=void 0===e?r:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(r,e),c=o.distanceTo(i)||1,h=1.42,u=2.0164;function d(t){var e=(l*l-a*a+(t?-1:1)*u*u*c*c)/(2*(t?l:a)*u*c),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function m(t){return(Math.exp(t)+Math.exp(-t))/2}var f=d(0);function _(t){return a*(m(f)*(p(e=f+h*t)/m(e))-p(f))/u;var e}var g=Date.now(),v=(d(1)-f)/h,y=n.duration?1e3*n.duration:1e3*v*.8;return this._moveStart(!0,n.noMoveStart),function n(){var s=(Date.now()-g)/y,l=function(t){return 1-Math.pow(1-t,1.5)}(s)*v;s<=1?(this._flyToFrame=Pn(n,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(_(l)/c)),r),this.getScaleZoom(a/function(t){return a*(m(f)/m(f+h*t))}(l),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=Nn(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 n=this.getCenter(),i=this._limitCenter(n,this._zoom,Nn(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=zn((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=zn(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=Dn([r.min.add(n),r.max.subtract(i)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var c=s.subtract(a.getCenter()),h=a.extend(s).getSize().subtract(l);o.x+=c.x<0?-h.x:h.x,o.y+=c.y<0?-h.y:h.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=nn({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),i=e.divideBy(2).round(),o=n.divideBy(2).round(),s=i.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(sn(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=nn({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=sn(this._handleGeolocationResponse,this),n=sn(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,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,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new Zn(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ro(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Mn(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ro(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=so("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new Bn(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=Nn(t),n=zn(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=Dn(this.project(a,i),this.project(r,i)).getSize(),h=Ii.any3d?this.options.zoomSnap:1,u=l.x/c.x,d=l.y/c.y,p=e?Math.max(u,d):Math.min(u,d);return i=this.getScaleZoom(p,i),h&&(i=Math.round(i/(h/100))*(h/100),i=e?Math.ceil(i/h)*h:Math.floor(i/h)*h),Math.max(o,Math.min(s,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new On(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new In(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(jn(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(zn(t),e)},layerPointToLatLng:function(t){var e=zn(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(jn(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(jn(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Nn(t))},distance:function(t,e){return this.options.crs.distance(jn(t),jn(e))},containerPointToLayerPoint:function(t){return zn(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return zn(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(zn(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(jn(t)))},mouseEventToContainerPoint:function(t){return Ho(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=io(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Co(e,"scroll",this._onScroll,this),this._containerId=an(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ii.any3d,uo(t,"leaflet-container"+(Ii.touch?" leaflet-touch":"")+(Ii.retina?" leaflet-retina":"")+(Ii.ielt9?" leaflet-oldie":"")+(Ii.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=oo(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(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),yo(this._mapPane,new On(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(uo(t.markerPane,"leaflet-zoom-hide"),uo(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){yo(this._mapPane,new On(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Mn(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){yo(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[an(this._container)]=this;var e=t?Ao:Co;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),Ii.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Mn(this._resizeRequest),this._resizeRequest=Pn((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 n,i=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((n=this._targets[an(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)){if(o&&!qo(s,t))break;if(i.push(n),o)break}if(s===this._container)break;s=s.parentNode}return i.length||r||o||!this.listens(e,!0)||(i=[this]),i},_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||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&Lo(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var i=nn({},t);i.type="preclick",this._fireDOMEvent(i,i.type,n)}var o=this._findEventTargets(t,e);if(n){for(var s=[],r=0;r<n.length;r++)n[r].listens(e,!0)&&s.push(n[r]);o=s.concat(o)}if(o.length){"contextmenu"===e&&Zo(t);var a=o[0],l={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=a.getLatLng&&(!a._radius||a._radius<=10);l.containerPoint=c?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=c?a.getLatLng():this.layerPointToLatLng(l.layerPoint)}for(r=0;r<o.length;r++)if(o[r].fire(e,l,!0),l.originalEvent._stopped||!1===o[r].options.bubblingMouseEvents&&-1!==yn(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).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 bo(this._mapPane)||new On(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return Dn([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),s=new In(i.subtract(o),i.add(o)),r=this._getBoundsOffset(s,n,e);return r.round().equals([0,0])?t:this.unproject(i.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new In(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=Dn(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),s=i.max.subtract(t.max);return new On(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_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(),n=this.getMaxZoom(),i=Ii.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){po(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n))&&(this.panBy(n,e),!0)},_createAnimProxy:function(){var t=this._proxy=so("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=to,n=this._proxy.style[e];vo(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ro(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();vo(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,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o))&&(Pn((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),!0)},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,uo(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(sn(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&po(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 Ko(t,e){return new Go(t,e)}var Yo=Cn.extend({options:{position:"topright"},initialize:function(t){mn(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),n=this.getPosition(),i=t._controlCorners[n];return uo(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ro(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()}}),Xo=function(t){return new Yo(t)};Go.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=so("div",e+"control-container",this._container);function i(i,o){var s=e+i+" "+e+o;t[i+o]=so("div",s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ro(this._controlCorners[t]);ro(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Jo=Yo.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in mn(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!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 Yo.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(an(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){uo(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?(uo(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):po(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return po(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=so("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),No(e),Bo(e);var i=this._section=so("section",t+"-list");n&&(this._map.on("click",this.collapse,this),Co(e,{mouseenter:function(){Co(i,"click",Zo),this.expand(),setTimeout((function(){Ao(i,"click",Zo)}))},mouseleave:this.collapse},this));var o=this._layersLink=so("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),Co(o,"click",Zo),Co(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=so("div",t+"-base",i),this._separator=so("div",t+"-separator",i),this._overlaysList=so("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&an(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(sn((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ao(this._baseLayersList),ao(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>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(an(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+an(this),i),this._layerControlInputs.push(e),e.layerId=an(t.layer),Co(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return n.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var s=n.length-1;s>=0;s--)t=n[s],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<i.length;s++)this._map.hasLayer(i[s])||this._map.addLayer(i[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),Qo=Yo.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",n=so("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},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,n,i,o){var s=so("a",n,i);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),No(s),Co(s,"click",jo),Co(s,"click",o,this),Co(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";po(this._zoomInButton,e),po(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(uo(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(uo(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Go.mergeOptions({zoomControl:!0}),Go.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Qo,this.addControl(this.zoomControl))}));var ts=Yo.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=so("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=so("div",e,n)),t.imperial&&(this._iScale=so("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_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),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),es=Yo.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ii.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){mn(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=so("div","leaflet-control-attribution"),No(this._container),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 n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});Go.mergeOptions({attributionControl:!0}),Go.addInitHook((function(){this.options.attributionControl&&(new es).addTo(this)}));Yo.Layers=Jo,Yo.Zoom=Qo,Yo.Scale=ts,Yo.Attribution=es,Xo.layers=function(t,e,n){return new Jo(t,e,n)},Xo.zoom=function(t){return new Qo(t)},Xo.scale=function(t){return new ts(t)},Xo.attribution=function(t){return new es(t)};var ns=Cn.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ns.addTo=function(t,e){return t.addHandler(e,this),this};var is,os={Events:En},ss=Ii.touch?"touchstart mousedown":"mousedown",rs=An.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){mn(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Co(this._dragStartTarget,ss,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(rs._dragging===this&&this.finishDrag(!0),Ao(this._dragStartTarget,ss,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ho(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)rs._dragging===this&&this.finishDrag();else if(!(rs._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(rs._dragging=this,this._preventOutline&&Lo(this._element),xo(),Ki(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Po(this._element);this._startPoint=new On(e.clientX,e.clientY),this._startPos=bo(this._element),this._parentScale=Mo(n);var i="mousedown"===t.type;Co(document,i?"mousemove":"touchmove",this._onMove,this),Co(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new On(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Zo(t),this._moved||(this.fire("dragstart"),this._moved=!0,uo(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),uo(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),yo(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){po(document.body,"leaflet-dragging"),this._lastTarget&&(po(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ao(document,"mousemove touchmove",this._onMove,this),Ao(document,"mouseup touchend touchcancel",this._onUp,this),$o(),Yi(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,rs._dragging=!1}});function as(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=function(t,e){for(var n=[t[0]],i=1,o=0,s=t.length;i<s;i++)ps(t[i],t[o])>e&&(n.push(t[i]),o=i);o<s-1&&n.push(t[s-1]);return n}(t,n),t=function(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,cs(t,i,e,0,n-1);var o,s=[];for(o=0;o<n;o++)i[o]&&s.push(t[o]);return s}(t,n),t}function ls(t,e,n){return Math.sqrt(ms(t,e,n,!0))}function cs(t,e,n,i,o){var s,r,a,l=0;for(r=i+1;r<=o-1;r++)(a=ms(t[r],t[i],t[o],!0))>l&&(s=r,l=a);l>n&&(e[s]=1,cs(t,e,n,i,s),cs(t,e,n,s,o))}function hs(t,e,n,i,o){var s,r,a,l=i?is:ds(t,n),c=ds(e,n);for(is=c;;){if(!(l|c))return[t,e];if(l&c)return!1;a=ds(r=us(t,e,s=l||c,n,o),n),s===l?(t=r,l=a):(e=r,c=a)}}function us(t,e,n,i,o){var s,r,a=e.x-t.x,l=e.y-t.y,c=i.min,h=i.max;return 8&n?(s=t.x+a*(h.y-t.y)/l,r=h.y):4&n?(s=t.x+a*(c.y-t.y)/l,r=c.y):2&n?(s=h.x,r=t.y+l*(h.x-t.x)/a):1&n&&(s=c.x,r=t.y+l*(c.x-t.x)/a),new On(s,r,o)}function ds(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function ps(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function ms(t,e,n,i){var o,s=e.x,r=e.y,a=n.x-s,l=n.y-r,c=a*a+l*l;return c>0&&((o=((t.x-s)*a+(t.y-r)*l)/c)>1?(s=n.x,r=n.y):o>0&&(s+=a*o,r+=l*o)),a=t.x-s,l=t.y-r,i?a*a+l*l:new On(s,r)}function fs(t){return!vn(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function _s(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),fs(t)}function gs(t,e){var n,i,o,s,r,a,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");fs(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var h=[];for(var u in t)h.push(e.project(jn(t[u])));var d=h.length;for(n=0,i=0;n<d-1;n++)i+=h[n].distanceTo(h[n+1])/2;if(0===i)c=h[0];else for(n=0,s=0;n<d-1;n++)if(r=h[n],a=h[n+1],(s+=o=r.distanceTo(a))>i){l=(s-i)/o,c=[a.x-l*(a.x-r.x),a.y-l*(a.y-r.y)];break}return e.unproject(zn(c))}var vs={__proto__:null,simplify:as,pointToSegmentDistance:ls,closestPointOnSegment:function(t,e,n){return ms(t,e,n)},clipSegment:hs,_getEdgeIntersection:us,_getBitCode:ds,_sqClosestPointOnSegment:ms,isFlat:fs,_flat:_s,polylineCenter:gs};function ys(t,e,n){var i,o,s,r,a,l,c,h,u,d=[1,4,2,8];for(o=0,c=t.length;o<c;o++)t[o]._code=ds(t[o],e);for(r=0;r<4;r++){for(h=d[r],i=[],o=0,s=(c=t.length)-1;o<c;s=o++)a=t[o],l=t[s],a._code&h?l._code&h||((u=us(l,a,h,e,n))._code=ds(u,e),i.push(u)):(l._code&h&&((u=us(l,a,h,e,n))._code=ds(u,e),i.push(u)),i.push(a));t=i}return t}function bs(t,e){var n,i,o,s,r,a,l,c,h;if(!t||0===t.length)throw new Error("latlngs not passed");fs(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=[];for(var d in t)u.push(e.project(jn(t[d])));var p=u.length;for(a=l=c=0,n=0,i=p-1;n<p;i=n++)o=u[n],s=u[i],r=o.y*s.x-s.y*o.x,l+=(o.x+s.x)*r,c+=(o.y+s.y)*r,a+=3*r;return h=0===a?u[0]:[l/a,c/a],e.unproject(zn(h))}var ws={__proto__:null,clipPolygon:ys,polygonCenter:bs},xs={project:function(t){return new On(t.lng,t.lat)},unproject:function(t){return new Zn(t.y,t.x)},bounds:new In([-180,-90],[180,90])},$s={R:6378137,R_MINOR:6356752.314245179,bounds:new In([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=s*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-r)/(1+r),s/2);return i=-n*Math.log(Math.max(a,1e-10)),new On(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(r),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=c=Math.PI/2-2*Math.atan(r*e)-a;return new Zn(a*n,t.x*n/i)}},Ls={__proto__:null,LonLat:xs,Mercator:$s,SphericalMercator:qn},Ts=nn({},Fn,{code:"EPSG:3395",projection:$s,transformation:function(){var t=.5/(Math.PI*$s.R);return Vn(t,.5,-t,.5)}()}),Ps=nn({},Fn,{code:"EPSG:4326",projection:xs,transformation:Vn(1/180,1,-1/180,.5)}),Ms=nn({},Hn,{projection:xs,transformation:Vn(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 n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});Hn.Earth=Fn,Hn.EPSG3395=Ts,Hn.EPSG3857=Gn,Hn.EPSG900913=Kn,Hn.EPSG4326=Ps,Hn.Simple=Ms;var ks=An.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[an(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[an(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 n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});Go.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=an(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=an(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 an(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?vn(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[an(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=an(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Cs=ks.extend({initialize:function(t,e){var n,i;if(mn(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},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){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);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 an(t)}}),Es=function(t,e){return new Cs(t,e)},As=Cs.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Cs.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),Cs.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 Bn;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Os=function(t,e){return new As(t,e)},Ss=Cn.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){mn(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=zn(i),s=zn("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Ii.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function zs(t){return new Ss(t)}var Is=Ss.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"string"!=typeof Is.imagePath&&(Is.imagePath=this._detectIconPath()),(this.options.imagePath||Is.imagePath)+Ss.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=so("div","leaflet-default-icon-path",document.body),e=oo(t,"background-image")||oo(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-"leaflet.css".length-1):""}}),Ds=ns.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new rs(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),uo(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&&po(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=bo(e._icon),r=n.getPixelBounds(),a=n.getPixelOrigin(),l=Dn(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));if(!l.contains(s)){var c=zn((Math.max(l.max.x,s.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(i);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),yo(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=Pn(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&&(Mn(this._panRequest),this._panRequest=Pn(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=bo(e._icon),o=e._map.layerPointToLatLng(i);n&&yo(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){Mn(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Bs=ks.extend({options:{icon:new Is,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){mn(this,e),this._latlng=jn(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=jn(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"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),uo(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Co(n,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(uo(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ao(this._icon,"focus",this._panOnFocus,this),ro(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ro(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&yo(this._icon,t),this._shadow&&yo(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&&(uo(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ds)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ds(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&&_o(this._icon,t),this._shadow&&_o(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,n=e.iconSize?zn(e.iconSize):zn(0,0),i=e.iconAnchor?zn(e.iconAnchor):zn(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Ns(t,e){return new Bs(t,e)}var Zs=ks.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 mn(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)}}),js=Zs.extend({options:{fill:!0,radius:10},initialize:function(t,e){mn(this,e),this._latlng=jn(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=jn(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 Zs.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,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new In(this._point.subtract(i),this._point.add(i))},_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 Rs(t,e){return new js(t,e)}var Hs=js.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=nn({},n,{radius:e})),mn(this,e),this._latlng=jn(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 Bn(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Zs.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===Fn.distance){var o=Math.PI/180,s=this._mRadius/Fn.R/o,r=n.project([e+s,t]),a=n.project([e-s,t]),l=r.add(a).divideBy(2),c=n.unproject(l).lat,h=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(c*o))/(Math.cos(e*o)*Math.cos(c*o)))/o;(isNaN(h)||0===h)&&(h=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(h)?0:l.x-n.project([c,t-h]).x,this._radiusY=l.y-r.y}else{var u=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(u).x}this._updateBounds()}});function Fs(t,e,n){return new Hs(t,e,n)}var Ws=Zs.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){mn(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,n,i=1/0,o=null,s=ms,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],c=1,h=l.length;c<h;c++){var u=s(t,e=l[c-1],n=l[c],!0);u<i&&(i=u,o=s(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return gs(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=jn(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Bn,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return fs(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=fs(t),i=0,o=t.length;i<o;i++)n?(e[i]=jn(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new In;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 On(t,t);this._rawPxBounds&&(this._pxBounds=new In([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,n){var i,o,s=t[0]instanceof Zn,r=t.length;if(s){for(o=[],i=0;i<r;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<r;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,s,r,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,s=(a=this._rings[e]).length;n<s-1;n++)(r=hs(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(r[0]),r[1]===a[n+1]&&n!==s-2||(l[i].push(r[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=as(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,s,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,s=this._parts.length;n<s;n++)for(i=0,o=(r=(a=this._parts[n]).length)-1;i<r;o=i++)if((e||0!==i)&&ls(t,a[o],a[i])<=l)return!0;return!1}});function qs(t,e){return new Ws(t,e)}Ws._flat=_s;var Us=Ws.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 bs(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Ws.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof Zn&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Ws.prototype._setLatLngs.call(this,t),fs(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return fs(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new On(e,e);if(t=new In(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,s=this._rings.length;o<s;o++)(i=ys(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,s,r,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(l=(e=this._parts[o]).length)-1;s<l;r=s++)n=e[s],i=e[r],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||Ws.prototype._containsPoint.call(this,t,!0)}});function Vs(t,e){return new Us(t,e)}var Gs=As.extend({initialize:function(t,e){mn(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=vn(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=Ks(t,s);return r?(r.feature=nr(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=nn({},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&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Ks(t,e){var n,i,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],c=e&&e.pointToLayer,h=e&&e.coordsToLatLng||Xs;if(!a&&!r)return null;switch(r.type){case"Point":return Ys(c,t,n=h(a),e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)n=h(a[o]),l.push(Ys(c,t,n,e));return new As(l);case"LineString":case"MultiLineString":return i=Js(a,"LineString"===r.type?0:1,h),new Ws(i,e);case"Polygon":case"MultiPolygon":return i=Js(a,"Polygon"===r.type?1:2,h),new Us(i,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var u=Ks({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new As(l);case"FeatureCollection":for(o=0,s=r.features.length;o<s;o++){var d=Ks(r.features[o],e);d&&l.push(d)}return new As(l);default:throw new Error("Invalid GeoJSON object.")}}function Ys(t,e,n,i){return t?t(e,n):new Bs(n,i&&i.markersInheritOptions&&i)}function Xs(t){return new Zn(t[1],t[0],t[2])}function Js(t,e,n){for(var i,o=[],s=0,r=t.length;s<r;s++)i=e?Js(t[s],e-1,n):(n||Xs)(t[s]),o.push(i);return o}function Qs(t,e){return void 0!==(t=jn(t)).alt?[un(t.lng,e),un(t.lat,e),un(t.alt,e)]:[un(t.lng,e),un(t.lat,e)]}function tr(t,e,n,i){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?tr(t[s],fs(t[s])?0:e-1,n,i):Qs(t[s],i));return!e&&n&&o.push(o[0]),o}function er(t,e){return t.feature?nn({},t.feature,{geometry:e}):nr(e)}function nr(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var ir={toGeoJSON:function(t){return er(this,{type:"Point",coordinates:Qs(this.getLatLng(),t)})}};function or(t,e){return new Gs(t,e)}Bs.include(ir),Hs.include(ir),js.include(ir),Ws.include({toGeoJSON:function(t){var e=!fs(this._latlngs);return er(this,{type:(e?"Multi":"")+"LineString",coordinates:tr(this._latlngs,e?1:0,!1,t)})}}),Us.include({toGeoJSON:function(t){var e=!fs(this._latlngs),n=e&&!fs(this._latlngs[0]),i=tr(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),er(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Cs.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),er(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var s=nr(o);"FeatureCollection"===s.type?i.push.apply(i,s.features):i.push(s)}}})),n?er(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var sr=or,rr=ks.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=Nn(e),mn(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(uo(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ro(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&&lo(this._image),this},bringToBack:function(){return this._map&&co(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Nn(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="IMG"===this._url.tagName,e=this._image=t?this._url:so("img");uo(e,"leaflet-image-layer"),this._zoomAnimated&&uo(e,"leaflet-zoom-animated"),this.options.className&&uo(e,this.options.className),e.onselectstart=hn,e.onmousemove=hn,e.onload=sn(this.fire,this,"load"),e.onerror=sn(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;vo(this._image,n,e)},_reset:function(){var t=this._image,e=new In(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();yo(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){_o(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(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()}}),ar=function(t,e,n){return new rr(t,e,n)},lr=rr.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:so("video");if(uo(e,"leaflet-image-layer"),this._zoomAnimated&&uo(e,"leaflet-zoom-animated"),this.options.className&&uo(e,this.options.className),e.onselectstart=hn,e.onmousemove=hn,e.onloadeddata=sn(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],o=0;o<n.length;o++)i.push(n[o].src);this._url=n.length>0?i:[e.src]}else{vn(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 s=0;s<this._url.length;s++){var r=so("source");r.src=this._url[s],e.appendChild(r)}}}});function cr(t,e,n){return new lr(t,e,n)}var hr=rr.extend({_initImage:function(){var t=this._image=this._url;uo(t,"leaflet-image-layer"),this._zoomAnimated&&uo(t,"leaflet-zoom-animated"),this.options.className&&uo(t,this.options.className),t.onselectstart=hn,t.onmousemove=hn}});function ur(t,e,n){return new hr(t,e,n)}var dr=ks.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof L.LatLng||vn(t))?(this._latlng=jn(t),mn(this,e)):(mn(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).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&&_o(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_o(this._container,1),this.bringToFront(),this.options.interactive&&(uo(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(_o(this._container,0),this._removeTimeout=setTimeout(sn(ro,void 0,this._container),200)):ro(this._container),this.options.interactive&&(po(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=jn(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&&lo(this._container),this},bringToBack:function(){return this._map&&co(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof As){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=zn(this.options.offset),n=this._getAnchor();this._zoomAnimated?yo(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});Go.include({_initOverlay:function(t,e,n,i){var o=e;return o instanceof t||(o=new t(i).setContent(e)),n&&o.setLatLng(n),o}}),ks.include({_initOverlay:function(t,e,n,i){var o=n;return o instanceof t?(mn(o,i),o._source=this):(o=e&&!i?e:new t(i,this)).setContent(n),o}});var pr=dr.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).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,dr.prototype.openOn.call(this,t)},onAdd:function(t){dr.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Zs||this._source.on("preclick",Do))},onRemove:function(t){dr.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Zs||this._source.off("preclick",Do))},getEvents:function(){var t=dr.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?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=so("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=so("div",t+"-content-wrapper",e);if(this._contentNode=so("div",t+"-content",n),No(e),Bo(this._contentNode),Co(e,"contextmenu",Do),this._tipContainer=so("div",t+"-tip-container",e),this._tip=so("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=so("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',Co(i,"click",(function(t){Zo(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",uo(t,s)):po(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();yo(this._container,e.add(n))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var e=this._map,n=parseInt(oo(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+n,o=this._containerWidth,s=new On(this._containerLeft,-i-this._containerBottom);s._add(bo(this._container));var r=e.layerPointToContainerPoint(s),a=zn(this.options.autoPanPadding),l=zn(this.options.autoPanPaddingTopLeft||a),c=zn(this.options.autoPanPaddingBottomRight||a),h=e.getSize(),u=0,d=0;r.x+o+c.x>h.x&&(u=r.x+o-h.x+c.x),r.x-u-l.x<0&&(u=r.x-l.x),r.y+i+c.y>h.y&&(d=r.y+i-h.y+c.y),r.y-d-l.y<0&&(d=r.y-l.y),(u||d)&&e.fire("autopanstart").panBy([u,d],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return zn(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),mr=function(t,e){return new pr(t,e)};Go.mergeOptions({closePopupOnClick:!0}),Go.include({openPopup:function(t,e,n){return this._initOverlay(pr,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ks.include({bindPopup:function(t,e){return this._popup=this._initOverlay(pr,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._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){jo(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof Zs?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var fr=dr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){dr.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){dr.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=dr.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=so("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+an(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,s=i.latLngToContainerPoint(i.getCenter()),r=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,h=zn(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,n=c):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=c/2):"right"===a?(e=0,n=c/2):"left"===a?(e=l,n=c/2):r.x<s.x?(a="right",e=0,n=c/2):(a="left",e=l+2*(h.x+u.x),n=c/2),t=t.subtract(zn(e,n,!0)).add(h).add(u),po(o,"leaflet-tooltip-right"),po(o,"leaflet-tooltip-left"),po(o,"leaflet-tooltip-top"),po(o,"leaflet-tooltip-bottom"),uo(o,"leaflet-tooltip-"+a),yo(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_o(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return zn(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),_r=function(t,e){return new fr(t,e)};Go.include({openTooltip:function(t,e,n){return this._initOverlay(fr,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),ks.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(fr,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",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&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){Co(t.getElement(),"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),Co(t.getElement(),"blur",this.closeTooltip,this)},_setAriaDescribedByOnLayer:function(t){t.getElement().setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var gr=Ss.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(ao(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=zn(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function vr(t){return new gr(t)}Ss.Default=Is;var yr=ks.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ii.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){mn(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ro(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(lo(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(co(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=ln(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 On?t:new On(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,s=n.length;o<s;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ii.ielt9){_o(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);_o(o.el,s),s<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(Mn(this._fadeFrame),this._fadeFrame=Pn(this._updateOpacity,this))}},_onOpaqueTile:hn,_initContainer:function(){this._container||(this._container=so("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(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ro(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=so("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),i.el.offsetWidth,this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:hn,_onRemoveLevel:hn,_onCreateLevel:hn,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.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)ro(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),s=Math.floor(e/2),r=n-1,a=new On(+o,+s);a.z=+r;var l=this._tileCoordsToKey(a),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),r>i&&this._retainParent(o,s,r,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new On(o,s);r.z=n+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,s,n+1,i))}},_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 void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var s=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();Ii.any3d?vo(t.el,o,i):yo(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*i);return new In(o.subtract(s),o.add(s))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),s=o.getCenter(),r=[],a=this.options.keepBuffer,l=new In(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var h=this._tiles[c].coords;h.z===this._tileZoom&&l.contains(new On(h.x,h.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var u=o.min.y;u<=o.max.y;u++)for(var d=o.min.x;d<=o.max.x;d++){var p=new On(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var m=this._tiles[this._tileCoordsToKey(p)];m?m.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],f);this._level.el.appendChild(f)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return Nn(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new Bn(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new On(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ro(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){uo(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=hn,t.onmousemove=hn,Ii.ielt9&&this.options.opacity<1&&_o(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),sn(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&Pn(sn(this._tileReady,this,t,null,o)),yo(o,n),this._tiles[i]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(_o(n.el,0),Mn(this._fadeFrame),this._fadeFrame=Pn(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(uo(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ii.ielt9||!this._map._fadeAnimated?Pn(this._pruneTiles,this):setTimeout(sn(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new On(this._wrapX?cn(t.x,this._wrapX):t.x,this._wrapY?cn(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new In(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 br(t){return new yr(t)}var wr=yr.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=mn(this,e)).detectRetina&&Ii.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),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Co(n,"load",sn(this._tileOnLoad,this,e,n)),Co(n,"error",sn(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Ii.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return gn(this._url,nn(e,this.options))},_tileOnLoad:function(t,e){Ii.ielt9?setTimeout(sn(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_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).onload=hn,e.onerror=hn,!e.complete)){e.src=bn;var n=this._tiles[t].coords;ro(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",bn),yr.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==bn))return yr.prototype._tileReady.call(this,t,e,n)}});function xr(t,e){return new wr(t,e)}var $r=wr.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 n=nn({},this.defaultWmsParams);for(var i in e)i in this.options||(n[i]=e[i]);var o=(e=mn(this,e)).detectRetina&&Ii.retina?2:1,s=this.getTileSize();n.width=s.x*o,n.height=s.y*o,this.wmsParams=n},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,wr.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=Dn(n.project(e[0]),n.project(e[1])),o=i.min,s=i.max,r=(this._wmsVersion>=1.3&&this._crs===Ps?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=wr.prototype.getTileUrl.call(this,t);return a+fn(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return nn(this.wmsParams,t),e||this.redraw(),this}});wr.WMS=$r,xr.wms=function(t,e){return new $r(t,e)};var Lr=ks.extend({options:{padding:.1},initialize:function(t){mn(this,t),an(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&uo(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 n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));Ii.any3d?vo(this._container,s,n):yo(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),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(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new In(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Tr=Lr.extend({options:{tolerance:0},getEvents:function(){var t=Lr.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Lr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Co(t,"mousemove",this._onMouseMove,this),Co(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Co(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){Mn(this._redrawRequest),delete this._ctx,ro(this._container),Ao(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Lr.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Ii.retina?2:1;yo(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Ii.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Lr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[an(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,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[an(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("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||Pn(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new In,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 n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,s,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=r[n].length;i<o;i++)s=r[n][i],l[i?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(n=e);this._fireEvent(!!n&&[n],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&&(po(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(uo(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(sn((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),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 n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Pr(t){return Ii.canvas?new Tr(t):null}var Mr=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),kr={_initContainer:function(){this._container=so("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Lr.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Mr("shape");uo(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Mr("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[an(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;ro(e),t.removeInteractiveTarget(e),delete this._layers[an(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Mr("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=vn(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Mr("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){lo(t._container)},_bringToBack:function(t){co(t._container)}},Cr=Ii.vml?Mr:Yn,Er=Lr.extend({_initContainer:function(){this._container=Cr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Cr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ro(this._container),Ao(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Lr.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),yo(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Cr("path");t.options.className&&uo(e,t.options.className),t.options.interactive&&uo(e,"leaflet-interactive"),this._updateStyle(t),this._layers[an(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ro(t._path),t.removeInteractiveTarget(t._path),delete this._layers[an(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Xn(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){lo(t._path)},_bringToBack:function(t){co(t._path)}});function Ar(t){return Ii.svg||Ii.vml?new Er(t):null}Ii.vml&&Er.include(kr),Go.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("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Pr(t)||Ar(t)}});var Or=Us.extend({initialize:function(t,e){Us.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Nn(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Sr(t,e){return new Or(t,e)}Er.create=Cr,Er.pointsToPath=Xn,Gs.geometryToLayer=Ks,Gs.coordsToLatLng=Xs,Gs.coordsToLatLngs=Js,Gs.latLngToCoords=Qs,Gs.latLngsToCoords=tr,Gs.getFeature=er,Gs.asFeature=nr,Go.mergeOptions({boxZoom:!0});var zr=ns.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(){Co(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ao(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ro(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Ki(),xo(),this._startPoint=this._map.mouseEventToContainerPoint(t),Co(document,{contextmenu:jo,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=so("div","leaflet-zoom-box",this._container),uo(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new In(this._point,this._startPoint),n=e.getSize();yo(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ro(this._box),po(this._container,"leaflet-crosshair")),Yi(),$o(),Ao(document,{contextmenu:jo,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(sn(this._resetState,this),0);var e=new Bn(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Go.addInitHook("addHandler","boxZoom",zr),Go.mergeOptions({doubleClickZoom:!0});var Ir=ns.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,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});Go.addInitHook("addHandler","doubleClickZoom",Ir),Go.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Dr=ns.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new rs(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))}uo(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){po(this._map._container,"leaflet-grab"),po(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=Nn(this._map.options.maxBounds);this._offsetLimit=Dn(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,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),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),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,s=(i+e+n)%t-e-n,r=Math.abs(o+n)<Math.abs(s+n)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=n.easeLinearity,a=o.multiplyBy(r/s),l=a.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),h=a.multiplyBy(c/l),u=c/(n.inertiaDeceleration*r),d=h.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),Pn((function(){e.panBy(d,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});Go.addInitHook("addHandler","dragging",Dr),Go.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Br=ns.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"),Co(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(),Ao(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,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){Co(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ao(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=zn(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}jo(t)}}});Go.addInitHook("addHandler","keyboard",Br),Go.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Nr=ns.extend({addHooks:function(){Co(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ao(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Wo(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(sn(this._performZoom,this),i),jo(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,s=n?Math.ceil(o/n)*n:o,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});Go.addInitHook("addHandler","scrollWheelZoom",Nr);Go.mergeOptions({tapHold:Ii.touchNative&&Ii.safari&&Ii.mobile,tapTolerance:15});var Zr=ns.extend({addHooks:function(){Co(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ao(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new On(e.clientX,e.clientY),this._holdTimeout=setTimeout(sn((function(){this._cancel(),this._isTapValid()&&(Co(document,"touchend",Zo),Co(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),600),Co(document,"touchend touchcancel contextmenu",this._cancel,this),Co(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ao(document,"touchend",Zo),Ao(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ao(document,"touchend touchcancel contextmenu",this._cancel,this),Ao(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new On(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});Go.addInitHook("addHandler","tapHold",Zr),Go.mergeOptions({touchZoom:Ii.touch,bounceAtZoomLimits:!0});var jr=ns.extend({addHooks:function(){uo(this._map._container,"leaflet-touch-zoom"),Co(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){po(this._map._container,"leaflet-touch-zoom"),Ao(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Co(document,"touchmove",this._onTouchMove,this),Co(document,"touchend touchcancel",this._onTouchEnd,this),Zo(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),Mn(this._animRequest);var r=sn(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=Pn(r,this,!0),Zo(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,Mn(this._animRequest),Ao(document,"touchmove",this._onTouchMove,this),Ao(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Go.addInitHook("addHandler","touchZoom",jr),Go.BoxZoom=zr,Go.DoubleClickZoom=Ir,Go.Drag=Dr,Go.Keyboard=Br,Go.ScrollWheelZoom=Nr,Go.TapHold=Zr,Go.TouchZoom=jr;var Rr=nn({__proto__:null,version:en,Control:Yo,control:Xo,Class:Cn,Handler:ns,extend:nn,bind:sn,stamp:an,setOptions:mn,Browser:Ii,Evented:An,Mixin:os,Util:kn,PosAnimation:Vo,Draggable:rs,DomEvent:Uo,DomUtil:ko,Point:On,point:zn,Bounds:In,bounds:Dn,Transformation:Un,transformation:Vn,LineUtil:vs,PolyUtil:ws,LatLng:Zn,latLng:jn,LatLngBounds:Bn,latLngBounds:Nn,CRS:Hn,Projection:Ls,Layer:ks,LayerGroup:Cs,layerGroup:Es,FeatureGroup:As,featureGroup:Os,ImageOverlay:rr,imageOverlay:ar,VideoOverlay:lr,videoOverlay:cr,SVGOverlay:hr,svgOverlay:ur,DivOverlay:dr,Popup:pr,popup:mr,Tooltip:fr,tooltip:_r,icon:zs,DivIcon:gr,divIcon:vr,Marker:Bs,marker:Ns,Icon:Ss,GridLayer:yr,gridLayer:br,TileLayer:wr,tileLayer:xr,Renderer:Lr,Canvas:Tr,canvas:Pr,Path:Zs,CircleMarker:js,circleMarker:Rs,Circle:Hs,circle:Fs,Polyline:Ws,polyline:qs,Polygon:Us,polygon:Vs,Rectangle:Or,rectangle:Sr,SVG:Er,svg:Ar,GeoJSON:Gs,geoJSON:or,geoJson:sr,Map:Go,map:Ko},{noConflict:Wr}),Hr=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("Unable to locate global object.")}(),Fr=Hr.L;function Wr(){return Hr.L=Fr,Rr}Hr.L=Rr;var qr=ct(Object.freeze({__proto__:null,Bounds:In,Browser:Ii,CRS:Hn,Canvas:Tr,Circle:Hs,CircleMarker:js,Class:Cn,Control:Yo,DivIcon:gr,DivOverlay:dr,DomEvent:Uo,DomUtil:ko,Draggable:rs,Evented:An,FeatureGroup:As,GeoJSON:Gs,GridLayer:yr,Handler:ns,Icon:Ss,ImageOverlay:rr,LatLng:Zn,LatLngBounds:Bn,Layer:ks,LayerGroup:Cs,LineUtil:vs,Map:Go,Marker:Bs,Mixin:os,Path:Zs,Point:On,PolyUtil:ws,Polygon:Us,Polyline:Ws,Popup:pr,PosAnimation:Vo,Projection:Ls,Rectangle:Or,Renderer:Lr,SVG:Er,SVGOverlay:hr,TileLayer:wr,Tooltip:fr,Transformation:Un,Util:kn,VideoOverlay:lr,bind:sn,bounds:Dn,canvas:Pr,circle:Fs,circleMarker:Rs,control:Xo,default:Rr,divIcon:vr,extend:nn,featureGroup:Os,geoJSON:or,geoJson:sr,gridLayer:br,icon:zs,imageOverlay:ar,latLng:jn,latLngBounds:Nn,layerGroup:Es,map:Ko,marker:Ns,noConflict:Wr,point:zn,polygon:Vs,polyline:qs,popup:mr,rectangle:Sr,setOptions:mn,stamp:an,svg:Ar,svgOverlay:ur,tileLayer:xr,tooltip:_r,transformation:Vn,version:en,videoOverlay:cr}));function Ur(e){let n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,k,C,O,S,z,I,D,B,N;return{c(){n=x("div"),i=x("div"),o=$("map center: "),s=$(e[0]),r=T(),a=x("a"),l=$("view on osm.org"),c=T(),h=x("br"),u=$("\n map zoom: "),d=$(e[1]),p=T(),m=x("br"),f=$("\n viewbox: "),_=$(e[2]),g=T(),w=x("br"),L=$("\n last click: "),P=$(e[4]),k=T(),C=x("br"),O=$("\n mouse position: "),S=$(e[5]),z=T(),I=x("div"),D=x("a"),D.textContent="hide",E(a,"target","_blank"),E(a,"href",e[3]),E(i,"id","map-position-inner"),E(D,"href","#hide"),E(I,"id","map-position-close"),E(I,"class","svelte-1b30dq3"),E(n,"id","map-position"),E(n,"class","svelte-1b30dq3")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(i,s),v(i,r),v(i,a),v(a,l),v(i,c),v(i,h),v(i,u),v(i,d),v(i,p),v(i,m),v(i,f),v(i,_),v(i,g),v(i,w),v(i,L),v(i,P),v(i,k),v(i,C),v(i,O),v(i,S),v(n,z),v(n,I),v(I,D),B||(N=M(D,"click",Vr),B=!0)},p(t,[e]){1&e&&A(s,t[0]),8&e&&E(a,"href",t[3]),2&e&&A(d,t[1]),4&e&&A(_,t[2]),16&e&&A(P,t[4]),32&e&&A(S,t[5])},i:t,o:t,d(t){t&&b(n),B=!1,N()}}}function Vr(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function Gr(t,e,n){let i,o,s,r,a,l,c;function h(t,e){n(0,o=t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),n(3,a=function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),n(1,s=t.getZoom()),n(2,r=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),n(5,c="-"),e&&n(5,c=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return dt.subscribe((t=>{t&&(t.on("move",(function(){h(t)})),t.on("mousemove",(function(e){h(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,h(t)})),t.on("load",(function(){h(t)})))})),[o,s,r,a,l,c]}!function(t,e){!function(e,n){t.exports=e(qr),void 0!==n&&n.L&&(n.L.Control.MiniMap=e(L),n.L.control.minimap=function(t,e){return new n.L.Control.MiniMap(t,e)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,n){t.Util.setOptions(this,n),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return n=t.Util.extend(this.options.mapOptions,n),this._miniMap=new t.Map(this._container,n),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var n=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,n,i,o,s,r){var a=t.DomUtil.create("a",i,o);a.innerHTML=e,a.href="#",a.title=n;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",s,r),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),n=this._miniMap.latLngToContainerPoint(e.getSouthWest()),i=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:n,ne:i}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,n=this._miniMap.getZoom()-this._mainMap.getZoom(),i=this._miniMap.getZoom()-this.options.zoomLevelOffset;return n>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset?this._miniMap.getZoom()>this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=i,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window)}({exports:{}});class Kr extends lt{constructor(t){super(),at(this,t,Gr,Ur,r,{})}}function Yr(e){let n,i,r,a,l,c,h,u;return n=new Kr({}),{c(){it(n.$$.fragment),i=T(),r=x("div"),a=T(),l=x("div"),l.textContent="show map bounds",E(r,"id","map"),E(r,"class","svelte-1vbvdrk"),E(l,"id","show-map-position"),E(l,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(o,d){var p;ot(n,o,d),y(o,i,d),y(o,r,d),y(o,a,d),y(o,l,d),c=!0,h||(u=[(p=e[0].call(null,r),p&&s(p.destroy)?p.destroy:t),M(l,"click",C(Xr))],h=!0)},p:t,i(t){c||(tt(n.$$.fragment,t),c=!0)},o(t){et(n.$$.fragment,t),c=!1},d(t){st(n,t),t&&b(i),t&&b(r),t&&b(a),t&&b(l),h=!1,o(u)}}}function Xr(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function Jr(t,e,n){let{display_minimap:i=!1}=e,{current_result:o=null}=e,{position_marker:s=null}=e,r=[];function a(t){let e=u(dt);if(!e)return;if(function(){let t=u(dt);t&&r.forEach((function(e){t.removeLayer(e)}))}(),s){let t=Rs(s,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.bindTooltip(`Search (${s[0]},${s[1]})`).openTooltip(),t.addTo(e),r.push(t)}var n=new URLSearchParams(window.location.search).get("viewbox");if(n){let t=n.split(",");Sr(Nn([t[1],t[0]],[t[3],t[2]]),{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let i=t.centroid?t.centroid.coordinates[1]:t.lat,o=t.centroid?t.centroid.coordinates[0]:t.lon,a=t.geometry||t.geojson;if(i&&o){let t=Rs([i,o],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});s&&t.bindTooltip("Result").openTooltip(),e.addLayer(t),r.push(t)}if(a){var l=sr({type:"FeatureCollection",features:[{type:"Feature",geometry:a,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(l),r.push(l),e.fitBounds(l.getBounds())}else i&&o&&s?e.fitBounds([[i,o],s],{padding:[50,50]}):i&&o&&e.setView([i,o],10)}return t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap),"current_result"in t&&n(2,o=t.current_result),"position_marker"in t&&n(3,s=t.position_marker)},t.$$.update=()=>{4&t.$$.dirty&&a(o)},[function(t){let e=function(t){const e=Nominatim_Config.Map_Tile_Attribution;let n=new Ko(t,{attributionControl:!1,scrollWheelZoom:!0,touchZoom:!1,center:[Nominatim_Config.Map_Default_Lat,Nominatim_Config.Map_Default_Lon],zoom:Nominatim_Config.Map_Default_Zoom});if(e&&e.length&&Xo.attribution({prefix:'<a href="https://leafletjs.com/">Leaflet</a>'}).addTo(n),xr(Nominatim_Config.Map_Tile_URL,{attribution:e}).addTo(n),i){let t=new wr(Nominatim_Config.Map_Tile_URL,{minZoom:0,maxZoom:13,attribution:e});new Yo.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=Yo.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return dt.set(e),a(o),{destroy:()=>{dt.set(null),e.remove()}}},i,o,s]}class Qr extends lt{constructor(t){super(),at(this,t,Jr,Yr,r,{display_minimap:1,current_result:2,position_marker:3})}}function ta(t){let e,n;return e=new _e({props:{api_request_params:t[0],bStructuredSearch:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.api_request_params=t[0]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ea(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new se({props:{$$slots:{default:[ta]},$$scope:{ctx:t}}});let d={reverse_search:!1};return void 0!==t[1]&&(d.current_result=t[1]),s=new tn({props:d}),Z.push((()=>nt(s,"current_result",u))),c=new Qr({props:{current_result:t[1],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),E(o,"class","sidebar svelte-1d53ob0"),E(l,"id","map-wrapper"),E(l,"class","svelte-1d53ob0"),E(i,"id","content"),E(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function na(t,e,n){let i,o,s;return d(t,_t,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"search"===t.tab&&function(t){Mt(),n(0,o={q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:Nominatim_Config.Search_AreaPolygons?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.has("dedupe")&&"1"!==t.get("dedupe")?0:1,"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=o.street||o.city||o.county||o.state||o.country||o.postalcode;o.q||e?$t("search",o,(function(t){pt.set(t),Mt("Result for "+o.q),e?(document.querySelector(".nav-tabs a[href='#structured']").click(),document.querySelector("input[name=street]").focus()):document.querySelector("input[name=q]").focus()})):pt.set(void 0)}(t.params)}},[o,s,undefined,i,function(t){s=t,n(1,s)}]}class ia extends lt{constructor(t){super(),at(this,t,na,ea,r,{})}}function oa(t,e,n){const i=t.slice();return i[8]=e[n],i[10]=n,i}function sa(e){let n,i,o,s,r=e[8]+"";return{c(){n=x("option"),i=$(e[10]),o=$(" - "),s=$(r),n.__value=e[10],n.value=n.__value},m(t,e){y(t,n,e),v(n,i),v(n,o),v(n,s)},p:t,d(t){t&&b(n)}}}function ra(t){let e,n,i,s,r,a,l,c,h,u,d,p,m,f,_,g,$,L,P,A,z,I,D=Ee(),B=[];for(let e=0;e<D.length;e+=1)B[e]=sa(oa(t,D,e));return{c(){e=x("div"),e.innerHTML='<label for="reverse-lat" class="svelte-1pqxd6v">lat</label>',n=T(),i=x("div"),s=x("input"),r=T(),a=x("div"),l=x("a"),l.textContent="<>",c=T(),h=x("div"),h.innerHTML='<label for="reverse-lon" class="svelte-1pqxd6v">lon</label>',u=T(),d=x("div"),p=x("input"),m=T(),f=x("div"),f.innerHTML='<label for="reverse-zoom" class="svelte-1pqxd6v">max zoom</label>',_=T(),g=x("div"),$=x("select"),L=x("option"),L.textContent="---";for(let t=0;t<B.length;t+=1)B[t].c();P=T(),A=x("div"),A.innerHTML='<button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>',E(e,"class","col-auto"),E(s,"id","reverse-lat"),E(s,"name","lat"),E(s,"type","text"),E(s,"class","form-control form-control-sm d-inline svelte-1pqxd6v"),E(s,"placeholder","latitude"),E(s,"pattern","^-?\\d+(\\.\\d+)?$"),E(i,"class","col-auto"),E(l,"id","switch-coords"),E(l,"class","btn btn-outline-secondary btn-sm svelte-1pqxd6v"),E(l,"title","switch lat and lon"),E(a,"class","col-auto"),E(h,"class","col-auto"),E(p,"id","reverse-lon"),E(p,"name","lon"),E(p,"type","text"),E(p,"class","form-control form-control-sm svelte-1pqxd6v"),E(p,"placeholder","longitude"),E(p,"pattern","^-?\\d+(\\.\\d+)?$"),E(d,"class","col-auto"),E(f,"class","col-auto"),L.__value="",L.value=L.__value,E($,"id","reverse-zoom"),E($,"name","zoom"),E($,"class","form-select form-select-sm svelte-1pqxd6v"),void 0===t[2]&&W((()=>t[7].call($))),E(g,"class","col-auto"),E(A,"class","col-auto")},m(o,b){y(o,e,b),y(o,n,b),y(o,i,b),v(i,s),O(s,t[0]),y(o,r,b),y(o,a,b),v(a,l),y(o,c,b),y(o,h,b),y(o,u,b),y(o,d,b),v(d,p),O(p,t[1]),y(o,m,b),y(o,f,b),y(o,_,b),y(o,g,b),v(g,$),v($,L);for(let t=0;t<B.length;t+=1)B[t].m($,null);S($,t[2]),y(o,P,b),y(o,A,b),z||(I=[M(s,"input",t[4]),M(s,"change",la),M(l,"click",C(k(t[5]))),M(p,"input",t[6]),M($,"change",t[7])],z=!0)},p(t,e){if(1&e&&s.value!==t[0]&&O(s,t[0]),2&e&&p.value!==t[1]&&O(p,t[1]),0&e){let n;for(D=Ee(),n=0;n<D.length;n+=1){const i=oa(t,D,n);B[n]?B[n].p(i,e):(B[n]=sa(i),B[n].c(),B[n].m($,null))}for(;n<B.length;n+=1)B[n].d(1);B.length=D.length}4&e&&S($,t[2])},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(r),t&&b(a),t&&b(c),t&&b(h),t&&b(u),t&&b(d),t&&b(m),t&&b(f),t&&b(_),t&&b(g),w(B,t),t&&b(P),t&&b(A),z=!1,o(I)}}}function aa(t){let e,n;return e=new le({props:{page:"reverse",$$slots:{default:[ra]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,[n]){const i={};2055&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function la(t){var e=t.target.value.split(",");2===e.length&&(document.querySelector("input[name=lat]").value=L.Util.trim(e[0]),document.querySelector("input[name=lon]").value=L.Util.trim(e[1]))}function ca(t,e,n){let{lat:i=""}=e,{lon:o=""}=e,{zoom:s=""}=e;function r(t,e,n){if(null===t||null===e)return;let i=new URLSearchParams;i.set("lat",t),i.set("lon",e),i.set("zoom",n||s),yt("reverse",i)}dt.subscribe((t=>{t&&t.on("click",(t=>{let e=t.latlng.wrap();r(e.lat.toFixed(5),e.lng.toFixed(5))}))}));return t.$$set=t=>{"lat"in t&&n(0,i=t.lat),"lon"in t&&n(1,o=t.lon),"zoom"in t&&n(2,s=t.zoom)},[i,o,s,r,function(){i=this.value,n(0,i)},()=>r(o,i),function(){o=this.value,n(1,o)},function(){s=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(2,s)}]}class ha extends lt{constructor(t){super(),at(this,t,ca,aa,r,{lat:0,lon:1,zoom:2})}}function ua(t){let n,i;const o=[t[0]];let s={};for(let t=0;t<o.length;t+=1)s=e(s,o[t]);return n=new ha({props:s}),{c(){it(n.$$.fragment)},m(t,e){ot(n,t,e),i=!0},p(t,e){const i=1&e?function(t,e){const n={},i={},o={$$scope:1};let s=t.length;for(;s--;){const r=t[s],a=e[s];if(a){for(const t in r)t in a||(i[t]=1);for(const t in a)o[t]||(n[t]=a[t],o[t]=1);t[s]=a}else for(const t in r)o[t]=1}for(const t in i)t in n||(n[t]=void 0);return n}(o,[(s=t[0],"object"==typeof s&&null!==s?s:{})]):{};var s;n.$set(i)},i(t){i||(tt(n.$$.fragment,t),i=!0)},o(t){et(n.$$.fragment,t),i=!1},d(t){st(n,t)}}}function da(t){let e,n,i,o,s,r,a,l,c,h;function u(e){t[4](e)}e=new se({props:{$$slots:{default:[ua]},$$scope:{ctx:t}}});let d={reverse_search:!0};return void 0!==t[1]&&(d.current_result=t[1]),s=new tn({props:d}),Z.push((()=>nt(s,"current_result",u))),c=new Qr({props:{current_result:t[1],position_marker:t[2],display_minimap:!0}}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),it(s.$$.fragment),a=T(),l=x("div"),it(c.$$.fragment),E(o,"class","sidebar svelte-1d53ob0"),E(l,"id","map-wrapper"),E(l,"class","svelte-1d53ob0"),E(i,"id","content"),E(i,"class","svelte-1d53ob0")},m(t,r){ot(e,t,r),y(t,n,r),y(t,i,r),v(i,o),ot(s,o,null),v(i,a),v(i,l),ot(c,l,null),h=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!r&&2&n&&(r=!0,o.current_result=t[1],q((()=>r=!1))),s.$set(o);const a={};2&n&&(a.current_result=t[1]),4&n&&(a.position_marker=t[2]),c.$set(a)},i(t){h||(tt(e.$$.fragment,t),tt(s.$$.fragment,t),tt(c.$$.fragment,t),h=!0)},o(t){et(e.$$.fragment,t),et(s.$$.fragment,t),et(c.$$.fragment,t),h=!1},d(t){st(e,t),t&&b(n),t&&b(i),st(s),st(c)}}}function pa(t,e,n){let i,o,s,r;return d(t,_t,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"reverse"===t.tab&&(e=t.params,Mt(),n(0,o={lat:e.get("lat"),lon:e.get("lon"),zoom:e.get("zoom")>1?Number(e.get("zoom")):Number(Nominatim_Config.Reverse_Default_Search_Zoom),format:"jsonv2"}),o.lat||o.lat?$t("reverse",o,(function(t){t&&!t.error?(n(2,r=[o.lat,o.lon]),pt.set([t])):pt.set([]),Mt("Reverse result for "+o.lat+","+o.lon),document.querySelector("input[name=lat]").focus()})):pt.set(void 0))}var e},[o,s,r,i,function(t){s=t,n(1,s)}]}class ma extends lt{constructor(t){super(),at(this,t,pa,da,r,{})}}function fa(e){let n,i,o,s,r,a,l,c,h,u,d;return{c(){n=x("form"),i=x("div"),o=x("div"),s=x("input"),a=T(),l=x("div"),l.innerHTML='<button type="submit" class="btn btn-primary btn-sm">Show</button>',c=T(),h=x("small"),h.innerHTML='OSM type+id (<em class="svelte-1kvo9ki">N123</em>, <em class="svelte-1kvo9ki">n123</em>, <em class="svelte-1kvo9ki">W123</em>, <em class="svelte-1kvo9ki">w123</em>, <em class="svelte-1kvo9ki">R123</em>, <em class="svelte-1kvo9ki">r123</em>),\n Place id (<em class="svelte-1kvo9ki">1234</em>) or\n URL (<em class="svelte-1kvo9ki">https://openstreetmap.org/way/123</em>)',E(s,"type","edit"),E(s,"class","form-control form-control-sm me-1 svelte-1kvo9ki"),E(s,"pattern","^[NWRnwr]?[0-9]+$|.*openstreetmap.*"),s.value=r=""+((e[0].osmtype||"")+(e[0].osmid||"")+(e[0].place_id||"")),E(o,"class","col-auto"),E(l,"class","col-auto"),E(i,"class","row g-1"),E(n,"class","form-inline svelte-1kvo9ki"),E(n,"action","details.html"),E(h,"class","form-text text-muted svelte-1kvo9ki")},m(t,r){y(t,n,r),v(n,i),v(i,o),v(o,s),v(i,a),v(i,l),y(t,c,r),y(t,h,r),u||(d=M(n,"submit",k(e[1])),u=!0)},p(t,[e]){1&e&&r!==(r=""+((t[0].osmtype||"")+(t[0].osmid||"")+(t[0].place_id||"")))&&s.value!==r&&(s.value=r)},i:t,o:t,d(t){t&&b(n),t&&b(c),t&&b(h),u=!1,d()}}}function _a(t,e,n){let{api_request_params:i={}}=e;return t.$$set=t=>{"api_request_params"in t&&n(0,i=t.api_request_params)},[i,function(t){let e=t.target.querySelector("input[type=edit]").value.trim(),n=e.match(/^\s*([NWR])(\d+)\s*$/i)||e.match(/\/(relation|way|node)\/(\d+)\s*$/);var i=new URLSearchParams;if(n)i.set("osmtype",n[1].charAt(0).toUpperCase()),i.set("osmid",n[2]);else{if(!e.match(/^\d+$/))return void alert("invalid input");i.set("place_id",e)}yt("details",i)}]}class ga extends lt{constructor(t){super(),at(this,t,_a,fa,r,{api_request_params:0})}}function va(e){let n;return{c(){n=x("span"),n.textContent="No Name",E(n,"class","noname")},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function ya(t){let e,n=t[0].localname+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&A(e,n)},d(t){t&&b(e)}}}function ba(t){let e,n;return e=new Et({props:{page:"search",params_hash:{postalcode:t[0].localname},$$slots:{default:[$a]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={postalcode:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function wa(t){let e,n;return e=new Et({props:{page:"search",params_hash:{country:t[0].localname},$$slots:{default:[La]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={country:t[0].localname}),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function xa(t){let e,n;return e=new Ie({props:{feature:t[0],$$slots:{default:[Ta]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.feature=t[0]),32&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function $a(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function La(t){let e;return{c(){e=$("search by name")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ta(t){let e;return{c(){e=$("details")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Pa(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k=Pe(t[0])+"",C=be(t[0])+"",O=t[0].rank_address+"",S=Me(t[0].admin_level)+"",I=ke(t[0].distance,t[1])+"";function D(t,e){return t[0].localname?ya:va}let B=D(t),N=B(t);const Z=[xa,wa,ba],j=[];function R(t,e){return 9&e&&(w=null),t[0].osm_id?0:(null==w&&(w=!(t[3]||!t[0].type.match(/^country/))),w?1:t[3]||"postcode"!==t[0].type?-1:2)}return~(L=R(t,-1))&&(P=j[L]=Z[L](t)),{c(){e=x("tr"),n=x("td"),N.c(),i=T(),o=x("td"),s=$(k),r=T(),a=x("td"),l=T(),c=x("td"),h=$(O),u=T(),d=x("td"),p=$(S),m=T(),f=x("td"),_=T(),g=x("td"),P&&P.c(),E(n,"class","name fw-bold svelte-6a43i0"),E(o,"class","svelte-6a43i0"),E(a,"class","svelte-6a43i0"),E(c,"class","svelte-6a43i0"),E(d,"class","svelte-6a43i0"),E(f,"class","svelte-6a43i0"),E(g,"class","svelte-6a43i0"),E(e,"class","svelte-6a43i0"),z(e,"notused",t[2]&&!t[4])},m(t,b){y(t,e,b),v(e,n),N.m(n,null),v(e,i),v(e,o),v(o,s),v(e,r),v(e,a),a.innerHTML=C,v(e,l),v(e,c),v(c,h),v(e,u),v(e,d),v(d,p),v(e,m),v(e,f),f.innerHTML=I,v(e,_),v(e,g),~L&&j[L].m(g,null),M=!0},p(t,[i]){B===(B=D(t))&&N?N.p(t,i):(N.d(1),N=B(t),N&&(N.c(),N.m(n,null))),(!M||1&i)&&k!==(k=Pe(t[0])+"")&&A(s,k),(!M||1&i)&&C!==(C=be(t[0])+"")&&(a.innerHTML=C),(!M||1&i)&&O!==(O=t[0].rank_address+"")&&A(h,O),(!M||1&i)&&S!==(S=Me(t[0].admin_level)+"")&&A(p,S),(!M||3&i)&&I!==(I=ke(t[0].distance,t[1])+"")&&(f.innerHTML=I);let o=L;L=R(t,i),L===o?~L&&j[L].p(t,i):(P&&(J(),et(j[o],1,1,(()=>{j[o]=null})),Q()),~L?(P=j[L],P?P.p(t,i):(P=j[L]=Z[L](t),P.c()),tt(P,1),P.m(g,null)):P=null),(!M||20&i)&&z(e,"notused",t[2]&&!t[4])},i(t){M||(tt(P),M=!0)},o(t){et(P),M=!1},d(t){t&&b(e),N.d(),~L&&j[L].d()}}}function Ma(t,e,n){let i,o,{addressLine:s}=e,{bDistanceInMeters:r}=e,{bMarkUnusedLines:a=!1}=e;return t.$$set=t=>{"addressLine"in t&&n(0,s=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters),"bMarkUnusedLines"in t&&n(2,a=t.bMarkUnusedLines)},t.$$.update=()=>{1&t.$$.dirty&&n(4,i=s.isaddress)},n(3,o=Nominatim_Config.Reverse_Only),[s,r,a,o,i]}class ka extends lt{constructor(t){super(),at(this,t,Ma,Pa,r,{addressLine:0,bDistanceInMeters:1,bMarkUnusedLines:2})}}function Ca(e){let n,i,s,r,a,l,c,h,u,d,p,m,f;return{c(){n=$("("),i=x("a"),i.textContent="how?",s=$(")\n\n"),r=x("div"),a=x("button"),a.innerHTML='<span aria-hidden="true">×</span>',l=$("\n\n Nightly calculated from nearby places having this postcode.\n "),c=x("a"),c.textContent="Documentation",h=$(".\n You can search for those with an "),u=x("a"),d=$("Overpass Turbo query"),p=$("."),E(i,"href","#openHint"),E(a,"type","button"),E(a,"class","close svelte-yw4tm0"),E(a,"aria-label","Close"),E(c,"href","https://nominatim.org/release-docs/latest/develop/Postcodes/"),E(u,"href",e[0]),E(u,"target","_blank"),E(r,"id","postcode-hint"),E(r,"class","my-2 p-2 svelte-yw4tm0")},m(t,e){y(t,n,e),y(t,i,e),y(t,s,e),y(t,r,e),v(r,a),v(r,l),v(r,c),v(r,h),v(r,u),v(u,d),v(r,p),m||(f=[M(i,"click",C(k(Ea))),M(a,"click",C(Aa))],m=!0)},p:t,i:t,o:t,d(t){t&&b(n),t&&b(i),t&&b(s),t&&b(r),m=!1,o(f)}}}function Ea(){document.getElementById("postcode-hint").style.display="block"}function Aa(){document.getElementById("postcode-hint").style.display="none"}function Oa(t,e,n){let{postcode:i}=e,{lat:o}=e,{lon:s}=e,r=`\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${i}}}\n\n (\n node["addr:postcode"="{{postcode}}"]({{bbox}});\n way["addr:postcode"="{{postcode}}"]({{bbox}});\n relation["addr:postcode"="{{postcode}}"]({{bbox}});\n\n node["postal_code"="{{postcode}}"]({{bbox}});\n way["postal_code"="{{postcode}}"]({{bbox}});\n relation["postal_code"="{{postcode}}"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm,""),a="https://overpass-turbo.eu/?Q="+encodeURIComponent(r)+"&C="+encodeURIComponent([o,s,15].join(";"))+"&R";return t.$$set=t=>{"postcode"in t&&n(1,i=t.postcode),"lat"in t&&n(2,o=t.lat),"lon"in t&&n(3,s=t.lon)},[a,i,o,s]}class Sa extends lt{constructor(t){super(),at(this,t,Oa,Ca,r,{postcode:1,lat:2,lon:3})}}function za(t){let e,n,i,o,s,r;const a=t[2].default,l=p(a,t,t[1],null);return{c(){e=x("tr"),n=x("td"),i=$(t[0]),o=T(),s=x("td"),l&&l.c(),E(n,"class","svelte-1184nr4"),E(s,"class","svelte-1184nr4")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),l&&l.m(s,null),r=!0},p(t,[e]){(!r||1&e)&&A(i,t[0]),l&&l.p&&(!r||2&e)&&_(l,a,t,t[1],r?f(a,t[1],e,null):g(t[1]),null)},i(t){r||(tt(l,t),r=!0)},o(t){et(l,t),r=!1},d(t){t&&b(e),l&&l.d(t)}}}function Ia(t,e,n){let{$$slots:i={},$$scope:o}=e,{title:s}=e;return t.$$set=t=>{"title"in t&&n(0,s=t.title),"$$scope"in t&&n(1,o=t.$$scope)},[s,o,i]}class Da extends lt{constructor(t){super(),at(this,t,Ia,za,r,{title:0})}}function Ba(t,e,n){const i=t.slice();return i[1]=e[n],i}function Na(t){let e,n,i,o,s,r,a=t[0][t[1]]+"",l=t[1]+"";return{c(){e=x("div"),n=x("span"),i=$(a),o=$(" ("),s=$(l),r=$(")\n "),E(n,"class","name svelte-ndknvb"),E(e,"class","line")},m(t,a){y(t,e,a),v(e,n),v(n,i),v(e,o),v(e,s),v(e,r)},p(t,e){1&e&&a!==(a=t[0][t[1]]+"")&&A(i,a),1&e&&l!==(l=t[1]+"")&&A(s,l)},d(t){t&&b(e)}}}function Za(e){let n,i=Object.keys(e[0]),o=[];for(let t=0;t<i.length;t+=1)o[t]=Na(Ba(e,i,t));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();n=P()},m(t,e){for(let n=0;n<o.length;n+=1)o[n].m(t,e);y(t,n,e)},p(t,[e]){if(1&e){let s;for(i=Object.keys(t[0]),s=0;s<i.length;s+=1){const r=Ba(t,i,s);o[s]?o[s].p(r,e):(o[s]=Na(r),o[s].c(),o[s].m(n.parentNode,n))}for(;s<o.length;s+=1)o[s].d(1);o.length=i.length}},i:t,o:t,d(t){w(o,t),t&&b(n)}}}function ja(t,e,n){let{items:i}=e;return t.$$set=t=>{"items"in t&&n(0,i=t.items)},[i]}class Ra extends lt{constructor(t){super(),at(this,t,ja,Za,r,{items:0})}}function Ha(t,e,n){const i=t.slice();return i[7]=e[n],i}function Fa(t,e,n){const i=t.slice();return i[10]=e[n],i}function Wa(t,e,n){const i=t.slice();return i[13]=e[n],i}function qa(t,e,n){const i=t.slice();return i[13]=e[n],i}function Ua(t,e,n){const i=t.slice();return i[18]=e[n],i}function Va(t,e,n){const i=t.slice();return i[18]=e[n],i}function Ga(t){let e,n;return e=new ga({props:{api_request_params:t[2]}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};4&n&&(i.api_request_params=t[2]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ka(e){let n;return{c(){n=$("No such place found.")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function Ya(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C,O,S,z,I,D,B,N,Z,j,R,H,F,W,q,U,V,G,K,Y,X,nt,rt,at,lt,ct,ht,ut,dt,pt,mt,ft,_t,gt,vt,yt,bt,wt,xt,$t,Lt=(t[0].localname||`${ye(t[0].osm_type)} ${t[0].osm_id}`)+"",Tt=Le(t[0]);a=new Ie({props:{feature:t[0],$$slots:{default:[Xa]},$$scope:{ctx:t}}}),h=new He({props:{aPlace:t[0]}}),_=new Da({props:{title:"Name",$$slots:{default:[tl]},$$scope:{ctx:t}}}),w=new Da({props:{title:"Type",$$slots:{default:[el]},$$scope:{ctx:t}}}),P=new Da({props:{title:"Last Updated",$$slots:{default:[nl]},$$scope:{ctx:t}}});let Pt=Tt&&il(t);C=new Da({props:{title:"Search Rank",$$slots:{default:[sl]},$$scope:{ctx:t}}}),S=new Da({props:{title:"Address Rank",$$slots:{default:[rl]},$$scope:{ctx:t}}});let Mt=t[0].calculated_importance&&al(t);D=new Da({props:{title:"Coverage",$$slots:{default:[hl]},$$scope:{ctx:t}}}),N=new Da({props:{title:"Centre Point (lat,lon)",$$slots:{default:[ul]},$$scope:{ctx:t}}}),j=new Da({props:{title:"OSM",$$slots:{default:[dl]},$$scope:{ctx:t}}}),H=new Da({props:{title:"Place Id",$$slots:{default:[pl]},$$scope:{ctx:t}}});let kt=t[0].calculated_wikipedia&&ml(t);q=new Da({props:{title:"Computed Postcode",$$slots:{default:[gl]},$$scope:{ctx:t}}}),V=new Da({props:{title:"Address Tags",$$slots:{default:[vl]},$$scope:{ctx:t}}}),K=new Da({props:{title:"Extra Tags",$$slots:{default:[yl]},$$scope:{ctx:t}}}),rt=new Qr({props:{current_result:t[0]}});let Ct=t[0].address&&bl(t),Et=t[0].linked_places&&xl(t),At=!t[4]&&Ll(t);const Ot=[Il,zl],St=[];function zt(t,e){return t[2].hierarchy?0:1}return wt=zt(t),xt=St[wt]=Ot[wt](t),{c(){e=x("div"),n=x("div"),i=x("h1"),o=$(Lt),s=T(),r=x("small"),it(a.$$.fragment),l=T(),c=x("div"),it(h.$$.fragment),u=T(),d=x("div"),p=x("div"),m=x("table"),f=x("tbody"),it(_.$$.fragment),g=T(),it(w.$$.fragment),L=T(),it(P.$$.fragment),M=T(),Pt&&Pt.c(),k=T(),it(C.$$.fragment),O=T(),it(S.$$.fragment),z=T(),Mt&&Mt.c(),I=T(),it(D.$$.fragment),B=T(),it(N.$$.fragment),Z=T(),it(j.$$.fragment),R=T(),it(H.$$.fragment),F=T(),kt&&kt.c(),W=T(),it(q.$$.fragment),U=T(),it(V.$$.fragment),G=T(),it(K.$$.fragment),Y=T(),X=x("div"),nt=x("div"),it(rt.$$.fragment),at=T(),lt=x("div"),ct=x("div"),ht=x("h2"),ht.textContent="Address",ut=T(),dt=x("table"),pt=x("thead"),pt.innerHTML="<tr><th>Local name</th> \n <th>Type</th> \n <th>OSM</th> \n <th>Address rank</th> \n <th>Admin level</th> \n <th>Distance</th> \n <th></th></tr>",mt=T(),ft=x("tbody"),Ct&&Ct.c(),_t=T(),Et&&Et.c(),gt=T(),At&&At.c(),vt=T(),yt=x("tr"),yt.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Parent Of</h2></td>',bt=T(),xt.c(),E(r,"class","svelte-193h58e"),E(i,"class","svelte-193h58e"),E(n,"class","col-sm-10"),E(c,"class","col-sm-2 text-end"),E(e,"class","row"),E(m,"id","locationdetails"),E(m,"class","table table-striped table-responsive"),E(p,"class","col-md-6"),E(nt,"id","map-wrapper"),E(nt,"class","svelte-193h58e"),E(X,"class","col-md-6"),E(d,"class","row"),E(ht,"class","svelte-193h58e"),E(yt,"class","all-columns svelte-193h58e"),E(dt,"id","address"),E(dt,"class","table table-striped table-small"),E(ct,"class","col-md-12"),E(lt,"class","row")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(i,o),v(i,s),v(i,r),ot(a,r,null),v(e,l),v(e,c),ot(h,c,null),y(t,u,b),y(t,d,b),v(d,p),v(p,m),v(m,f),ot(_,f,null),v(f,g),ot(w,f,null),v(f,L),ot(P,f,null),v(f,M),Pt&&Pt.m(f,null),v(f,k),ot(C,f,null),v(f,O),ot(S,f,null),v(f,z),Mt&&Mt.m(f,null),v(f,I),ot(D,f,null),v(f,B),ot(N,f,null),v(f,Z),ot(j,f,null),v(f,R),ot(H,f,null),v(f,F),kt&&kt.m(f,null),v(f,W),ot(q,f,null),v(f,U),ot(V,f,null),v(f,G),ot(K,f,null),v(d,Y),v(d,X),v(X,nt),ot(rt,nt,null),y(t,at,b),y(t,lt,b),v(lt,ct),v(ct,ht),v(ct,ut),v(ct,dt),v(dt,pt),v(dt,mt),v(dt,ft),Ct&&Ct.m(ft,null),v(ft,_t),Et&&Et.m(ft,null),v(ft,gt),At&&At.m(ft,null),v(ft,vt),v(ft,yt),v(ft,bt),St[wt].m(ft,null),$t=!0},p(t,e){(!$t||1&e)&&Lt!==(Lt=(t[0].localname||`${ye(t[0].osm_type)} ${t[0].osm_id}`)+"")&&A(o,Lt);const n={};1&e&&(n.feature=t[0]),8388608&e&&(n.$$scope={dirty:e,ctx:t}),a.$set(n);const i={};1&e&&(i.aPlace=t[0]),h.$set(i);const s={};8388609&e&&(s.$$scope={dirty:e,ctx:t}),_.$set(s);const r={};8388609&e&&(r.$$scope={dirty:e,ctx:t}),w.$set(r);const l={};8388609&e&&(l.$$scope={dirty:e,ctx:t}),P.$set(l),1&e&&(Tt=Le(t[0])),Tt?Pt?(Pt.p(t,e),1&e&&tt(Pt,1)):(Pt=il(t),Pt.c(),tt(Pt,1),Pt.m(f,k)):Pt&&(J(),et(Pt,1,1,(()=>{Pt=null})),Q());const c={};8388609&e&&(c.$$scope={dirty:e,ctx:t}),C.$set(c);const u={};8388609&e&&(u.$$scope={dirty:e,ctx:t}),S.$set(u),t[0].calculated_importance?Mt?(Mt.p(t,e),1&e&&tt(Mt,1)):(Mt=al(t),Mt.c(),tt(Mt,1),Mt.m(f,I)):Mt&&(J(),et(Mt,1,1,(()=>{Mt=null})),Q());const d={};8388609&e&&(d.$$scope={dirty:e,ctx:t}),D.$set(d);const p={};8388609&e&&(p.$$scope={dirty:e,ctx:t}),N.$set(p);const m={};8388609&e&&(m.$$scope={dirty:e,ctx:t}),j.$set(m);const g={};8388609&e&&(g.$$scope={dirty:e,ctx:t}),H.$set(g),t[0].calculated_wikipedia?kt?(kt.p(t,e),1&e&&tt(kt,1)):(kt=ml(t),kt.c(),tt(kt,1),kt.m(f,W)):kt&&(J(),et(kt,1,1,(()=>{kt=null})),Q());const v={};8388609&e&&(v.$$scope={dirty:e,ctx:t}),q.$set(v);const y={};8388609&e&&(y.$$scope={dirty:e,ctx:t}),V.$set(y);const b={};8388609&e&&(b.$$scope={dirty:e,ctx:t}),K.$set(b);const x={};1&e&&(x.current_result=t[0]),rt.$set(x),t[0].address?Ct?(Ct.p(t,e),1&e&&tt(Ct,1)):(Ct=bl(t),Ct.c(),tt(Ct,1),Ct.m(ft,_t)):Ct&&(J(),et(Ct,1,1,(()=>{Ct=null})),Q()),t[0].linked_places?Et?(Et.p(t,e),1&e&&tt(Et,1)):(Et=xl(t),Et.c(),tt(Et,1),Et.m(ft,gt)):Et&&(J(),et(Et,1,1,(()=>{Et=null})),Q()),t[4]?At&&(At.d(1),At=null):At?At.p(t,e):(At=Ll(t),At.c(),At.m(ft,vt));let $=wt;wt=zt(t),wt===$?St[wt].p(t,e):(J(),et(St[$],1,1,(()=>{St[$]=null})),Q(),xt=St[wt],xt?xt.p(t,e):(xt=St[wt]=Ot[wt](t),xt.c()),tt(xt,1),xt.m(ft,null))},i(t){$t||(tt(a.$$.fragment,t),tt(h.$$.fragment,t),tt(_.$$.fragment,t),tt(w.$$.fragment,t),tt(P.$$.fragment,t),tt(Pt),tt(C.$$.fragment,t),tt(S.$$.fragment,t),tt(Mt),tt(D.$$.fragment,t),tt(N.$$.fragment,t),tt(j.$$.fragment,t),tt(H.$$.fragment,t),tt(kt),tt(q.$$.fragment,t),tt(V.$$.fragment,t),tt(K.$$.fragment,t),tt(rt.$$.fragment,t),tt(Ct),tt(Et),tt(xt),$t=!0)},o(t){et(a.$$.fragment,t),et(h.$$.fragment,t),et(_.$$.fragment,t),et(w.$$.fragment,t),et(P.$$.fragment,t),et(Pt),et(C.$$.fragment,t),et(S.$$.fragment,t),et(Mt),et(D.$$.fragment,t),et(N.$$.fragment,t),et(j.$$.fragment,t),et(H.$$.fragment,t),et(kt),et(q.$$.fragment,t),et(V.$$.fragment,t),et(K.$$.fragment,t),et(rt.$$.fragment,t),et(Ct),et(Et),et(xt),$t=!1},d(t){t&&b(e),st(a),st(h),t&&b(u),t&&b(d),st(_),st(w),st(P),Pt&&Pt.d(),st(C),st(S),Mt&&Mt.d(),st(D),st(N),st(j),st(H),kt&&kt.d(),st(q),st(V),st(K),st(rt),t&&b(at),t&&b(lt),Ct&&Ct.d(),Et&&Et.d(),At&&At.d(),St[wt].d()}}}function Xa(t){let e;return{c(){e=$("link to this page")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Ja(t){let e,n;return e=new Ra({props:{items:t[0].names}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].names),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Qa(e){let n;return{c(){n=x("span"),n.textContent="No Name",E(n,"class","noname fw-bold")},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function tl(t){let e,n,i,o,s;const r=[Qa,Ja],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!!Array.isArray(t[0].names)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function el(t){let e,n,i,o=t[0].category+"",s=t[0].type+"";return{c(){e=$(o),n=$(":"),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].category+"")&&A(e,o),1&n&&s!==(s=t[0].type+"")&&A(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function nl(t){let e,n=t[0].indexed_date+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].indexed_date+"")&&A(e,n)},d(t){t&&b(e)}}}function il(t){let e,n;return e=new Da({props:{title:"Admin Level",$$slots:{default:[ol]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ol(t){let e,n=t[0].admin_level+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].admin_level+"")&&A(e,n)},d(t){t&&b(e)}}}function sl(t){let e,n=t[0].rank_search+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[0].rank_search+"")&&A(e,n)},d(t){t&&b(e)}}}function rl(t){let e,n,i,o,s=t[0].rank_address+"",r=Te(t[0].rank_address)+"";return{c(){e=$(s),n=$(" ("),i=$(r),o=$(")")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].rank_address+"")&&A(e,s),1&n&&r!==(r=Te(t[0].rank_address)+"")&&A(i,r)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function al(t){let e,n;return e=new Da({props:{title:"Importance",$$slots:{default:[cl]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ll(t){let e;return{c(){e=$("(estimated)")},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function cl(t){let e,n,i,o=t[0].calculated_importance+"",s=!t[0].importance&&ll();return{c(){e=$(o),n=T(),s&&s.c(),i=P()},m(t,o){y(t,e,o),y(t,n,o),s&&s.m(t,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].calculated_importance+"")&&A(e,o),t[0].importance?s&&(s.d(1),s=null):s||(s=ll(),s.c(),s.m(i.parentNode,i))},d(t){t&&b(e),t&&b(n),s&&s.d(t),t&&b(i)}}}function hl(t){let e,n=$e(t[0])+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=$e(t[0])+"")&&A(e,n)},d(t){t&&b(e)}}}function ul(t){let e,n,i,o=t[0].centroid.coordinates[1]+"",s=t[0].centroid.coordinates[0]+"";return{c(){e=$(o),n=$(","),i=$(s)},m(t,o){y(t,e,o),y(t,n,o),y(t,i,o)},p(t,n){1&n&&o!==(o=t[0].centroid.coordinates[1]+"")&&A(e,o),1&n&&s!==(s=t[0].centroid.coordinates[0]+"")&&A(i,s)},d(t){t&&b(e),t&&b(n),t&&b(i)}}}function dl(t){let e,n,i=be(t[0])+"";return{c(){e=new I(!1),n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=be(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function pl(t){let e,n,i,o,s=t[0].place_id+"";return{c(){e=$(s),n=$("\n ("),i=x("a"),i.textContent="on this server",o=$(")"),E(i,"href","https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id")},m(t,s){y(t,e,s),y(t,n,s),y(t,i,s),y(t,o,s)},p(t,n){1&n&&s!==(s=t[0].place_id+"")&&A(e,s)},d(t){t&&b(e),t&&b(n),t&&b(i),t&&b(o)}}}function ml(t){let e,n;return e=new Da({props:{title:"Wikipedia Calculated",$$slots:{default:[fl]},$$scope:{ctx:t}}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};8388609&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function fl(t){let e,n,i=xe(t[0])+"";return{c(){e=new I(!1),n=P(),e.a=n},m(t,o){e.m(i,t,o),y(t,n,o)},p(t,n){1&n&&i!==(i=xe(t[0])+"")&&e.p(i)},d(t){t&&b(n),t&&e.d()}}}function _l(t){let e,n,i,o,s=t[0].calculated_postcode+"";return i=new Sa({props:{postcode:t[0].calculated_postcode,lat:t[0].centroid.coordinates[1],lon:t[0].centroid.coordinates[0]}}),{c(){e=$(s),n=T(),it(i.$$.fragment)},m(t,s){y(t,e,s),y(t,n,s),ot(i,t,s),o=!0},p(t,n){(!o||1&n)&&s!==(s=t[0].calculated_postcode+"")&&A(e,s);const r={};1&n&&(r.postcode=t[0].calculated_postcode),1&n&&(r.lat=t[0].centroid.coordinates[1]),1&n&&(r.lon=t[0].centroid.coordinates[0]),i.$set(r)},i(t){o||(tt(i.$$.fragment,t),o=!0)},o(t){et(i.$$.fragment,t),o=!1},d(t){t&&b(e),t&&b(n),st(i,t)}}}function gl(t){let e,n,i=t[0].calculated_postcode&&_l(t);return{c(){i&&i.c(),e=P()},m(t,o){i&&i.m(t,o),y(t,e,o),n=!0},p(t,n){t[0].calculated_postcode?i?(i.p(t,n),1&n&&tt(i,1)):(i=_l(t),i.c(),tt(i,1),i.m(e.parentNode,e)):i&&(J(),et(i,1,1,(()=>{i=null})),Q())},i(t){n||(tt(i),n=!0)},o(t){et(i),n=!1},d(t){i&&i.d(t),t&&b(e)}}}function vl(t){let e,n;return e=new Ra({props:{items:t[0].addresstags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].addresstags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function yl(t){let e,n;return e=new Ra({props:{items:t[0].extratags}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].extratags),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function bl(t){let e,n,i=t[0].address,o=[];for(let e=0;e<i.length;e+=1)o[e]=wl(Va(t,i,e));const s=t=>et(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=P()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);y(t,e,i),n=!0},p(t,n){if(1&n){let r;for(i=t[0].address,r=0;r<i.length;r+=1){const s=Va(t,i,r);o[r]?(o[r].p(s,n),tt(o[r],1)):(o[r]=wl(s),o[r].c(),tt(o[r],1),o[r].m(e.parentNode,e))}for(J(),r=i.length;r<o.length;r+=1)s(r);Q()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)tt(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)et(o[t]);n=!1},d(t){w(o,t),t&&b(e)}}}function wl(t){let e,n;return e=new ka({props:{addressLine:t[18],bMarkUnusedLines:!0,bDistanceInMeters:!1}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[18]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function xl(t){let e,n,i,o,s=t[0].linked_places,r=[];for(let e=0;e<s.length;e+=1)r[e]=$l(Ua(t,s,e));const a=t=>et(r[t],1,1,(()=>{r[t]=null}));return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Linked Places</h2></td>',n=T();for(let t=0;t<r.length;t+=1)r[t].c();i=P(),E(e,"class","all-columns svelte-193h58e")},m(t,s){y(t,e,s),y(t,n,s);for(let e=0;e<r.length;e+=1)r[e].m(t,s);y(t,i,s),o=!0},p(t,e){if(1&e){let n;for(s=t[0].linked_places,n=0;n<s.length;n+=1){const o=Ua(t,s,n);r[n]?(r[n].p(o,e),tt(r[n],1)):(r[n]=$l(o),r[n].c(),tt(r[n],1),r[n].m(i.parentNode,i))}for(J(),n=s.length;n<r.length;n+=1)a(n);Q()}},i(t){if(!o){for(let t=0;t<s.length;t+=1)tt(r[t]);o=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)et(r[t]);o=!1},d(t){t&&b(e),t&&b(n),w(r,t),t&&b(i)}}}function $l(t){let e,n;return e=new ka({props:{addressLine:t[18],bMarkUnusedLines:!0,bDistanceInMeters:!0}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[18]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ll(t){let e,n,i;function o(t,e){return t[2].keywords?Pl:Tl}let s=o(t),r=s(t);return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h2 class="svelte-193h58e">Keywords</h2></td>',n=T(),r.c(),i=P(),E(e,"class","all-columns svelte-193h58e")},m(t,o){y(t,e,o),y(t,n,o),r.m(t,o),y(t,i,o)},p(t,e){s===(s=o(t))&&r?r.p(t,e):(r.d(1),r=s(t),r&&(r.c(),r.m(i.parentNode,i)))},d(t){t&&b(e),t&&b(n),r.d(t),t&&b(i)}}}function Tl(t){let e,n,i,o,s;return{c(){e=x("tr"),n=x("td"),i=x("a"),o=$("display keywords"),E(i,"class","btn btn-outline-secondary btn-sm"),E(i,"href",s=t[1]+"&keywords=1")},m(t,s){y(t,e,s),v(e,n),v(n,i),v(i,o)},p(t,e){2&e&&s!==(s=t[1]+"&keywords=1")&&E(i,"href",s)},d(t){t&&b(e)}}}function Pl(t){let e,n;function i(t,n){var i;return 1&n&&(e=null),null==e&&(i=t[0],e=!!(i.keywords&&i.keywords.name&&i.keywords.address&&(i.keywords.name.length>0||i.keywords.address.length>0))),e?kl:Ml}let o=i(t,-1),s=o(t);return{c(){s.c(),n=P()},m(t,e){s.m(t,e),y(t,n,e)},p(t,e){o===(o=i(t,e))&&s?s.p(t,e):(s.d(1),s=o(t),s&&(s.c(),s.m(n.parentNode,n)))},d(t){s.d(t),t&&b(n)}}}function Ml(e){let n;return{c(){n=x("tr"),n.innerHTML="<td>Place has no keywords</td>"},m(t,e){y(t,n,e)},p:t,d(t){t&&b(n)}}}function kl(t){let e,n,i,o,s=t[0].keywords.name,r=[];for(let e=0;e<s.length;e+=1)r[e]=El(qa(t,s,e));let a=t[0].keywords.address&&Al(t);return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h3 class="svelte-193h58e">Name Keywords</h3></td>',n=T();for(let t=0;t<r.length;t+=1)r[t].c();i=T(),a&&a.c(),o=P(),E(e,"class","all-columns svelte-193h58e")},m(t,s){y(t,e,s),y(t,n,s);for(let e=0;e<r.length;e+=1)r[e].m(t,s);y(t,i,s),a&&a.m(t,s),y(t,o,s)},p(t,e){if(1&e){let n;for(s=t[0].keywords.name,n=0;n<s.length;n+=1){const o=qa(t,s,n);r[n]?r[n].p(o,e):(r[n]=El(o),r[n].c(),r[n].m(i.parentNode,i))}for(;n<r.length;n+=1)r[n].d(1);r.length=s.length}t[0].keywords.address?a?a.p(t,e):(a=Al(t),a.c(),a.m(o.parentNode,o)):a&&(a.d(1),a=null)},d(t){t&&b(e),t&&b(n),w(r,t),t&&b(i),a&&a.d(t),t&&b(o)}}}function Cl(t){let e,n,i,o=t[13].id+"";return{c(){e=x("td"),n=$("word id: "),i=$(o)},m(t,o){y(t,e,o),v(e,n),v(e,i)},p(t,e){1&e&&o!==(o=t[13].id+"")&&A(i,o)},d(t){t&&b(e)}}}function El(t){let e,n,i,o,s=Ce(t[13].token)+"",r=t[13].id&&Cl(t);return{c(){e=x("tr"),n=x("td"),i=$(s),o=T(),r&&r.c()},m(t,s){y(t,e,s),v(e,n),v(n,i),v(e,o),r&&r.m(e,null)},p(t,n){1&n&&s!==(s=Ce(t[13].token)+"")&&A(i,s),t[13].id?r?r.p(t,n):(r=Cl(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},d(t){t&&b(e),r&&r.d()}}}function Al(t){let e,n,i,o=t[0].keywords.address,s=[];for(let e=0;e<o.length;e+=1)s[e]=Sl(Wa(t,o,e));return{c(){e=x("tr"),e.innerHTML='<td colspan="7" class="svelte-193h58e"><h3 class="svelte-193h58e">Address Keywords</h3></td>',n=T();for(let t=0;t<s.length;t+=1)s[t].c();i=P(),E(e,"class","all-columns svelte-193h58e")},m(t,o){y(t,e,o),y(t,n,o);for(let e=0;e<s.length;e+=1)s[e].m(t,o);y(t,i,o)},p(t,e){if(1&e){let n;for(o=t[0].keywords.address,n=0;n<o.length;n+=1){const r=Wa(t,o,n);s[n]?s[n].p(r,e):(s[n]=Sl(r),s[n].c(),s[n].m(i.parentNode,i))}for(;n<s.length;n+=1)s[n].d(1);s.length=o.length}},d(t){t&&b(e),t&&b(n),w(s,t),t&&b(i)}}}function Ol(t){let e,n,i,o=t[13].id+"";return{c(){e=x("td"),n=$("word id: "),i=$(o)},m(t,o){y(t,e,o),v(e,n),v(e,i)},p(t,e){1&e&&o!==(o=t[13].id+"")&&A(i,o)},d(t){t&&b(e)}}}function Sl(t){let e,n,i,o,s,r=Ce(t[13].token)+"",a=t[13].id&&Ol(t);return{c(){e=x("tr"),n=x("td"),i=$(r),o=T(),a&&a.c(),s=T()},m(t,r){y(t,e,r),v(e,n),v(n,i),v(e,o),a&&a.m(e,null),v(e,s)},p(t,n){1&n&&r!==(r=Ce(t[13].token)+"")&&A(i,r),t[13].id?a?a.p(t,n):(a=Ol(t),a.c(),a.m(e,s)):a&&(a.d(1),a=null)},d(t){t&&b(e),a&&a.d()}}}function zl(e){let n,i,o,s,r;return{c(){n=x("tr"),i=x("td"),o=x("a"),s=$("display child places"),E(o,"class","btn btn-outline-secondary btn-sm"),E(o,"href",r=e[1]+"&hierarchy=1")},m(t,e){y(t,n,e),v(n,i),v(i,o),v(o,s)},p(t,e){2&e&&r!==(r=t[1]+"&hierarchy=1")&&E(o,"href",r)},i:t,o:t,d(t){t&&b(n)}}}function Il(t){let e,n,i,o,s;const r=[Bl,Dl],a=[];function l(t,n){return 1&n&&(e=null),null==e&&(e=!(!t[0].hierarchy||"object"!=typeof t[0].hierarchy||!Object.keys(t[0].hierarchy).length)),e?0:1}return n=l(t,-1),i=a[n]=r[n](t),{c(){i.c(),o=P()},m(t,e){a[n].m(t,e),y(t,o,e),s=!0},p(t,e){let s=n;n=l(t,e),n===s?a[n].p(t,e):(J(),et(a[s],1,1,(()=>{a[s]=null})),Q(),i=a[n],i?i.p(t,e):(i=a[n]=r[n](t),i.c()),tt(i,1),i.m(o.parentNode,o))},i(t){s||(tt(i),s=!0)},o(t){et(i),s=!1},d(t){a[n].d(t),t&&b(o)}}}function Dl(e){let n;return{c(){n=x("tr"),n.innerHTML="<td>Place is not parent of other places</td>"},m(t,e){y(t,n,e)},p:t,i:t,o:t,d(t){t&&b(n)}}}function Bl(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,s=Object.keys(t[0].hierarchy),r=[];for(let e=0;e<s.length;e+=1)r[e]=Zl(Ha(t,s,e));const a=t=>et(r[t],1,1,(()=>{r[t]=null}));let l=o&&jl();return{c(){for(let t=0;t<r.length;t+=1)r[t].c();e=T(),l&&l.c(),n=P()},m(t,o){for(let e=0;e<r.length;e+=1)r[e].m(t,o);y(t,e,o),l&&l.m(t,o),y(t,n,o),i=!0},p(t,i){if(1&i){let n;for(s=Object.keys(t[0].hierarchy),n=0;n<s.length;n+=1){const o=Ha(t,s,n);r[n]?(r[n].p(o,i),tt(r[n],1)):(r[n]=Zl(o),r[n].c(),tt(r[n],1),r[n].m(e.parentNode,e))}for(J(),n=s.length;n<r.length;n+=1)a(n);Q()}1&i&&(o=Object.keys(t[0].hierarchy)>500),o?l||(l=jl(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){if(!i){for(let t=0;t<s.length;t+=1)tt(r[t]);i=!0}},o(t){r=r.filter(Boolean);for(let t=0;t<r.length;t+=1)et(r[t]);i=!1},d(t){w(r,t),t&&b(e),l&&l.d(t),t&&b(n)}}}function Nl(t){let e,n;return e=new ka({props:{addressLine:t[10],bDistanceInMeters:!0}}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[10]),e.$set(i)},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Zl(t){let e,n,i,o,s,r,a,l=t[7]+"",c=t[0].hierarchy[t[7]],h=[];for(let e=0;e<c.length;e+=1)h[e]=Nl(Fa(t,c,e));const u=t=>et(h[t],1,1,(()=>{h[t]=null}));return{c(){e=x("tr"),n=x("td"),i=x("h3"),o=$(l),s=T();for(let t=0;t<h.length;t+=1)h[t].c();r=P(),E(i,"class","svelte-193h58e"),E(n,"colspan","7"),E(n,"class","svelte-193h58e"),E(e,"class","all-columns svelte-193h58e")},m(t,l){y(t,e,l),v(e,n),v(n,i),v(i,o),y(t,s,l);for(let e=0;e<h.length;e+=1)h[e].m(t,l);y(t,r,l),a=!0},p(t,e){if((!a||1&e)&&l!==(l=t[7]+"")&&A(o,l),1&e){let n;for(c=t[0].hierarchy[t[7]],n=0;n<c.length;n+=1){const i=Fa(t,c,n);h[n]?(h[n].p(i,e),tt(h[n],1)):(h[n]=Nl(i),h[n].c(),tt(h[n],1),h[n].m(r.parentNode,r))}for(J(),n=c.length;n<h.length;n+=1)u(n);Q()}},i(t){if(!a){for(let t=0;t<c.length;t+=1)tt(h[t]);a=!0}},o(t){h=h.filter(Boolean);for(let t=0;t<h.length;t+=1)et(h[t]);a=!1},d(t){t&&b(e),t&&b(s),w(h,t),t&&b(r)}}}function jl(t){let e;return{c(){e=x("p"),e.textContent="There are more child objects which are not shown."},m(t,n){y(t,e,n)},d(t){t&&b(e)}}}function Rl(t){let e,n,i,o,s,r;e=new se({props:{$$slots:{default:[Ga]},$$scope:{ctx:t}}});const a=[Ya,Ka],l=[];function c(t,e){return t[0]?0:""!==window.location.search&&t[3]?1:-1}return~(o=c(t))&&(s=l[o]=a[o](t)),{c(){it(e.$$.fragment),n=T(),i=x("div"),s&&s.c(),E(i,"class","container")},m(t,s){ot(e,t,s),y(t,n,s),y(t,i,s),~o&&l[o].m(i,null),r=!0},p(t,[n]){const r={};8388612&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r);let h=o;o=c(t),o===h?~o&&l[o].p(t,n):(s&&(J(),et(l[h],1,1,(()=>{l[h]=null})),Q()),~o?(s=l[o],s?s.p(t,n):(s=l[o]=a[o](t),s.c()),tt(s,1),s.m(i,null)):s=null)},i(t){r||(tt(e.$$.fragment,t),tt(s),r=!0)},o(t){et(e.$$.fragment,t),et(s),r=!1},d(t){st(e,t),t&&b(n),t&&b(i),~o&&l[o].d()}}}function Hl(t,e,n){let i,o,s,r,a;d(t,_t,(t=>n(5,o=t)));let l=!1;return t.$$.update=()=>{if(32&t.$$.dirty){let t=o;"details"===t.tab&&(e=t.params,n(2,a={place_id:e.get("place_id"),osmtype:e.get("osmtype"),osmid:e.get("osmid"),class:e.get("class"),keywords:e.get("keywords"),addressdetails:1,hierarchy:"1"===e.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"}),n(3,l=!1),a.place_id||a.osmtype&&a.osmid?(a.place_id?Mt("Details for "+a.place_id):Mt("Details for "+a.osmtype+a.osmid),$t("details",a,(function(t){window.scrollTo(0,0),n(3,l=!0),n(0,s=t&&!t.error?t:void 0)}))):n(0,s=void 0),n(1,r=window.location.search))}var e},n(4,i=Nominatim_Config.Reverse_Only),[s,r,a,l,i,o]}class Fl extends lt{constructor(t){super(),at(this,t,Hl,Rl,r,{})}}function Wl(t,e,n){const i=t.slice();return i[2]=e[n],i}function ql(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C,O,S,z,I,D,B,N=t[2].osm_type+"",Z=be(t[2])+"",j=t[2].class+"",R=t[2].type+"",H=t[2].name+"",F=(t[2].country_code||"")+"",W=t[2].errormessage+"",q=t[2].updated+"";return{c(){e=x("tr"),n=x("td"),i=$(N),o=T(),s=x("td"),r=T(),a=x("td"),l=$(j),c=T(),h=x("td"),u=$(R),d=T(),p=x("td"),m=$(H),f=T(),_=x("td"),g=$(F),w=T(),L=x("td"),P=$(W),M=T(),k=x("td"),C=$(q),O=T(),S=x("td"),z=x("a"),I=$("josm"),B=T(),E(z,"href",D="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+ye(t[2].osm_type)+"/"+t[2].osm_id+"/full"),E(z,"target","josm")},m(t,b){y(t,e,b),v(e,n),v(n,i),v(e,o),v(e,s),s.innerHTML=Z,v(e,r),v(e,a),v(a,l),v(e,c),v(e,h),v(h,u),v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,M),v(e,k),v(k,C),v(e,O),v(e,S),v(S,z),v(z,I),v(e,B)},p(t,e){1&e&&N!==(N=t[2].osm_type+"")&&A(i,N),1&e&&Z!==(Z=be(t[2])+"")&&(s.innerHTML=Z),1&e&&j!==(j=t[2].class+"")&&A(l,j),1&e&&R!==(R=t[2].type+"")&&A(u,R),1&e&&H!==(H=t[2].name+"")&&A(m,H),1&e&&F!==(F=(t[2].country_code||"")+"")&&A(g,F),1&e&&W!==(W=t[2].errormessage+"")&&A(P,W),1&e&&q!==(q=t[2].updated+"")&&A(C,q),1&e&&D!==(D="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+ye(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&E(z,"href",D)},d(t){t&&b(e)}}}function Ul(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,L=t[0].length+"";e=new se({});let P=t[0],M=[];for(let e=0;e<P.length;e+=1)M[e]=ql(Wl(t,P,e));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Broken polygons",a=T(),l=x("p"),c=$("Total number of broken polygons: "),h=$(L),u=$("."),d=T(),p=x("table"),m=x("thead"),m.innerHTML="<th>OSM type</th> \n <th>OSM id</th> \n <th>Class</th> \n <th>Type</th> \n <th>Name</th> \n <th>Country Code</th> \n <th>Error message</th> \n <th>Updated</th> \n <th></th>",f=T(),_=x("tbody");for(let t=0;t<M.length;t+=1)M[t].c();E(p,"class","table table-striped table-hover"),E(s,"class","col-sm-12"),E(o,"class","row"),E(i,"class","container")},m(t,b){ot(e,t,b),y(t,n,b),y(t,i,b),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(l,u),v(s,d),v(s,p),v(p,m),v(p,f),v(p,_);for(let t=0;t<M.length;t+=1)M[t].m(_,null);g=!0},p(t,[e]){if((!g||1&e)&&L!==(L=t[0].length+"")&&A(h,L),1&e){let n;for(P=t[0],n=0;n<P.length;n+=1){const i=Wl(t,P,n);M[n]?M[n].p(i,e):(M[n]=ql(i),M[n].c(),M[n].m(_,null))}for(;n<M.length;n+=1)M[n].d(1);M.length=P.length}},i(t){g||(tt(e.$$.fragment,t),g=!0)},o(t){et(e.$$.fragment,t),g=!1},d(t){st(e,t),t&&b(n),t&&b(i),w(M,t)}}}function Vl(t,e,n){let i=[];return B((function(){$t("polygons",{format:"json"},(function(t){n(0,i=t)})),Mt("Broken polygons")})),[i]}class Gl extends lt{constructor(t){super(),at(this,t,Vl,Ul,r,{})}}function Kl(t,e,n){const i=t.slice();return i[2]=e[n],i}function Yl(t){let e,n=t[2].place_id+"";return{c(){e=$(n)},m(t,n){y(t,e,n)},p(t,i){1&i&&n!==(n=t[2].place_id+"")&&A(e,n)},d(t){t&&b(e)}}}function Xl(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C=t[2].country_code+"",E=t[2].name+"",O=be(t[2])+"",S=t[2].osm_type+"",z=t[2].class+"",I=t[2].type+"";return i=new Ie({props:{feature:t[2],$$slots:{default:[Yl]},$$scope:{ctx:t}}}),{c(){e=x("tr"),n=x("td"),it(i.$$.fragment),o=T(),s=x("td"),r=$(C),a=T(),l=x("td"),c=$(E),h=T(),u=x("td"),d=T(),p=x("td"),m=$(S),f=T(),_=x("td"),g=$(z),w=T(),L=x("td"),P=$(I),M=T()},m(t,b){y(t,e,b),v(e,n),ot(i,n,null),v(e,o),v(e,s),v(s,r),v(e,a),v(e,l),v(l,c),v(e,h),v(e,u),u.innerHTML=O,v(e,d),v(e,p),v(p,m),v(e,f),v(e,_),v(_,g),v(e,w),v(e,L),v(L,P),v(e,M),k=!0},p(t,e){const n={};1&e&&(n.feature=t[2]),33&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n),(!k||1&e)&&C!==(C=t[2].country_code+"")&&A(r,C),(!k||1&e)&&E!==(E=t[2].name+"")&&A(c,E),(!k||1&e)&&O!==(O=be(t[2])+"")&&(u.innerHTML=O),(!k||1&e)&&S!==(S=t[2].osm_type+"")&&A(m,S),(!k||1&e)&&z!==(z=t[2].class+"")&&A(g,z),(!k||1&e)&&I!==(I=t[2].type+"")&&A(P,I)},i(t){k||(tt(i.$$.fragment,t),k=!0)},o(t){et(i.$$.fragment,t),k=!1},d(t){t&&b(e),st(i)}}}function Jl(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g=t[0].length+"";e=new se({});let L=t[0],P=[];for(let e=0;e<L.length;e+=1)P[e]=Xl(Kl(t,L,e));const M=t=>et(P[t],1,1,(()=>{P[t]=null}));return{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Deletable",a=T(),l=x("p"),c=$(g),h=$(" objects have been deleted in OSM but are still in the Nominatim database."),u=T(),d=x("table"),p=x("thead"),p.innerHTML="<th>Place id</th> \n <th>Country Code</th> \n <th>Name</th> \n <th>OSM id</th> \n <th>OSM type</th> \n <th>Class</th> \n <th>Type</th>",m=T(),f=x("tbody");for(let t=0;t<P.length;t+=1)P[t].c();E(d,"class","table table-striped table-hover"),E(s,"class","col-sm-12"),E(o,"class","row"),E(i,"class","container")},m(t,g){ot(e,t,g),y(t,n,g),y(t,i,g),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(s,u),v(s,d),v(d,p),v(d,m),v(d,f);for(let t=0;t<P.length;t+=1)P[t].m(f,null);_=!0},p(t,[e]){if((!_||1&e)&&g!==(g=t[0].length+"")&&A(c,g),1&e){let n;for(L=t[0],n=0;n<L.length;n+=1){const i=Kl(t,L,n);P[n]?(P[n].p(i,e),tt(P[n],1)):(P[n]=Xl(i),P[n].c(),tt(P[n],1),P[n].m(f,null))}for(J(),n=L.length;n<P.length;n+=1)M(n);Q()}},i(t){if(!_){tt(e.$$.fragment,t);for(let t=0;t<L.length;t+=1)tt(P[t]);_=!0}},o(t){et(e.$$.fragment,t),P=P.filter(Boolean);for(let t=0;t<P.length;t+=1)et(P[t]);_=!1},d(t){st(e,t),t&&b(n),t&&b(i),w(P,t)}}}function Ql(t,e,n){let i=[];return B((function(){$t("deletable",{format:"json"},(function(t){n(0,i=t)})),Mt("Deletable objects")})),[i]}class tc extends lt{constructor(t){super(),at(this,t,Ql,Jl,r,{})}}function ec(t){let e,n,i,o,s,r,a,l,c,h,u,d,p,m,f,_,g,w,L,P,M,k,C=t[1].Nominatim_API_Endpoint+"",O=t[0].software_version+"",S=t[0].database_version+"",z=t[0].data_updated+"";return e=new se({}),{c(){it(e.$$.fragment),n=T(),i=x("div"),o=x("div"),s=x("div"),r=x("h1"),r.textContent="Server status",a=T(),l=x("dl"),c=x("dt"),c.textContent="API Endpoint",h=x("dd"),u=x("a"),d=$(C),p=x("dt"),p.textContent="Software version",m=x("dd"),f=$(O),_=x("dt"),_.textContent="Database version",g=x("dd"),w=$(S),L=x("dt"),L.textContent="Data last updated",P=x("dd"),M=$(z),E(u,"href",t[1].Nominatim_API_Endpoint),E(s,"class","col-sm-12"),E(o,"class","row"),E(i,"class","container")},m(t,b){ot(e,t,b),y(t,n,b),y(t,i,b),v(i,o),v(o,s),v(s,r),v(s,a),v(s,l),v(l,c),v(l,h),v(h,u),v(u,d),v(l,p),v(l,m),v(m,f),v(l,_),v(l,g),v(g,w),v(l,L),v(l,P),v(P,M),k=!0},p(t,[e]){(!k||1&e)&&O!==(O=t[0].software_version+"")&&A(f,O),(!k||1&e)&&S!==(S=t[0].database_version+"")&&A(w,S),(!k||1&e)&&z!==(z=t[0].data_updated+"")&&A(M,z)},i(t){k||(tt(e.$$.fragment,t),k=!0)},o(t){et(e.$$.fragment,t),k=!1},d(t){st(e,t),t&&b(n),t&&b(i)}}}function nc(t,e,n){let i={},o=Nominatim_Config;return B((function(){$t("status",{format:"json"},(function(t){n(0,i=t)})),Mt("Server status")})),[i,o]}class ic extends lt{constructor(t){super(),at(this,t,nc,ec,r,{})}}function oc(e){let n,i,o,s;return n=new se({}),{c(){it(n.$$.fragment),i=T(),o=x("div"),E(o,"id","about-help"),E(o,"class","container svelte-1l5yrvt")},m(t,e){ot(n,t,e),y(t,i,e),y(t,o,e),s=!0},p:t,i(t){s||(tt(n.$$.fragment,t),s=!0)},o(t){et(n.$$.fragment,t),s=!1},d(t){st(n,t),t&&b(i),t&&b(o)}}}function sc(t){return B((()=>{Tt("theme/about-help.html",document.getElementById("about-help"))})),[]}class rc extends lt{constructor(t){super(),at(this,t,sc,oc,r,{})}}function ac(t){let e,n;return e=new rc({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function lc(t){let e,n;return e=new ic({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function cc(t){let e,n;return e=new Gl({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function hc(t){let e,n;return e=new tc({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function uc(t){let e,n;return e=new Fl({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function dc(t){let e,n;return e=new ma({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function pc(t){let e,n;return e=new ia({}),{c(){it(e.$$.fragment)},m(t,i){ot(e,t,i),n=!0},i(t){n||(tt(e.$$.fragment,t),n=!0)},o(t){et(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function mc(t){let e,n,i,o,s,r,a;const l=[pc,dc,uc,hc,cc,lc,ac],c=[];function h(t,e){return"search"===t[0]?0:"reverse"===t[0]?1:"details"===t[0]?2:"deletable"===t[0]?3:"polygons"===t[0]?4:"status"===t[0]?5:"about"===t[0]?6:-1}return~(e=h(t))&&(n=c[e]=l[e](t)),o=new wt({}),{c(){n&&n.c(),i=T(),it(o.$$.fragment)},m(n,l){~e&&c[e].m(n,l),y(n,i,l),ot(o,n,l),s=!0,r||(a=M(window,"popstate",t[2]),r=!0)},p(t,[o]){let s=e;e=h(t),e!==s&&(n&&(J(),et(c[s],1,1,(()=>{c[s]=null})),Q()),~e?(n=c[e],n||(n=c[e]=l[e](t),n.c()),tt(n,1),n.m(i.parentNode,i)):n=null)},i(t){s||(tt(n),tt(o.$$.fragment,t),s=!0)},o(t){et(n),et(o.$$.fragment,t),s=!1},d(t){~e&&c[e].d(t),t&&b(i),st(o,t),r=!1,a()}}}function fc(t,e,n){let i,o;d(t,_t,(t=>n(1,o=t))),yt();return t.$$.update=()=>{2&t.$$.dirty&&n(0,i=o.tab)},[i,o,()=>yt()]}new class extends lt{constructor(t){super(),at(this,t,fc,mc,r,{})}}({target:document.body})}();