PageSourceSearch

https://services.unitedbaristas.com/wp-content/plugins/jreviews_ad…/views/js/maps.combined.min.js?ver=5120

js unitedbaristas.com collected 2026-10-04 02:41:21 UTC 276,131 bytes, 61 lines download raw bytes

1/* @preserve
2 * Leaflet 1.6.0+Detached: 0c81bdf904d864fd12a286e3d1979f47aba17991.0c81bdf, a JS library for interactive maps. http://leafletjs.com
3 * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4 */
5!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.L={})}(this,(function(t){"use strict";var e=Object.freeze;function i(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}Object.freeze=function(t){return t};var n=Object.create||function(t){return o.prototype=t,new o};function o(){}function s(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var a=0;function r(t){return t._leaflet_id=t._leaflet_id||++a,t._leaflet_id}function l(t,e,i){var n,o,s,a;return a=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(a,e),n=!0)}}function h(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o}function d(){return!1}function u(t,e){var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function p(t){return c(t).split(/\s+/)}function _(t,e){for(var i in t.hasOwnProperty("options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function m(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var f=/\{ *([\w_-]+) *\}/g;function g(t,e){return t.replace(f,(function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n}))}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function y(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var w="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var b=0;function P(t){var e=+new Date,i=Math.max(0,16-(e-b));return b=e+i,window.setTimeout(t,i)}var C=window.requestAnimationFrame||x("RequestAnimationFrame")||P,M=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function T(t,e,i){if(!i||C!==P)return C.call(window,s(t,e));t.call(e)}function k(t){t&&M.call(window,t)}var S=(Object.freeze||Object)({freeze:e,extend:i,create:n,bind:s,lastId:a,stamp:r,throttle:l,wrapNum:h,falseFn:d,formatNum:u,trim:c,splitWords:p,setOptions:_,getParamString:m,template:g,isArray:v,indexOf:y,emptyImageUrl:w,requestFn:C,cancelFn:M,requestAnimFrame:T,cancelAnimFrame:k});function z(){}z.extend=function(t){function e(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var o=e.__super__=this.prototype,s=n(o);for(var a in(s.constructor=e).prototype=s,this)this.hasOwnProperty(a)&&"prototype"!==a&&"__super__"!==a&&(e[a]=this[a]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var e=0;e<t.length;
vendor: 6,057 bytes, line 5
5e++)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),i.apply(null,[s].concat(t.includes)),delete t.includes),s.options&&(t.options=i(n(s.options),t.options)),i(s,t),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=s._initHooks.length;t<e;t++)s._initHooks[t].call(this)}},e},z.include=function(t){return i(this.prototype,t),this},z.mergeOptions=function(t){return i(this.prototype.options,t),this},z.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var j={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=p(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else for(var o=0,s=(t=p(t)).length;o<s;o++)this._off(t[o],e,i);else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var o={fn:e,ctx:i},s=n,a=0,r=s.length;a<r;a++)if(s[a].fn===e&&s[a].ctx===i)return;s.push(o)},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(o=0,s=n.length;o<s;o++){var a=n[o];if(a.ctx===i&&a.fn===e)return a.fn=d,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(o,1)}}else{for(o=0,s=n.length;o<s;o++)n[o].fn=d;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var a=0,r=s.length;a<r;a++){var l=s[a];l.fn.call(l.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var o=s((function(){this.off(t,e,i).off(t,o,i)}),this);return this.on(t,e,i).on(t,o,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};j.addEventListener=j.on,j.removeEventListener=j.clearAllEventListeners=j.off,j.addOneTimeEventListener=j.once,j.fireEvent=j.fire,j.hasEventListeners=j.listens;var I=z.extend(j);function E(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var A=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function B(t,e,i){return t instanceof E?t:v(t)?new E(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new E(t.x,t.y):new E(t,e,i)}function O(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function Z(t,e){return!t||t instanceof O?t:new O(t,e)}function D(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function N(t,e){return t instanceof D?t:new D(t,e)}function R(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function G(t,e,i){return t instanceof R?t:v(t)&&"object"!=typeof t[0]?3===t.length?new R(t[0],t[1],t[2]):2===t.length?new R(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new R(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new R(t,e,i)}E.prototype={clone:function(){return new E(this.x,this.y)},add:function(t){return this.clone()._add(B(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(B(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 E(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new E(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=A(this.x),this.y=A(this.y),this},distanceTo:function(t){var e=(t=B(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=B(t)).x===this.x&&t.y===this.y},contains:function(t){return t=B(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},O.prototype={extend:function(t){return t=B(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 E((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new E(this.min.x,this.max.y)},getTopRight:function(){return new E(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,i;return(t="number"==typeof t[0]||t instanceof E?B(t):Z(t))instanceof O?
vendor: 3,867 bytes, line 5
5(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=Z(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,a=o.y>=e.y&&n.y<=i.y;return s&&a},overlaps:function(t){t=Z(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.x<i.x,a=o.y>e.y&&n.y<i.y;return s&&a},isValid:function(){return!(!this.min||!this.max)}},D.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof R)i=e=t;else{if(!(t instanceof D))return t?this.extend(G(t)||N(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new R(e.lat,e.lng),this._northEast=new R(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new D(new R(e.lat-n,e.lng-o),new R(i.lat+n,i.lng+o))},getCenter:function(){return new R((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 R(this.getNorth(),this.getWest())},getSouthEast:function(){return new R(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 R||"lat"in t?G(t):N(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof D?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,a=o.lng>=e.lng&&n.lng<=i.lng;return s&&a},overlaps:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.lat<i.lat,a=o.lng>e.lng&&n.lng<i.lng;return s&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=N(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var F,U={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},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,i=this.scale(t);return new O(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!(R.prototype={equals:function(t,e){return!!t&&(t=G(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("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,G(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return N([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new R(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var e=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new R(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0==n&&0==o)return t;
vendor: 5,314 bytes, line 5
5var s=t.getSouthWest(),a=t.getNorthEast();return new D(new R(s.lat-n,s.lng-o),new R(a.lat-n,a.lng-o))}},H=i({},U,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),r=s*s+Math.cos(n)*Math.cos(o)*a*a,l=2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r));return this.R*l}}),V=6378137,W={R:V,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=Math.sin(n*e);return new E(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new R((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(F=V*Math.PI,new O([-F,-F],[F,F]))};function q(t,e,i,n){if(v(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=i,this._d=n}function K(t,e,i,n){return new q(t,e,i,n)}q.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 E((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var $,Q=i({},H,{code:"EPSG:3857",projection:W,transformation:($=.5/(Math.PI*W.R),K($,.5,-$,.5))}),X=i({},Q,{code:"EPSG:900913"});function Y(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,e){var i,n,o,s,a,r,l="";for(i=0,o=t.length;i<o;i++){for(n=0,s=(a=t[i]).length;n<s;n++)l+=(n?"L":"M")+(r=a[n]).x+" "+r.y;l+=e?jt?"z":"x":""}return l||"M0 0"}var tt=document.documentElement.style,et="ActiveXObject"in window,it=et&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),ot=Et("webkit"),st=Et("android"),at=Et("android 2")||Et("android 3"),rt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=st&&Et("Google")&&rt<537&&!("AudioNode"in window),ht=!!window.opera,dt=Et("chrome"),ut=Et("gecko")&&!ot&&!ht&&!et,ct=!dt&&Et("safari"),pt=Et("phantom"),_t="OTransition"in tt,mt=0===navigator.platform.indexOf("Win"),ft=et&&"transition"in tt,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!at,vt="MozPerspective"in tt,yt=!window.L_DISABLE_3D&&(ft||gt||vt)&&!_t&&!pt,Lt="undefined"!=typeof orientation||Et("mobile"),wt=Lt&&ot,xt=Lt&&gt,bt=!window.PointerEvent&&window.MSPointerEvent,Pt=!(ot||!window.PointerEvent&&!bt),Ct=!window.L_NO_TOUCH&&(Pt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Mt=Lt&&ht,Tt=Lt&&ut,kt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),St=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",d,e),window.removeEventListener("testPassiveEventSupport",d,e)}catch(t){}return t},zt=!!document.createElement("canvas").getContext,jt=!(!document.createElementNS||!Y("svg").createSVGRect),It=!jt&&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 Et(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var At=(Object.freeze||Object)({ie:et,ielt9:it,edge:nt,webkit:ot,android:st,android23:at,androidStock:lt,opera:ht,chrome:dt,gecko:ut,safari:ct,phantom:pt,opera12:_t,win:mt,ie3d:ft,webkit3d:gt,gecko3d:vt,any3d:yt,mobile:Lt,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:bt,pointer:Pt,touch:Ct,mobileOpera:Mt,mobileGecko:Tt,retina:kt,passiveEvents:St,canvas:zt,svg:jt,vml:It}),Bt=bt?"MSPointerDown":"pointerdown",Ot=bt?"MSPointerMove":"pointermove",Zt=bt?"MSPointerUp":"pointerup",Dt=bt?"MSPointerCancel":"pointercancel",Nt=["INPUT","SELECT","OPTION"],Rt={},Gt=!1,Ft=0;function Ut(t){Rt[t.pointerId]=t,Ft++}function Ht(t){Rt[t.pointerId]&&(Rt[t.pointerId]=t)}function Vt(t){delete Rt[t.pointerId],Ft--}function Wt(t,e){for(var i in t.touches=[],Rt)t.touches.push(Rt[i]);t.changedTouches=[t],e(t)}var qt=bt?"MSPointerDown":Pt?"pointerdown":"touchstart",Kt=bt?"MSPointerUp":Pt?"pointerup":"touchend",$t="_leaflet_";var Qt,Xt,Yt,Jt,te,ee=ge(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ie=ge(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ne="webkitTransition"===ie||"OTransition"===ie?ie+"End":"transitionend";function oe(t){return"string"==typeof t?document.getElementById(t):t}function se(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function ae(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function re(t){var e=t.parentNode;e&&e.removeChild(t)}function le(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function he(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function de(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ue(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=me(t);return 0<i.length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ce(t,e){if(void 0!==t.classList)for(var i=p(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!ue(t,e)){var s=me(t);_e(t,(s?s+" ":"")+e)}}
5function pe(t,e){void 0!==t.classList?t.classList.remove(e):_e(t,c((" "+me(t)+" ").replace(" "+e+" "," ")))}function _e(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function me(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function fe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function ge(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function ve(t,e,i){var n=e||new E(0,0);t.style[ee]=(ft?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function ye(t,e){t._leaflet_pos=e,yt?ve(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Le(t){return t._leaflet_pos||new E(0,0)}if("onselectstart"in document)Qt=function(){Se(window,"selectstart",Ze)},Xt=function(){je(window,"selectstart",Ze)};else{var we=ge(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Qt=function(){if(we){var t=document.documentElement.style;Yt=t[we],t[we]="none"}},Xt=function(){we&&(document.documentElement.style[we]=Yt,Yt=void 0)}}function xe(){Se(window,"dragstart",Ze)}function be(){je(window,"dragstart",Ze)}function Pe(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ce(),te=(Jt=t).style.outline,t.style.outline="none",Se(window,"keydown",Ce))}function Ce(){Jt&&(Jt.style.outline=te,te=Jt=void 0,je(window,"keydown",Ce))}function Me(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function Te(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var ke=(Object.freeze||Object)({TRANSFORM:ee,TRANSITION:ie,TRANSITION_END:ne,get:oe,getStyle:se,create:ae,remove:re,empty:le,toFront:he,toBack:de,hasClass:ue,addClass:ce,removeClass:pe,setClass:_e,getClass:me,setOpacity:fe,testProp:ge,setTransform:ve,setPosition:ye,getPosition:Le,disableTextSelection:Qt,enableTextSelection:Xt,disableImageDrag:xe,enableImageDrag:be,preventOutline:Pe,restoreOutline:Ce,getSizedParentNode:Me,getScale:Te});function Se(t,e,i,n){if("object"==typeof e)for(var o in e)Ie(t,o,e[o],i);else for(var s=0,a=(e=p(e)).length;s<a;s++)Ie(t,e[s],i,n);return this}var ze="_leaflet_events";function je(t,e,i,n){if("object"==typeof e)for(var o in e)Ee(t,o,e[o],i);else if(e)for(var s=0,a=(e=p(e)).length;s<a;s++)Ee(t,e[s],i,n);else{for(var r in t[ze])Ee(t,r,t[ze][r]);delete t[ze]}return this}function Ie(t,e,i,n){var o=e+r(i)+(n?"_"+r(n):"");if(t[ze]&&t[ze][o])return this;var a=function(e){return i.call(n||t,e||window.event)},l=a;Pt&&0===e.indexOf("touch")?function(t,e,i,n){"touchstart"===e?function(t,e,i){var n=s((function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Nt.indexOf(t.target.tagName)<0))return;Ze(t)}Wt(t,e)}));t["_leaflet_touchstart"+i]=n,t.addEventListener(Bt,n,!1),Gt||(document.documentElement.addEventListener(Bt,Ut,!0),document.documentElement.addEventListener(Ot,Ht,!0),document.documentElement.addEventListener(Zt,Vt,!0),document.documentElement.addEventListener(Dt,Vt,!0),Gt=!0)}(t,i,n):"touchmove"===e?function(t,e,i){function n(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Wt(t,e)}t["_leaflet_touchmove"+i]=n,t.addEventListener(Ot,n,!1)}(t,i,n):"touchend"===e&&function(t,e,i){function n(t){Wt(t,e)}t["_leaflet_touchend"+i]=n,t.addEventListener(Zt,n,!1),t.addEventListener(Dt,n,!1)}(t,i,n)}(t,e,a,o):!Ct||"dblclick"!==e||Pt&&dt?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",a,!!St&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(a=function(e){e=e||window.event,We(t,e)&&l(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1)):("click"===e&&st&&(a=function(t){!function(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Fe&&i-Fe;if(n&&100<n&&n<500||t.target._simulatedClick&&!t._simulated)return De(t);Fe=i,e(t)}(t,l)}),t.addEventListener(e,a,!1)):"attachEvent"in t&&t.attachEvent("on"+e,a):function(t,e,
5i){var n,o,s=!1;function a(t){var e;if(Pt){if(!nt||"mouse"===t.pointerType)return;e=Ft}else e=t.touches.length;if(!(1<e)){var i=Date.now(),a=i-(n||i);o=t.touches?t.touches[0]:t,s=0<a&&a<=250,n=i}}function r(t){if(s&&!o.cancelBubble){if(Pt){if(!nt||"mouse"===t.pointerType)return;var i,a,r={};for(a in o)i=o[a],r[a]=i&&i.bind?i.bind(o):i;o=r}o.type="dblclick",o.button=0,e(o),n=null}}t[$t+qt+i]=a,t[$t+Kt+i]=r,t[$t+"dblclick"+i]=e,t.addEventListener(qt,a,!!St&&{passive:!1}),t.addEventListener(Kt,r,!!St&&{passive:!1}),t.addEventListener("dblclick",e,!1)}(t,a,o),t[ze]=t[ze]||{},t[ze][o]=a}function Ee(t,e,i,n){var o=e+r(i)+(n?"_"+r(n):""),s=t[ze]&&t[ze][o];if(!s)return this;Pt&&0===e.indexOf("touch")?function(t,e,i){var n=t["_leaflet_"+e+i];"touchstart"===e?t.removeEventListener(Bt,n,!1):"touchmove"===e?t.removeEventListener(Ot,n,!1):"touchend"===e&&(t.removeEventListener(Zt,n,!1),t.removeEventListener(Dt,n,!1))}(t,e,o):!Ct||"dblclick"!==e||Pt&&dt?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",s,!!St&&{passive:!1}):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,s,!1):"detachEvent"in t&&t.detachEvent("on"+e,s):function(t,e){var i=t[$t+qt+e],n=t[$t+Kt+e],o=t[$t+"dblclick"+e];t.removeEventListener(qt,i,!!St&&{passive:!1}),t.removeEventListener(Kt,n,!!St&&{passive:!1}),nt||t.removeEventListener("dblclick",o,!1)}(t,o),t[ze][o]=null}function Ae(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Ve(t),this}function Be(t){return Ie(t,"mousewheel",Ae),this}function Oe(t){return Se(t,"mousedown touchstart dblclick",Ae),Ie(t,"click",He),this}function Ze(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function De(t){return Ze(t),Ae(t),this}function Ne(t,e){if(!e)return new E(t.clientX,t.clientY);var i=Te(e),n=i.boundingClientRect;return new E((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Re=mt&&dt?2*window.devicePixelRatio:ut?window.devicePixelRatio:1;function Ge(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Re: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 Fe,Ue={};function He(t){Ue[t.type]=!0}function Ve(t){var e=Ue[t.type];return Ue[t.type]=!1,e}function We(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var qe=(Object.freeze||Object)({on:Se,off:je,stopPropagation:Ae,disableScrollPropagation:Be,disableClickPropagation:Oe,preventDefault:Ze,stop:De,getMousePosition:Ne,getWheelDelta:Ge,fakeStop:He,skipped:Ve,isExternalTarget:We,addListener:Se,removeListener:je}),Ke=I.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Le(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=T(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),ye(this._el,i),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)}}),$e=I.extend({options:{crs:Q,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=_(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=s(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(G(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ie&&yt&&!Mt&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Se(this._proxy,ne,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
vendor: 1,298 bytes, line 5
5,setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(G(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.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||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(yt?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),s=(t instanceof E?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),a=this.containerPointToLatLng(o.add(s));return this.setView(a,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():N(t);var i=B(e.paddingTopLeft||e.padding||[0,0]),n=B(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};
vendor: 1,963 bytes, line 5
5var s=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),o),r=this.project(t.getNorthEast(),o);return{center:this.unproject(a.add(r).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,e){if(!(t=N(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.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=B(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 Ke,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ce(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!yt)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),a=this._zoom;t=G(t),e=void 0===e?a:e;var r=Math.max(s.x,s.y),l=r*this.getZoomScale(a,e),h=o.distanceTo(n)||1,d=1.42,u=d*d;function c(t){var e=(l*l-r*r+(t?-1:1)*u*u*h*h)/(2*(t?l:r)*u*h),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function _(t){return(Math.exp(t)+Math.exp(-t))/2}var m=c(0);var f=Date.now(),g=(c(1)-m)/d,v=i.duration?1e3*i.duration:1e3*g*.8;return this._moveStart(!0,i.noMoveStart),function i(){var s=(Date.now()-f)/v,l=function(t){return 1-Math.pow(1-t,1.5)}(s)*g;s<=1?(this._flyToFrame=T(i,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(function(t){return r*(_(m)*function(t){return p(t)/_(t)}(m+d*t)-p(m))/u}
vendor: 46,302 bytes, line 5
5(l)/h)),a),this.getScaleZoom(r/function(t){return r*(_(m)/_(m+d*t))}(l),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=N(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 i=this.getCenter(),n=this._limitCenter(i,this._zoom,N(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=B((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=B(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),s=this.project(o),a=this.project(t),r=this.getPixelBounds(),l=r.getSize().divideBy(2),h=Z([r.min.add(i),r.max.subtract(n)]);if(!h.contains(a)){this._enforcingBounds=!0;var d=s.subtract(a),u=B(a.x+d.x,a.y+d.y);(a.x<h.min.x||a.x>h.max.x)&&(u.x=s.x-d.x,0<d.x?u.x+=l.x-i.x:u.x-=l.x-n.x),(a.y<h.min.y||a.y>h.max.y)&&(u.y=s.y-d.y,0<d.y?u.y+=l.y-i.y:u.y-=l.y-n.y),this.panTo(this.unproject(u),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),o=e.divideBy(2).round(),a=n.divideBy(2).round(),r=o.subtract(a);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(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=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=s(this._handleGeolocationResponse,this),n=s(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){var e=t.code,i=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: "+i+"."})},_handleGeolocationResponse:function(t){var e=new R(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(s[a]=t.coords[a]);this.fire("locationfound",s)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),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(),re(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)re(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=ae("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},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 D(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,i){t=N(t),i=B(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),a=t.getNorthWest(),r=t.getSouthEast(),l=this.getSize().subtract(i),h=Z(this.project(r,n),this.project(a,n)).getSize(),d=yt?this.options.zoomSnap:1,u=l.x/h.x,c=l.y/h.y,p=e?Math.max(u,c):Math.min(u,c);return n=this.getScaleZoom(p,n),d&&(n=Math.round(n/(d/100))*(d/100),n=e?Math.ceil(n/d)*d:Math.floor(n/d)*d),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new E(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new O(i,i.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 i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(G(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(B(t),e)},layerPointToLatLng:function(t){var e=B(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(G(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(G(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(N(t))},distance:function(t,e){return this.options.crs.distance(G(t),G(e))},containerPointToLayerPoint:function(t){return B(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return B(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(B(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(G(t)))},mouseEventToContainerPoint:function(t){return Ne(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=oe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Se(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&yt,ce(t,"leaflet-container"+(Ct?" leaflet-touch":"")+(kt?" leaflet-retina":"")+(it?" leaflet-oldie":"")+(ct?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=se(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),ye(this._mapPane,new E(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ce(t.markerPane,"leaflet-zoom-hide"),ce(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ye(this._mapPane,new E(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),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,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_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){ye(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={};var e=t?je:Se;e((this._targets[r(this._container)]=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),yt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){k(this._resizeRequest),this._resizeRequest=T((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 i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((i=this._targets[r(s)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(o&&!We(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n.length||a||o||!We(s,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!Ve(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Pe(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var s=n[0];"contextmenu"===e&&s.listens(e,!0)&&Ze(t);var a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var r=s.getLatLng&&(!s._radius||s._radius<=10);a.containerPoint=r?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=r?s.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<n.length;l++)if(n[l].fire(e,a,!0),a.originalEvent._stopped||!1===n[l].options.bubblingMouseEvents&&-1!==y(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 Le(this._mapPane)||new E(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 i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return Z([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),s=new O(n.subtract(o),n.add(o)),a=this._getBoundsOffset(s,i,e);return a.round().equals([0,0])?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new O(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=Z(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new E(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=yt?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){pe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=ae("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ee,i=this._proxy.style[e];ve(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){re(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ve(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o)||(T((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&pe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),T((function(){this._moveEnd(!0)}),this))}});function Qe(t){return new Xe(t)}var Xe=z.extend({options:{position:"topright"},initialize:function(t){_(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),i=this.getPosition(),n=t._controlCorners[i];return ce(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(re(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});$e.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=ae("div",e+"control-container",this._container);function n(n,o){var s=e+n+" "+e+o;t[n+o]=ae("div",s,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)re(this._controlCorners[t]);re(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ye=Xe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in _(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=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 Xe.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(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ce(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?(ce(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):pe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return pe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ae("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Oe(e),Be(e);var n=this._section=ae("section",t+"-list");i&&(this._map.on("click",this.collapse,this),st||Se(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ae("a",t+"-toggle",e);o.href="#",o.title="Layers",Ct?(Se(o,"click",De),Se(o,"click",this.expand,this)):Se(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=ae("div",t+"-base",n),this._separator=ae("div",t+"-separator",n),this._overlaysList=ae("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(s((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;le(this._baseLayersList),le(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<o,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(r(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+r(this),n),this._layerControlInputs.push(e),e.layerId=r(t.layer),Se(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return i.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.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<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;0<=o;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Je=Xe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=ae("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},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,i,n,o){var s=ae("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Oe(s),Se(s,"click",De),Se(s,"click",o,this),Se(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";pe(this._zoomInButton,e),pe(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMinZoom()||ce(this._zoomOutButton,e),!this._disabled&&t._zoom!==t.getMaxZoom()||ce(this._zoomInButton,e)}});$e.mergeOptions({zoomControl:!0}),$e.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Je,this.addControl(this.zoomControl))}));var ti=Xe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=ae("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=ae("div",e,i)),t.imperial&&(this._iScale=ae("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_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),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;5280<o?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(10<=i?10:5<=i?5:3<=i?3:2<=i?2:1)}}),ei=Xe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){_(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=ae("div","leaflet-control-attribution"),Oe(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},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});$e.mergeOptions({attributionControl:!0}),$e.addInitHook((function(){this.options.attributionControl&&(new ei).addTo(this)})),Xe.Layers=Ye,Xe.Zoom=Je,Xe.Scale=ti,Xe.Attribution=ei,Qe.layers=function(t,e,i){return new Ye(t,e,i)},Qe.zoom=function(t){return new Je(t)},Qe.scale=function(t){return new ti(t)},Qe.attribution=function(t){return new ei(t)};var ii=z.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},enabled:function(){return!!this._enabled}});ii.addTo=function(t,e){return t.addHandler(e,this),this};var ni,oi={Events:j},si=Ct?"touchstart mousedown":"mousedown",ai={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},ri={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},li=I.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){_(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Se(this._dragStartTarget,si,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(li._dragging===this&&this.finishDrag(),je(this._dragStartTarget,si,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ue(this._element,"leaflet-zoom-anim")&&!(li._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((li._dragging=this)._preventOutline&&Pe(this._element),xe(),Qt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Me(this._element);this._startPoint=new E(e.clientX,e.clientY),this._parentScale=Te(i),Se(document,ri[t.type],this._onMove,this),Se(document,ai[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&1<t.touches.length)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new E(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Ze(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Le(this._element).subtract(i),ce(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ce(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,k(this._animRequest),this._lastEvent=t,this._animRequest=T(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ye(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in pe(document.body,"leaflet-dragging"),this._lastTarget&&(pe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ri)je(document,ri[t],this._onMove,this),je(document,ai[t],this._onUp,this);be(),Xt(),this._moved&&this._moving&&(k(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,li._dragging=!1}});function hi(t,e){if(!e||!t.length)return t.slice();var i=e*e;return function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,s){var a,r,l,h=0;for(r=o+1;r<=s-1;r++)h<(l=_i(e[r],e[o],e[s],!0))&&(a=r,h=l);n<h&&(i[a]=1,t(e,i,n,o,a),t(e,i,n,a,s))}(t,n,e,0,i-1);var o,s=[];for(o=0;o<i;o++)n[o]&&s.push(t[o]);return s}(t=function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;n<s;n++)a=t[n],e<(l=(r=t[o]).x-a.x)*l+(h=r.y-a.y)*h&&(i.push(t[n]),o=n);var a,r,l,h;return o<s-1&&i.push(t[s-1]),i}(t,i),i)}function di(t,e,i){return Math.sqrt(_i(t,e,i,!0))}function ui(t,e,i,n,o){var s,a,r,l=n?ni:pi(t,i),h=pi(e,i);for(ni=h;;){if(!(l|h))return[t,e];if(l&h)return!1;r=pi(a=ci(t,e,s=l||h,i,o),i),s===l?(t=a,l=r):(e=a,h=r)}}function ci(t,e,i,n,o){var s,a,r=e.x-t.x,l=e.y-t.y,h=n.min,d=n.max;return 8&i?(s=t.x+r*(d.y-t.y)/l,a=d.y):4&i?(s=t.x+r*(h.y-t.y)/l,a=h.y):2&i?(s=d.x,a=t.y+l*(d.x-t.x)/r):1&i&&(s=h.x,a=t.y+l*(h.x-t.x)/r),new E(s,a,o)}function pi(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function _i(t,e,i,n){var o,s=e.x,a=e.y,r=i.x-s,l=i.y-a,h=r*r+l*l;return 0<h&&(1<(o=((t.x-s)*r+(t.y-a)*l)/h)?(s=i.x,a=i.y):0<o&&(s+=r*o,a+=l*o)),r=t.x-s,l=t.y-a,n?r*r+l*l:new E(s,a)}function mi(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function fi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),mi(t)}var gi=(Object.freeze||Object)({simplify:hi,pointToSegmentDistance:di,closestPointOnSegment:function(t,e,i){return _i(t,e,i)},clipSegment:ui,_getEdgeIntersection:ci,_getBitCode:pi,_sqClosestPointOnSegment:_i,isFlat:mi,_flat:fi});function vi(t,e,i){var n,o,s,a,r,l,h,d,u,c=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=pi(t[o],e);for(a=0;a<4;a++){for(d=c[a],n=[],o=0,s=(h=t.length)-1;o<h;s=o++)r=t[o],l=t[s],r._code&d?l._code&d||((u=ci(l,r,d,e,i))._code=pi(u,e),n.push(u)):(l._code&d&&((u=ci(l,r,d,e,i))._code=pi(u,e),n.push(u)),n.push(r));t=n}return t}var yi,Li=(Object.freeze||Object)({clipPolygon:vi}),wi={project:function(t){return new E(t.lng,t.lat)},unproject:function(t){return new R(t.y,t.x)},bounds:new O([-180,-90],[180,90])},xi={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,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),a=s*Math.sin(n),r=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),s/2);return n=-i*Math.log(Math.max(r,1e-10)),new E(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),a=Math.exp(-t.y/n),r=Math.PI/2-2*Math.atan(a),l=0,h=.1;l<15&&1e-7<Math.abs(h);l++)e=s*Math.sin(r),e=Math.pow((1-e)/(1+e),s/2),r+=h=Math.PI/2-2*Math.atan(a*e)-r;return new R(r*i,t.x*i/n)}},bi=(Object.freeze||Object)({LonLat:wi,Mercator:xi,SphericalMercator:W}),Pi=i({},H,{code:"EPSG:3395",projection:xi,transformation:(yi=.5/(Math.PI*xi.R),K(yi,.5,-yi,.5))}),Ci=i({},H,{code:"EPSG:4326",projection:wi,transformation:K(1/180,1,-1/180,.5)}),Mi=i({},U,{projection:wi,transformation:K(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 i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});U.Earth=H,U.EPSG3395=Pi,U.EPSG3857=Q,U.EPSG900913=X,U.EPSG4326=Ci,U.Simple=Mi;var Ti=I.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[r(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[r(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 i=this.getEvents();e.on(i,this),this.once("remove",(function(){e.off(i,this)}),this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});$e.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(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},hasLayer:function(t){return!!t&&r(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?v(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].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,i!==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 ki=Ti.extend({initialize:function(t,e){var i,n;if(_(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},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&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);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 r(t)}}),Si=ki.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ki.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),ki.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 D;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),zi=z.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){_(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=B(n),s=B("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.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 kt&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),ji=zi.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 ji.imagePath||(ji.imagePath=this._detectIconPath()),(this.options.imagePath||ji.imagePath)+zi.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ae("div","leaflet-default-icon-path",document.body),e=se(t,"background-image")||se(t,"backgroundImage");return document.body.removeChild(t),null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ii=ii.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new li(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ce(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&&pe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=Le(e._icon),a=i.getPixelBounds(),r=i.getPixelOrigin(),l=Z(a.min._subtract(r).add(o),a.max._subtract(r).subtract(o));if(!l.contains(s)){var h=B((Math.max(l.max.x,s.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),ye(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=T(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(k(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Le(e._icon),o=e._map.layerPointToLatLng(n);i&&ye(i,n),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)}}),Ei=Ti.extend({options:{icon:new ji,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){_(this,e),this._latlng=G(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=G(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"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),ce(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(ce(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&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}),re(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&re(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&ye(this._icon,t),this._shadow&&ye(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&&(ce(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ii)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ii(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&&fe(this._icon,t),this._shadow&&fe(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}}),Ai=Ti.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 _(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&t.hasOwnProperty("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}}),Bi=Ai.extend({options:{fill:!0,radius:10},initialize:function(t,e){_(this,e),this._latlng=G(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=G(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}
vendor: 2,418 bytes, line 5
5,setStyle:function(t){var e=t&&t.radius||this._radius;return Ai.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,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new O(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Oi=Bi.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),_(this,e),this._latlng=G(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 D(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Ai.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===H.distance){var o=Math.PI/180,s=this._mRadius/H.R/o,a=i.project([e+s,t]),r=i.project([e-s,t]),l=a.add(r).divideBy(2),h=i.unproject(l).lat,d=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;!isNaN(d)&&0!==d||(d=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(d)?0:l.x-i.project([h,t-d]).x,this._radiusY=l.y-a.y}else{var u=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(u).x}this._updateBounds()}}),Zi=Ai.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){_(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,i,n=1/0,o=null,s=_i,a=0,r=this._parts.length;a<r;a++)for(var l=this._parts[a],h=1,d=l.length;h<d;h++){var u=s(t,e=l[h-1],i=l[h],!0);u<n&&(n=u,o=s(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o}
vendor: 2,487 bytes, line 5
5,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,a,r=this._rings[0],l=r.length;if(!l)return null;for(e=t=0;t<l-1;t++)e+=r[t].distanceTo(r[t+1])/2;if(0===e)return this._map.layerPointToLatLng(r[0]);for(n=t=0;t<l-1;t++)if(o=r[t],s=r[t+1],e<(n+=i=o.distanceTo(s)))return a=(n-e)/i,this._map.layerPointToLatLng([s.x-a*(s.x-o.x),s.y-a*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=G(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new D,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return mi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=mi(t),n=0,o=t.length;n<o;n++)i?(e[n]=G(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);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 E(t,t);this._pxBounds=new O([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,i){var n,o,s=t[0]instanceof R,a=t.length;if(s){for(o=[],n=0;n<a;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_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,i,n,o,s,a,r,l=this._parts;for(n=e=0,o=this._rings.length;e<o;e++)for(i=0,s=(r=this._rings[e]).length;i<s-1;i++)(a=ui(r[i],r[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(a[0]),a[1]===r[i+1]&&i!==s-2||(l[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=hi(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,s,a,r,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(n=0,o=(a=(r=this._parts[i]).length)-1;n<a;o=n++)if((e||0!==n)&&di(t,r[o],r[n])<=l)return!0;return!1}});Zi._flat=fi;var Di=Zi.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length}
vendor: 3,062 bytes, line 5
5,getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,a,r,l,h=this._rings[0],d=h.length;if(!d)return null;for(s=a=r=0,t=0,e=d-1;t<d;e=t++)i=h[t],n=h[e],o=i.y*n.x-n.y*i.x,a+=(i.x+n.x)*o,r+=(i.y+n.y)*o,s+=3*o;return l=0===s?h[0]:[a/s,r/s],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=Zi.prototype._convertLatLngs.call(this,t),i=e.length;return 2<=i&&e[0]instanceof R&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Zi.prototype._setLatLngs.call(this,t),mi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return mi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new E(e,e);if(t=new O(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;o<s;o++)(n=vi(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,s,a,r,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,r=this._parts.length;o<r;o++)for(s=0,a=(l=(e=this._parts[o]).length)-1;s<l;a=s++)i=e[s],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||Zi.prototype._containsPoint.call(this,t,!0)}}),Ni=Si.extend({initialize:function(t,e){_(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=v(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var a=Ri(t,s);return a?(a.feature=qi(t),a.defaultOptions=a.options,this.resetStyle(a),s.onEachFeature&&s.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Ri(t,e){var i,n,o,s,a="Feature"===t.type?t.geometry:t,r=a?a.coordinates:null,l=[],h=e&&e.pointToLayer,d=e&&e.coordsToLatLng||Fi;if(!r&&!a)return null;switch(a.type){case"Point":return Gi(h,t,i=d(r),e);case"MultiPoint":for(o=0,s=r.length;o<s;o++)i=d(r[o]),l.push(Gi(h,t,i,e));return new Si(l);case"LineString":case"MultiLineString":return n=Ui(r,"LineString"===a.type?0:1,d),new Zi(n,e);case"Polygon":case"MultiPolygon":return n=Ui(r,"Polygon"===a.type?1:2,d),new Di(n,e);case"GeometryCollection":for(o=0,s=a.geometries.length;o<s;o++){var u=Ri({geometry:a.geometries[o],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new Si(l);default:throw new Error("Invalid GeoJSON object.")}}function Gi(t,e,i,n){return t?t(e,i):new Ei(i,n&&n.markersInheritOptions&&n)}function Fi(t){return new R(t[1],t[0],t[2])}
vendor: 54,961 bytes, line 5
5function Ui(t,e,i){for(var n,o=[],s=0,a=t.length;s<a;s++)n=e?Ui(t[s],e-1,i):(i||Fi)(t[s]),o.push(n);return o}function Hi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function Vi(t,e,i,n){for(var o=[],s=0,a=t.length;s<a;s++)o.push(e?Vi(t[s],e-1,i,n):Hi(t[s],n));return!e&&i&&o.push(o[0]),o}function Wi(t,e){return t.feature?i({},t.feature,{geometry:e}):qi(e)}function qi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ki={toGeoJSON:function(t){return Wi(this,{type:"Point",coordinates:Hi(this.getLatLng(),t)})}};function $i(t,e){return new Ni(t,e)}Ei.include(Ki),Oi.include(Ki),Bi.include(Ki),Zi.include({toGeoJSON:function(t){var e=!mi(this._latlngs);return Wi(this,{type:(e?"Multi":"")+"LineString",coordinates:Vi(this._latlngs,e?1:0,!1,t)})}}),Di.include({toGeoJSON:function(t){var e=!mi(this._latlngs),i=e&&!mi(this._latlngs[0]),n=Vi(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Wi(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),ki.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(i){e.push(i.toGeoJSON(t).geometry.coordinates)})),Wi(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 i="GeometryCollection"===e,n=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var s=qi(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}})),i?Wi(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Qi=$i,Xi=Ti.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=N(e),_(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ce(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){re(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&&he(this._image),this},bringToBack:function(){return this._map&&de(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=N(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:ae("img");ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=d,e.onmousemove=d,e.onload=s(this.fire,this,"load"),e.onerror=s(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),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ve(this._image,i,e)},_reset:function(){var t=this._image,e=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();ye(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){fe(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)}}),Yi=Xi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ae("video");if(ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=d,e.onmousemove=d,e.onloadeddata=s(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o<i.length;o++)n.push(i[o].src);this._url=0<i.length?n:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var a=0;a<this._url.length;a++){var r=ae("source");r.src=this._url[a],e.appendChild(r)}}}}),Ji=Xi.extend({_initImage:function(){var t=this._image=this._url;ce(t,"leaflet-image-layer"),this._zoomAnimated&&ce(t,"leaflet-zoom-animated"),this.options.className&&ce(t,this.options.className),t.onselectstart=d,t.onmousemove=d}}),tn=Ti.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){_(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&fe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&fe(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(fe(this._container,0),this._removeTimeout=setTimeout(s(re,void 0,this._container),200)):re(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=G(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&&he(this._container),this},bringToBack:function(){return this._map&&de(this._container),this},_prepareOpen:function(t,e,i){if(e instanceof Ti||(i=e,e=t),e instanceof Si)for(var n in t._layers){e=t._layers[n];break}if(!i)if(e.getCenter)i=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");i=e.getLatLng()}return this._source=e,this.update(),i},_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=B(this.options.offset),i=this._getAnchor();this._zoomAnimated?ye(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}}),en=tn.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){tn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ai||this._source.on("preclick",Ae))},onRemove:function(t){tn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ai||this._source.off("preclick",Ae))},getEvents:function(){var t=tn.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=ae("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=ae("div",t+"-content-wrapper",e);if(this._contentNode=ae("div",t+"-content",i),Oe(i),Be(this._contentNode),Se(i,"contextmenu",Ae),this._tipContainer=ae("div",t+"-tip-container",e),this._tip=ae("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=ae("a",t+"-close-button",e);n.href="#close",n.innerHTML="&#215;",Se(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&o<n?(e.height=o+"px",ce(t,s)):pe(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();ye(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(se(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new E(this._containerLeft,-i-this._containerBottom);o._add(Le(this._container));var s=t.layerPointToContainerPoint(o),a=B(this.options.autoPanPadding),r=B(this.options.autoPanPaddingTopLeft||a),l=B(this.options.autoPanPaddingBottomRight||a),h=t.getSize(),d=0,u=0;s.x+n+l.x>h.x&&(d=s.x+n-h.x+l.x),s.x-d-r.x<0&&(d=s.x-r.x),s.y+i+l.y>h.y&&(u=s.y+i-h.y+l.y),s.y-u-r.y<0&&(u=s.y-r.y),(d||u)&&t.fire("autopanstart").panBy([d,u])}},_onCloseButtonClick:function(t){this._close(),De(t)},_getAnchor:function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});$e.mergeOptions({closePopupOnClick:!0}),$e.include({openPopup:function(t,e,i){return t instanceof en||(t=new en(i).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}}),Ti.include({bindPopup:function(t,e){return t instanceof en?(_(t,e),(this._popup=t)._source=this):(this._popup&&!e||(this._popup=new en(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&&(De(t),e instanceof Ai?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 nn=tn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){tn.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){tn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=tn.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=ae("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),s=this.options.direction,a=i.offsetWidth,r=i.offsetHeight,l=B(this.options.offset),h=this._getAnchor();t="top"===s?t.add(B(-a/2+l.x,-r+l.y+h.y,!0)):"bottom"===s?t.subtract(B(a/2-l.x,-l.y,!0)):"center"===s?t.subtract(B(a/2+l.x,r/2-h.y+l.y,!0)):"right"===s||"auto"===s&&o.x<n.x?(s="right",t.add(B(l.x+h.x,h.y-r/2+l.y,!0))):(s="left",t.subtract(B(a+h.x-l.x,r/2-h.y-l.y,!0))),pe(i,"leaflet-tooltip-right"),pe(i,"leaflet-tooltip-left"),pe(i,"leaflet-tooltip-top"),pe(i,"leaflet-tooltip-bottom"),ce(i,"leaflet-tooltip-"+s),ye(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&fe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return B(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});$e.include({openTooltip:function(t,e,i){return t instanceof nn||(t=new nn(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Ti.include({bindTooltip:function(t,e){return t instanceof nn?(_(t,e),(this._tooltip=t)._source=this):(this._tooltip&&!e||(this._tooltip=new nn(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",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),Ct&&(i.click=this._openTooltip)),this[e](i),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&&(ce(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&&(pe(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,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var on=zi.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"),i=this.options;if(i.html instanceof Element?(le(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=B(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});zi.Default=ji;var sn=Ti.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Lt,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){_(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(),re(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(he(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(de(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=l(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 E?t:new E(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,i=this.getPane().children,n=-t(-1/0,1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!it){fe(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);fe(o.el,s),s<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this))}},_onOpaqueTile:d,_initContainer:function(){this._container||(this._container=ae("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 i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(re(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=ae("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:d,_onRemoveLevel:d,_onCreateLevel:d,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<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 n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.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)re(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),s=Math.floor(e/2),a=i-1,r=new E(+o,+s);r.z=+a;var l=this._tileCoordsToKey(r),h=this._tiles[l];return h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),n<a&&this._retainParent(o,s,a,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var a=new E(o,s);a.z=i+1;var r=this._tileCoordsToKey(a),l=this._tiles[r];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(o,s,i+1,n))}},_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,i,n){var o=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom)&&(o=void 0);var s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();yt?ve(t.el,o,n):ye(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=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]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*n);return new O(o.subtract(s),o.add(s))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),a=[],r=this.options.keepBuffer,l=new O(o.getBottomLeft().subtract([r,-r]),o.getTopRight().add([r,-r]));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 h in this._tiles){var d=this._tiles[h].coords;d.z===this._tileZoom&&l.contains(new E(d.x,d.y))||(this._tiles[h].current=!1)}if(1<Math.abs(i-this._tileZoom))this._setView(t,i);else{for(var u=o.min.y;u<=o.max.y;u++)for(var c=o.min.x;c<=o.max.x;c++){var p=new E(c,u);if(p.z=this._tileZoom,this._isValidTile(p)){var _=this._tiles[this._tileCoordsToKey(p)];_?_.current=!0:a.push(p)}}if(a.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(c=0;c<a.length;c++)this._addTile(a[c],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return N(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new D(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new E(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(re(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=d,t.onmousemove=d,it&&this.options.opacity<1&&fe(t,this.options.opacity),st&&!at&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),s(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&T(s(this._tileReady,this,t,null,o)),ye(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(fe(i.el,0),k(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ce(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),it||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new E(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(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}}),an=sn.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=_(this,e)).detectRetina&&kt&&0<e.maxZoom&&(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("")),st||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 i=document.createElement("img");return Se(i,"load",s(this._tileOnLoad,this,e,i)),Se(i,"error",s(this._tileOnError,this,e,i)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},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 n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return g(this._url,i(e,this.options))},_tileOnLoad:function(t,e){it?setTimeout(s(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,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=d,e.onerror=d,e.complete||(e.src=w,re(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return lt||e.el.setAttribute("src",w),sn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==w))return sn.prototype._tileReady.call(this,t,e,i)}});function rn(t,e){return new an(t,e)}var ln=an.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=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var s=(e=_(this,e)).detectRetina&&kt?2:1,a=this.getTileSize();n.width=a.x*s,n.height=a.y*s,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,an.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=Z(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,a=(1.3<=this._wmsVersion&&this._crs===Ci?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),r=an.prototype.getTileUrl.call(this,t);return r+m(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});an.WMS=ln,rn.wms=function(t,e){return new ln(t,e)};var hn=Ti.extend({options:{padding:.1,tolerance:0},initialize:function(t){_(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ce(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 i=this._map.getZoomScale(e,this._zoom),n=Le(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),a=this._map.project(t,e).subtract(s),r=o.multiplyBy(-i).add(n).add(o).subtract(a);yt?ve(this._container,r,i):ye(this._container,r)},_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(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new O(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),dn=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){hn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Se(t,"mousemove",this._onMouseMove,this),Se(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Se(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,re(this._container),je(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){hn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=kt?2:1;ye(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",kt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){hn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);var e=(this._layers[r(t)]=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,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[r(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,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),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||T(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.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,a=t._parts,r=a.length,l=this._ctx;if(r){for(l.beginPath(),i=0;i<r;i++){for(n=0,o=a[i].length;n<o;n++)s=a[i][n],l[n?"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,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!=o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!=o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(He(t),this._fireEvent([i],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&&(pe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(ce(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(L.bind((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&((i.prev=n)?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,(this._drawLast.next=e).next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&((n.next=i)?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function un(t){return zt?new dn(t):null}var cn=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">')}}}(),pn={_initContainer:function(){this._container=ae("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(hn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=cn("shape");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=cn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(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;re(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=cn("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=v(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=cn("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){he(t._container)},_bringToBack:function(t){de(t._container)}},_n=It?cn:Y,mn=hn.extend({getEvents:function(){var t=hn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=_n("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=_n("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){re(this._container),je(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){hn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),ye(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=_n("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){re(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){he(t._path)},_bringToBack:function(t){de(t._path)}});function fn(t){return jt||It?new mn(t):null}It&&mn.include(pn),$e.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&&un(t)||fn(t)}});var gn=Di.extend({initialize:function(t,e){Di.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});mn.create=_n,mn.pointsToPath=J,Ni.geometryToLayer=Ri,Ni.coordsToLatLng=Fi,Ni.coordsToLatLngs=Ui,Ni.latLngToCoords=Hi,Ni.latLngsToCoords=Vi,Ni.getFeature=Wi,Ni.asFeature=qi,$e.mergeOptions({boxZoom:!0});var vn=ii.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(){Se(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){je(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){re(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(),Qt(),xe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Se(document,{contextmenu:De,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ae("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new O(this._point,this._startPoint),i=e.getSize();ye(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(re(this._box),pe(this._container,"leaflet-crosshair")),Xt(),be(),je(document,{contextmenu:De,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(s(this._resetState,this),0);var e=new D(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()}});$e.addInitHook("addHandler","boxZoom",vn),$e.mergeOptions({doubleClickZoom:!0});var yn=ii.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,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});$e.addInitHook("addHandler","doubleClickZoom",yn),$e.mergeOptions({dragging:!0,inertia:!at,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ln=ii.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new li(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))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){pe(this._map._container,"leaflet-grab"),pe(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=N(this._map.options.maxBounds);this._offsetLimit=Z(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,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)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),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,r=o.multiplyBy(a/s),l=r.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),d=r.multiplyBy(h/l),u=h/(i.inertiaDeceleration*a),c=d.multiplyBy(-u/2).round();c.x||c.y?(c=e._limitOffset(c,e.options.maxBounds),T((function(){e.panBy(c,{duration:u,easeLinearity:a,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});$e.addInitHook("addHandler","dragging",Ln),$e.mergeOptions({keyboard:!0,keyboardPanDelta:80});var wn=ii.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"),Se(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(),je(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,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){Se(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){je(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=B(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}De(t)}}});$e.addInitHook("addHandler","keyboard",wn),$e.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var xn=ii.extend({addHooks:function(){Se(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){je(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ge(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),n),De(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=i?Math.ceil(o/i)*i:o,a=t._limitZoom(e+(0<this._delta?s:-s))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});$e.addInitHook("addHandler","scrollWheelZoom",xn),$e.mergeOptions({tap:!0,tapTolerance:15});var bn=ii.extend({addHooks:function(){Se(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){je(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Ze(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new E(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&ce(i,"leaflet-active"),this._holdTimeout=setTimeout(s((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),Se(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),je(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&pe(i,"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 E(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});Ct&&!Pt&&$e.addInitHook("addHandler","tap",bn),$e.mergeOptions({touchZoom:Ct&&!at,bounceAtZoomLimits:!0});var Pn=ii.extend({addHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Se(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){pe(this._map._container,"leaflet-touch-zoom"),je(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 i=e.mouseEventToContainerPoint(t.touches[0]),n=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(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Se(document,"touchmove",this._onTouchMove,this),Se(document,"touchend",this._onTouchEnd,this),Ze(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMin
5Zoom()&&o<1||this._zoom>e.getMaxZoom()&&1<o)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1==o)return}else{var a=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1==o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var r=s(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=T(r,this,!0),Ze(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),je(document,"touchmove",this._onTouchMove),je(document,"touchend",this._onTouchEnd),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}});$e.addInitHook("addHandler","touchZoom",Pn),$e.BoxZoom=vn,$e.DoubleClickZoom=yn,$e.Drag=Ln,$e.Keyboard=wn,$e.ScrollWheelZoom=xn,$e.Tap=bn,$e.TouchZoom=Pn,Object.freeze=e,t.version="1.6.0+HEAD.0c81bdf",t.Control=Xe,t.control=Qe,t.Browser=At,t.Evented=I,t.Mixin=oi,t.Util=S,t.Class=z,t.Handler=ii,t.extend=i,t.bind=s,t.stamp=r,t.setOptions=_,t.DomEvent=qe,t.DomUtil=ke,t.PosAnimation=Ke,t.Draggable=li,t.LineUtil=gi,t.PolyUtil=Li,t.Point=E,t.point=B,t.Bounds=O,t.bounds=Z,t.Transformation=q,t.transformation=K,t.Projection=bi,t.LatLng=R,t.latLng=G,t.LatLngBounds=D,t.latLngBounds=N,t.CRS=U,t.GeoJSON=Ni,t.geoJSON=$i,t.geoJson=Qi,t.Layer=Ti,t.LayerGroup=ki,t.layerGroup=function(t,e){return new ki(t,e)},t.FeatureGroup=Si,t.featureGroup=function(t){return new Si(t)},t.ImageOverlay=Xi,t.imageOverlay=function(t,e,i){return new Xi(t,e,i)},t.VideoOverlay=Yi,t.videoOverlay=function(t,e,i){return new Yi(t,e,i)},t.SVGOverlay=Ji,t.svgOverlay=function(t,e,i){return new Ji(t,e,i)},t.DivOverlay=tn,t.Popup=en,t.popup=function(t,e){return new en(t,e)},t.Tooltip=nn,t.tooltip=function(t,e){return new nn(t,e)},t.Icon=zi,t.icon=function(t){return new zi(t)},t.DivIcon=on,t.divIcon=function(t){return new on(t)},t.Marker=Ei,t.marker=function(t,e){return new Ei(t,e)},t.TileLayer=an,t.tileLayer=rn,t.GridLayer=sn,t.gridLayer=function(t){return new sn(t)},t.SVG=mn,t.svg=fn,t.Renderer=hn,t.Canvas=dn,t.canvas=un,t.Path=Ai,t.CircleMarker=Bi,t.circleMarker=function(t,e){return new Bi(t,e)},t.Circle=Oi,t.circle=function(t,e,i){return new Oi(t,e,i)},t.Polyline=Zi,t.polyline=function(t,e){return new Zi(t,e)},t.Polygon=Di,t.polygon=function(t,e){return new Di(t,e)},t.Rectangle=gn,t.rectangle=function(t,e){return new gn(t,e)},t.Map=$e,t.map=function(t,e){return new $e(t,e)};var Cn=window.L;t.noConflict=function(){return window.L=Cn,this},window.L=t})),this.L=this.L||{},this.L.Control=this.L.Control||{},this.L.Control.Geocoder=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e=/[&<>"'`]/g,i=/[&<>"'`]/,n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};function o(t){return n[t]}function s(e,i,n){var o=new XMLHttpRequest;o.onreadystatechange=function(){4===o.readyState&&(200===o.status||304===o.status?n(JSON.parse(o.response)):n(""))},o.open("GET",e+t.Util.getParamString(i),!0),o.setRequestHeader("Accept","application/json"),o.send(null)}function a(t,n){return t.replace(/\{ *([\w_]+) *\}/g,(function(t,s){var a,r=n[s];return void 0===r?r="":"function"==typeof r&&(r=r(n)),null==(a=r)?"":a?(a=""+a,i.test(a)?a.replace(e,o):a):a+""}))}var r={class:t.Control.extend({options:{showResultIcons:!1,collapsed:!0,expand:"touch",position:"topright",placeholder:"Search...",errorMessage:"Nothing found.",suggestMinLength:3,suggestTimeout:250,defaultMarkGeocode:!0},includes:t.Evented.prototype||t.Mixin.Events,initialize:function(e){t.Util.setOptions(this,e),this.options.geocoder||(this.options.geocoder=new l.class),this._requestCount=0},onAdd:function(e){var i,n="leaflet-control-geocoder",o=t.DomUtil.create("div",n+" leaflet-bar"),s=t.DomUtil.create("button",n+"-icon",o),a=this._form=t.DomUtil.create("div",n+"-form",o);return this._map=e,this._container=o,s.innerHTML="&nbsp;",s.type="button",(i=this._input=t.DomUtil.create("input","",a)).type="text",i.placeholder=this.options.placeholder,this._errorElement=t.DomUtil.create("div",n+"-form-no-error",o),this._errorElement.innerHTML=this.options.errorMessage,this._alts=t.DomUtil.create("ul",n+"-alternatives leaflet-control-geocoder-alternatives-minimized",o),t.DomEvent.disableClickPropagation(this._alts),t.DomEvent.addListener(i,"keydown",this._key
5down,this),this.options.geocoder.suggest&&t.DomEvent.addListener(i,"input",this._change,this),t.DomEvent.addListener(i,"blur",(function(){this.options.collapsed&&!this._preventBlurCollapse&&this._collapse(),this._preventBlurCollapse=!1}),this),this.options.collapsed?"click"===this.options.expand?t.DomEvent.addListener(o,"click",(function(t){0===t.button&&2!==t.detail&&this._toggle()}),this):t.Browser.touch&&"touch"===this.options.expand?t.DomEvent.addListener(o,"touchstart mousedown",(function(t){this._toggle(),t.preventDefault(),t.stopPropagation()}),this):(t.DomEvent.addListener(o,"mouseover",this._expand,this),t.DomEvent.addListener(o,"mouseout",this._collapse,this),this._map.on("movestart",this._collapse,this)):(this._expand(),t.Browser.touch?t.DomEvent.addListener(o,"touchstart",(function(){this._geocode()}),this):t.DomEvent.addListener(o,"click",(function(){this._geocode()}),this)),this.options.defaultMarkGeocode&&this.on("markgeocode",this.markGeocode,this),this.on("startgeocode",(function(){t.DomUtil.addClass(this._container,"leaflet-control-geocoder-throbber")}),this),this.on("finishgeocode",(function(){t.DomUtil.removeClass(this._container,"leaflet-control-geocoder-throbber")}),this),t.DomEvent.disableClickPropagation(o),o},_geocodeResult:function(e,i){if(i||1!==e.length)if(e.length>0){this._alts.innerHTML="",this._results=e,t.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized");for(var n=0;n<e.length;n++)this._alts.appendChild(this._createAlt(e[n],n))}else t.DomUtil.addClass(this._errorElement,"leaflet-control-geocoder-error");else this._geocodeResultSelected(e[0])},markGeocode:function(e){return e=e.geocode||e,this._map.fitBounds(e.bbox),this._geocodeMarker&&this._map.removeLayer(this._geocodeMarker),this._geocodeMarker=new t.Marker(e.center).bindPopup(e.html||e.name).addTo(this._map).openPopup(),this},_geocode:function(t){var e=++this._requestCount,i=t?"suggest":"geocode",n={input:this._input.value};this._lastGeocode=this._input.value,t||this._clearResults(),this.fire("start"+i,n),this.options.geocoder[i](this._input.value,(function(o){e===this._requestCount&&(n.results=o,this.fire("finish"+i,n),this._geocodeResult(o,t))}),this)},_geocodeResultSelected:function(t){var e=this;t.mapbox_id&&!t.center&&this.options.geocoder.retrieve?this.options.geocoder.retrieve(t.mapbox_id,(function(t){t&&e.fire("markgeocode",{geocode:t})})):this.fire("markgeocode",{geocode:t})},_toggle:function(){t.DomUtil.hasClass(this._container,"leaflet-control-geocoder-expanded")?this._collapse():this._expand()},_expand:function(){t.DomUtil.addClass(this._container,"leaflet-control-geocoder-expanded"),this._input.select(),this.fire("expand")},_collapse:function(){t.DomUtil.removeClass(this._container,"leaflet-control-geocoder-expanded"),t.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),t.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),this._input.blur(),this.fire("collapse")},_clearResults:function(){t.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),this._selection=null,t.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error")},_createAlt:function(e,i){var n=t.DomUtil.create("li",""),o=t.DomUtil.create("a","",n),s=this.options.showResultIcons&&e.icon?t.DomUtil.create("img","",o):null,a=e.html?void 0:document.createTextNode(e.name);return s&&(s.src=e.icon),n.setAttribute("data-result-index",i),e.html?o.innerHTML=o.innerHTML+e.html:o.appendChild(a),t.DomEvent.addListener(n,"mousedown touchstart",(function(i){this._preventBlurCollapse=!0,t.DomEvent.stop(i),this._geocodeResultSelected(e),t.DomEvent.on(n,"click",(function(){this.options.collapsed?this._collapse():this._clearResults()}),this)}),this),n},_keydown:function(e){var i=this,n=function(e){i._selection&&(t.DomUtil.removeClass(i._selection,"leaflet-control-geocoder-selected"),i._selection=i._selection[e>0?"nextSibling":"previousSibling"]),i._selection||(i._selection=i._alts[e>0?"firstChild":"lastChild"]),i._selection&&t.DomUtil.addClass(i._selection,"leaflet-control-geocoder-selected")};switch(e.keyCode){case 27:this.options.collapsed&&this._collapse();break;case 38:n(-1);break;case 40:n(1);break;case 13:if(this._selection){var o=parseInt(this._selection.getAttribute("data-result-index"),10);this._geocodeResultSelected(this._results[o]),this._clearResults()}else this._geocode()}},_change:function(){var e=this._input.value;e!==this._lastGeocode&&(clearTimeout(this._suggestTimeout),e.length>=this.options.suggestMinLength?this._suggestTimeout=setTimeout(t.bind((function(){this._geocode(!0)}),this),this.options.suggestTimeout):this._clearResults())}}),factory:function(e){return new t.Control.Geocoder(e)}},l={class:t.Class.extend({options:{serviceUrl:"https://nominatim.openstreetmap.org/",geocodingQueryParams:{},reverseQueryParams:{},htmlTemplate:function(t){var e=t.address,i=[];return(e.road||e.building)&&i.push("{building} {road} {house_number}"),(e.city||e.town||e.village||e.hamlet)&&i.push('<span class="'+(i.length>
50?"leaflet-control-geocoder-address-detail":"")+'">{postcode} {city} {town} {village} {hamlet}</span>'),(e.state||e.country)&&i.push('<span class="'+(i.length>0?"leaflet-control-geocoder-address-context":"")+'">{state} {country}</span>'),a(i.join("<br/>"),e)}},initialize:function(e){t.Util.setOptions(this,e)},geocode:function(e,i,n){s(this.options.serviceUrl+"search",t.extend({q:e,limit:5,format:"json",addressdetails:1},this.options.geocodingQueryParams),t.bind((function(e){for(var o=[],s=e.length-1;s>=0;s--){for(var a=e[s].boundingbox,r=0;r<4;r++)a[r]=parseFloat(a[r]);o[s]={icon:e[s].icon,name:e[s].display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(e[s]):void 0,bbox:t.latLngBounds([a[0],a[2]],[a[1],a[3]]),center:t.latLng(e[s].lat,e[s].lon),properties:e[s]}}i.call(n,o)}),this))},reverse:function(e,i,n,o){s(this.options.serviceUrl+"reverse",t.extend({lat:e.lat,lon:e.lng,zoom:Math.round(Math.log(i/256)/Math.log(2)),addressdetails:1,format:"json"},this.options.reverseQueryParams),t.bind((function(e){var i,s=[];e&&e.lat&&e.lon&&(i=t.latLng(e.lat,e.lon),s.push({name:e.display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(e):void 0,center:i,bbox:t.latLngBounds(i,i),properties:e})),n.call(o,s)}),this))}}),factory:function(e){return new t.Control.Geocoder.Nominatim(e)}},h={class:t.Class.extend({options:{suggestUrl:"https://api.mapbox.com/search/searchbox/v1/suggest",retrieveUrl:"https://api.mapbox.com/search/searchbox/v1/retrieve",forwardUrl:"https://api.mapbox.com/search/searchbox/v1/forward",reverseUrl:"https://api.mapbox.com/search/searchbox/v1/reverse",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(e,i){t.setOptions(this,i),this.accessToken=e,this.sessionToken=null,this.suggestions={}},generateSessionToken:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},geocode:function(e,i,n){var o=this,a=t.extend({q:e,access_token:this.accessToken,limit:10},this.options.geocodingQueryParams);s(this.options.forwardUrl,a,(function(t){var e=o.processFeatures(t);i.call(n,e)}))},suggest:function(e,i,n){var o=this;this.sessionToken||(this.sessionToken=this.generateSessionToken());var a=t.extend({q:e,access_token:this.accessToken,session_token:this.sessionToken,limit:10},this.options.geocodingQueryParams);s(this.options.suggestUrl,a,(function(t){var e=[];if(o.suggestions={},t.suggestions&&t.suggestions.length)for(var s=0;s<t.suggestions.length;s++){var a=t.suggestions[s],r=a.full_address||a.name;o.suggestions[a.mapbox_id]=a,e.push({name:r,mapbox_id:a.mapbox_id,feature_type:a.feature_type,properties:{text:a.name,place:a.context&&a.context.place?a.context.place.name:void 0,region:a.context&&a.context.region?a.context.region.name:void 0,postcode:a.context&&a.context.postcode?a.context.postcode.name:void 0,country:a.context&&a.context.country?a.context.country.name:void 0}})}i.call(n,e)}))},retrieve:function(t,e,i){var n=this,o={access_token:this.accessToken,session_token:this.sessionToken||""};s(this.options.retrieveUrl+"/"+t,o,(function(o){if(n.sessionToken=null,o.features&&o.features.length){var s=n.processFeatures(o);e.call(i,s.length?s[0]:null)}else{var a=n.suggestions[t];a?e.call(i,{name:a.full_address||a.name,center:null,bbox:null,properties:{text:a.name,place:a.context&&a.context.place?a.context.place.name:void 0,region:a.context&&a.context.region?a.context.region.name:void 0,postcode:a.context&&a.context.postcode?a.context.postcode.name:void 0,country:a.context&&a.context.country?a.context.country.name:void 0}}):e.call(i,null)}}))},reverse:function(e,i,n,o){var a=this,r=t.extend({longitude:e.lng,latitude:e.lat,access_token:this.accessToken},this.options.reverseQueryParams);s(this.options.reverseUrl,r,(function(t){var e=a.processFeatures(t);n.call(o,e)}))},processFeatures:function(e){var i,n,o,s=[];if(e.features&&e.features.length)for(var a=0;a<=e.features.length-1;a++){var r=(i=e.features[a]).geometry.coordinates;n=t.latLng(r[1],r[0]),o=i.bbox?t.latLngBounds(t.latLng(i.bbox[1],i.bbox[0]),t.latLng(i.bbox[3],i.bbox[2])):t.latLngBounds(n,n);var l=i.properties||{},h=l.context||{},d={text:l.name,address:l.address,place:h.place?h.place.name:void 0,region:h.region?h.region.name:void 0,postcode:h.postcode?h.postcode.name:void 0,country:h.country?h.country.name:void 0};s[a]={name:l.full_address||l.name,bbox:o,center:n,feature_type:l.feature_type,properties:d}}return s}}),factory:function(e,i){return new t.Control.Geocoder.Mapbox(e,i)}},d={class:t.Class.extend({options:{serviceUrl:"https://photon.komoot.io/api/",reverseUrl:"https://photon.komoot.io/reverse/",nameProperties:["name","street","suburb","hamlet","town","city","state","country"]},initialize:function(e){t.setOptions(this,e)},geocode:function(e,i,n){var o=t.extend({q:e},this.options.geocodingQueryParams);s(this.options.serviceUrl,o,t.bind((function(t){i.call(n,this._decodeFeatures(t))}),this))}
5,suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(e,i,n,o){var a=t.extend({lat:e.lat,lon:e.lng},this.options.reverseQueryParams);s(this.options.reverseUrl,a,t.bind((function(t){n.call(o,this._decodeFeatures(t))}),this))},_decodeFeatures:function(e){var i,n,o,s,a,r,l=[];if(e&&e.features)for(i=0;i<e.features.length;i++)o=(n=e.features[i]).geometry.coordinates,s=t.latLng(o[1],o[0]),r=(a=n.properties.extent)?t.latLngBounds([a[1],a[0]],[a[3],a[2]]):t.latLngBounds(s,s),l.push({name:this._deocodeFeatureName(n),html:this.options.htmlTemplate?this.options.htmlTemplate(n):void 0,center:s,bbox:r,properties:n.properties});return l},_deocodeFeatureName:function(t){var e,i;for(e=0;!i&&e<this.options.nameProperties.length;e++)i=t.properties[this.options.nameProperties[e]];return i}}),factory:function(e){return new t.Control.Geocoder.Photon(e)}},u={class:t.Class.extend({options:{service_url:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(e,i){t.setOptions(this,i),this._accessToken=e},geocode:function(e,i,n){var o={SingleLine:e,outFields:"Addr_Type",forStorage:!1,maxLocations:10,f:"json"};o=t.Util.extend(o,this.options.geocodingQueryParams),this._key&&this._key.length&&(o.token=this._key),s(this.options.service_url+"/findAddressCandidates",o,(function(e){var o,s,a,r=[];if(e.candidates&&e.candidates.length)for(var l=0;l<=e.candidates.length-1;l++)o=e.candidates[l],s=t.latLng(o.location.y,o.location.x),a=t.latLngBounds(t.latLng(o.extent.ymax,o.extent.xmax),t.latLng(o.extent.ymin,o.extent.xmin)),r[l]={name:o.address,bbox:a,center:s,properties:{type:o.attributes?o.attributes.Addr_type:"address"}};i.call(n,r)}))},suggest:function(t,e,i){return this.geocode(t,e,i)},reverse:function(e,i,n,o){var a={location:encodeURIComponent(e.lng)+","+encodeURIComponent(e.lat),distance:100,f:"json"};a=t.Util.extend(a,this.options.geocodingQueryParams),s(this.options.service_url+"/reverseGeocode",a,(function(e){var i,s=[];e&&!e.error&&(i=t.latLng(e.location.y,e.location.x),s.push({name:e.address.Match_addr,center:i,bounds:t.latLngBounds(i,i)})),n.call(o,s)}))}}),factory:function(e,i){return new t.Control.Geocoder.ArcGis(e,i)}},c=t.Util.extend(r.class,{Nominatim:l.class,nominatim:l.factory,Mapbox:h.class,mapbox:h.factory,Photon:d.class,photon:d.factory,ArcGis:u.class,arcgis:u.factory});return t.Util.extend(t.Control,{Geocoder:c,geocoder:r.factory}),c}(L),L.KML=L.FeatureGroup.extend({options:{async:!0},initialize:function(t,e){L.Util.setOptions(this,e),this._kml=t,this._layers={},t&&this.addKML(t,e,this.options.async)},loadXML:function(t,e,i,n){void 0===n&&(n=this.options.async),void 0===i&&(i=this.options);var o=new window.XMLHttpRequest;if(void 0===o.withCredentials&&void 0!==window.XDomainRequest){var s=new window.XDomainRequest;s.open("GET",t,n),s.onprogress=function(){},s.ontimeout=function(){},s.onerror=function(){},s.onload=function(){if(s.responseText){var t=new window.ActiveXObject("Microsoft.XMLDOM");t.loadXML(s.responseText),e(t,i)}},setTimeout((function(){s.send()}),0)}else{o.open("GET",t,n),o.setRequestHeader("Accept","application/vnd.google-earth.kml+xml");try{o.overrideMimeType("text/xml")}catch(t){}o.onreadystatechange=function(){4===o.readyState&&200===o.status&&e(o.responseXML,i)},o.send(null)}},addKML:function(t,e,i){var n=this;this.loadXML(t,(function(t){n._addKML(t)}),e,i)},_addKML:function(t){var e=L.KML.parseKML(t);if(e&&e.length){for(var i=0;i<e.length;i++)this.fire("addlayer",{layer:e[i]}),this.addLayer(e[i]);this.latLngs=L.KML.getLatLngs(t),this.fire("loaded")}},latLngs:[]}),L.Util.extend(L.KML,{parseKML:function(t){var e=this.parseStyles(t);this.parseStyleMap(t,e);for(var i,n=t.getElementsByTagName("Folder"),o=[],s=0;s<n.length;s++)this._check_folder(n[s])&&(i=this.parseFolder(n[s],e))&&o.push(i);n=t.getElementsByTagName("Placemark");for(var a=0;a<n.length;a++)this._check_folder(n[a])&&(i=this.parsePlacemark(n[a],t,e))&&o.push(i);n=t.getElementsByTagName("GroundOverlay");for(var r=0;r<n.length;r++)(i=this.parseGroundOverlay(n[r]))&&o.push(i);return o},_check_folder:function(t,e){for(t=t.parentNode;t&&"Folder"!==t.tagName;)t=t.parentNode;return!t||t===e},parseStyles:function(t){for(var e={},i=t.getElementsByTagName("Style"),n=0,o=i.length;n<o;n++){var s=this.parseStyle(i[n]);if(s)e["#"+s.id]=s}return e},parseStyle:function(t){var e,i,n={},o={},s={},a={color:!0,width:!0,Icon:!0,href:!0,hotSpot:!0};function r(t){for(var e={},i=0;i<t.childNodes.length;i++){var n=t.childNodes[i],o=n.tagName;if(a[o])if("hotSpot"===o)for(var l=0;l<n.attributes.length;l++)e[n.attributes[l].name]=n.attributes[l].nodeValue;else{var h=n.childNodes[0].nodeValue;"color"===o?(e.opacity=parseInt(h.substring(0,2),16)/255,e.color="#"+h.substring(6,8)+h.substring(4,6)+h.substring(2,4)):"width"===o?e.weight=h:"Icon"===o?(s=r(n)).href&&(e.href=s.href):"href"===o&&(e.href=h)}}return e}return(e=t.getElementsByTagName("LineStyle"))&&e[0]&&(n=r(e[0])),(e=t.getElementsByTagName("PolyStyle"))&&e[0]&&(o=r(e[0])),o.color&&(n.fillColor=o.color),o.op
5acity&&(n.fillOpacity=o.opacity),(e=t.getElementsByTagName("IconStyle"))&&e[0]&&(s=r(e[0])),s.href&&(n.icon=new L.KMLIcon({iconUrl:s.href,shadowUrl:null,anchorRef:{x:s.x,y:s.y},anchorType:{x:s.xunits,y:s.yunits}})),(i=t.getAttribute("id"))&&n&&(n.id=i),n},parseStyleMap:function(t,e){for(var i=t.getElementsByTagName("StyleMap"),n=0;n<i.length;n++){var o,s,a,r=i[n];(o=r.getElementsByTagName("key"))&&o[0]&&(s=o[0].textContent),(o=r.getElementsByTagName("styleUrl"))&&o[0]&&(a=o[0].textContent),"normal"===s&&(e["#"+r.getAttribute("id")]=e[a])}},parseFolder:function(t,e){var i,n,o=[];i=t.getElementsByTagName("Folder");for(var s=0;s<i.length;s++)this._check_folder(i[s],t)&&(n=this.parseFolder(i[s],e))&&o.push(n);i=t.getElementsByTagName("Placemark");for(var a=0;a<i.length;a++)this._check_folder(i[a],t)&&(n=this.parsePlacemark(i[a],t,e))&&o.push(n);i=t.getElementsByTagName("GroundOverlay");for(var r=0;r<i.length;r++)this._check_folder(i[r],t)&&(n=this.parseGroundOverlay(i[r]))&&o.push(n);if(o.length)return 1===o.length?o[0]:new L.FeatureGroup(o)},parsePlacemark:function(t,e,i,n){var o,s,a,r,l,h=n||{};for(l=t.getElementsByTagName("styleUrl"),s=0;s<l.length;s++){var d=l[s].childNodes[0].nodeValue;for(var u in i[d])h[u]=i[d][u]}if(t.getElementsByTagName("Style")[0]){var c=this.parseStyle(t);if(c)for(r in c)h[r]=c[r]}var p=["MultiGeometry","MultiTrack","gx:MultiTrack"];for(o in p)for(l=t.getElementsByTagName(p[o]),s=0;s<l.length;s++)return this.parsePlacemark(l[s],e,i,h);var _=[],m=["LineString","Polygon","Point","Track","gx:Track"];for(a in m){var f=m[a];for(l=t.getElementsByTagName(f),s=0;s<l.length;s++){var g=this["parse"+f.replace(/gx:/,"")](l[s],e,h);g&&_.push(g)}}if(_.length){var v=_[0];_.length>1&&(v=new L.FeatureGroup(_));var y,w="";for((l=t.getElementsByTagName("name")).length&&l[0].childNodes.length&&(y=l[0].childNodes[0].nodeValue),l=t.getElementsByTagName("description"),s=0;s<l.length;s++)for(a=0;a<l[s].childNodes.length;a++)w+=l[s].childNodes[a].nodeValue;return y&&v.on("add",(function(){v.bindPopup("<h2>"+y+"</h2>"+w)})),v}},parseCoords:function(t){var e=t.getElementsByTagName("coordinates");return this._read_coords(e[0])},parseLineString:function(t,e,i){var n=this.parseCoords(t);if(n.length)return new L.Polyline(n,i)},parseTrack:function(t,e,i){var n=e.getElementsByTagName("gx:coord");0===n.length&&(n=e.getElementsByTagName("coord"));for(var o=[],s=0;s<n.length;s++)o=o.concat(this._read_gxcoords(n[s]));if(o.length)return new L.Polyline(o,i)},parsePoint:function(t,e,i){var n=t.getElementsByTagName("coordinates");if(n.length){var o=n[0].childNodes[0].nodeValue.split(",");return new L.KMLMarker(new L.LatLng(o[1],o[0]),i)}},parsePolygon:function(t,e,i){var n,o,s,a=[],r=[];for(n=t.getElementsByTagName("outerBoundaryIs"),o=0;o<n.length;o++)(s=this.parseCoords(n[o]))&&a.push(s);for(n=t.getElementsByTagName("innerBoundaryIs"),o=0;o<n.length;o++)(s=this.parseCoords(n[o]))&&r.push(s);if(a.length)return i.fillColor&&(i.fill=!0),1===a.length?new L.Polygon(a.concat(r),i):new L.MultiPolygon(a,i)},getLatLngs:function(t){for(var e=t.getElementsByTagName("coordinates"),i=[],n=0;n<e.length;n++)i=i.concat(this._read_coords(e[n]));return i},_read_coords:function(t){var e,i="",n=[];for(e=0;e<t.childNodes.length;e++)i+=t.childNodes[e].nodeValue;for(i=i.split(/[\s\n]+/),e=0;e<i.length;e++){var o=i[e].split(",");o.length<2||n.push(new L.LatLng(o[1],o[0]))}return n},_read_gxcoords:function(t){var e,i=[];return e=t.firstChild.nodeValue.split(" "),i.push(new L.LatLng(e[1],e[0])),i},parseGroundOverlay:function(t){var e=t.getElementsByTagName("LatLonBox")[0],i=new L.LatLngBounds([e.getElementsByTagName("south")[0].childNodes[0].nodeValue,e.getElementsByTagName("west")[0].childNodes[0].nodeValue],[e.getElementsByTagName("north")[0].childNodes[0].nodeValue,e.getElementsByTagName("east")[0].childNodes[0].nodeValue]),n={Icon:!0,href:!0,color:!0};var o={};if(o=function t(e){for(var i={},o={},s=0;s<e.childNodes.length;s++){var a=e.childNodes[s],r=a.tagName;if(n[r]){var l=a.childNodes[0].nodeValue;"Icon"===r?(o=t(a)).href&&(i.href=o.href):"href"===r?i.href=l:"color"===r&&(i.opacity=parseInt(l.substring(0,2),16)/255,i.color="#"+l.substring(6,8)+l.substring(4,6)+l.substring(2,4))}}return i}(t),void 0!==e.getElementsByTagName("rotation")[0]){var s=e.getElementsByTagName("rotation")[0].childNodes[0].nodeValue;o.rotation=parseFloat(s)}return new L.RotatedImageOverlay(o.href,i,{opacity:o.opacity,angle:o.rotation})}}),L.KMLIcon=L.Icon.extend({_setIconStyles:function(t,e){L.Icon.prototype._setIconStyles.apply(this,[t,e]);var i=this.options;this.options.popupAnchor=[0,-.83*t.height],"fraction"===i.anchorType.x&&(t.style.marginLeft=-i.anchorRef.x*t.width+"px"),"fraction"===i.anchorType.y&&
5(t.style.marginTop=-(1-i.anchorRef.y)*t.height+1+"px"),"pixels"===i.anchorType.x&&(t.style.marginLeft=-i.anchorRef.x+"px"),"pixels"===i.anchorType.y&&(t.style.marginTop=i.anchorRef.y-t.height+1+"px")}}),L.KMLMarker=L.Marker.extend({options:{icon:new L.KMLIcon.Default}}),L.RotatedImageOverlay=L.ImageOverlay.extend({options:{angle:0},_reset:function(){L.ImageOverlay.prototype._reset.call(this),this._rotate()},_animateZoom:function(t){L.ImageOverlay.prototype._animateZoom.call(this,t),this._rotate()},_rotate:function(){if(L.DomUtil.TRANSFORM)this._image.style[L.DomUtil.TRANSFORM]+=" rotate("+this.options.angle+"deg)";else if(L.Browser.ie){var t=this.options.angle*(Math.PI/180),e=Math.cos(t),i=Math.sin(t);this._image.style.filter+=" progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11="+e+", M12="+-i+", M21="+i+", M22="+e+")"}},getBounds:function(){return this._bounds}}),L.GridLayer.GoogleMutant=L.GridLayer.extend({options:{minZoom:0,maxZoom:23,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",opacity:1,continuousWorld:!1,noWrap:!1,type:"roadmap",maxNativeZoom:21},initialize:function(t){L.GridLayer.prototype.initialize.call(this,t),this._ready=!!window.google&&!!window.google.maps&&!!window.google.maps.Map,this._GAPIPromise=this._ready?Promise.resolve(window.google):new Promise((function(t,e){var i=0,n=null;n=setInterval((function(){return i>=10?(clearInterval(n),e(new Error("window.google not found after 10 attempts"))):window.google&&window.google.maps&&window.google.maps.Map?(clearInterval(n),t(window.google)):void i++}),500)})),this._tileCallbacks={},this._freshTiles={},this._imagesPerTile="hybrid"===this.options.type?2:1,this._boundOnMutatedImage=this._onMutatedImage.bind(this)},onAdd:function(t){L.GridLayer.prototype.onAdd.call(this,t),this._initMutantContainer(),this._GAPIPromise.then(function(){if(this._ready=!0,this._map=t,this._initMutant(),t.on("viewreset",this._reset,this),this.options.updateWhenIdle?t.on("moveend",this._update,this):t.on("move",this._update,this),t.on("zoomend",this._handleZoomAnim,this),t.on("resize",this._resize,this),google.maps.event.addListenerOnce(this._mutant,"idle",function(){this._checkZoomLevels(),this._mutantIsReady=!0}.bind(this)),t._controlCorners.bottomright.style.marginBottom="20px",t._controlCorners.bottomleft.style.marginBottom="20px",this._reset(),this._update(),this._subLayers)for(var e in this._subLayers)this._subLayers[e].setMap(this._mutant)}.bind(this))},onRemove:function(t){L.GridLayer.prototype.onRemove.call(this,t),this._observer.disconnect(),t._container.removeChild(this._mutantContainer),google.maps.event.clearListeners(t,"idle"),google.maps.event.clearListeners(this._mutant,"idle"),t.off("viewreset",this._reset,this),t.off("move",this._update,this),t.off("moveend",this._update,this),t.off("zoomend",this._handleZoomAnim,this),t.off("resize",this._resize,this),t._controlCorners&&(t._controlCorners.bottomright.style.marginBottom="0em",t._controlCorners.bottomleft.style.marginBottom="0em")},getAttribution:function(){return this.options.attribution},setElementSize:function(t,e){t.style.width=e.x+"px",t.style.height=e.y+"px"},addGoogleLayer:function(t,e){return this._subLayers||(this._subLayers={}),this._GAPIPromise.then(function(){var i=new(0,google.maps[t])(e);return i.setMap(this._mutant),this._subLayers[t]=i,i}.bind(this))},removeGoogleLayer:function(t){var e=this._subLayers&&this._subLayers[t];e&&(e.setMap(null),delete this._subLayers[t])},_initMutantContainer:function(){this._mutantContainer||(this._mutantContainer=L.DomUtil.create("div","leaflet-google-mutant leaflet-top leaflet-left"),this._mutantContainer.id="_MutantContainer_"+L.Util.stamp(this._mutantContainer),this._mutantContainer.style.zIndex="800",this._mutantContainer.style.pointerEvents="none",L.DomEvent.off(this._mutantContainer)),this._map.getContainer().appendChild(this._mutantContainer),this.setOpacity(this.options.opacity),this.setElementSize(this._mutantContainer,this._map.getSize()),this._attachObserver(this._mutantContainer)},_initMutant:function(){if(this._ready&&this._mutantContainer)if(this._mutant)this._resize();else{this._mutantCenter=new google.maps.LatLng(0,0);var t=new google.maps.Map(this._mutantContainer,{center:this._mutantCenter,zoom:0,tilt:0,mapTypeId:this.options.type,disableDefaultUI:!0,keyboardShortcuts:!1,draggable:!1,disableDoubleClickZoom:!0,scrollwheel:!1,streetViewControl:!1,styles:this.options.styles||[],backgroundColor:"transparent"});this._mutant=t,google.maps.event.addListenerOnce(t,"idle",function(){for(var t=this._mutantContainer.querySelectorAll("a"),e=0;e<t.length;e++)t[e].style.pointerEvents="auto"}.bind(this)),this.fire("spawned",{mapObject:t})}},_attachObserver:function(t){this._observer||(this._observer=new MutationObserver(this._onMutations.bind(this))),this._observer.observe(t,{childList:!0,subtree:!0}),Array.prototype.forEach.call(t.querySelectorAll("img"),this._boundOnMutatedImage)},_onMutations:function(t){for(var e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.addedNodes.length;++n){var o=i.addedNodes[n];
5o instanceof HTMLImageElement?this._onMutatedImage(o):o instanceof HTMLElement&&(Array.prototype.forEach.call(o.querySelectorAll("img"),this._boundOnMutatedImage),"white"===o.style.backgroundColor&&L.DomUtil.remove(o),0===o.textContent.indexOf("For development purposes only")&&L.DomUtil.remove(o),Array.prototype.forEach.call(o.querySelectorAll('div[draggable=false][style*="text-align: center"]'),L.DomUtil.remove))}},_roadRegexp:/!1i(\d+)!2i(\d+)!3i(\d+)!/,_satRegexp:/x=(\d+)&y=(\d+)&z=(\d+)/,_staticRegExp:/StaticMapService\.GetMapImage/,_onMutatedImage:function(t){var e,i=t.src.match(this._roadRegexp),n=0;if(i?(e={z:i[1],x:i[2],y:i[3]},this._imagesPerTile>1&&(t.style.zIndex=1,n=1)):((i=t.src.match(this._satRegexp))&&(e={x:i[1],y:i[2],z:i[3]}),n=0),e){var o=this._tileCoordsToKey(e);t.style.position="absolute",t.style.visibility="hidden";var s=o+"/"+n;if(this._freshTiles[s]=t,s in this._tileCallbacks&&this._tileCallbacks[s])this._tileCallbacks[s].pop()(t),this._tileCallbacks[s].length||delete this._tileCallbacks[s];else if(this._tiles[o]){var a=this._tiles[o].el,r=0===n?a.firstChild:a.firstChild.nextSibling,l=this._clone(t);a.replaceChild(l,r)}}else t.src.match(this._staticRegExp)&&(t.style.visibility="hidden")},createTile:function(t,e){var i=this._tileCoordsToKey(t),n=L.DomUtil.create("div");n.dataset.pending=this._imagesPerTile,e=e.bind(this,null,n);for(var o=0;o<this._imagesPerTile;o++){var s=i+"/"+o;if(s in this._freshTiles){var a=this._freshTiles[s];n.appendChild(this._clone(a)),n.dataset.pending--}else this._tileCallbacks[s]=this._tileCallbacks[s]||[],this._tileCallbacks[s].push(function(t){return function(i){t.appendChild(this._clone(i)),t.dataset.pending--,parseInt(t.dataset.pending)||e()}.bind(this)}.bind(this)(n))}return parseInt(n.dataset.pending)||L.Util.requestAnimFrame(e),n},_clone:function(t){var e=t.cloneNode(!0);return e.style.visibility="visible",e},_checkZoomLevels:function(){var t=this._map.getZoom(),e=this._mutant.getZoom();t&&e&&(e!==t||e>this.options.maxNativeZoom)&&this._setMaxNativeZoom(e)},_setMaxNativeZoom:function(t){t!=this.options.maxNativeZoom&&(this.options.maxNativeZoom=t,this._resetView())},_reset:function(){this._initContainer()},_update:function(){if(this._mutant){var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e);var i=this._map.getZoom(),n=i!==Math.round(i),o=this._mutant.getZoom();n||i==o||(this._mutant.setZoom(i),this._mutantIsReady&&this._checkZoomLevels())}L.GridLayer.prototype._update.call(this)},_resize:function(){var t=this._map.getSize();this._mutantContainer.style.width===t.x&&this._mutantContainer.style.height===t.y||(this.setElementSize(this._mutantContainer,t),this._mutant&&google.maps.event.trigger(this._mutant,"resize"))},_handleZoomAnim:function(){if(!this._mutant)return;var t=this._map.getCenter(),e=new google.maps.LatLng(t.lat,t.lng);this._mutant.setCenter(e),this._mutant.setZoom(Math.round(this._map.getZoom()));const i=this._mutant.getZoom();for(let t of Object.keys(this._freshTiles)){i!=t.split(":")[2]&&delete this._freshTiles[t]}},_removeTile:function(t){if(this._mutant)return setTimeout(this._pruneTile.bind(this,t),1e3),L.GridLayer.prototype._removeTile.call(this,t)}
5,_getLargeGMapBound:function(t){const e=t.getSouthWest(),i=t.getNorthEast(),n=e.lat(),o=e.lng(),s=i.lat(),a=i.lng(),r=Math.abs(s-n),l=Math.abs(a-o);return L.latLngBounds([[n-r,o-l],[s+r,a+l]])},_pruneTile:function(t){var e=this._mutant.getZoom(),i=t.split(":")[2];const n=this._mutant.getBounds(),o=this._getLargeGMapBound(n);for(var s=0;s<this._imagesPerTile;s++){var a=t+"/"+s;if(a in this._freshTiles){var r=this._map&&this._keyToBounds(t);this._map&&r.overlaps(o)&&i==e||delete this._freshTiles[a]}}}}),L.gridLayer.googleMutant=function(t){return new L.GridLayer.GoogleMutant(t)},function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t.Leaflet=t.Leaflet||{},t.Leaflet.markercluster=t.Leaflet.markercluster||{}))}(this,(function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t}),this):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t}),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,o=this._nonPointGroup,s=this.options.chunkedLoading,a=this.options.chunkInterval,r=this.options.chunkProgress,l=t.length,h=0,d=!0;if(this._map){var u=(new Date).getTime(),c=L.bind((function(){for(var p=(new Date).getTime();l>h;h++){if(s&&0==h%200)if((new Date).getTime()-p>a)break;if((i=t[h])instanceof L.LayerGroup)d&&(t=t.slice(),d=!1),this._extractNonGroupLayers(i,t),l=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var _=i.__parent.getAllChildMarkers(),m=_[0]===i?_[1]:_[0];n.removeLayer(m)}}else o.addLayer(i),e||this.fire("layeradd",{layer:i})}r&&r(h,l,(new Date).getTime()-u),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(c,this.options.chunkDelay)}),this);c()}else for(var p=this._needsClustering;l>h;h++)(i=t[h])instanceof L.LayerGroup?(d&&(t=t.slice(),d=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||p.push(i):o.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,o=this._featureGroup,s=this._nonPointGroup,a=!0;if(!this._map){for(e=0;
vendor: 4,845 bytes, line 5
5n>e;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var r=t.slice(),l=n;for(e=0;l>e;e++)(i=r[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,r),l=r.length):this._unspiderfyLayer(i)}for(e=0;n>e;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),o.hasLayer(i)&&(o.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent}),this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,s=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),n=s.length-1;n>=0;n--){for(i=!0,o=a.length-1;o>=0;o--)if(a[o].layer===s[n]){i=!1;break}i&&t.call(e,s[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer((function(e){t.push(e)})),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer((function(i){L.stamp(i)===t&&(e=i)})),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).length-1;e>=0;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){"function"!=typeof e&&(e=function(){});var i=function(){!t._icon&&!t.__parent._icon||this._inZoomAnimation||(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",i,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",i,this),this.on("animationend",i,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;i>e;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;i>e;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());e>=o&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}}
vendor: 4,167 bytes, line 5
5,_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,s=this._featureGroup,a=this._map,r=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,d=h._markers;for(this._arraySplice(d,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<r));)e&&h._childCount<=1?(l=h._markers[0]===t?h._markers[1]:h._markers[0],n[h._zoom].removeObject(h,a.project(h._cLatLng,h._zoom)),o[h._zoom].addObject(l,a.project(l.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(l),l.__parent=h.__parent,h._icon&&(s.removeLayer(h),i||s.addLayer(l))):h._iconNeedsUpdate=!0,h=h.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=10>e?"small":100>e?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){for(var e=t.layer,i=e;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;o>=e;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,o=this._gridClusters,s=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());
vendor: 6,975 bytes, line 5
5for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=a;e--){i=this._map.project(t.getLatLng(),e);var r=o[e].getNearObject(i);if(r)return r._addChild(t),void(t.__parent=r);if(r=s[e].getNearObject(i)){var l=r.__parent;l&&this._removeLayer(r,!1);var h=new this._markerCluster(this,e,r,t);o[e].addObject(h,this._map.project(h._cLatLng,e)),r.__parent=h,t.__parent=h;var d=h;for(n=e-1;n>l._zoom;n--)d=new this._markerCluster(this,n,d),o[n].addObject(d,this._map.project(r.getLatLng(),n));return l._addChild(d),void this._removeFromGridUnclustered(r,e)}s[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}))},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),o=this._featureGroup,s=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,s,(function(s){var a,r=s._latlng,l=s._markers;for(n.contains(r)||(r=null),s._isSingleParent()&&t+1===e?(o.removeLayer(s),s._recursivelyAddChildrenToMap(null,e,n)):(s.clusterHide(),s._recursivelyAddChildrenToMap(r,e,n)),i=l.length-1;i>=0;i--)a=l[i],n.contains(a._latlng)||o.removeLayer(a)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),o.eachLayer((function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()})),this._topClusterLevel._recursively(n,t,e,(function(t){t._recursivelyRestoreChildPositions(e)})),this._ignoreMove=!1,this._enqueue((function(){this._topClusterLevel._recursively(n,t,s,(function(t){o.removeLayer(t),t.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue((function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()}))):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,o,e+1,i);var s=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue((function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(n,i,o,(function(t){t._recursivelyRemoveChildrenFromMap(n,o,e+1)}));s._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t);for(var n=this._markers.length-1;n>=0;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,o=n.getBoundsZoom(this._bounds),s=this._zoom+1,a=n.getZoom();i.length>0&&o>s;){s++;var r=[];for(e=0;e<i.length;e++)r=r.concat(i[e]._childClusters);i=r}o>
vendor: 10,768 bytes, line 5
5s?this._group._map.setView(this._latlng,s):a>=o?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,o=this._markers,s=this._childClusters,a=0,r=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)i=o[t]._latlng,this._bounds.extend(i),a+=i.lat,r+=i.lng;for(t=0;t<s.length;t++)(e=s[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,a+=i.lat*n,r+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/l,r/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,(function(t){var i,n,o=t._markers;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}),(function(t){var i,n,o=t._childClusters;for(i=o.length-1;i>=0;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,(function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),i),o._isSingleParent()&&i-1===n?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,i)):o.clusterHide(),o._addToMap()}))},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,(function(t){t.clusterShow()}))},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,(function(n){if(e!==n._zoom)for(var o=n._markers.length-1;o>=0;o--){var s=n._markers[o];i.contains(s._latlng)&&(t&&(s._backupLatlng=s.getLatLng(),s.setLatLng(t),s.clusterHide&&s.clusterHide()),n._group._featureGroup.addLayer(s))}}),(function(e){e._addToMap(t)}))},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;o>=0;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,s;this._recursively(t,e-1,i-1,(function(t){for(s=t._markers.length-1;s>=0;s--)o=t._markers[s],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}),(function(t){for(s=t._childClusters.length-1;s>=0;s--)o=t._childClusters[s],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}))},_recursively:function(t,e,i,n,o){var s,a,r=this._childClusters,l=this._zoom;if(l>=e&&(n&&n(this),o&&l===i&&o(this)),e>l||i>l)for(s=r.length-1;s>=0;s--)(a=r[s])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,i,n,o)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,s=o[n]=o[n]||{},a=s[i]=s[i]||[],r=L.Util.stamp(t);this._objectPoint[r]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),s=this._getCoord(e.y),a=this._grid,r=a[s]=a[s]||{},l=r[o]=r[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;n>i;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete r[o],!0},eachObject:function(t,e){var i,n,o,s,a,r,l=this._grid;for(i in l)for(n in a=l[i])for(o=0,s=(r=a[n]).length;s>o;o++)t.call(e,r[o])&&(o--,s--)},getNearObject:function(t){var e,i,n,o,s,a,r,l,h=this._getCoord(t.x),d=this._getCoord(t.y),u=this._objectPoint,c=this._sqCellSize,p=null;for(e=d-1;d+1>=e;e++)if(o=this._grid[e])for(i=h-1;h+1>=i;i++)if(s=o[i])for(n=0,a=s.length;a>n;n++)r=s[n],(c>(l=this._sqDist(u[L.Util.stamp(r)],t))||c>=l&&null===p)&&(c=l,p=r);return p},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,o,s=0,a=null,r=[];for(i=e.length-1;i>=0;i--)n=e[i],(o=this.getDistant(n,t))>0&&(r.push(n),o>s&&(s=o,a=n));return{maxPoint:a,newPoints:r}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,o=!1,s=!1,a=null,r=null,l=null,h=null,d=null,u=null;for(e=t.length-1;e>=0;e--){var c=t[e];(!1===i||c.lat>i)&&(a=c,i=c.lat),(!1===n||c.lat<n)&&(r=c,n=c.lat),(!1===o||c.lng>o)&&(l=c,o=c.lng),(!1===s||c.lng<s)&&(h=c,s=c.lng)}return n!==i?(u=r,d=a):(u=h,d=l),[].concat(this.buildConvexHull([u,d],t),this.buildConvexHull([d,u],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;e>=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,i):(i.y+=10,t=this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,s=this._2PI/t,a=[];for(o=Math.max(o,35),a.length=t,i=0;t>i;i++)n=this._circleStartAngle+i*s,a[i]=new L.Point(e.x+o*Math.cos(n),e.y+o*Math.sin(n))._round();return a},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,o=n*this._spiralLengthStart,s=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,r=0,l=[];for(l.length=t,i=t;i>=0;i--)t>i&&(l[i]=new L.Point(e.x+o*Math.cos(r),e.y+o*Math.sin(r))._round()),o+=a/(r+=s/o+5e-4*i);return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=s.length-1;e>=0;e--)t=s[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,s,a=this._group,r=a._map,l=a._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,i=0;i<t.length;i++)s=r.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,s],h),r.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setZIndexOffset&&n.setZIndexOffset(1e6),l.addLayer(n);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,s,a,r,l=this,h=this._group,d=h._map,u=h._featureGroup,c=this._latlng,p=d.latLngToLayerPoint(c),_=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),f=m.opacity;for(void 0===f&&(f=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),_?(m.opacity=0,m.className=(m.className||"")+" leaflet-cluster-spider-leg"):m.opacity=f,h._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],r=d.layerPointToLatLng(e[i]),o=new L.Polyline([c,r],m),d.addLayer(o),n._spiderLeg=o,_&&(a=(s=o._path).getTotalLength()+.1,s.style.strokeDasharray=a,s.style.strokeDashoffset=a),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),u.addLayer(n),n._setPos&&n._setPos(p);for(h._forceLayout(),h._animationStart(),i=t.length-1;i>=0;i--)r=d.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.clusterShow&&n.clusterShow(),_&&((s=(o=n._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:f}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout((function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})}),200)},_animationUnspiderfy:function(t){var e,i,n,o,s,a,r=this,l=this._group,h=l._map,d=l._featureGroup,u=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),c=this.getAllChildMarkers(null,!0),p=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=c.length-1;i>=0;i--)(e=c[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,a=!0,e._setPos&&(e._setPos(u),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&d.removeLayer(e),p&&(s=(o=(n=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=s,n.setStyle({opacity:0}
5)));l._ignoreMove=!1,setTimeout((function(){var t=0;for(i=c.length-1;i>=0;i--)(e=c[i])._spiderLeg&&t++;for(i=c.length-1;i>=0;i--)(e=c[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&d.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:r,markers:c})}),200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i})),
6/**
7 * @package     MapsPro Add-on for JReviews
8 * @author      ClickFWD LLC (https://www.jreviews.com)
9 * @copyright   Copyright (C) 2010-2025 ClickFWD LLC
10 * @license     GNU GPL version 3 or later
11 */
12jreviews.mapsProvider=jreviews.mapsProvider||{},jreviews.mapsProvider.providers=jreviews.mapsProvider.providers||{},jreviews.mapsProvider.providers.arcgis={geocoder:class{constructor(t,e){this.accessToken=t,this.settings=e,this.suggestions={},this.baseUrl="https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"}async geocode(t,e){let i=!1;const n=new URLSearchParams({SingleLine:t,f:"json",outFields:"Type,Addr_Type,City,Region,Postal,Country",maxLocations:1});this.settings.country&&n.set("sourceCountry",this.settings.country);try{const t=await fetch(`${this.baseUrl}/findAddressCandidates?${n}`),e=await t.json();e.candidates&&e.candidates.length&&(i=this.processCandidate(e.candidates[0]))}catch(t){console.error("ArcGIS geocode error:",t)}e(i)}async suggest(t,e){let i=[];const n=new URLSearchParams({text:t,f:"json",maxSuggestions:this.settings.limit||10});this.settings.country&&n.set("countryCode",this.settings.country);try{const e=await fetch(`${this.baseUrl}/suggest?${n}`),o=await e.json();o.suggestions&&o.suggestions.length&&o.suggestions.forEach((e=>{const n=this._formatSuggestion(e.text);i.push({value:e.text,label:e.text,ref:e.magicKey,term:t,primary:n.primary,secondary:n.secondary}),this.suggestions[e.magicKey]=e}))}catch(t){console.error("ArcGIS suggest error:",t)}e(i)}_formatSuggestion(t){const e=t.split(",").map((t=>t.trim()));return{primary:e[0]||t,secondary:e.slice(1).join(", "),label:t}}async reverse(t,e,i){let n;const o=new URLSearchParams({location:`${t.lng},${t.lat}`,f:"json",outFields:"Type,Addr_Type,City,Region,Postal,Country"});try{const t=await fetch(`${this.baseUrl}/reverseGeocode?${o}`),e=await t.json();e&&!e.error&&(n={name:e.address.Match_addr,center:L.latLng(e.location.y,e.location.x),bounds:L.latLngBounds(L.latLng(e.location.y,e.location.x),L.latLng(e.location.y,e.location.x)),formatted_address:e.address.Match_addr,type:this._mapType(e.address.Type,e.address.Addr_Type),properties:{city:e.address.City,state:e.address.Region,postal_code:e.address.Postal,country:e.address.CountryCode}})}catch(t){console.error("ArcGIS reverse error:",t)}i(n)}async getPlaceInfo(t){const e=new URLSearchParams({magicKey:t,f:"json",outFields:"Type,Addr_Type,City,Region,Postal,Country"});try{const t=await fetch(`${this.baseUrl}/findAddressCandidates?${e}`),i=await t.json();if(i.candidates&&i.candidates.length)return this.processCandidate(i.candidates[0])}catch(t){console.error("ArcGIS getPlaceInfo error:",t)}const i=this.suggestions[t];return i?{name:i.text,formatted_address:i.text,type:"address",properties:{}}:null}processCandidate(t){if(!t)return null;const e=t.location,i=t.extent,n=t.attributes||{};return{name:t.address,bounds:i&&!["POI","PointAddress","StreetAddress","StreetInt","StreetAddressExt","DistanceMarker","StreetMidBlock","StreetName","Postal","PostalExt"].includes(n.Addr_Type)?L.latLngBounds(L.latLng(i.ymin,i.xmin),L.latLng(i.ymax,i.xmax)):null,center:L.latLng(e.y,e.x),formatted_address:t.address,type:this._mapType(n.Type,n.Addr_Type),properties:{city:n.City||"",state:n.Region||"",postal_code:n.Postal||"",country:n.Country||""}}}_mapAddrType(t){if(!t)return"address";return{POI:"POI",PointAddress:"PointAddress",StreetAddress:"StreetAddress",StreetInt:"StreetAddress",StreetAddressExt:"StreetAddress",DistanceMarker:"StreetAddress",StreetMidBlock:"StreetAddress",StreetName:"StreetName",Postal:"Postal",PostalExt:"Postal",Locality:"Locality",City:"City",Subregi
12on:"Subregion",Territory:"Territory",Region:"region",Country:"country"}[t]||"address"}_mapType(t,e){if(t&&t.trim()){const e={Mountain:"mountain",Peak:"peak",Volcano:"volcano",Lake:"water",River:"water",Stream:"water",Bay:"water",Beach:"beach",Island:"island",Park:"park","National Park":"national_park",Forest:"park",Tower:"landmark",Monument:"landmark",Museum:"museum","Historical Site":"landmark",Bridge:"landmark",Airport:"poi",Stadium:"poi"}[t];if(e)return e}return this._mapAddrType(e)}}},
13/**
14 * @package     MapsPro Add-on for JReviews
15 * @author      ClickFWD LLC (https://www.jreviews.com)
16 * @copyright   Copyright (C) 2010-2018 ClickFWD LLC
17 * @license     GNU GPL version 3 or later
18 */
19jreviews.mapsProvider=jreviews.mapsProvider||{},jreviews.mapsProvider.providers=jreviews.mapsProvider.providers||{},jreviews.mapsProvider.providers.google={map:class{constructor(t,e){this.settings=e,this.streetviewSvc=null,this.map={},this.markers=[],this.panoCanvas=document.querySelector("."+e.streetview_canvas)}addBaseLayer(t,e){this.map=t,this.markers=e;const i=this.settings.styles;let n={};for(const t in this.settings.layers)n[t]=L.gridLayer.googleMutant({styles:i,maxZoom:20,clickableIcons:!1,type:t});n[this.settings.defaultLayer].addTo(t);let o={};for(var s in this.settings.layers)o[this.settings.layers[s]]=n[s];if(this.settings.streetview){let t=new google.maps.StreetViewPanorama(this.panoCanvas),e=new google.maps.StreetViewService;this.panorama=t,this.streetviewService=e,this.googleMapObject=null,this.streetviewRepositioned=!1,this.streetviewInitialized=!1,document.addEventListener("jr-reposition-streetview",(()=>{if(this.googleMapObject){this.streetviewInitialized||(this.googleMapObject.setOptions({streetViewControl:!0}),this.googleMapObject.setStreetView(this.panorama),this.streetviewInitialized=!0);let t=[];if(this.map.eachLayer((e=>{e instanceof L.Marker&&t.push(e)})),1===t.length){let e=t[0].getLatLng(),i={lat:e.lat,lng:e.lng};this.checkStreetViewExists(i,this.streetviewService,this.panorama)}else if(1===this.markers.length){let t=this.markers[0].payload,e={lat:t.lat,lng:t.lng};this.checkStreetViewExists(e,this.streetviewService,this.panorama)}else{let t=this.map.getCenter(),e={lat:t.lat,lng:t.lng};this.checkStreetViewExists(e,this.streetviewService,this.panorama)}}this.streetviewRepositioned=!0}));for(const i in n)n[i].on("spawned",(i=>{this.googleMapObject=i.mapObject,this.loadStreetview(i.mapObject,t,e),document.dispatchEvent(new CustomEvent("jr-reposition-streetview"))}))}Object.keys(o).length>1&&this.settings.showLayers&&L.control.layers(o,{},{collapsed:!0}).addTo(t)}loadStreetview(t,e,i){const n=!this.streetviewInitialized;this.streetviewInitialized=!0,n||(t.setOptions({streetViewControl:!0}),t.setStreetView(e),google.maps.event.addListenerOnce(t,"idle",(n=>{if(!this.streetviewRepositioned){var o=t.getCenter().toJSON();this.checkStreetViewExists(o,i,e)}})),1===this.markers.length&&this.markers[0].off("click").on("click",(t=>{let n=this.markers[0].payload;this.checkStreetViewExists({lat:n.lat,lng:n.lng},i,e)})),this.map.on("click",(t=>{this.checkStreetViewExists(t.latlng,i,e)})))}checkStreetViewExists(t,e,i){e.getPanoramaByLocation(t,50,((e,n)=>{if(n==google.maps.StreetViewStatus.OK){this.map.getContainer().style.width="49%",this.map.invalidateSize(!0),this.panoCanvas.classList.remove("jrHidden");var o=this.computeAngle(t,e.location.latLng.toJSON()),s={position:e.location.latLng,pov:{heading:o,pitch:10,zoom:1}};i.setOptions(s)}}))}computeAngle(t,e){let i=t.lat-e.lat,n=t.lng-e.lng,o=57.2957795*Math.atan2(n*Math.cos(.017453*t.lat),i);return this.wrapAngle(o)}wrapAngle(t){return t>=360?t-=360:t<0&&(t+=360),t}},geocoder:class{constructor(t,e){this.mapKey=t,this.settings=e,this.places=null,this.geocoderGoogle=null,this.suggestions={},this.cache={},this.locationSearchClient=window.jrMapsLocationSearch?.create({geocodingService:"google",googleApiKey:t,googleApiLocale:e.language||"en",countryRestriction:e.country||"",suggestionLimit:e.limit||10})||null,this.googleToJR={locality:"city",administrative_area_level_1:"state",postal_code:"postal_code",postal_code_prefix:"postal_code",country:"country"},this.componentForm={locality:"long_name",administrative_area_level_1:"long_name",country:"long_name",postal_code:"short_name",postal_code_prefix:"short_name"};const i=this.settings.loadInterval||100,n=this.settings.loadTimeout||5e3;let o=0;const s=()=>{window.google&&google.maps&&google.maps.places?google.maps.Geocoder&&(this.geocoderGoogle||=new google.maps.Geocoder):o<n?(o+=i,setTimeout(s,i)):console.warn("Google Maps API did not load in time")};s()}ensureLegacyPlacesService(){return!!this.places||!!(window.google&&google.maps&&google.maps.places&&google.maps.places.AutocompleteService)&&(this.places=new google.maps.places.AutocompleteService,!0)}geocode(t,e){if(!this.geocoderGoogle)return void e(!1);let i=!1;this.geocoderGoogle.geocode({address:t},((t,n)=>{"OK"==n&&t.length&&(i=this.processLocation(t[0])),e(i)}))}suggest(t,e){if(this.locationSearchClient||=window.jrMapsLocationSearch?.create({geocodingService:"google",googleApiKey:this.mapKey,googleApiLocale:this.settings.language||"en",countryRestriction:this.settings.country||"",suggestionLimit:this.settings.limit||10})||null,this.locationSearchClient)this.locationSearchClient.suggest(t).then((i=>{const n=i.map((e=>(this.suggestions[e.ref]=e,{value:e.label,label:e.label,ref:e.ref,term:t,primary:e.primary,secondary:e.secondary,apiGeneration:e.apiGeneration})));this.cache[t]=n,e(n)})).catch((t=>{console.error("Google Places suggestions failed:",t),e([],{cacheable:!1})}
19));else if(this.ensureLegacyPlacesService())if(t in this.cache)e(this.cache[t]);else{let i=[],n={input:t,limit:this.settings.limit||10,componentRestrictions:{}};this.settings.country&&(n.componentRestrictions.country=this.settings.country),this.places.getPlacePredictions(n,((n,o)=>{"OK"===o&&n.length&&n.forEach((e=>{const n=e.structured_formatting?.main_text||e.description,o=e.structured_formatting?.secondary_text||"";i.push({value:e.description,label:e.description,ref:e.place_id,term:t,primary:n,secondary:o}),this.suggestions[e.place_id]=e})),this.cache[t]=i,e(i)}))}else e([])}reverse(t,e,i){if(!this.geocoderGoogle)return void i(void 0);let n;var o=new google.maps.LatLng(t.lat,t.lng);this.geocoderGoogle.geocode({latLng:o},((t,e)=>{e==google.maps.GeocoderStatus.OK&&t.length?n=this.processLocation(t[0]):console.log("Geocoding failed: "+e),i(n)}))}getPlaceInfo(t){const e=this.suggestions[t];return this.locationSearchClient&&e?this.locationSearchClient.resolve(e).then((t=>{if(!t)return null;const i=t.bounds,n=L.latLng(t.lat,t.lng),o=4===i?.length?L.latLngBounds(L.latLng(i[3],i[2]),L.latLng(i[1],i[0])):L.latLngBounds(n,n);return{name:t.formatted_address||t.label,bounds:o,center:n,formatted_address:t.formatted_address||t.label,type:e.data?.types?.[0]||"address",properties:{city:t.components?.city,state:t.components?.state,postal_code:t.components?.postalcode,country:t.components?.country}}})).catch((t=>(console.error("Google Places details failed:",t),null))):new Promise((e=>{this.geocoderGoogle?this.geocoderGoogle.geocode({placeId:t},((t,i)=>{if("OK"===i){const i=this.processLocation(t[0]);e(i)}else e(null)})):e(null)}))}processLocation(t){const e=L.latLngBounds(L.latLng(t.geometry.viewport.getNorthEast().lat(),t.geometry.viewport.getNorthEast().lng()),L.latLng(t.geometry.viewport.getSouthWest
19().lat(),t.geometry.viewport.getSouthWest().lng())),i=L.latLng(t.geometry.location.toJSON());let n={name:t.formatted_address,bounds:e,center:i,formatted_address:t.formatted_address,type:t.types&&t.types.length?t.types.includes("natural_feature")?"natural_feature":t.types.includes("landmark")?"landmark":t.types.includes("museum")?"museum":t.types[0]:"address",properties:{}};for(let e=0;e<t.address_components.length;e++){let i=t.address_components[e].types[0];this.componentForm[i]&&(n.properties[this.googleToJR[i]]=t.address_components[e][this.componentForm[i]])}return n}}},
20/**
21 * @package     MapsPro Add-on for JReviews
22 * @author      ClickFWD LLC (https://www.jreviews.com)
23 * @copyright   Copyright (C) 2010-2018 ClickFWD LLC
24 * @license     GNU GPL version 3 or later
25 */
26jreviews.mapsProvider=jreviews.mapsProvider||{},jreviews.mapsProvider.providers=jreviews.mapsProvider.providers||{},jreviews.mapsProvider.providers.mapbox={map:class{constructor(t,e){this.accessToken=t,this.settings=e}addBaseLayer(t){let e={};for(const t in this.settings.layers){let i,n={minZoom:1,maxZoom:20,attribution:this.settings.layerAttribution[t],token:this.accessToken};t.match("/v4/")?i=t:(i=t.replace("@2x","")+"@2x",n.tileSize=512,n.zoomOffset=-1),e[t]=L.tileLayer(i+"?access_token={token}",n)}e[this.settings.defaultLayer].addTo(t);let i={};for(var n in this.settings.layers)i[this.settings.layers[n]]=e[n];Object.keys(i).length>1&&this.settings.showLayers&&L.control.layers(i,{},{collapsed:!0}).addTo(t)}},geocoder:class{constructor(t,e){this.accessToken=t,this.settings=e,this.sessionToken=null,this.suggestions=[]}generateSessionToken(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}async geocode(t,e){let i=!1;const n=new URLSearchParams({q:t,access_token:this.accessToken,limit:1});this.settings.country&&n.set("country",this.settings.country);try{const t=await fetch(`https://api.mapbox.com/search/searchbox/v1/forward?${n}`),e=await t.json();e.features&&e.features.length&&(i=this.processLocation(e.features[0]))}catch(t){console.error("Mapbox geocode error:",t)}e(i)}async suggest(t,e){let i=[];this.sessionToken||(this.sessionToken=this.generateSessionToken());const n=new URLSearchParams({q:t,access_token:this.accessToken,session_token:this.sessionToken,limit:this.settings.limit||10});this.settings.country&&n.set("country",this.settings.country);const o=this.settings.language?this.settings.language.split("_")[0]:null;o&&["de","it","en","nl","fr","ca","he","fi","ko","pl","sl","tl","cs","hu","ka","lv","pt","sr","zh","is","ja","nb","sk","th"].includes(o)&&n.set("language",o);try{const e=await fetch(`https://api.mapbox.com/search/searchbox/v1/suggest?${n}`),o=await e.json();o.suggestions&&o.suggestions.length&&o.suggestions.forEach((e=>{const n=this._formatSuggestion(e);i.push({value:e.full_address||e.name,label:n.label,ref:e.mapbox_id,term:t,primary:n.primary,secondary:n.secondary}),this.suggestions[e.mapbox_id]=e}))}catch(t){console.error("Mapbox suggest error:",t)}e(i)}_formatSuggestion(t){let e=t.name||t.full_address;const i=[],n=t.context?.place?.name;n&&!e.includes(n)&&(e=`${e}, ${n}`),t.poi_category&&t.poi_category.length?i.push(t.poi_category[0]):t.feature_type&&"address"!==t.feature_type&&i.push(t.feature_type);const o=t.context?.region?.name;o&&!e.includes(o)&&i.push(o);const s=t.context?.country?.name;s&&!e.includes(s)&&i.push(s);const a=i.join(", ");return{primary:e,secondary:a,label:a?`${e}, ${a}`:e}}async reverse(t,e,i){let n;const o=new URLSearchParams({longitude:t.lng,latitude:t.lat,access_token:this.accessToken});try{const t=await fetch(`https://api.mapbox.com/search/searchbox/v1/reverse?${o}`),e=await t.json();e.features&&e.features.length&&(n=this.processLocation(e.features[0]))}catch(t){console.error("Mapbox reverse error:",t)}i(n)}async getPlaceInfo(t){const e=new URLSearchParams({access_token:this.accessToken,session_token:this.sessionToken||""});try{const i=await fetch(`https://api.mapbox.com/search/searchbox/v1/retrieve/${t}?${e}`),n=await i.json();if(this.sessionToken=null,n.features&&n.features.length)return this.processLocation(n.features[0])}catch(t){console.error("Mapbox retrieve error:",t)}const i=this.suggestions[t];return i?{name:i.full_address||i.name,formatted_address:i.full_address||i.name,type:i.feature_type||"address",properties:{city:i.context?.place?.name,state:i.context?.regi
26on?.name,postal_code:i.context?.postcode?.name,country:i.context?.country?.name}}:null}processLocation(t){const e=t.geometry.coordinates,i=t.properties;return{name:i.full_address||i.name,bounds:t.bbox?L.latLngBounds(L.latLng(t.bbox[1],t.bbox[0]),L.latLng(t.bbox[3],t.bbox[2])):null,center:L.latLng(e[1],e[0]),formatted_address:i.full_address||i.name,type:i.feature_type||"address",poi_category:i.poi_category||null,properties:{city:i.context?.place?.name,state:i.context?.region?.name,postal_code:i.context?.postcode?.name,country:i.context?.country?.name}}}}},
27/**
28 * @package     MapsPro Add-on for JReviews
29 * @author      ClickFWD LLC (https://www.jreviews.com)
30 * @copyright   Copyright (C) 2010-2018 ClickFWD LLC
31 * @license     GNU GPL version 3 or later
32 */
33jreviews.mapsProvider=jreviews.mapsProvider||{},jreviews.mapsProvider.providers=jreviews.mapsProvider.providers||{},jreviews.mapsProvider.providers.nominatim={geocoder:class{constructor(t,e){this.settings=e,this.geocoder=this.loadGeocoder(),this.suggestions=[],this.rateLimited=!1}loadGeocoder(){let t={geocodingQueryParams:{limit:this.settings.limit}};return this.settings.country&&(t.geocodingQueryParams.countrycodes=this.settings.country),this.settings.language&&(t.geocodingQueryParams["accept-language"]=this.settings.language.split("_")[0]),L.Control.Geocoder.nominatim(t)}geocode(t,e){let i=!1;this.geocoder.geocode(t,(t=>{t.length&&(i=this.processLocation(t[0])),e(i)}))}suggest(t,e){let i=[];const n=this.geocoder.options.geocodingQueryParams.limit;this.rateLimited?this.geocoder.options.geocodingQueryParams.limit=1:this.geocoder.options.geocodingQueryParams.limit=10,this.geocoder.geocode(t,(o=>{this.geocoder.options.geocodingQueryParams.limit=n,o.length?o.forEach((e=>{const n=e.properties||{},o=this._formatSuggestion(e.name,n);i.push({value:e.name,label:o.label,ref:e.name,term:t,primary:o.primary,secondary:o.secondary}),this.suggestions[e.name]=e})):this.rateLimited||(console.warn("Nominatim: No results returned, possibly rate limited. Falling back to 1 result per request."),this.rateLimited=!0),e(i)}))}_formatSuggestion(t,e){let i=t.split(",").map((t=>t.trim()))[0]||t;const n=[],o=e.address?.county;o&&!i.includes(o)&&(i=`${i}, ${o}`);const s=e.type||e.addresstype;s&&!["yes","house","residential","building","address","apartments","detached","terrace"].includes(s)&&n.push(s);const a=e.address?.state;a&&!i.includes(a)&&n.push(a);const r=e.address?.country;r&&!i.includes(r)&&n.push(r);const l=n.join(", ");return{primary:i,secondary:l,label:l?`${i}, ${l}`:i}}reverse(t,e,i){let n;this.geocoder.reverse(t,e,(t=>{if(t.length){var e=t[0];n=this.processLocation(e)}i(n)}))}getPlaceInfo(t){const e=this.suggestions[t];return e?Promise.resolve(this.processLocation(e)):Promise.resolve(null)}_getLocationType(t){return t.class&&["tourism","amenity","shop","leisure","historic","sport","office"].includes(t.class)?"poi":t.addresstype?t.addresstype:t.type||t.osm_type||"address"}processLocation(t){if(!t)return null;const e=t.properties?.address||{};return{name:t.name,bounds:t.bbox,center:t.center,formatted_address:t.name,type:this._getLocationType(t.properties||{}),properties:{city:e.city,state:e.state,postal_code:e.postcode,country:e.country}}}}},
34/**
35 * @package     MapsPro Add-on for JReviews
36 * @author      ClickFWD LLC (https://www.jreviews.com)
37 * @copyright   Copyright (C) 2010-2018 ClickFWD LLC
38 * @license     GNU GPL version 3 or later
39 */
40jreviews.mapsProvider=jreviews.mapsProvider||{},jreviews.mapsProvider.providers=jreviews.mapsProvider.providers||{},jreviews.mapsProvider.providers.openstreetmap={map:class{constructor(t,e){this.settings=e}addBaseLayer(t){let e={};for(const t in this.settings.layers){let i=19,n=19;t.includes("opentopomap.org")?(i=15,n=15):t.includes("tile.openstreetmap.org")&&(i=19,n=19),e[t]=L.tileLayer(t,{minZoom:1,maxZoom:i,maxNativeZoom:n,detectRetina:!0,attribution:this.settings.layerAttribution[t]})}e[this.settings.defaultLayer].addTo(t);let i={};for(var n in this.settings.layers)i[this.settings.layers[n]]=e[n];Object.keys(i).length>1&&this.settings.showLayers&&L.control.layers(i,{},{collapsed:!0}).addTo(t)}}},
41/**
42 * @package     MapsPro Add-on for JReviews
43 * @author      ClickFWD LLC (https://www.jreviews.com)
44 * @copyright   Copyright (C) 2010-2025 ClickFWD LLC
45 * @license     GNU GPL version 3 or later
46 */
47jreviews.mapsProvider=jreviews.mapsProvider||{},jreviews.mapsProvider.providers=jreviews.mapsProvider.providers||{},jreviews.mapsProvider.providers.photon={geocoder:class{constructor(t,e){this.settings=e,this.geocoder=this.loadGeocoder(),this.suggestions=[]}loadGeocoder(){let t={geocodingQueryParams:{limit:this.settings.limit}};return this.settings.language&&(t.geocodingQueryParams.lang=this.settings.language.split("_")[0]),L.Control.Geocoder.photon(t)}geocode(t,e){let i=!1;this.geocoder.geocode(t,(t=>{t.length&&(i=this.processLocation(t[0])),e(i)}))}suggest(t,e){let i=[];this.geocoder.geocode(t,(n=>
47{n.length&&n.forEach((e=>{const n=e.properties||{},o=this._formatSuggestion(e.name,n),s=`${n.osm_type}_${n.osm_id}`;i.push({value:e.name,label:o.label,ref:s,term:t,primary:o.primary,secondary:o.secondary}),this.suggestions[s]=e})),e(i)}))}_formatSuggestion(t,e){let i=t;const n=[],o=e.county;o&&!t.includes(o)&&(i=`${i}, ${o}`);const s=e.osm_value||e.type;s&&!["yes","house","residential","building","address","apartments","detached","terrace"].includes(s)&&n.push(s);const a=e.state;a&&!t.includes(a)&&n.push(a);const r=e.country;r&&!t.includes(r)&&n.push(r);const l=n.join(", "),h=[i];return l&&h.push(l),{primary:i,secondary:l,label:h.join(", ")}}reverse(t,e,i){let n;this.geocoder.reverse(t,e,(t=>{if(t.length){var e=t[0];n=this.processLocation(e)}i(n)}))}getPlaceInfo(t){const e=this.suggestions[t];return e?Promise.resolve(this.processLocation(e)):Promise.resolve(null)}_getLocationType(t){return t.osm_key&&["tourism","amenity","shop","leisure","historic","sport"].includes(t.osm_key)?"poi":"natural"===t.osm_key&&t.osm_value?t.osm_value:t.type||t.osm_type||"address"}processLocation(t){if(!t)return null;const e=t.properties||{};return{name:t.name,bounds:t.bbox,center:t.center,formatted_address:t.name,type:this._getLocationType(e),properties:{city:e.city||e.town||e.village,state:e.state,postal_code:e.postcode,country:e.country}}}}},
48/**
49 * @package     MapsPro Add-on for JReviews
50 * @author      ClickFWD LLC (https://www.jreviews.com)
51 * @copyright   Copyright (C) 2010-2018 ClickFWD LLC
52 * @license     GNU GPL version 3 or later
53 */
54jreviews.mapsProvider=jreviews.mapsProvider||{},jreviews.mapsProvider.getInstance=class{constructor(t,e){this.suggestCache={},this.geocodeCache={},this.settings=Object.assign({controls:{},geocoder:{limit:10,language:"",country:null}},e),this.mapProvider=new jreviews.mapsProvider.providers[t.maps].map(t.mapKey,this.settings),this.geocoderProvider=new jreviews.mapsProvider.providers[t.geocoder].geocoder(t.geocoderKey,this.settings.geocoder)}map(t,e){let i=L.map(t,{zoomControl:this.settings.controls.zoomControl,scrollWheelZoom:!1,dragging:!L.Browser.mobile,tap:!L.Browser.mobile});return i.attributionControl.setPrefix(""),this.settings.controls.scaleControl&&L.control.scale().addTo(i),this.mapProvider.addBaseLayer(i,e),i}geocode(t,e){t in this.geocodeCache?e(this.geocodeCache[t]):this.geocoderProvider&&this.geocoderProvider.geocode(t,(i=>{this.geocodeCache[t]=i,e(i)}))}suggest(t,e){t in this.suggestCache?e(this.suggestCache[t]):this.geocoderProvider&&this.geocoderProvider.suggest(t,((i,n={})=>{!1!==n.cacheable&&(this.suggestCache[t]=i),e(i)}))}reverse(t,e,i){this.geocoderProvider&&this.geocoderProvider.reverse(t,e,(t=>{i(t)}))}getPlaceInfo(t){return new Promise((e=>{if(this.geocoderProvider){e(this.geocoderProvider.getPlaceInfo(t))}}))}},
55/**
56 * @package     MapsPro Add-on for JReviews
57 * @author      ClickFWD LLC (https://www.jreviews.com)
58 * @copyright   Copyright (C) 2010-2020 ClickFWD LLC
59 * @license     GNU GPL version 3 or later
60 */
61function(t,e){if("undefined"!=typeof jreviews){var i,n,o,s,a=t("div.jr-page");jreviews.maps=jreviews.maps||{},jreviews.maps.__api_loadfn={},jreviews.maps.__api_loaded=!1,jreviews.maps.__api_callback_fn={},jreviews.maps.loadAPI=function(t,e){jreviews.maps.__api_loadfn[t]=setInterval((function(){jreviews.maps.__api_callback_fn[t]=e,jreviews.maps.__api_loaded&&(clearInterval(jreviews.maps.__api_loadfn[t]),"function"==typeof jreviews.maps.__api_callback_fn[t]&&jreviews.maps.__api_callback_fn[t]())}),50)},jreviews.maps.startup=function(){if(jreviews.maps.__api_loadfn.loadAPI=setInterval((function(){typeof L!==e&&(jreviews.maps.__api_loaded=!0,clearInterval(jreviews.maps.__api_loadfn.loadAPI))}),50),jreviews.maps.fields!=e){if(a=a.length>0?a:t("div.jr-page"),i=t(".jr-map-canvas")||[],n=a.find("form.jr-form-adv-search-module")||[],o=a.find("#jr-form-adv-search")||[],s=jreviews.maps.fields!=e&&""!==jreviews.maps.fields.proximity&&n.length?n.find("."+jreviews.maps.fields.proximity):[],n.length&&jreviews.maps.fields!=e){var r={},l=jreviews.maps.fields.lat,h=jreviews.maps.fields.lon;
61if(window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,(function(t,e,i){r[e]=i})),l in r&&h in r||window.location.href.replace(/([^\/:]+):([^\/]*)/gi,(function(t,e,i){r[e]=i})),l in r&&h in r){var d=r[l],u=r[h],c=n.find('[name="data[Field][Listing]['+l+']"]'),p=n.find('[name="data[Field][Listing]['+h+']"]');c.length||p.length||n.append('<input type="hidden" name="data[Field][Listing]['+l+']" value="'+d+'" />').append('<input type="hidden" name="data[Field][Listing]['+h+']" value="'+u+'" />')}}a.on("jrListingFieldsLoaded","#jr-form-listing",(function(){var e=a.find("#jr-form-listing");if(jreviews.maps.fields.address.address1&&(jreviews.maps.autocomplete&&""!=jreviews.maps.fields.proximity&&jreviews.maps.loadAPI("proximity",(function(){e.jrProximitySearch({fields:jreviews.maps.fields,autocomplete:!0,autofill:!0,addlatlngonlookup:!0,targetField:jreviews.maps.fields.address.address1,loadonfocus:!1})})),jreviews.maps.loadAPI("geolocation",(function(){e.find("."+jreviews.maps.fields.address.address1).jrGeolocation({autofill:!0})}))),jreviews.maps.fields.mapit){var i=t(this);i.find("."+jreviews.maps.fields.mapit).length&&jreviews.maps.loadAPI("mapit",(function(){i.jrMapIt({fields:jreviews.maps.fields,route:{name:"maps_dialog",action:"dialog"}})}))}})),(i.length>0||s.length>0||o.length>0)&&jreviews.maps.loadAPI("init",jreviews.maps.init),jreviews.maps.loadAPI("init-ajax",(function(){var e,i,n=t("#jr-map-column .jr-map-canvas");t(document).on("jreviews-onBeforeAjaxUpdate",(function(t){n.length&&n.data("jrMaps")&&null!==i&&(i=n.detach().jrMaps("destroy"))})),t(document).on("jreviews-onAfterAjaxUpdate",(function(n,o){var s=document.querySelector("#jr-map-column .jr-map-canvas");i&&null!==s?(s.parentNode.replaceChild(i[0],s),e&&e.abort(),(e=jreviews.dispatch({method:"get",type:"json",controller:"maps_payload",action:"payload",data:{responseKey:s.dataset.responseKey,ids:s.dataset.ids}})).done((t=>{i.jrMaps({mapData:t})}))):jreviews.maps.loadMaps(t(s))}))}))}},jreviews.maps.init=function(){if(jreviews.maps.loadMaps(i),jreviews.maps.fields.proximity){if(s.length){var e=jreviews.maps.autocomplete;
61n.jrProximitySearch({fields:jreviews.maps.fields,autocomplete:e,autofill:!1,addlatlngonlookup:!0}),s.jrGeolocation({lat_input_name:jreviews.maps.fields.lat,lon_input_name:jreviews.maps.fields.lon})}a.on("jrSearchFormLoaded","#jr-form-adv-search",(function(){var e=t(this),i=e.find("."+jreviews.maps.fields.proximity);i.length&&(jreviews.maps.loadAPI("adv-search",(function(){var t=jreviews.maps.autocomplete;e.jrProximitySearch({fields:jreviews.maps.fields,autocomplete:t,autofill:!1,addlatlngonlookup:!0})})),i.jrGeolocation({lat_input_name:jreviews.maps.fields.lat,lon_input_name:jreviews.maps.fields.lon}))}))}},jreviews.maps.loadingPayload={},jreviews.maps.loadMaps=function(e,i){e.each((function(){var e=t(this),n=(e.data("referrer"),e.data("responseKey")),o=e.data("ids")||"";n?(jreviews.maps.loadingPayload[n]&&jreviews.maps.loadingPayload[n].abort(),jreviews.maps.loadingPayload[n]=jreviews.dispatch({method:"get",type:"json",controller:"maps_payload",action:"payload",data:{responseKey:n,ids:o}}),jreviews.maps.loadingPayload[n].done((function(t){e.jrMaps({mapData:t})})).always((function(){"function"==typeof i&&i()}))):(e.jrMaps(),"function"==typeof i&&i())}))},jreviews.maps.autoFillAddress=function(t,i){if(1!=Object.keys(jreviews.maps.fields.address).length&&i.properties!=e){for(var n in jreviews.maps.fields.address)if("address1"!==n){var o=t.find('input[name="data[Field][Listing]['+jreviews.maps.fields.address[n]+']"]');o.length&&o.val("").trigger("change")}var s,a=t.find('input[name="data[Field][Listing]['+jreviews.maps.fields.address.address1+']"]'),r=[];["city","state","postal_code","country"].forEach((e=>{var n=i.properties[e];s=t.find('input[name="data[Field][Listing]['+jreviews.maps.fields.address[e]+']"]'),n&&s.length&&"text"==s.prop("type")&&s.val(n),s.length&&("text"===s.prop("type")?r.push(!0):r.push(!1))})),0!==r.length&&!1!==r.every(Boolean)&&"text"==a.prop("type")&&a.val(i.formatted_address)}},jreviews.addOnload("maps-startup",jreviews.maps.startup)}}(jQuery),function(t){t.fn.jrGeolocation=function(e){var i=t.extend({lat_input_name:"jr_latitude",lon_input_name:"jr_longitude",autofill:!1,persistent:!1,onAfter:function(){}},e),n=new jreviews.mapsProvider.getInstance(jreviews.maps.service);var o=function(e,o){if(e.wrap('<div class="jrAddressGeolocation"></div>'),null!=navigator.geolocation&&null===document.location.host.match("localhost")){var a=t('<a href="javascript:;" class="jr-geolocation jrGeolocation jrIconOnly"><span class="jrIconLocate"></span></a>');e.after(a),a.on("click",(function(a){a.preventDefault();var r=t(this).find("span");r.switchClass("jrIconLocate","jrLoadingSmall",0);var l=function(){r.switchClass("jrLoadingSmall","jrIconLocate",0),e.removeClass("ui-autocomplete-loading")};navigator.geolocation.getCurrentPosition((function(t){var a=L.latLng(t.coords.latitude,t.coords.longitude);n.reverse(a,15e6,(t=>{l(),t?(i.onAfter(t),s(o,t.center),e.val(t.formatted_address),!0===i.autofill&&jreviews.maps.autoFillAddress(o,t)):console.log("Reverse geocoding failed")}))}),(function(e){console.log(e),e.code==e.POSITION_UNAVAILABLE&&t.jrAlert(jreviews.__t("GEOMAPS_GEOLOCATION_POSITION_UNAVAILABLE")),l()}),{maximumAge:6e4,timeout:1e4})}))}},s=function(t,e){if(void 0!==t){var n=t.find('input[name="data[Field][Listing]['+i.lat_input_name+']"]'),o=t.find('input[name="data[Field][Listing]['+i.lon_input_name+']"]');n.length||o.length?(n.val(e.lat),o.val(e.lng)):t.append('<input type="hidden" name="data[Field][Listing]['+i.lat_input_name+']" value="'+e.lat+'" />').append('<input type="hidden" name="data[Field][Listing]['+i.lon_input_name+']" value="'+e.lng+'" />'),t.trigger("onLiveSearch")}};return this.each((function(){var e=t(this),i=e.parents("form");return e.data("jrGeolocation")||(o(e,i),e.data("jrGeolocation",!0)),this}))}}(jQuery),function(t){t.widget("jreviews.jrProximitySearch",{provider:null,options:{fields:{},autocomplete:!1,autofill:!1,addlatlngonlookup:!1,loadonfocus:!0,targetField:null,delay:600,minLength:3},proximityField:null,page:null,_create:function(e){var i=this;t.extend(!0,i.options,{geocoder:{limit:10,country:jreviews.maps.autocomplete_country,language:jreviews.locale}},e),i.options.targetField=i.options.targetField||i.options.fields.proximity,i.page=i.element,i.searchButton=i.page.find(".jr-search"),i.provider=new jreviews.mapsProvider.getInstance(jreviews.maps.service,i.options)},_init:function(){var e=this,i=e.page.find("."+e.options.targetField),n=i.closest("form");function o(t,i){"Enter"==t.key&&(t.preventDefault(),i.removeClass("ui-autocomplete-loading").data("enterKey",!0)),n.data("pause",!0).data("pause-livesearch",!0);var o=e._getInputVal(i);""!=o&&o.length>=e.options.minLength&&e.provider.geocode(o,(function(o){o&&(e._addCoordinateInputs(o.center),e.searchButton.prop("disabled",!1),n.data("pause",!1),"Enter"==t.key?(i.val(o.formatted_address),delete e.lastTerm,delete e.lastSuggestions):!0!==n.data("abort-livesearch")&&("Tab"!=t.key&&"focusout"!=t.type||i.val(o.formatted_address),n.data("pause-livesearch",!1).trigger("onLiveSearch")))}))}if(e.page.on("focus","."+e.options.targetField,(function(t){e.searchButton.prop("disabled",!0)})).on("blur","."+e.options.targetField,(function(t){""==e._getInputVal(i)?e._clearCoordinates():e._hasCoordinates()||o(t,i),n.data("pause",!1).data("abort-livesearch",!1).data("pause-livesearch",!1),i.removeClass("ui-autocomplete-loading")})).on("keyup","."+e.options.targetField,(function(t){n.data("pause-livesearch",!0),""==e._getInputVal(i)&&e._clearCoordinates()})),!0===e.options.autocomplete){if("text"==i.prop("type"))i.autocomplete({minLength:e.options.minLength,delay:e.options.delay,open:function(){var e=t(this).data("uiAutocomplete").menu.element;e.addClass("jrAutoComplete"),e.css("display","block"),n.data("pause-livesearch",!0)},source:function(t,o){var s=t.term;if(i.data("enterKey"))o([]);else if(void 0===e.lastTerm||e.lastTerm!==s)try{e.provider.suggest(s,(function(t){try{t&&t.length&&e.provider.getPlaceInfo(t[0].ref).then((t=>{t&&e.options.addlatlngonlookup&&(e._addCoordinateInputs(t.center),n.data("pause-livesearch",!1),e.page.trigger("onLiveSearch")),e.searchButton.prop("disabled",!1)})).catch((function(t){console.error("getPlaceInfo error:",t)}))}catch(t){console.error("Autocomplete callback error:",t)}i.removeClass("ui-autocomplete-loading"),e.lastTerm=s,e.lastSuggestions=t||[],o(t||[])}))}catch(t){console.error("Suggest error:",t),i.removeClass("ui-autocomplete-loading"),o([])}else o(e.lastSuggestions)},select:function(t,n){e.provider.getPlaceInfo(n.item.ref).then((t=>
61{t&&(e._addCoordinateInputs(t.center),!0===e.options.autofill&&jreviews.maps.autoFillAddress(e.page,t),e.page.trigger("onLiveSearch"))})),i.removeClass("ui-autocomplete-loading")}}).on("focus",(function(t){i.data("enterKey",!1),e.options.loadonfocus&&""!=i.val()&&void 0!==e.lastTerm&&i.autocomplete("search",e.lastTerm)})).on("keyup",(function(e){"Enter"==e.key||"Tab"==e.key?(i.autocomplete("close"),o(e,t(this))):i.data("enterKey",!1)})).on("blur",(function(t){n.data("pause",!1).data("pause-livesearch",!1)})),i.data("ui-autocomplete")&&(i.data("ui-autocomplete")._renderItem=function(e,i){let n;return i.primary?(n='<div class="jr-autocomplete-item"><span class="jr-autocomplete-primary">'+i.primary+"</span>",i.secondary&&(n+='<span class="jr-autocomplete-secondary">'+i.secondary+"</span>"),n+="</div>"):n=i.label,t("<li></li>").data("item.autocomplete",i).append("<a>"+n+"</a>").appendTo(e)},"google"==jreviews.maps.service.geocoder&&(i.data("ui-autocomplete")._renderMenu=function(e,i){var n=this;t.each(i,(function(t,i){void 0!==i.value&&n._renderItemData(e,i)})),e[0].style.paddingBottom=0,e.append(`<li id="jr-geocoding-attribution" class="fwd-sticky fwd-bg-white fwd-bottom-0 fwd-py-3 fwd-text-right ui-fixed"><img style="width: 144px;" src="${jreviews.maps.geocoder_attribution_img}" /></li>`)})),!("placeholder"in document.createElement("input"))||""!=i.attr("placeholder")&&void 0!==i.attr("placeholder")||i.attr("placeholder",jreviews.__t("GEOMAPS_ENTER_LOCATION"))}else{var s=0;e.page.on("keyup","."+e.options.targetField,(function(t){"Enter"==t.key||"Tab"==t.key?(n.data("abort-livesearch",!0),o(t,i)):jreviews._searchIgnore.includes(t.key)||""===i.val()||(n.data("pause",!0).data("abort-livesearch",!1).data("pause-livesearch",!0),clearTimeout(s),s=setTimeout((function(){o(t,i)}),e.options.delay))}))}document.addEventListener("mousedown",(function(t){e.searchButton.prop("disabled",!1)}))},_getInputVal:function(t){var e,i;return"select-one"==t.prop("type")?(e=t.find("option:selected"),i=""!==t.val()?e.text():null):i=t.val(),i},_addCoordinateInputs:function(e){var i=this,n=i.options.fields.lat,o=i.options.fields.lon,s='input[name="data[Field][Listing]['+n+']"]',a='input[name="data[Field][Listing]['+o+']"]',r=t('<input type="hidden" name="data[Field][Listing]['+n+']" />'),l=t('<input type="hidden" name="data[Field][Listing]['+o+']" />');
610==i.page.find(s).length?(r.appendTo(i.page),l.appendTo(i.page)):(r=i.page.find(s),l=i.page.find(a)),r.val(e.lat),l.val(e.lng),i.searchButton.prop("disabled",!1)},_hasCoordinates:function(){var t=this,e='input[name="data[Field][Listing]['+t.options.fields.lat+']"]',i='input[name="data[Field][Listing]['+t.options.fields.lon+']"]';return!(!this.page.find(e).val()||!t.page.find(i).val())},_clearCoordinates:function(){var t=this,e='input[name="data[Field][Listing]['+t.options.fields.lat+']"]',i='input[name="data[Field][Listing]['+t.options.fields.lon+']"]';t.page.find(e+","+i).val("")}})}(jQuery),function(t){t.widget("jreviews.jrMapIt",{map:null,provider:null,options:{route:{},controls:{zoomControl:!0,scrollWheelZoom:!0},width:"700px",zoom:15,lang:{mapit:jreviews.__t("GEOMAPS_MAPIT"),clear_coord:jreviews.__t("GEOMAPS_CLEAR_COORDINATES"),geocode_fail:jreviews.__t("GEOMAPS_CANNOT_GEOCODE")},fields:{},geocoder:{limit:10,country:jreviews.maps.autocomplete_country,language:jreviews.locale}},page:null,buttons:{},inputs:{},_create:function(e){var i=this;i.page=i.element,t.extend(i.options,e),i.buttons={map:t('<button class="jr-map-it jrButton">').html('<span class="jrIconPin"></span>'+i.options.lang.mapit),clearVal:t('<button class="jr-clear-latlng jrButton">').html('<span class="jrIconRemove"></span>'+i.options.lang.clear_coord)},i.inputs={lat:t('<input type="hidden" name="data[Field][Listing]['+i.options.fields.lat+']" >'),lon:t('<input type="hidden" name="data[Field][Listing]['+i.options.fields.lon+']" >')},i.provider=new jreviews.mapsProvider.getInstance(jreviews.maps.service,i.options)},_init:function(){var t=this,e=t.buttons,i=t.inputs;e.map.on("click",(function(e){e.preventDefault(),t.open()})),e.clearVal.on("click",(function(e){e.preventDefault(),t.page.find('input[name="data[Field][Listing]['+t.options.fields.lat+']"]').length&&(i.lon=t.page.find('input[name="data[Field][Listing]['+t.options.fields.lon+']"]'),i.lat=t.page.find('input[name="data[Field][Listing]['+t.options.fields.lat+']"]')),i.lat.attr("value",""),i.lon.attr("value",""),i.lat.val(""),i.lon.val("")}));var n=t.page.find("."+t.options.fields.mapit),o=n.closest(".jrAddressGeolocation");o.length?o.after(e.map,"&nbsp;",e.clearVal):n.after(e.map,"&nbsp;",e.clearVal)},open:function(){var e=this,i=e.inputs;0===e.page.find('input[name="data[Field][Listing]['+e.options.fields.lat+']"]').length?e.page.append(i.lat,i.lon):(i.lat=e.page.find('input[name="data[Field][Listing]['+e.options.fields.lat+']"]'),i.lon=e.page.find('input[name="data[Field][Listing]['+e.options.fields.lon+']"]'));var n=L.latLng(i.lat.val(),i.lon.val()),o=e.getAddress(e.page);""!==o&&jreviews.dispatch({method:"get",type:"html",controller:e.options.route.name,action:e.options.route.action}).done((s=>{var a={title:"",width:e.options.width,height:"auto",dialogClass:"jrDialog jrNoPadding",lightbox:!0,open:function(){var s=t(this),a=t(window).height();a>0&&a<500&&s.find(".jr-geomaps-map").css("height",a-100+"px"),""===i.lat.val()&&""===i.lon.val()?""!==o&&e.provider.geocode(o,(function(i){i?e._createMap(e.page,s,i.center):(s.dialog("close"),t.jrAlert(jreviews.__t("GEOMAPS_CANNOT_GEOCODE")))})):e._createMap(e.page,s,n)},close:function(){e.map&&map.off().remove()}};t.jrAlert(s,a)}))},getAddress:function(e){var i,n=this,o=[],s="";return t.each(n.options.fields.address,(function(t,n){var a,r=e.find("."+n),l=e.find(".jr-cat-select");if(i=r.prop("type"),"category"==n&&l.length>0){var h=l.last().find(":selected").text();h!==jreviews.__t("LISTING_SELECT_CAT")&&(s=h)}else if("parent_category"==n&&l.length>1){var d=l.last().prev().find(":selected").text();d!==jreviews.__t("LISTING_SELECT_CAT")&&(s=d)}else"select-one"==i||"select-multiple"==i?(a=r.find("option:selected").first(),s=""!==a.val()?a.text():null):s=r.val();null!=s&&""!==s&&"undefined"!=s&&o.push(s)})),0===e.find("."+n.options.fields.address.country).length&&void 0!==n.options.fields.default_country&&""!==n.options.fields.default_country&&o.push(n.options.fields.default_country),o.join(" ")},_createMap:function(t,e,i){var n,o=this,s=o.inputs,a=o.element,r=e.find(".jr-geomaps-map");a.data("mapData");
61o.map||(n=new jreviews.mapsProvider.getInstance(jreviews.maps.service,r.data("settings")),map=n.map(r[0])),map.setView(i,o.options.zoom);var l=L.marker(i,{draggable:!0}).addTo(map);s.lat.val(i.lat),s.lon.val(i.lng),map.on("load",(function(t){r.removeClass("jrMapLoading")})),l.on("dragend",(function(t){s.lat.val(l.getLatLng().lat),s.lon.val(l.getLatLng().lng)}))}})}(jQuery),function(t){t.widget("jreviews.jrMaps",{provider:null,options:{zoom:13,radius:10,radiusStyle:{color:"#FF0000",opacity:0,weight:2,fillColor:"transparent",fillOpacity:0},positionStyle:{fillOpacity:.8,fillColor:"#3387fb",strokeOpacity:1,strokeColor:"#2669c5",strokeWeight:3,scale:10},container_class:"jr-page",resize_class:"jr-map-resize",streetview_canvas:"jr-streetview-canvas",scroller:!1,cluster:{disableClusteringAtZoom:14,spiderfyOnMaxZoom:!1,maxClusterRadius:40},showmap:!1,geocoder:{limit:10,country:jreviews.maps.autocomplete_country,language:jreviews.locale}},_scale:null,_domain:null,_icons:{},_markersArr:[],_getZoomForType:function(t,e){var i={mountain:13,peak:13,volcano:13,hill:14,lake:12,river:11,stream:14,waterfall:15,forest:11,park:13,nature_reserve:12,national_park:10,beach:14,island:12,bay:11,ocean:8,airport:14,stadium:15,golf_course:14,zoo:14,theme_park:13,campground:14,ski_resort:13};if(e&&Array.isArray(e))for(var n=0;n<e.length;n++)if(i[e[n]])return i[e[n]];if(void 0===t)return 12;var o=t.match(/administrative_area_level_(\d+)/);if(o){var s=parseInt(o[1]);if(1===s)return 7;if(2===s)return 9;if(3===s)return 12;if(s>=4)return 14}return{country:5,continent:5,region:7,state:7,province:7,Territory:7,county:9,district:9,Subregion:9,city:12,locality:12,town:12,village:12,place:12,City:12,Locality:12,municipality:12,neighborhood:14,suburb:14,residential:14,colloquial_area:14,sublocality:14,sublocality_level_1:14,sublocality_level_2:14,quarter:14,borough:14,natural_feature:14,natural:14,peak:14,mountain:14,volcano:14,water:14,beach:14,island:14,archipelago:14,park:15,national_park:15,state_park:15,postcode:16,postal_code:16,Postal:16,street:17,route:17,StreetName:17,intersection:17,poi:17,point_of_interest:17,establishment:17,landmark:17,tourist_attraction:15,museum:15,POI:17,food:17,restaurant:17,cafe:17,bar:17,bakery:17,meal_takeaway:17,store:17,shopping_mall:17,market:17,supermarket:17,convenience_store:17,health:17,hospital:17,doctor:17,pharmacy:17,dentist:17,entertainment:17,casino:17,movie_theater:17,night_club:17,bank:17,atm:17,gas_station:17,car_rental:17,parking:17,lodging:17,hotel:17,motel:17,transit_station:17,bus_station:17,train_station:17,subway_station:17,library:17,school:17,university:17,church:17,mosque:17,synagogue:17,place_of_worship:17,address:18,house:18,building:18,street_address:18,premise:18,subpremise:18,StreetAddress:18,PointAddress:18}[t]||12},_getTileLayerMaxZoom:function(t){var e=null;return t.eachLayer((function(t){if(t._url&&t.options){var i=t.options.maxZoom;i&&(!e||i<e)&&(e=i)}})),e||17},_setData:function(t,e,i){var n=this.element,o=n.data(t)||{};o[e]=i,n.data(t,o)},_bbox:null,_create:function(){var e=this,i=e.element,n=e.element.closest("."+e.options.container_class),o=e.element.siblings(".jr-map-loading-bar");i.data("mapData",this.options.mapData||{}),i.data("templates",{}),i.data("timers",{}),i.data("markers",{}),i.data("gicons",{}),i.data("services",{clustering:null}),i.data("states",{slideout:0,delayed:!1,initialized:!1,clustering:!1,pause:!1,poppedURL:!1,center:null}),e._setData("containers","page",n),e._setData("containers","infowindow",t('<div class="jr-infowindow-container">')),e._setData("containers","loadingBar",o),e._setData("containers","loadingBarIndicator",o.find(".jr-map-loading")),e._setData("containers","canvasColumn",n.find(".jr-map-canvas-col")),e._setData("containers","sidebarColumn",n.find(".jr-map-sidebar-col")),e._setData("containers","sidebarHeader",n.find(".jr-map-sidebar-header")),e._setData("containers","sidebar",n.find(".jr-map-listings")),e._setData("containers","slideout",n.find(".jr-map-listing-slideout")),e._setData("containers","filters",n.find(".jr-map-filters")),e._setData("containers","attachments",n.find('.jr-attachments [data-file-type="kml"]')),e._setData("elements","sortList",n.find(".jr-map-order")),e.options=t.extend(e.options,i.data("settings")),e._setData("states","clustering",!!e.options.clustering),e._setData("dimensions","defaultWidth",e.element.width()),e._setData("dimensions","canvasRightColumn",i.data("c
61ontainers").canvasColumn.css("marginRight")),e._useSlideout();var s=i.data("mapData");for(var a in s.icons)e._icons[a]=s.icons[a];if(e._bbox=i.data("page")?i.data("page").bbox:null,e._compileJavascriptTemplates(),!1===e._checkForTabs())if(!0===e.options.showmap){var r,l=e.element.closest(".jr-map");l.length&&(r=t('<div class="jrMapCanvas"></div>').width(l.width()+"px").height(l.height()+"px")),e._setData("states","delayed",!0),n.find("."+e.options.resize_class).hide(),e._isModuleOrMapview()?(l.hide().before(r),i.removeClass("jrMapCanvas")):i.removeClass("jrMapLoading").addClass("jrMapCanvas");var h=t('<button class="jrMapClick2Show jrButton">'+jreviews.__t("GEOMAPS_SHOW_MAP_BTN")+"</button>").on("click",(function(t){t.preventDefault(),e._setData("states","delayed",!1),n.find("."+e.options.resize_class).show(),h.remove(),e._isModuleOrMapview()?(r.remove(),l.show()):i.removeClass("jrMapCanvas"),e._init()}));e._isModuleOrMapview()?r.append(h):i.append(h)}else i.addClass("jrMapLoading");0===jreviews.mobi&&t(window).resize((function(){i.is(":visible")&&void 0!==i.data("containers")&&(i.data("containers").filters.hide(),e._useSlideout())})),e.provider=new jreviews.mapsProvider.getInstance(jreviews.maps.service,e.options)},_init:function(){var t,e=this,i=e.element;if(e._bindRouting(),!0!==i.data("states").delayed){if(e._bbox){var n=e._bbox.split(",");o=L.latLngBounds([n[0],n[1]],[n[2],n[3]])}else var o=e._getWorldBounds();i.data("bounds",o),i.data("containers").infowindow.insertAfter(i),t=e.provider.map(i[0],e._markersArr),i.data("map",t),e._setMinZoom(t),t.on("load",(function(t){e._bbox=null,e._isModuleOrMapview()?e._updateMap():i[0].dispatchEvent(new CustomEvent("jr-map-initialized",{bubbles:!0,detail:{type:e._isList()?"list":"detail",referrer:i.data("referrer")}}))})),i.on("jrOnAfterMapInitialized",(function(t){console.log("Map initialized ..."),i.closest(".jr-map, .jr-page").removeClass("jrMapLoading")})),t.on("click dblclick resize zoomstart movestart",(function(t){e._closeInfowindow(),e._hideSlideout()})),t.on("zoomend dragend",(function(t){e._isModuleOrMapview()&&!0===i.data("states").initialized&&!1===e._paused()&&(console.log("Map moved/zoomed ..."),e._updateMap())})),i.data("states").clustering&&e._setData("services","clustering",L.markerClusterGroup(e.options.cluster));var s=i.data("mapData");(e._isDetail()||e._isList())&&s.count>0&&(e._setData("states","initialized",!0),e._addMarkers(s)),1==s.count&&(e._isDetail()||e._isList())?(t.fitBounds(L.featureGroup(e._markersArr).getBounds()),t.setZoom(e.options.zoom)):e._isList()?t.fitBounds(L.featureGroup(e._markersArr).getBounds()):(t.fitBounds(o),t.setZoom(t.getZoom()-1)),e._addKmlLayer(),e._bindMapResize(),e._bindListPageItems(),e._isList()&&e._bindMapScroller(),(e._isMapview()||e._isModule())&&(e._bindListingOrder(),e._createAddressBar(),e._isMapview()&&e._bindBrowserHistory()),e._bindAdvancedSearch()}},_useSlideout:function(){var e=this,i=e.element,n=0;if(!t.isEmptyObject(i.data())){if((1==jreviews.mobi||i.data("containers").page.width()<1.5*parseInt(i.data("containers").sidebarColumn.width()))&&(n=1),1==n)i.data("containers").sidebarColumn.hide(),i.data("containers").canvasColumn.css({width:"100%","margin-right":0});else{var o=i.data("containers").sidebarColumn.width()>0?i.data("containers").page.width()-i.data("containers").sidebarColumn.width()-10:i.data("containers").page.width();i.data("containers").sidebarColumn.show(),i.data("containers").canvasColumn.css({width:o+"px","margin-right":i.data("dimensions").canvasRightColumn})}i.data("states").initialized&&e._resizeMap(),e._setData("states","slideout",n),i.data("containers").filters.width(i.data("containers").canvasColumn.width())}},_getWorldBounds:function(){return L.latLngBounds([-85,-180],[85,180])},_isModuleOrMapview:function(){return!(!this._isModule()&&!this._isMapview())},_isModule:function(){return this.element.data("referrer").match(/module-[a-z-0-9]+/)},_isMapview:function(){return this.element.data("referrer").match(/mapview-[a-z-0-9]+/)},_isDetail:function(){return"detail"==this.element.data("referrer")},_isList:function(){return"list"==this.element.data("referrer")},_compileJavascriptTemplates:function(){var t=this,e=t.element;t._isModuleOrMapview()&&null==e.data("templates").sidebar&&t._setData("templates","sidebar",Hogan.compile(t._getTemplateMarkup("jr-map-listings-tmpl"))),t._isModuleOrMapview()&&null==e.data("templates").slideout&&t._setData("templates","slideout",Hogan.compile(t._getTemplateMarkup("jr-map-slideout-tmpl"))),null==e.data("templates")["infowindow-sm"]&&t._setData("templates","infowindow-sm",Hogan.compile(t._getTemplateMarkup("jr-map-infowindow-tmpl"))),null==e.data("templates")["infowindow-lg"]&&t._setData("templates","infowindow-lg",Hogan.compile(t._getTemplateMarkup("jr-map-infowindow-large-tmpl")))},_getTemplateMarkup:function(e){var i=t("#"+e);if(!i.length)return"";var n=i.html().trim(),o=i.data("relpath").replace(/\//g,"\\/"),s=new RegExp(o+"{{","g");return(n=(n=(n=(n=(n=n.replace(/{{&amp;/g,"{{&")).replace(/\/%7B%7B/gi,"{{")).replace(/%7B%7B/gi,"{{")).replace(/%7D%7D/gi,"}}")).replace(s,"{{")).replaceAll("router-link","a").replaceAll('to="','href="').replaceAll("jr-img","img").replaceAll("data-src","src")},_checkForTabs:function(){var e,i=this,n=i.element,o=i.element.closest(".
61jr-tabs"),s=i.element.closest(".tab-pane"),a=i.element.closest(".wk-slideshow");if(!o.length&&!s.length&&!a.length)return!1;if(i._setData("states","delayed",!0),o.length){if(activeTabID=o.find("li.ui-tabs-active a").eq(0).attr("href").split("#")[1],activeTabID&&n.parents("#"+activeTabID).length&&!n.data("states").initialized)return i._setData("states","delayed",!1),!1;o.on("tabsactivate",(function(t,e){e.newPanel.attr("id")!=n.closest(".ui-tabs-panel").attr("id")||n.data("states").initialized||(i._setData("states","delayed",!1),i._init())}))}else if(s.length)setTimeout((function(){if(anchor=s.parent().prev("ul").find("li a").eq(0).attr("href"),(e=anchor?anchor.split("#")[1]:null)&&n.parents("#"+e).length&&!n.data("states").initialized)i._setData("states","delayed",!1),i._init();else{t('a[data-toggle="tab"]').one("shown.bs.tab",(function(t){i._setData("states","delayed",!1),i._init()}));var o=s.attr("id").match(/[\d]+$/);o&&t("#cbtabnav"+o+" a").one("click",(function(){i._setData("states","delayed",!1),i._init()}))}}),550);else if(a.length){n.parents("li").parent("ul").find("li");var r=a.find("ul.nav"),l=r.index(h),h=r.eq(l);h.on("click",(function(){n.data("states").initialized||(i._setData("states","delayed",!1),i._init())}))}return!0},_bindListingOrder:function(){var t=this;t.element.data("containers").page.on("change",".jr-map-order",(function(){t._updateMap()}))},_bindListPageItems:function(){var e=this,i=e.element,n=i.data("markers");void 0!==n&&i.data("containers").page.on("mouseover",'[data-map-lookup="1"]',(function(){var o=t(this).data("listingId"),s=n[o],a=i.data("infowindowMarker");s&&(void 0===a||void 0!==a&&a.id!==o)&&(e._closeInfowindow(),i.data("map").panTo(s.payload.latlng),s.fire("click"),e._toggleIcon(s,"_hover"))})).on("mouseout",'[data-map-lookup="1"]',(function(){var i=t(this).data("listingId"),o=n[i];o&&e._toggleIcon(o,"")}))},_bindMapResize:function(){var t=this,e=t.element,i=e.data("containers"),n=e.data("dimensions");void 0!==i&&void 0!==n&&i.page.on("click","."+t.options.resize_class+" a.jr-map-large, ."+t.options.resize_class+" a.jr-map-small",(function(){var e,o;i.page.find("."+t.options.resize_class+" a").toggle();var s=t.element.width()<=n.defaultWidth;e=s?600:n.defaultWidth,o=s?500:n.defaultWidth,t.element.closest("#jr-map-column").animate({width:e},"fast"),t.element.siblings().not(".jr-infowindow-container").animate({width:e},"fast"),t.element.animate({width:e,height:o},"fast",(function(){t._resizeMap()}))}))},_bindMapScroller:function(){var e=this.element,i=e.data("containers").page;if(this.options.scroller){var n=i.find("div#jr-map-results-wrapper"),o=i.find("div#jr-map-column"),s=i.find("div#jr-listing-column");o.width(e.data("dimensions").defaultWidth);s.width();var a=n.offset().top,r=s.height()+a-n.height()-5;t(window).scroll((function(){var e=t(this).scrollTop();if(e>=a){n.addClass("fixed").removeClass("top bottom");var i=t(this).width()-(o.offset().left+n.outerWidth());n.css("right",i)}else n.addClass("top").removeClass("fixed bottom");e>=r&&n.addClass("bottom").removeClass("top fixed")}))}},_bindBrowserHistory:function(){var e=this,i=e.element,n=/([^&=]+)=?([^&]*)/g,o=function(t){return decodeURIComponent(t.replace(/\+/g," "))},s=i.data("elements").sortList,a=s?s.val():null;window.history.replaceState({jreviews_maps:!0,defaultSort:a},"",document.location.href),e.parseParams=function(e){var i,s={};if(e)for("?"==e.substr(0,1)&&(e=e.substr(1));i=n.exec(e);){var a=o(i[1]),r=o(i[2]);void 0!==s[a]?(t.isArray(s[a])||(s[a]=[s[a]]),s[a].push(r)):s[a]=r}return s},window.addEventListener("popstate",(function(t){var n=t.state;if(n&&n.jreviews_maps){e._setData("states","poppedURL",!0);var o=i.data("elements").sortList,s=e.parseParams(document.location.search);if(s.referrer=e.element.data("referrer"),o.length&&(s.order?o.val(s.order):n.defaultSort&&o.val(n.defaultSort)),""==document.location.search.replace("?tmpl=component",""))i.data("map").fitBounds(e._getWorldBounds()),e._clearMarkers(),e._setData("states","initialized",!1),e._updateMap();else{if(void 0!==s.bbox){var a=s.bbox.split(","),r=L.latLngBounds([a[0],a[1]],[a[2],a[3]]);i.data("map").fitBounds(r)}
61e._updateMap(s,!0)}}}))},_bindRouting:function(){if(this.options.directions){let t=document.querySelector(".jr-directions-address:not(.jr-ready)");if(t){t.classList.add("jr-ready");let e=t.querySelector(".jr-directions-destination");if(""!=e.value){let i=t.querySelector(".jr-directions-origin"),n=t.querySelector(".jr-directions-travelmode");t.querySelector(".jr-directions-swap").addEventListener("click",(t=>{[e.value,i.value]=[i.value,e.value]})),t.classList.remove("jrHidden"),t.querySelector(".jr-directions-submit").addEventListener("click",(t=>{let o=`https://www.google.com/maps/dir/?api=1&origin=${i.value}&destination=${e.value}&travelmode=${n.value}`;window.open(o)}))}}}},_addMarkers:function(e){var i=this,n=i.element,o=e.payload,s=[],a=n.data("map");i._scale=e.scale,i._domain=e.domain,i._domain_rel=e.domain_rel,i._markersArr=[],t.each(o,(function(t,e){if(void 0===(o=n.data("markers")[e.id])){var o=i._createMarker(e);i._setData("markers",e.id,o),i._markersArr.push(o)}0==n.data("states").clustering?o.addTo(a):s.push(o)})),s.length&&(n.data("services").clustering.addLayers(s),a.addLayer(n.data("services").clustering)),i._hideOutofBoundsMarkers(o)},_hideOutofBoundsMarkers:function(e){var i=this.element,n={},o=[];t.each(e,(function(t,e){n[e.id]=!0})),t.each(i.data("markers"),(function(t,e){void 0===n[e.id]&&(i.data("states").clustering?o.push(e):e.remove())})),o.length&&i.data("services").clustering.removeLayers(o)},_updateMap:function(e){var i=this,n=i.element,o=n.data("map"),s=o.getBounds();if(i._closeInfowindow(),i._hideSlideout(),n.data("containers").sidebarColumn.unbind("mouseover"),null==s||i._paused())i._unpause();else{e=e||i._processSearchParams(s);var a=n.data("containers").loadingBarIndicator;if(i._isModuleOrMapview()){n.data("timers").updatingLoadingBar&&clearInterval(n.data("timers").updatingLoadingBar),a.width(0),n.data("containers").loadingBar.removeClass("jrHidden");var r=setInterval((function(){a.width()+15<a.parent("div").width()&&a.css("width",a.width()+15)}),500);i._setData("timers","updatingLoadingBar",r)}"object"==typeof i._loadingPayload&&i._loadingPayload.abort(),i._loadingPayload=jreviews.dispatch({method:"get",type:"json",controller:"maps_payload",action:"payload",data:e}),i._loadingPayload.done((function(e){for(var s in i._closeInfowindow(),a.width(0),i._setData("states","poppedURL",!1),i._isModuleOrMapview()&&void 0!==n.data("timers").updatingLoadingBar&&clearInterval(n.data("timers").updatingLoadingBar),i._updateMapResultsCount(e.count,e.payload.length),e.icons)void 0===i._icons[s]&&(i._icons[s]=e.icons[s]);i._addMarkers(e),i._renderSidebarListings(n.data("templates").sidebar,i._addListingTemplateFunctions(e));var r=n.data("markers");n.data("containers").sidebar.on("click",".jr-listing-location",(function(e){e.preventDefault();var n=t(this).data("id");i._setCenterZoom(o,r[n].payload.latlng,15,!1),setTimeout((function(){i._loadInfoWindow(r[n])}),200)})).on("mouseover",".jr-listing-thumbnail",(function(){var e=t(this).data("id");i._loadInfoWindow(r[e])})).on("mouseout",".jr-listing-thumbnail",(function(){i._closeInfowindow()})),0==n.data("states").initialized&&((e.fitBounds||!e.fitBounds&&null==e.center)&&e.count>0&&(i._pause(),o.fitBounds(L.featureGroup(i._markersArr).getBounds()),setTimeout((function(){i._unpause()}),600)),i._isDetail()||1==e.count?i._setCenterZoom(o,{lat:e.payload[0].lat,lng:e.payload[0].lng},i.options.zoom):e.center&&(e.setDefaultCenter?o.setView(e.center,e.zoom):i._setCenterRadius(o,e.center,i.options.radius,e.positionMarker),i._unpause())),i._isModuleOrMapview()&&n.data("containers").loadingBar.addClass("jrHidden"),0==n.data("states").initialized&&(n.trigger("jrOnAfterMapInitialized"),n[0].dispatchEvent(new CustomEvent("jr-map-initialized",{bubbles:!0,detail:{type:i._isMapview()?"mapview":"module",referrer:n.data("referrer")}}))),n.trigger("jrOnAfterMapUpdate"),i._setData("states","initialized",!0)}))}},_processSearchParams:function(e){var i=this,n=i.element,o=(n.data("map"),n.data("states").initialized),s=e.getSouthWest
61(),a=e.getNorthEast(),r=s.lat,l=s.lng,h=a.lat,d=a.lng,u=r.toFixed(4)+","+l.toFixed(4)+","+h.toFixed(4)+","+d.toFixed(4),c=n.data("elements").sortList.val(),p=n.data("containers").filters.find("form :input").not('[name^="text-jr"]'),_=[];if(!0===o&&(p.length&&(p=p.filter((function(){return""!=this.value})),_=t(p.serializeArray()).map((function(t,e){return e.name=e.name.replace(/data\[Field\]\[Listing\]\[(\w+)\]/,"$1"),e.name=e.name.replace(/data\[(\w+)\]/,"$1"),"categories"==e.name&&(e.name="cat"),e})).get()),_.push({name:"bbox",value:u})),_.push({name:"order",value:c}),!0===n.data("states").radiusSearch&&(_.push({name:"jr_radius",value:i.options.radius}),_.push({name:jreviews.maps.fields.lat,value:n.data("states").currentPosition.lat.toFixed(4)}),_.push({name:jreviews.maps.fields.lon,value:n.data("states").currentPosition.lng.toFixed(4)})),i._isMapview()&&1==o&&!0!==n.data("states").poppedURL){var m=decodeURIComponent(window.location.href.split("://")[0]+"://"+document.domain+window.location.pathname+"?"+t.param(_));window.history.pushState({jreviews_maps:!0,url:m},null,m)}return _.push({name:"init",value:!1===o?1:0}),_.push({name:"referrer",value:n.data("referrer")}),void 0!==n.data("page")&&t.map(n.data("page"),(function(e,i){"object"==typeof e?t.map(e,(function(t,e){_.push({name:"mapPage["+i+"]["+e+"]",value:t})})):_.push({name:"mapPage["+i+"]",value:e})})),_},_addListingTemplateFunctions:function(t){var e=this;function i(t){return"http"==t.substr(0,4)?t:e._domain+"/"+t}function n(t){return"http"==t.substr(0,4)?t:e._domain_rel+"/"+t}return t.ownerCreatedBlock=function(){return this.owner||this.created},t.titleUrl=function(){return n(this.url)},t.ownerUrl=function(){return n(this.url)},t.catUrl=function(){return n(this.url)},t.thumbSrc=function(){return i(this.imageUrl)},t.avatarSrc=function(){return!/<[a-z][\s\S]*>/i.test(this.avatar)&&("//"==this.avatar.substr(0,2)?this.avatar:i(this.avatar))},t.avatar=function(){return console.log(this.avatar),!!/<[a-z][\s\S]*>/i.test(this.avatar)&&this.avatar},t.ratingStars=function(){return(this.rating/e._scale*100).toFixed(2)+"%"},t.ratingValue=function(){return this.rating.toFixed(1)},t.favoriteClass=function(){return"favored"==this.favorite?"jrIconUnfavorite":"jrIconFavorite"},t.favoriteLang=function(){return"favored"==this.favorite?jreviews.__t("FAVORITE_REMOVE"):jreviews.__t("FAVORITE_ADD")},t},_renderSidebarListings:function(t,e){var i=this.element.data("containers").sidebar;i.length&&i.html(t.render(e))},_updateMapResultsCount:function(t,e){var i=this.element,n=i.data("containers").page;n.find(".jr-map-results-total").html(t),n.find(".jr-map-results-current").html(e),i.data("containers").sidebarHeader.show()},_clearMarkers:function(){var e=this.element,i=e.data("markers");Object.keys(i).length&&(e.data("states").clustering?e.data("services").clustering.clearLayers():t.each(i,(function(t,e){e.remove()})),e.data("markers",{}))},_createMarker:function(t){var e=this,i=e.element,n=[t.lat,t.lng],o=e._createIcon(t),s=L.marker(n,{icon:o,alt:t.title,zIndexOffset:1==t.featured?100:0});return i.data("bounds",i.data("bounds").extend(n)),o.data&&o.data.shadow&&s.setShadow(o.data.shadow),s.icon_name=t.icon,s.id=t.id,s.payload=t,s.payload.latlng=n,s.on("click",(function(t){e._isModuleOrMapview()?e._displayListing(s):e._loadInfoWindow(s)})),s.on("mouseover",(function(t){e._toggleIcon(s,"_hover")})),s.on("mouseout",(function(t){e._toggleIcon(s,"")})),s},_toggleIcon:function(t,e){var i=this,n=t.icon_name;if(1===t.payload.featured&&n+"_featured"+e in i._icons&&(n+="_featured"),void 0!==t&&n+e in i._icons){i._icons[n+e].url=i._icons[n+e].url.replace("{index}",t.payload.index);var o=i._createCustomIcon(i._icons[n+e]);t.setIcon(o)}},_createIcon:function(t){var e,i=this,n=i.element,o=t.icon,s=(t.index,n.data("gicons"));if(s.length&&void 0!==s[o]&&"numbered"!==o)return s[o];if(void 0===i._icons[o]&&(o="default"),1===t.featured&&o+"_featured"in i._icons&&(o+="_featured"),"custom"===i._icons[o].type)e=i._createCustomIcon(i._icons[o]);else e=i._createDefaultIcon(i._icons[o]);return i._setData("gicons",o,e),e},_createCustomIcon:function(t){return L.icon({iconUrl:t.url,iconSize:t.size,shadowSize:[0,0],iconAnchor:[t.size[0]/2,t.size[1]]})},_createDefaultIcon:function(t){return L.icon({iconUrl:t.url,iconSize:t.size,shadowSize:[0,0],iconAnchor:[t.size[0]/2,t.size[1]]})},_bindAdvancedSearch:function(){var e=this,i=e.element,n=i.data("c
61ontainers").page,o=n.find(".jr-map-show-filters"),s=n.find(".jr-form-map-search");if(s.length){s.jreviewsFields({page_setup:!0,recallValues:!0,referrer:"adv_search_module"});var a=i.data("containers").filters.detach().appendTo("body");s.find(".jr-update").on("click",(function(t){t.preventDefault(),e._updateMap(),a.hide()})),s.find(":input").on("change",(function(t){t.preventDefault(),e._updateMap()})).on("keypress",(function(t){if(13==t.which)return t.preventDefault(),!1})),o.on("click",(function(t){t.preventDefault();var e=n.find(".jr-map-header"),i=e.offset();i.top+=e.outerHeight(),a.css("position","absolute"),a.css(i),a.toggle(),s.jrApplyFieldOptionLayout()})),t("body").on("click",(function(e){0==t(e.target).closest(".jr-map-show-filters").length&&a.hide()})),a.on("click",(function(t){t.stopPropagation()}))}},_createAddressBar:function(){var e=this,i=e.element.data("map"),n=e.element.closest(".jr-map").find(".jr-map-search"),o=n.find(".jr-location"),s=e.element.closest(".jr-map").find(".jr-radius");if(e.options.search&&n){var a=t.extend({},jreviews.maps.fields,{proximity:"jr-location"});n.find("."+a.proximity).jrGeolocation({onAfter:function(t){e._setCenterRadius(i,{lat:t.center.lat,lng:t.center.lng},e.options.radius),o.val(t.name)}}),o.attr("placeholder","placeholder"in document.createElement("input")?jreviews.__t("GEOMAPS_ENTER_LOCATION"):""),jreviews.maps.autocomplete&&(o.autocomplete({minLength:3,delay:650,open:function(){t(this).data("uiAutocomplete").menu.element.addClass("jrAutoComplete")},source:function(t,i){var n=t.term.replace(/,(\S)/g,", $1"),s=o.data("uiAutocomplete");if(void 0!==e._lastTerm&&e._lastTerm===n)return i(e._lastSuggestions||[]),void(e._lastSuggestions&&e._lastSuggestions.length&&s.menu.element.css("display","block"));e.provider.suggest(n,(function(t){e._lastTerm=n,e._lastSuggestions=t||[],i(t||[]),t&&t.length&&s.menu.element.css("display","block")}))},select:function(t,n){e.provider.getPlaceInfo(n.item.ref).then((t=>{var n=e._getZoomForType(t.type,t.poi_category);console.log("[DEBUG] Location info:",t),console.log("[DEBUG] Type:",t.type,"POI Category:",t.poi_category),console.log("[DEBUG] Calculated zoom for type:",n);var o=e._getTileLayerMaxZoom(i);o&&n>o&&(n=o),console.log("[DEBUG] Final zoom:",n),t.center&&i.setView(t.center,n)}))}}).on("focus",(function(){""!=t(this).val()&&t(this).autocomplete("search",t(this).val())})).on("keypress",(function(e){13==e.which?(t(this).autocomplete("disable"),n.find(".jr-map-search-btn").trigger("click"),e.preventDefault()):t(this).autocomplete("enable")})),o.data("ui-autocomplete")&&(o.data("ui-autocomplete")._renderItem=function(e,i){let n;return i.primary?(n='<div class="jr-autocomplete-item"><span class="jr-autocomplete-primary">'+i.primary+"</span>",i.secondary&&(n+='<span class="jr-autocomplete-secondary">'+i.secondary+"</span>"),n+="</div>"):n=i.label,t("<li></li>").data("item.autocomplete",i).append("<a>"+n+"</a>").appendTo(e)})),n.on("click",".jr-map-search-btn",(function(t){t.preventDefault();var o=n.find("input").val().replace(/,(\S)/g,", $1");if(""===o)return!1;e.provider.geocode(o,(function(t){if(t){var n=e._getZoomForType(t.type,t.poi_category),o=e._getTileLayerMaxZoom(i);o&&n>o&&(n=o),t.bounds&&t.bounds.isValid&&t.bounds.isValid()?i.fitBounds(t.bounds,{maxZoom:n}):t.center&&i.setView(t.center,n)}}))})),s.on("change",(function(i){var n=t(this).val();e.options.radius=n,e._updateMap()}))}},_addKmlLayer:function(){var e=this.element,i=e.data("containers").attachments;i&&i.each((function(i,n){var o=t(this).data("file-path"),s=new L.KML(o,{async:!0});e.data("map").addLayer(s)}))},_displayListing:function(e){var i=this,n=i.element;if(n.data("states").slideout){var o=n.data("containers").slideout,s={payload:t.extend({},e.payload)};o.closest(".jr-map-listing-slideout-wrapper").show();var a=!!o.find("#jr-map-listing-"+e.id).length;o.html(n.data("templates").slideout.render(i._addListingTemplateFunctions(s))),a?o.slideToggle():"none"==o.css("display")&&o.slideDown()}else{i._loadInfoWindow(e);var r=n.data("containers").sidebar;if(r.length){var l=r.find("#jr-map-listing-"+e.id);r.find("[id^=jr-map-listing-]").removeClass("jrHighlight"),r.scrollTop(0).scrollTop(l.addClass("jrHighlight").position().top)}}},_loadInfoWindow:function(e){var i=this,n=i.element,o="infowindow-lg";
61n.data("containers").sidebar.length&&(o="infowindow-sm");var s=t(n.data("templates")[o].render(i._addListingTemplateFunctions(e.payload)));i._closeInfowindow()._positionInfowindow(s,e),e.setZIndexOffset(101),n.data("infowindowMarker",e)},_positionInfowindow:function(t,e){var i,n,o=this.element,s=o.data("map");s.getBounds();o.data("containers").infowindow.css({position:"absolute",display:"block",visibility:"hidden"}).html(t),setTimeout((function(){var a=s.latLngToContainerPoint(e.payload.latlng);i=a.x-t.width()/2-4,n=o.position().top+a.y+6,o.data("containers").infowindow.css({left:i+"px",top:n+"px",visibility:"visible"})}),250)},_closeInfowindow:function(){var t=this.element;void 0!==t.data("containers")&&t.data("containers").infowindow.html("");var e=t.data("infowindowMarker");return void 0!==e&&e.setZIndexOffset(1===e.payload.featured?100:0),t.data("infowindowMarker",void 0),this},_hideSlideout:function(){var t=this.element.data("containers").slideout;t.length&&t.slideUp()},_setCenterRadius:function(t,e,i,n){var o,s=this,a=s.element;n=void 0===n?1:n;return void 0!==a.data("elements").radiusArea?o=a.data("elements").radiusArea:(o=L.circle(e,{radius:1e3*i}).setStyle(s.options.radiusStyle),s._setData("elements","radiusArea",o)),o.addTo(t),t.fitBounds(o.getBounds()),n&&s._addCurrentPositionMarker(t,e),t},_drawCenterRadius:function(t){var e=this.element;void 0!==e.data("elements").radiusArea&&e.data("elements").radiusArea.addTo(t)},_setCenterZoom:function(t,e,i,n){this.element;return t.setView(e,i),!0===n&&this._addCurrentPositionMarker(t,e),t},_addCurrentPositionMarker:function(t,e){var i=this;if(0!=i.options.positionMarker)return L.circleMarker(e,i.options.positionRadius).setStyle(i.options.positionStyle).addTo(t),t},_setMinZoom:function(t){this.element;var e=1,i=this.element.width();return i<=512?e=1:i>512&&i<=1024?e=2:i>1024&&i<=2048?e=3:i>2048&&(e=4),t.setMinZoom(e),t},_resizeMap:function(t){var e=this.element.data("map");t&&this._setData("states","center",e.getCenter()),e.invalidateSize(!0)},_pause:function(){this.element.data("states").pause=!0},_unpause:function(){this.element.data("states").pause=!1},_paused:function(){return this.element.data("states").pause},getMap:function(){return this.element.data("map")},getMarkers:function(){return this.element.data("markers")},getZoom:function(){return this.element.data("map").getZoom()},isLoadingDelayed:function(){return this.element.data("states").delayed},getCenter:function(){return this.element.data("bounds").getCenter()},_destroy:function(){this._markersArr=[],this._closeInfowindow(),this.element.data("map")&&this.element.data("map").off().remove(),this.element.removeClass((function(t,e){return(e.match(/\leaflet-\S+/g)||[]).join(" ")})),this.element.find(".jrMapClick2Show").remove(),this.element.removeData()}})}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.