
/* @preserve
 * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
 * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
 */
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";function i(t){for(var i,e,n=1,o=arguments.length;n<o;n++)for(i in e=arguments[n])t[i]=e[i];return t}function e(){}function n(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}function o(t){return t._leaflet_id=t._leaflet_id||++qt,t._leaflet_id}function s(t,i,e){var n,o,s=function(){n=!1,o&&(r.apply(e,o),o=!1)},r=function(){n?o=arguments:(t.apply(e,arguments),setTimeout(s,i),n=!0)};return r}function r(t,i,e){var n=i[1],o=i[0],s=n-o;return t===n&&e?t:((t-o)%s+s)%s+o}function a(){return!1}function h(t,i){var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function l(t){return u(t).split(/\s+/)}function c(t,i){for(var e in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?Vt(t.options):{}),i)t.options[e]=i[e];return t.options}function _(t,i,e){var n=[];for(var o in t)n.push(encodeURIComponent(e?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}function d(t,i){return t.replace(Gt,function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n})}function p(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}function m(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function f(t){var i=+new Date,e=Math.max(0,16-(i-Xt));return Xt=i+e,window.setTimeout(t,e)}function g(t,i,e){return e&&Jt===f?void t.call(i):Jt.call(window,n(t,i))}function v(t){t&&$t.call(window,t)}function y(){}function x(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}function w(t,i,e){return t instanceof x?t:Kt(t)?new x(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new x(t.x,t.y):new x(t,i,e)}function P(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function b(t,i){return!t||t instanceof P?t:new P(t,i)}function T(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n<o;n++)this.extend(e[n])}function M(t,i){return t instanceof T?t:new T(t,i)}function z(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function C(t,i,e){return t instanceof z?t:Kt(t)&&"object"!=typeof t[0]?3===t.length?new z(t[0],t[1],t[2]):2===t.length?new z(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new z(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new z(t,i,e)}function S(t,i,e,n){return Kt(t)?(this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3])):(this._a=t,this._b=i,this._c=e,this._d=n,void 0)}function Z(t,i,e,n){return new S(t,i,e,n)}function E(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function k(t,i){for(var e,n,o,s,r="",a=0,h=t.length;a<h;a++){for(e=0,n=(o=t[a]).length;e<n;e++)r+=(e?"L":"M")+(s=o[e]).x+" "+s.y;r+=i?Ki?"z":"x":""}return r||"M0 0"}function B(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}function A(t,i,e,o){function s(t){N(t,h)}function r(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||N(t,l)}var a,h,u,l,c,_,d,p;return"touchstart"===i?(c=t,_=e,d=o,p=n(function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&ft(t),N(t,_)}),c["_leaflet_touchstart"+d]=p,c.addEventListener(Ji,p,!1),ee||(document.addEventListener(Ji,I,!0),document.addEventListener($i,O,!0),document.addEventListener(Qi,R,!0),document.addEventListener(te,R,!0),ee=!0)):"touchmove"===i?(l=e,(u=t)["_leaflet_touchmove"+o]=r,u.addEventListener($i,r,!1)):"touchend"===i&&(h=e,(a=t)["_leaflet_touchend"+o]=s,a.addEventListener(Qi,s,!1),a.addEventListener(te,s,!1)),this}function I(t){ie[t.pointerId]=t}function O(t){ie[t.pointerId]&&(ie[t.pointerId]=t)}function R(t){delete ie[t.pointerId]}function N(t,i){for(var e in t.touches=[],ie)t.touches.push(ie[e]);t.changedTouches=[t],i(t)}function D(t){return"string"==typeof t?document.getElementById(t):t}function j(t,i){var e,n=t.style[i]||t.currentStyle&&t.currentStyle[i];return n&&"auto"!==n||!document.defaultView||(n=(e=document.defaultView.getComputedStyle(t,null))?e[i]:null),"auto"===n?null:n}function W(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function H(t){var i=t.parentNode;i&&i.removeChild(t)}function F(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function U(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function V(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function q(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=X(t);return 0<e.length&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function G(t,i){var e;if(void 0!==t.classList)for(var n=l(i),o=0,s=n.length;o<s;o++)t.classList.add(n[o]);else q(t,i)||Y(t,((e=X(t))?e+" ":"")+i)}function K(t,i){void 0!==t.classList?t.classList.remove(i):Y(t,u((" "+X(t)+" ").replace(" "+i+" "," ")))}function Y(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function X(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function J(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}(t,i)}function $(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function Q(t,i,e){var n=i||new x(0,0);t.style[re]=(Bi?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function tt(t,i){t._leaflet_pos=i,Oi?Q(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function it(t){return t._leaflet_pos||new x(0,0)}function et(){ht(window,"dragstart",ft)}function nt(){ut(window,"dragstart",ft)}function ot(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(st(),pi=(di=t).style.outline,t.style.outline="none",ht(window,"keydown",st))}function st(){di&&(di.style.outline=pi,pi=di=void 0,ut(window,"keydown",st))}function rt(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function at(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}function ht(t,i,e,n){if("object"==typeof i)for(var o in i)ct(t,o,i[o],e);else for(var s=0,r=(i=l(i)).length;s<r;s++)ct(t,i[s],e,n);return this}function ut(t,i,e,n){if("object"==typeof i)for(var o in i)_t(t,o,i[o],e);else if(i)for(var s=0,r=(i=l(i)).length;s<r;s++)_t(t,i[s],e,n);else{for(var a in t[le])_t(t,a,t[le][a]);delete t[le]}return this}function lt(){return Wi&&!xi&&!Si}function ct(t,i,e,n){function s(t){if(Wi){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(1<t.touches.length)return;var i=Date.now(),e=i-(c||i);_=t.touches?t.touches[0]:t,d=0<e&&e<=250,c=i}function r(t){if(d&&!_.cancelBubble){if(Wi){if("mouse"===t.pointerType)return;var i,e,n={};for(e in _)i=_[e],n[e]=i&&i.bind?i.bind(_):i;_=n}_.type="dblclick",_.button=0,u(_),c=null}}var a=i+o(e)+(n?"_"+o(n):"");if(t[le]&&t[le][a])return this;var h,u,l,c,_,d,p=function(i){return e.call(n||t,i||window.event)},m=p;Wi&&0===i.indexOf("touch")?A(t,i,p,a):Hi&&"dblclick"===i&&!lt()?(u=p,d=!1,(h=t)[se+ne+(l=a)]=s,h[se+oe+l]=r,h[se+"dblclick"+l]=u,h.addEventListener(ne,s,!!qi&&{passive:!1}),h.addEventListener(oe,r,!!qi&&{passive:!1}),h.addEventListener("dblclick",u,!1)):"addEventListener"in t?"touchstart"===i||"touchmove"===i||"wheel"===i||"mousewheel"===i?t.addEventListener(ce[i]||i,p,!!qi&&{passive:!1}):"mouseenter"===i||"mouseleave"===i?(p=function(i){i=i||window.event,Pt(t,i)&&m(i)},t.addEventListener(ce[i],p,!1)):t.addEventListener(i,m,!1):"attachEvent"in t&&t.attachEvent("on"+i,p),t[le]=t[le]||{},t[le][a]=p}function _t(t,i,e,n){var s,r,a,h,u,l,c,_,d=i+o(e)+(n?"_"+o(n):""),p=t[le]&&t[le][d];return p?(Wi&&0===i.indexOf("touch")?(_=(l=t)["_leaflet_"+(c=i)+d],"touchstart"===c?l.removeEventListener(Ji,_,!1):"touchmove"===c?l.removeEventListener($i,_,!1):"touchend"===c&&(l.removeEventListener(Qi,_,!1),l.removeEventListener(te,_,!1))):Hi&&"dblclick"===i&&!lt()?(a=(s=t)[se+ne+(r=d)],h=s[se+oe+r],u=s[se+"dblclick"+r],s.removeEventListener(ne,a,!!qi&&{passive:!1}),s.removeEventListener(oe,h,!!qi&&{passive:!1}),s.removeEventListener("dblclick",u,!1)):"removeEventListener"in t?t.removeEventListener(ce[i]||i,p,!1):"detachEvent"in t&&t.detachEvent("on"+i,p),void(t[le][d]=null)):this}function dt(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,wt(t),this}function pt(t){return ct(t,"wheel",dt),this}function mt(t){return ht(t,"mousedown touchstart dblclick",dt),ct(t,"click",xt),this}function ft(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function gt(t){return ft(t),dt(t),this}function vt(t,i){if(!i)return new x(t.clientX,t.clientY);var e=at(i),n=e.boundingClientRect;return new x((t.clientX-n.left)/e.x-i.clientLeft,(t.clientY-n.top)/e.y-i.clientTop)}function yt(t){return xi?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/_e:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function xt(t){de[t.type]=!0}function wt(t){var i=de[t.type];return de[t.type]=!1,i}function Pt(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}function Lt(t){return new ge(t)}function bt(t,i){if(!i||!t.length)return t.slice();var e=i*i;return t=function(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,function r(t,i,e,n,o){var s,a,h,u=0;for(a=n+1;a<=o-1;a++)h=St(t[a],t[n],t[o],!0),u<h&&(s=a,u=h);e<u&&(i[s]=1,r(t,i,e,n,s),r(t,i,e,s,o))}(t,n,i,0,e-1);var o,s=[];for(o=0;o<e;o++)n[o]&&s.push(t[o]);return s}(t=function(t,i){for(var e=[t[0]],n=1,o=0,s=t.length;n<s;n++)(function(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n})(t[n],t[o])>i&&(e.push(t[n]),o=n);return o<s-1&&e.push(t[s-1]),e}(t,e),e)}function Tt(t,i,e){return Math.sqrt(St(t,i,e,!0))}function Mt(t,i,e,n,o){var s,r,a,h=n?Le:Ct(t,e),u=Ct(i,e);for(Le=u;;){if(!(h|u))return[t,i];if(h&u)return!1;a=Ct(r=zt(t,i,s=h||u,e,o),e),s===h?(t=r,h=a):(i=r,u=a)}}function zt(t,i,e,n,o){var s,r,a=i.x-t.x,h=i.y-t.y,u=n.min,l=n.max;return 8&e?(s=t.x+a*(l.y-t.y)/h,r=l.y):4&e?(s=t.x+a*(u.y-t.y)/h,r=u.y):2&e?(s=l.x,r=t.y+h*(l.x-t.x)/a):1&e&&(s=u.x,r=t.y+h*(u.x-t.x)/a),new x(s,r,o)}function Ct(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function St(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return 0<u&&(1<(o=((t.x-s)*a+(t.y-r)*h)/u)?(s=e.x,r=e.y):0<o&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new x(s,r)}function Zt(t){return!Kt(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Et(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Zt(t)}function kt(t,i,e){for(var n,o,s,r,a,h,u,l=[1,4,2,8],c=0,_=t.length;c<_;c++)t[c]._code=Ct(t[c],i);for(s=0;s<4;s++){for(h=l[s],n=[],c=0,o=(_=t.length)-1;c<_;o=c++)r=t[c],a=t[o],r._code&h?a._code&h||((u=zt(a,r,h,i,e))._code=Ct(u,i),n.push(u)):(a._code&h&&((u=zt(a,r,h,i,e))._code=Ct(u,i),n.push(u)),n.push(r));t=n}return t}function Bt(t,i){var e,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],u=i&&i.pointToLayer,l=i&&i.coordsToLatLng||It;if(!a&&!r)return null;switch(r.type){case"Point":return At(u,t,e=l(a),i);case"MultiPoint":for(o=0,s=a.length;o<s;o++)e=l(a[o]),h.push(At(u,t,e,i));return new je(h);case"LineString":case"MultiLineString":return n=Ot(a,"LineString"===r.type?0:1,l),new Ke(n,i);case"Polygon":case"MultiPolygon":return n=Ot(a,"Polygon"===r.type?1:2,l),new Ye(n,i);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=Bt({geometry:r.geometries[o],type:"Feature",properties:t.properties},i);c&&h.push(c)}return new je(h);default:throw new Error("Invalid GeoJSON object.")}}function At(t,i,e,n){return t?t(i,e):new Ue(e,n&&n.markersInheritOptions&&n)}function It(t){return new z(t[1],t[0],t[2])}function Ot(t,i,e){for(var n,o=[],s=0,r=t.length;s<r;s++)n=i?Ot(t[s],i-1,e):(e||It)(t[s]),o.push(n);return o}function Rt(t,i){return i="number"==typeof i?i:6,void 0!==t.alt?[h(t.lng,i),h(t.lat,i),h(t.alt,i)]:[h(t.lng,i),h(t.lat,i)]}function Nt(t,i,e,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(i?Nt(t[s],i-1,e,n):Rt(t[s],n));return!i&&e&&o.push(o[0]),o}function Dt(t,e){return t.feature?i({},t.feature,{geometry:e}):jt(e)}function jt(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function Wt(t,i){return new Xe(t,i)}function Ht(t,i){return new hn(t,i)}function Ft(t){return Gi?new cn(t):null}function Ut(t){return Ki||Yi?new mn(t):null}var Vt=Object.create||function(t){return e.prototype=t,new e},qt=0,Gt=/\{ *([\w_-]+) *\}/g,Kt=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},Yt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",Xt=0,Jt=window.requestAnimationFrame||m("RequestAnimationFrame")||f,$t=window.cancelAnimationFrame||m("CancelAnimationFrame")||m("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},Qt={extend:i,create:Vt,bind:n,lastId:qt,stamp:o,throttle:s,wrapNum:r,falseFn:a,formatNum:h,trim:u,splitWords:l,setOptions:c,getParamString:_,template:d,isArray:Kt,indexOf:p,emptyImageUrl:Yt,requestFn:Jt,cancelFn:$t,requestAnimFrame:g,cancelAnimFrame:v};y.extend=function(t){function e(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var n=e.__super__=this.prototype,o=Vt(n);for(var s in(o.constructor=e).prototype=o,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(i(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=Kt(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===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,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=i(Vt(o.options),t.options)),i(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=o._initHooks.length;t<i;t++)o._initHooks[t].call(this)}},e},y.include=function(t){return i(this.prototype,t),this},y.mergeOptions=function(t){return i(this.prototype.options,t),this},y.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var ti={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var o=0,s=(t=l(t)).length;o<s;o++)this._on(t[o],i,e);return this},off:function(t,i,e){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else for(var o=0,s=(t=l(t)).length;o<s;o++)this._off(t[o],i,e);else delete this._events;return this},_on:function(t,i,e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),e===this&&(e=void 0);for(var o={fn:i,ctx:e},s=n,r=0,a=s.length;r<a;r++)if(s[r].fn===i&&s[r].ctx===e)return;s.push(o)},_off:function(t,i,e){var n,o,s;if(this._events&&(n=this._events[t]))if(i){if(e===this&&(e=void 0),n)for(o=0,s=n.length;o<s;o++){var r=n[o];if(r.ctx===e&&r.fn===i)return r.fn=a,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=a;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 r=0,a=s.length;r<a;r++){var h=s[r];h.fn.call(h.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,i){var e=this._events&&this._events[t];if(e&&e.length)return!0;if(i)for(var n in this._eventParents)if(this._eventParents[n].listens(t,i))return!0;return!1},once:function(t,i,e){if("object"==typeof t){for(var o in t)this.once(o,t[o],i);return this}var s=n(function(){this.off(t,i,e).off(t,s,e)},this);return this.on(t,i,e).on(t,s,e)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o(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)}};ti.addEventListener=ti.on,ti.removeEventListener=ti.clearAllEventListeners=ti.off,ti.addOneTimeEventListener=ti.once,ti.fireEvent=ti.fire,ti.hasEventListeners=ti.listens;var ii=y.extend(ti),ei=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};x.prototype={clone:function(){return new x(this.x,this.y)},add:function(t){return this.clone()._add(w(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(w(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 x(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new x(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=ei(this.x),this.y=ei(this.y),this},distanceTo:function(t){var i=(t=w(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=w(t)).x===this.x&&t.y===this.y},contains:function(t){return t=w(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}},P.prototype={extend:function(t){return t=w(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 x((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new x(this.min.x,this.max.y)},getTopRight:function(){return new x(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 i,e;return(t=("number"==typeof t[0]||t instanceof x?w:b)(t))instanceof P?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=b(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=b(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.x<e.x,r=o.y>i.y&&n.y<e.y;return s&&r},isValid:function(){return!(!this.min||!this.max)}},T.prototype={extend:function(t){var i,e,n=this._southWest,o=this._northEast;if(t instanceof z)e=i=t;else{if(!(t instanceof T))return t?this.extend(C(t)||M(t)):this;if(i=t._southWest,e=t._northEast,!i||!e)return this}return n||o?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),o.lat=Math.max(e.lat,o.lat),o.lng=Math.max(e.lng,o.lng)):(this._southWest=new z(i.lat,i.lng),this._northEast=new z(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,o=Math.abs(i.lng-e.lng)*t;return new T(new z(i.lat-n,i.lng-o),new z(e.lat+n,e.lng+o))},getCenter:function(){return new z((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new z(this.getNorth(),this.getWest())},getSouthEast:function(){return new z(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=("number"==typeof t[0]||t instanceof z||"lat"in t?C:M)(t);var i,e,n=this._southWest,o=this._northEast;return t instanceof T?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=M(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=M(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lat<e.lat,r=o.lng>i.lng&&n.lng<e.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=M(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}};var ni,oi={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);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 i=this.projection.bounds,e=this.scale(t);return new P(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!(z.prototype={equals:function(t,i){return!!t&&(t=C(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+h(this.lat,t)+", "+h(this.lng,t)+")"},distanceTo:function(t){return si.distance(this,C(t))},wrap:function(){return si.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return M([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new z(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var i=this.wrapLng?r(t.lng,this.wrapLng,!0):t.lng;return new z(this.wrapLat?r(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,o=i.lng-e.lng;if(0==n&&0==o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new T(new z(s.lat-n,s.lng-o),new z(r.lat-n,r.lng-o))}},si=i({},oi,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,o=i.lat*e,s=Math.sin((i.lat-t.lat)*e/2),r=Math.sin((i.lng-t.lng)*e/2),a=s*s+Math.cos(n)*Math.cos(o)*r*r,h=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*h}}),ri=6378137,ai={R:ri,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),o=Math.sin(n*i);return new x(this.R*t.lng*i,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var i=180/Math.PI;return new z((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:new P([-(ni=ri*Math.PI),-ni],[ni,ni])};S.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return i=i||1,t.x=i*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new x((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};var hi,ui,li,ci,_i,di,pi,mi=i({},si,{code:"EPSG:3857",projection:ai,transformation:Z(hi=.5/(Math.PI*ai.R),.5,-hi,.5)}),fi=i({},mi,{code:"EPSG:900913"}),gi=document.documentElement.style,vi="ActiveXObject"in window,yi=vi&&!document.addEventListener,xi="msLaunchUri"in navigator&&!("documentMode"in document),wi=B("webkit"),Pi=B("android"),Li=B("android 2")||B("android 3"),bi=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ti=Pi&&B("Google")&&bi<537&&!("AudioNode"in window),Mi=!!window.opera,zi=!xi&&B("chrome"),Ci=B("gecko")&&!wi&&!Mi&&!vi,Si=!zi&&B("safari"),Zi=B("phantom"),Ei="OTransition"in gi,ki=0===navigator.platform.indexOf("Win"),Bi=vi&&"transition"in gi,Ai="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Li,Ii="MozPerspective"in gi,Oi=!window.L_DISABLE_3D&&(Bi||Ai||Ii)&&!Ei&&!Zi,Ri="undefined"!=typeof orientation||B("mobile"),Ni=Ri&&wi,Di=Ri&&Ai,ji=!window.PointerEvent&&window.MSPointerEvent,Wi=!(!window.PointerEvent&&!ji),Hi=!window.L_NO_TOUCH&&(Wi||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Fi=Ri&&Mi,Ui=Ri&&Ci,Vi=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),qi=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",a,i),window.removeEventListener("testPassiveEventSupport",a,i)}catch(t){}return t}(),Gi=!!document.createElement("canvas").getContext,Ki=!(!document.createElementNS||!E("svg").createSVGRect),Yi=!Ki&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),Xi={ie:vi,ielt9:yi,edge:xi,webkit:wi,android:Pi,android23:Li,androidStock:Ti,opera:Mi,chrome:zi,gecko:Ci,safari:Si,phantom:Zi,opera12:Ei,win:ki,ie3d:Bi,webkit3d:Ai,gecko3d:Ii,any3d:Oi,mobile:Ri,mobileWebkit:Ni,mobileWebkit3d:Di,msPointer:ji,pointer:Wi,touch:Hi,mobileOpera:Fi,mobileGecko:Ui,retina:Vi,passiveEvents:qi,canvas:Gi,svg:Ki,vml:Yi},Ji=ji?"MSPointerDown":"pointerdown",$i=ji?"MSPointerMove":"pointermove",Qi=ji?"MSPointerUp":"pointerup",te=ji?"MSPointerCancel":"pointercancel",ie={},ee=!1,ne=ji?"MSPointerDown":Wi?"pointerdown":"touchstart",oe=ji?"MSPointerUp":Wi?"pointerup":"touchend",se="_leaflet_",re=$(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ae=$(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),he="webkitTransition"===ae||"OTransition"===ae?ae+"End":"transitionend";_i="onselectstart"in document?(ci=function(){ht(window,"selectstart",ft)},function(){ut(window,"selectstart",ft)}):(li=$(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),ci=function(){var t;li&&(t=document.documentElement.style,ui=t[li],t[li]="none")},function(){li&&(document.documentElement.style[li]=ui,ui=void 0)});var ue={TRANSFORM:re,TRANSITION:ae,TRANSITION_END:he,get:D,getStyle:j,create:W,remove:H,empty:F,toFront:U,toBack:V,hasClass:q,addClass:G,removeClass:K,setClass:Y,getClass:X,setOpacity:J,testProp:$,setTransform:Q,setPosition:tt,getPosition:it,disableTextSelection:ci,enableTextSelection:_i,disableImageDrag:et,enableImageDrag:nt,preventOutline:ot,restoreOutline:st,getSizedParentNode:rt,getScale:at},le="_leaflet_events",ce={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"},_e=ki&&zi?2*window.devicePixelRatio:Ci?window.devicePixelRatio:1,de={},pe={on:ht,off:ut,stopPropagation:dt,disableScrollPropagation:pt,disableClickPropagation:mt,preventDefault:ft,stop:gt,getMousePosition:vt,getWheelDelta:yt,fakeStop:xt,skipped:wt,isExternalTarget:Pt,addListener:ht,removeListener:ut},me=ii.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=it(t),this._offset=i.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=g(this._animate,this),this._step()},_step:function(t){var i=new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),tt(this._el,e),this.fire("step")},_complete:function(){v(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),fe=ii.extend({options:{crs:mi,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,i){i=c(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(C(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ae&&Oi&&!Fi&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ht(this._proxy,he,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(C(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,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return t=t||(Oi?this.options.zoomDelta:1),this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){return t=t||(Oi?this.options.zoomDelta:1),this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),o=this.getSize().divideBy(2),s=(t instanceof x?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(s));return this.setView(r,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():M(t);var e=w(i.paddingTopLeft||i.padding||[0,0]),n=w(i.paddingBottomRight||i.padding||[0,0]),o=this.getBoundsZoom(t,!1,e.add(n));if((o="number"==typeof i.maxZoom?Math.min(i.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=n.subtract(e).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,i){if(!(t=M(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){return i=i||{},(t=w(t).round()).x||t.y?(!0===i.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new me,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate?(G(this._mapPane,"leaflet-pan-anim"),e=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),
this):this.fire("moveend");var e},flyTo:function(t,i,e){function n(t){var i=(_*_-c*c+(t?-1:1)*m*m*d*d)/(2*(t?_:c)*m*d),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function o(t){return(Math.exp(t)-Math.exp(-t))/2}function s(t){return(Math.exp(t)+Math.exp(-t))/2}function r(t){return c*(s(f)*(o(i=f+p*t)/s(i))-o(f))/m;var i}if(!1===(e=e||{}).animate||!Oi)return this.setView(t,i,e);this._stop();var a=this.project(this.getCenter()),h=this.project(t),u=this.getSize(),l=this._zoom;t=C(t),i=void 0===i?l:i;var c=Math.max(u.x,u.y),_=c*this.getZoomScale(l,i),d=h.distanceTo(a)||1,p=1.42,m=p*p,f=n(0),v=Date.now(),y=(n(1)-f)/p,x=e.duration?1e3*e.duration:1e3*y*.8;return this._moveStart(!0,e.noMoveStart),function w(){var e,n,o=(Date.now()-v)/x,u=(e=o,(1-Math.pow(1-e,1.5))*y);o<=1?(this._flyToFrame=g(w,this),this._move(this.unproject(a.add(h.subtract(a).multiplyBy(r(u)/d)),l),this.getScaleZoom(c/(n=u,c*(s(f)/s(f+p*n))),l),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return(t=M(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 i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,M(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e,n,o=w((i=i||{}).paddingTopLeft||i.padding||[0,0]),s=w(i.paddingBottomRight||i.padding||[0,0]),r=this.getCenter(),a=this.project(r),h=this.project(t),u=this.getPixelBounds(),l=u.getSize().divideBy(2),c=b([u.min.add(o),u.max.subtract(s)]);return c.contains(h)||(this._enforcingBounds=!0,e=a.subtract(h),n=w(h.x+e.x,h.y+e.y),(h.x<c.min.x||h.x>c.max.x)&&(n.x=a.x-e.x,0<e.x?n.x+=l.x-o.x:n.x-=l.x-s.x),(h.y<c.min.y||h.y>c.max.y)&&(n.y=a.y-e.y,0<e.y?n.y+=l.y-o.y:n.y-=l.y-s.y),this.panTo(this.unproject(n),i),this._enforcingBounds=!1),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 o=this.getSize(),s=e.divideBy(2).round(),r=o.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:o})):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=n(this._handleGeolocationResponse,this),o=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,o,t):navigator.geolocation.getCurrentPosition(e,o,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})},_handleGeolocationResponse:function(t){var i,e=new z(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),o=this._locateOptions;o.setView&&(i=this.getBoundsZoom(n),this.setView(e,o.maxZoom?Math.min(i,o.maxZoom):i));var s={latlng:e,bounds:n,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),H(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(v(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)H(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=W("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},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 T(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,i,e){t=M(t),e=w(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(e),u=b(this.project(a,n),this.project(r,n)).getSize(),l=Oi?this.options.zoomSnap:1,c=h.x/u.x,_=h.y/u.y,d=i?Math.max(c,_):Math.min(c,_),n=this.getScaleZoom(d,n);return l&&(n=Math.round(n/(l/100))*(l/100),n=i?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new x(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new P(e,e.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,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(C(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(w(t),i)},layerPointToLatLng:function(t){var i=w(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(C(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(C(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(M(t))},distance:function(t,i){return this.options.crs.distance(C(t),C(i))},containerPointToLayerPoint:function(t){return w(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return w(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(w(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(C(t)))},mouseEventToContainerPoint:function(t){return vt(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 i=this._container=D(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");ht(i,"scroll",this._onScroll,this),this._containerId=o(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Oi,G(t,"leaflet-container"+(Hi?" leaflet-touch":"")+(Vi?" leaflet-retina":"")+(yi?" leaflet-oldie":"")+(Si?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=j(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),tt(this._mapPane,new x(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(G(t.markerPane,"leaflet-zoom-hide"),G(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){tt(this._mapPane,new x(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n,!1)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e){void 0===i&&(i=this._zoom);var n=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return v(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){tt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var i=t?ut:ht;i((this._targets[o(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Oi&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){v(this._resizeRequest),this._resizeRequest=g(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,i){for(var e,n=[],s="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,a=!1;r;){if((e=this._targets[o(r)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){a=!0;break}if(e&&e.listens(i,!0)){if(s&&!Pt(r,t))break;if(n.push(e),s)break}if(r===this._container)break;r=r.parentNode}return n.length||a||s||!Pt(r,t)||(n=[this]),n},_handleDOMEvent:function(t){var i;this._loaded&&!wt(t)&&("mousedown"!==(i=t.type)&&"keypress"!==i&&"keyup"!==i&&"keydown"!==i||ot(t.target||t.srcElement),this._fireDOMEvent(t,i))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){var o;if("click"===t.type&&((o=i({},t)).type="preclick",this._fireDOMEvent(o,o.type,n)),!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var s=n[0];"contextmenu"===e&&s.listens(e,!0)&&ft(t);var r,a={originalEvent:t};"keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(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 h=0;h<n.length;h++)if(n[h].fire(e,a,!0),a.originalEvent._stopped||!1===n[h].options.bubblingMouseEvents&&-1!==p(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,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return it(this._mapPane)||new x(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return b([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),o=this.getSize().divideBy(2),s=new P(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,e,i);return r.round().equals([0,0])?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new P(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=b(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new x(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,i){return 0<t+i?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=Oi?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){K(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e)||(this.panBy(e,i),0))},_createAnimProxy:function(){var t=this._proxy=W("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var i=re,e=this._proxy.style[i];Q(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){H(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();Q(this._proxy,this.project(t,i),this.getZoomScale(i,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,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o)||(g(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),0))},_animateZoom:function(t,i,e,o){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,G(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:o}),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&K(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),g(function(){this._moveEnd(!0)},this))}}),ge=y.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return G(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(H(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()}});fe.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,o){var s=e+t+" "+e+o;i[t+o]=W("div",s,n)}var i=this._controlCorners={},e="leaflet-",n=this._controlContainer=W("div",e+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)H(this._controlCorners[t]);H(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var ve=ge.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){for(var n in c(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ge.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,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(o(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){G(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?(G(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):K(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return K(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=W("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),mt(i),pt(i);var n=this._section=W("section",t+"-list");e&&(this._map.on("click",this.collapse,this),Pi||ht(i,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=W("a",t+"-toggle",i);o.href="#",o.title="Layers",Hi?(ht(o,"click",gt),ht(o,"click",this.expand,this)):ht(o,"focus",this.expand,this),e||this.expand(),this._baseLayersList=W("div",t+"-base",n),this._separator=W("div",t+"-separator",n),this._overlaysList=W("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&o(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,e){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:e}),this.options.sortLayers&&this._layers.sort(n(function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;F(this._baseLayersList),F(this._overlaysList),this._layerControlInputs=[];for(var t,i,e,n=0,o=0;o<this._layers.length;o++)e=this._layers[o],this._addItem(e),i=i||e.overlay,t=t||!e.overlay,n+=e.overlay?0:1;return this.options.hideSingleBase&&(t=t&&1<n,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(o(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+o(this),n),this._layerControlInputs.push(i),i.layerId=o(t.layer),ht(i,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("div");return e.appendChild(r),r.appendChild(i),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);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,i,e=this._layerControlInputs,n=this._map.getZoom(),o=e.length-1;0<=o;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),ye=ge.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=W("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},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,i,e,n,o){var s=W("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),mt(s),ht(s,"click",gt),ht(s,"click",o,this),ht(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";K(this._zoomInButton,i),K(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMinZoom()||G(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMaxZoom()||G(this._zoomInButton,i)}});fe.mergeOptions({zoomControl:!0}),fe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ye,this.addControl(this.zoomControl))});var xe=ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=W("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=W("div",i,e)),t.imperial&&(this._iScale=W("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;5280<o?(i=o/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e=10<=e?10:5<=e?5:3<=e?3:2<=e?2:1)}}),we=ge.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=W("div","leaflet-control-attribution"),mt(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].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 i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});fe.mergeOptions({attributionControl:!0}),fe.addInitHook(function(){this.options.attributionControl&&(new we).addTo(this)}),ge.Layers=ve,ge.Zoom=ye,ge.Scale=xe,ge.Attribution=we,Lt.layers=function(t,i,e){return new ve(t,i,e)},Lt.zoom=function(t){return new ye(t)},Lt.scale=function(t){return new xe(t)},Lt.attribution=function(t){return new we(t)};var Pe=y.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}});Pe.addTo=function(t,i){return t.addHandler(i,this),this};var Le,be,Te={Events:ti},Me=Hi?"touchstart mousedown":"mousedown",ze={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Ce={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Se=ii.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){c(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(ht(this._dragStartTarget,Me,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Se._dragging===this&&this.finishDrag(),ut(this._dragStartTarget,Me,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var i,e;!t._simulated&&this._enabled&&(this._moved=!1,q(this._element,"leaflet-zoom-anim")||Se._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Se._dragging=this)._preventOutline&&ot(this._element),et(),ci(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=rt(this._element),this._startPoint=new x(i.clientX,i.clientY),this._parentScale=at(e),ht(document,Ce[t.type],this._onMove,this),ht(document,ze[t.type],this._onUp,this))))},_onMove:function(t){var i,e;!t._simulated&&this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:((e=new x((i=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,i.clientY)._subtract(this._startPoint)).x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,ft(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=it(this._element).subtract(e),G(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),G(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,v(this._animRequest),this._lastEvent=t,this._animRequest=g(this._updatePosition,this,!0))))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),tt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in K(document.body,"leaflet-dragging"),this._lastTarget&&(K(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ce)ut(document,Ce[t],this._onMove,this),ut(document,ze[t],this._onUp,this);nt(),_i(),this._moved&&this._moving&&(v(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Se._dragging=!1}}),Ze={simplify:bt,pointToSegmentDistance:Tt,closestPointOnSegment:function(t,i,e){return St(t,i,e)},clipSegment:Mt,_getEdgeIntersection:zt,_getBitCode:Ct,_sqClosestPointOnSegment:St,isFlat:Zt,_flat:Et},Ee={clipPolygon:kt},ke={project:function(t){return new x(t.lng,t.lat)},unproject:function(t){return new z(t.y,t.x)},bounds:new P([-180,-90],[180,90])},Be={R:6378137,R_MINOR:6356752.314245179,bounds:new P([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,o=this.R_MINOR/e,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2),n=-e*Math.log(Math.max(a,1e-10));return new x(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,u=.1;h<15&&1e-7<Math.abs(u);h++)i=s*Math.sin(a),i=Math.pow((1-i)/(1+i),s/2),a+=u=Math.PI/2-2*Math.atan(r*i)-a;return new z(a*e,t.x*e/n)}},Ae={LonLat:ke,Mercator:Be,SphericalMercator:ai},Ie=i({},si,{code:"EPSG:3395",projection:Be,transformation:Z(be=.5/(Math.PI*Be.R),.5,-be,.5)
}),Oe=i({},si,{code:"EPSG:4326",projection:ke,transformation:Z(1/180,1,-1/180,.5)}),Re=i({},oi,{projection:ke,transformation:Z(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});oi.Earth=si,oi.EPSG3395=Ie,oi.EPSG3857=mi,oi.EPSG900913=fi,oi.EPSG4326=Oe,oi.Simple=Re;var Ne=ii.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[o(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i,e=t.target;e.hasLayer(this)&&(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents&&(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}))}});fe.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=o(t);return this._layers[i]||((this._layers[i]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=o(t);return this._layers[i]&&(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return!!t&&o(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?Kt(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=o(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=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),i=void 0===o.maxZoom?i:Math.max(i,o.maxZoom);this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==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 De=Ne.extend({initialize:function(t,i){var e,n;if(c(this,i),this._layers={},t)for(e=0,n=t.length;e<n;e++)this.addLayer(t[e])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return!!t&&("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);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:o}),je=De.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),De.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),De.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 T;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),We=y.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){c(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var o=w(n),s=w("shadow"===i&&e.shadowAnchor||e.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.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,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return Vi&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),He=We.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 He.imagePath||(He.imagePath=this._detectIconPath()),(this.options.imagePath||He.imagePath)+We.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=W("div","leaflet-default-icon-path",document.body),i=j(t,"background-image")||j(t,"backgroundImage");return document.body.removeChild(t),i=null===i||0!==i.indexOf("url")?"":i.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Fe=Pe.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Se(t,t,(!0))),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),G(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&K(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i,e=this._marker,n=e._map,o=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,r=it(e._icon),a=n.getPixelBounds(),h=n.getPixelOrigin(),u=b(a.min._subtract(h).add(s),a.max._subtract(h).subtract(s));u.contains(r)||(i=w((Math.max(u.max.x,r.x)-u.max.x)/(a.max.x-u.max.x)-(Math.min(u.min.x,r.x)-u.min.x)/(a.min.x-u.min.x),(Math.max(u.max.y,r.y)-u.max.y)/(a.max.y-u.max.y)-(Math.min(u.min.y,r.y)-u.min.y)/(a.min.y-u.min.y)).multiplyBy(o),n.panBy(i,{animate:!1}),this._draggable._newPos._add(i),this._draggable._startPos._add(i),tt(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=g(this._adjustPan.bind(this,t)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(v(this._panRequest),this._panRequest=g(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,n=it(i._icon),o=i._map.layerPointToLatLng(n);e&&tt(e,n),i._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){v(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ue=Ne.extend({options:{icon:new He,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,i){c(this,i),this._latlng=C(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 i=this._latlng;return this._latlng=C(t),this.update(),this.fire("move",{oldLatLng:i,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(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),G(e,i),t.keyboard&&(e.tabIndex="0"),this._icon=e,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&&(G(o,i),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}),H(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&H(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&tt(this._icon,t),this._shadow&&tt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){var t;this.options.interactive&&(G(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Fe&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Fe(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&&J(this._icon,t),this._shadow&&J(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}}),Ve=Ne.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 c(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),qe=Ve.extend({options:{fill:!0,radius:10},initialize:function(t,i){c(this,i),this._latlng=C(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=C(t),this.redraw(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return Ve.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new P(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Ge=qe.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),c(this,e),this._latlng=C(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 T(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Ve.prototype.setStyle,_project:function(){var t,i,e,n,o,s,r,a,h=this._latlng.lng,u=this._latlng.lat,l=this._map,c=l.options.crs;c.distance===si.distance?(t=Math.PI/180,i=this._mRadius/si.R/t,e=l.project([u+i,h]),n=l.project([u-i,h]),o=e.add(n).divideBy(2),s=l.unproject(o).lat,r=Math.acos((Math.cos(i*t)-Math.sin(u*t)*Math.sin(s*t))/(Math.cos(u*t)*Math.cos(s*t)))/t,!isNaN(r)&&0!==r||(r=i/Math.cos(Math.PI/180*u)),this._point=o.subtract(l.getPixelOrigin()),this._radius=isNaN(r)?0:o.x-l.project([s,h-r]).x,this._radiusY=o.y-e.y):(a=c.unproject(c.project(this._latlng).subtract([this._mRadius,0])),this._point=l.latLngToLayerPoint(this._latlng),this._radius=this._point.x-l.latLngToLayerPoint(a).x),this._updateBounds()}}),Ke=Ve.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){c(this,i),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 i,e,n=1/0,o=null,s=St,r=0,a=this._parts.length;r<a;r++)for(var h=this._parts[r],u=1,l=h.length;u<l;u++){var c=s(t,i=h[u-1],e=h[u],!0);c<n&&(n=c,o=s(t,i,e))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a=this._rings[0],h=a.length;if(!h)return null;for(i=t=0;t<h-1;t++)i+=a[t].distanceTo(a[t+1])/2;if(0===i)return this._map.layerPointToLatLng(a[0]);for(n=t=0;t<h-1;t++)if(o=a[t],s=a[t+1],i<(n+=e=o.distanceTo(s)))return r=(n-i)/e,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=C(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new T,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Zt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=Zt(t),n=0,o=t.length;n<o;n++)e?(i[n]=C(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new P;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(),i=new x(t,t);this._pxBounds=new P([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)])},_projectLatlngs:function(t,i,e){var n,o,s=t[0]instanceof z,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),e.extend(o[n]);i.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],i,e)},_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 for(var i,e,n,o,s=this._parts,r=0,a=0,h=this._rings.length;r<h;r++)for(i=0,e=(o=this._rings[r]).length;i<e-1;i++)(n=Mt(o[i],o[i+1],t,i,!0))&&(s[a]=s[a]||[],s[a].push(n[0]),n[1]===o[i+1]&&i!==e-2||(s[a].push(n[1]),a++))},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=bt(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,o,s,r,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,s=this._parts.length;e<s;e++)for(n=0,o=(r=(a=this._parts[e]).length)-1;n<r;o=n++)if((i||0!==n)&&Tt(t,a[o],a[n])<=h)return!0;return!1}});Ke._flat=Et;var Ye=Ke.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,o,s,r,a,h,u=this._rings[0],l=u.length;if(!l)return null;for(t=s=r=a=0,i=l-1;t<l;i=t++)e=u[t],n=u[i],o=e.y*n.x-n.y*e.x,r+=(e.x+n.x)*o,a+=(e.y+n.y)*o,s+=3*o;return h=0===s?u[0]:[r/s,a/s],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var i=Ke.prototype._convertLatLngs.call(this,t),e=i.length;return 2<=e&&i[0]instanceof z&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Ke.prototype._setLatLngs.call(this,t),Zt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Zt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new x(i,i),t=new P(t.min.subtract(e),t.max.add(e));if(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=kt(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,o,s,r,a,h,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(h=(i=this._parts[o]).length)-1;s<h;r=s++)e=i[s],n=i[r],e.y>t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||Ke.prototype._containsPoint.call(this,t,!0)}}),Xe=je.extend({initialize:function(t,i){c(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=Kt(t)?t:t.features;if(o){for(i=0,e=o.length;i<e;i++)((n=o[i]).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 r=Bt(t,s);return r?(r.feature=jt(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(i){this._setLayerStyle(i,t)},this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}}),Je={toGeoJSON:function(t){return Dt(this,{type:"Point",coordinates:Rt(this.getLatLng(),t)})}};Ue.include(Je),Ge.include(Je),qe.include(Je),Ke.include({toGeoJSON:function(t){var i=!Zt(this._latlngs);return Dt(this,{type:(i?"Multi":"")+"LineString",coordinates:Nt(this._latlngs,i?1:0,!1,t)})}}),Ye.include({toGeoJSON:function(t){var i=!Zt(this._latlngs),e=i&&!Zt(this._latlngs[0]),n=Nt(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),Dt(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),De.include({toMultiPoint:function(t){var i=[];return this.eachLayer(function(e){i.push(e.toGeoJSON(t).geometry.coordinates)}),Dt(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer(function(i){var o,s;i.toGeoJSON&&(o=i.toGeoJSON(t),e?n.push(o.geometry):"FeatureCollection"===(s=jt(o)).type?n.push.apply(n,s.features):n.push(s))}),e?Dt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var $e=Wt,Qe=Ne.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=M(i),c(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(G(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){H(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&&U(this._image),this},bringToBack:function(){return this._map&&V(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=M(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,i=this._image=t?this._url:W("img");G(i,"leaflet-image-layer"),this._zoomAnimated&&G(i,"leaflet-zoom-animated"),this.options.className&&G(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onload=n(this.fire,this,"load"),i.onerror=n(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Q(this._image,e,i)},_reset:function(){var t=this._image,i=new P(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();tt(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){J(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)}}),tn=Qe.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:W("video");if(G(i,"leaflet-image-layer"),this._zoomAnimated&&G(i,"leaflet-zoom-animated"),this.options.className&&G(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onloadeddata=n(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),o=[],s=0;s<e.length;s++)o.push(e[s].src);this._url=0<e.length?o:[i.src]}else{Kt(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted;for(var r=0;r<this._url.length;r++){var h=W("source");h.src=this._url[r],i.appendChild(h)}}}}),en=Qe.extend({_initImage:function(){var t=this._image=this._url;G(t,"leaflet-image-layer"),this._zoomAnimated&&G(t,"leaflet-zoom-animated"),this.options.className&&G(t,this.options.className),t.onselectstart=a,t.onmousemove=a}}),nn=Ne.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,i){c(this,t),this._source=i},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&J(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&J(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(J(this._container,0),this._removeTimeout=setTimeout(n(H,void 0,this._container),200)):H(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=C(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&&U(this._container),this},bringToBack:function(){return this._map&&V(this._container),this},_prepareOpen:function(t,i,e){if(i instanceof Ne||(e=i,i=t),i instanceof je)for(var n in t._layers){i=t._layers[n];break}if(!e)if(i.getCenter)e=i.getCenter();else{if(!i.getLatLng)throw new Error("Unable to get source layer LatLng.");e=i.getLatLng()}return this._source=i,this.update(),e},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){var t,i,e,n,o;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),i=w(this.options.offset),e=this._getAnchor(),this._zoomAnimated?tt(this._container,t.add(e)):i=i.add(t).add(e),n=this._containerBottom=-i.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+i.x,this._container.style.bottom=n+"px",this._container.style.left=o+"px")},_getAnchor:function(){return[0,0]}}),on=nn.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){nn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ve||this._source.on("preclick",dt))},onRemove:function(t){nn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ve||this._source.off("preclick",dt))},getEvents:function(){var t=nn.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,i="leaflet-popup",e=this._container=W("div",i+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=W("div",i+"-content-wrapper",e);this._contentNode=W("div",i+"-content",n),mt(e),pt(this._contentNode),ht(e,"contextmenu",dt),this._tipContainer=W("div",i+"-tip-container",e),this._tip=W("div",i+"-tip",this._tipContainer),this.options.closeButton&&((t=this._closeButton=W("a",i+"-close-button",e)).href="#close",t.innerHTML="&#215;",ht(t,"click",this._onCloseButtonClick,this))},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth,e=Math.min(e,this.options.maxWidth);e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&o<n?(i.height=o+"px",G(t,s)):K(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();tt(this._container,i.add(e))},_adjustPan:function(){var t,i,e,n,o,s,r,a,h,u,l,c;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),t=this._map,i=parseInt(j(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,(o=new x(this._containerLeft,-e-this._containerBottom))._add(it(this._container)),s=t.layerPointToContainerPoint(o),r=w(this.options.autoPanPadding),a=w(this.options.autoPanPaddingTopLeft||r),h=w(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),c=l=0,s.x+n+h.x>u.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c]))},_onCloseButtonClick:function(t){this._close(),gt(t)},_getAnchor:function(){return w(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});fe.mergeOptions({closePopupOnClick:!0}),fe.include({openPopup:function(t,i,e){return t instanceof on||(t=new on(e).setContent(t)),i&&t.setLatLng(i),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}}),Ne.include({bindPopup:function(t,i){return t instanceof on?(c(t,i),(this._popup=t)._source=this):(this._popup&&!i||(this._popup=new on(i,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,i){return this._popup&&this._map&&(i=this._popup._prepareOpen(this,t,i),this._map.openPopup(this._popup,i)),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 i=t.layer||t.target;this._popup&&this._map&&(gt(t),i instanceof Ve?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng));
},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var sn=nn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){nn.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){nn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=nn.prototype.getEvents.call(this);return Hi&&!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=W("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e=this._map,n=this._container,o=e.latLngToContainerPoint(e.getCenter()),s=e.layerPointToContainerPoint(t),r=this.options.direction,a=n.offsetWidth,h=n.offsetHeight,u=w(this.options.offset),l=this._getAnchor(),c="top"===r?(i=a/2,h):"bottom"===r?(i=a/2,0):(i="center"===r?a/2:"right"===r?0:"left"===r?a:s.x<o.x?(r="right",0):(r="left",a+2*(u.x+l.x)),h/2);t=t.subtract(w(i,c,!0)).add(u).add(l),K(n,"leaflet-tooltip-right"),K(n,"leaflet-tooltip-left"),K(n,"leaflet-tooltip-top"),K(n,"leaflet-tooltip-bottom"),G(n,"leaflet-tooltip-"+r),tt(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&J(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return w(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});fe.include({openTooltip:function(t,i,e){return t instanceof sn||(t=new sn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),Ne.include({bindTooltip:function(t,i){return t instanceof sn?(c(t,i),(this._tooltip=t)._source=this):(this._tooltip&&!i||(this._tooltip=new sn(i,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){var i,e;!t&&this._tooltipHandlersAdded||(i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),Hi&&(e.click=this._openTooltip)),this[i](e),this._tooltipHandlersAdded=!t)},openTooltip:function(t,i){return this._tooltip&&this._map&&(i=this._tooltip._prepareOpen(this,t,i),this._map.openTooltip(this._tooltip,i),this._tooltip.options.interactive&&this._tooltip._container&&(G(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&&(K(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 i=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(i,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var rn=We.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i,e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;return n.html instanceof Element?(F(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos&&(i=w(n.bgPos),e.style.backgroundPosition=-i.x+"px "+-i.y+"px"),this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});We.Default=He;var an=Ne.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ri,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){c(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(),H(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(U(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(V(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=s(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 x?t:new x(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 i,e=this.getPane().children,n=-t(-1/0,1/0),o=0,s=e.length;o<s;o++)i=e[o].style.zIndex,e[o]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!yi){J(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var o,s=this._tiles[n];s.current&&s.loaded&&(o=Math.min(1,(t-s.loaded)/200),J(s.el,o),o<1?i=!0:(s.active?e=!0:this._onOpaqueTile(s),s.active=!0))}e&&!this._noPrune&&this._pruneTiles(),i&&(v(this._fadeFrame),this._fadeFrame=g(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=W("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,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)e=Number(e),this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(H(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=W("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),a(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,i,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)(e=this._tiles[t]).current&&!e.active&&(i=e.coords,this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)H(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,e,n){var o=Math.floor(t/2),s=Math.floor(i/2),r=e-1,a=new x((+o),(+s));a.z=+r;var h=this._tileCoordsToKey(a),u=this._tiles[h];return u&&u.active?u.retain=!0:(u&&u.loaded&&(u.retain=!0),n<r&&this._retainParent(o,s,r,n))},_retainChildren:function(t,i,e,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new x(o,s);r.z=e+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),e+1<n&&this._retainChildren(o,s,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var o=Math.round(i),o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),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),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();Oi?Q(t.el,o,n):tt(t.el,o)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),o=i.project(t,this._tileZoom).floor(),s=i.getSize().divideBy(2*n);return new P(o.subtract(s),o.add(s))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=this.options.keepBuffer,h=new P(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var l=this._tiles[u].coords;l.z===this._tileZoom&&h.contains(new x(l.x,l.y))||(this._tiles[u].current=!1)}if(1<Math.abs(e-this._tileZoom))this._setView(t,e);else{for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d,p=new x(_,c);p.z=this._tileZoom,this._isValidTile(p)&&((d=this._tiles[this._tileCoordsToKey(p)])?d.current=!0:r.push(p))}if(r.sort(function(t,i){return t.distanceTo(s)-i.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));for(var m=document.createDocumentFragment(),_=0;_<r.length;_++)this._addTile(r[_],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return M(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new T(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new x((+i[0]),(+i[1]));return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(H(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){G(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,yi&&this.options.opacity<1&&J(t,this.options.opacity),Pi&&!Li&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var e=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&g(n(this._tileReady,this,t,null,s)),tt(s,e),this._tiles[o]={el:s,coords:t,current:!0},i.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var o=this._tileCoordsToKey(t);(e=this._tiles[o])&&(e.loaded=+new Date,this._map._fadeAnimated?(J(e.el,0),v(this._fadeFrame),this._fadeFrame=g(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(G(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),yi||!this._map._fadeAnimated?g(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new x(this._wrapX?r(t.x,this._wrapX):t.x,this._wrapY?r(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new P(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),hn=an.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=c(this,i)).detectRetina&&Vi&&0<i.maxZoom&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),Pi||this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return ht(e,"load",n(this._tileOnLoad,this,i,e)),ht(e,"error",n(this._tileOnError,this,i,e)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),e.alt="",e.setAttribute("role","presentation"),e.src=this.getTileUrl(t),e},getTileUrl:function(t){var e,n={r:Vi?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(e=this._globalTileRange.max.y-t.y,this.options.tms&&(n.y=e),n["-y"]=e),d(this._url,i(n,this.options))},_tileOnLoad:function(t,i){yi?setTimeout(n(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom;return this.options.zoomReverse&&(t=i-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=a,i.onerror=a,i.complete||(i.src=Yt,H(i),delete this._tiles[t]))},_removeTile:function(t){var i=this._tiles[t];if(i)return Ti||i.el.setAttribute("src",Yt),an.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==Yt))return an.prototype._tileReady.call(this,t,i,e)}}),un=hn.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=c(this,e)).detectRetina&&Vi?2:1,r=this.getTileSize();n.width=r.x*s,n.height=r.y*s,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[i]=this._crs.code,hn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=b(e.project(i[0]),e.project(i[1])),o=n.min,s=n.max,r=(1.3<=this._wmsVersion&&this._crs===Oe?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=hn.prototype.getTileUrl.call(this,t);return a+_(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});hn.WMS=un,Ht.wms=function(t,i){return new un(t,i)};var ln=Ne.extend({options:{padding:.1,tolerance:0},initialize:function(t){c(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&G(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,i){var e=this._map.getZoomScale(i,this._zoom),n=it(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),r=this._map.project(t,i).subtract(s),a=o.multiplyBy(-e).add(n).add(o).subtract(r);Oi?Q(this._container,a,e):tt(this._container,a)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new P(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),cn=ln.extend({getEvents:function(){var t=ln.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ln.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ht(t,"mousemove",this._onMouseMove,this),ht(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ht(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){v(this._redrawRequest),delete this._ctx,H(this._container),ut(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(){var t,i,e,n;this._map._animatingZoom&&this._bounds||(ln.prototype._update.call(this),t=this._bounds,i=this._container,e=t.getSize(),n=Vi?2:1,tt(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Vi&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){ln.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);var i=(this._layers[o(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[o(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){for(var i,e=t.options.dashArray.split(/[, ]+/),n=[],o=0;o<e.length;o++){if(i=Number(e[o]),isNaN(i))return;n.push(i)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||g(this._redraw,this))},_extendRedrawBounds:function(t){var i;t._pxBounds&&(i=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new P,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i])))},_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,i=this._redrawBounds;i?(t=i.getSize(),this._ctx.clearRect(i.min.x,i.min.y,t.x,t.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var t,i,e=this._redrawBounds;this._ctx.save(),e&&(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,i){if(this._drawing){var e,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(h.beginPath(),e=0;e<a;e++){for(n=0,o=r[e].length;n<o;n++)s=r[e][n],h[n?"lineTo":"moveTo"](s.x,s.y);i&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){var i,e,n,o;this._drawing&&!t._empty()&&(i=t._point,e=this._ctx,n=Math.max(Math.round(t._radius),1),1!=(o=(Math.max(Math.round(t._radiusY),1)||n)/n)&&(e.save(),e.scale(1,o)),e.beginPath(),e.arc(i.x,i.y/o,n,0,2*Math.PI,!1),1!=o&&e.restore(),this._fillStroke(e,t))},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(n)&&(("click"===t.type||"preclick"!==t.type)&&this._map._draggableMoved(i)||(e=i));e&&(xt(t),this._fireEvent([e],t))},_onMouseMove:function(t){var i;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(i=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,i))},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(K(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var e,o,s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(i)&&(o=e);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(G(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(n(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i,e,n=t._order;n&&(i=n.next,e=n.prev,i&&((i.prev=e)?e.next=i:i&&(this._drawFirst=i),n.prev=this._drawLast,(this._drawLast.next=n).next=null,this._drawLast=n,this._requestRedraw(t)))},_bringToBack:function(t){var i,e,n=t._order;n&&(i=n.next,(e=n.prev)&&((e.next=i)?i.prev=e:e&&(this._drawLast=e),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)))}}),_n=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">')}}}(),dn={_initContainer:function(){this._container=W("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ln.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=_n("shape");G(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=_n("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;H(i),t.removeInteractiveTarget(i),delete this._layers[o(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i=i||(t._stroke=_n("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=Kt(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e=e||(t._fill=_n("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){U(t._container)},_bringToBack:function(t){V(t._container)}},pn=Yi?_n:E,mn=ln.extend({getEvents:function(){var t=ln.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=pn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=pn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){H(this._container),ut(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){var t,i,e;this._map._animatingZoom&&this._bounds||(ln.prototype._update.call(this),i=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),tt(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update"))},_initPath:function(t){var i=t._path=pn("path");t.options.className&&G(i,t.options.className),t.options.interactive&&G(i,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){H(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,k(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){U(t._path)},_bringToBack:function(t){V(t._path)}});Yi&&mn.include(dn),fe.include({getRenderer:function(t){var i=(i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&Ft(t)||Ut(t)}});var fn=Ye.extend({initialize:function(t,i){Ye.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=M(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});mn.create=pn,mn.pointsToPath=k,Xe.geometryToLayer=Bt,Xe.coordsToLatLng=It,Xe.coordsToLatLngs=Ot,Xe.latLngToCoords=Rt,Xe.latLngsToCoords=Nt,Xe.getFeature=Dt,Xe.asFeature=jt,fe.mergeOptions({boxZoom:!0});var gn=Pe.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(){ht(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){ut(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){H(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){return!(!t.shiftKey||1!==t.which&&1!==t.button)&&(this._clearDeferredResetState(),this._resetState(),ci(),et(),this._startPoint=this._map.mouseEventToContainerPoint(t),ht(document,{contextmenu:gt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this),void 0)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=W("div","leaflet-zoom-box",this._container),G(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new P(this._point,this._startPoint),e=i.getSize();tt(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(H(this._box),
K(this._container,"leaflet-crosshair")),_i(),nt(),ut(document,{contextmenu:gt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){var i;1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0),i=new T(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})))},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});fe.addInitHook("addHandler","boxZoom",gn),fe.mergeOptions({doubleClickZoom:!0});var vn=Pe.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});fe.addInitHook("addHandler","doubleClickZoom",vn),fe.mergeOptions({dragging:!0,inertia:!Li,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yn=Pe.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Se(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))),G(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){K(this._map._container,"leaflet-grab"),K(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,i=this._map;i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=M(this._map.options.maxBounds),this._offsetLimit=b(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var i,e;this._map.options.inertia&&(i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(i),this._prunePositions(i)),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),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){var t,i;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit,t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)<Math.abs(s+e)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i,e,n,o,s,r,a,h,u,l=this._map,c=l.options,_=!c.inertia||this._times.length<2;l.fire("dragend",t),_?l.fire("moveend"):(this._prunePositions(+new Date),i=this._lastPos.subtract(this._positions[0]),e=(this._lastTime-this._times[0])/1e3,n=c.easeLinearity,s=(o=i.multiplyBy(n/e)).distanceTo([0,0]),r=Math.min(c.inertiaMaxSpeed,s),a=o.multiplyBy(r/s),h=r/(c.inertiaDeceleration*n),(u=a.multiplyBy(-h/2).round()).x||u.y?(u=l._limitOffset(u,l.options.maxBounds),g(function(){l.panBy(u,{duration:h,easeLinearity:n,noMoveStart:!0,animate:!0})})):l.fire("moveend"))}});fe.addInitHook("addHandler","dragging",yn),fe.mergeOptions({keyboard:!0,keyboardPanDelta:80});var xn=Pe.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"),ht(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(),ut(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(){var t,i,e,n;this._focused||(t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft,this._map._container.focus(),window.scrollTo(n,e))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var i=this._panKeys={},e=this.keyCodes,n=0,o=e.left.length;n<o;n++)i[e.left[n]]=[-1*t,0];for(n=0,o=e.right.length;n<o;n++)i[e.right[n]]=[t,0];for(n=0,o=e.down.length;n<o;n++)i[e.down[n]]=[0,t];for(n=0,o=e.up.length;n<o;n++)i[e.up[n]]=[0,-1*t]},_setZoomDelta:function(t){for(var i=this._zoomKeys={},e=this.keyCodes,n=0,o=e.zoomIn.length;n<o;n++)i[e.zoomIn[n]]=t;for(n=0,o=e.zoomOut.length;n<o;n++)i[e.zoomOut[n]]=-t},_addHooks:function(){ht(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){ut(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys)n._panAnim&&n._panAnim._inProgress||(i=this._panKeys[e],t.shiftKey&&(i=w(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}gt(t)}}});fe.addInitHook("addHandler","keyboard",xn),fe.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var wn=Pe.extend({addHooks:function(){ht(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){ut(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=yt(t),e=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(e-(new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),o),gt(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=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=e?Math.ceil(o/e)*e:o,r=t._limitZoom(i+(0<this._delta?s:-s))-i;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(i+r):t.setZoomAround(this._lastMousePos,i+r))}});fe.addInitHook("addHandler","scrollWheelZoom",wn),fe.mergeOptions({tap:!0,tapTolerance:15});var Pn=Pe.extend({addHooks:function(){ht(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){ut(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(ft(t),this._fireClick=!0,1<t.touches.length)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],e=i.target;this._startPos=this._newPos=new x(i.clientX,i.clientY),e.tagName&&"a"===e.tagName.toLowerCase()&&G(e,"leaflet-active"),this._holdTimeout=setTimeout(n(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),ht(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){var i,e;clearTimeout(this._holdTimeout),ut(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches&&((e=(i=t.changedTouches[0]).target)&&e.tagName&&"a"===e.tagName.toLowerCase()&&K(e,"leaflet-active"),this._simulateEvent("mouseup",i),this._isTapValid()&&this._simulateEvent("click",i))},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var i=t.touches[0];this._newPos=new x(i.clientX,i.clientY),this._simulateEvent("mousemove",i)},_simulateEvent:function(t,i){var e=document.createEvent("MouseEvents");e._simulated=!0,i.target._simulatedClick=!0,e.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(e)}});!Hi||Wi&&!Si||fe.addInitHook("addHandler","tap",Pn),fe.mergeOptions({touchZoom:Hi&&!Li,bounceAtZoomLimits:!0});var Ln=Pe.extend({addHooks:function(){G(this._map._container,"leaflet-touch-zoom"),ht(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){K(this._map._container,"leaflet-touch-zoom"),ut(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i,e,n=this._map;!t.touches||2!==t.touches.length||n._animatingZoom||this._zooming||(i=n.mouseEventToContainerPoint(t.touches[0]),e=n.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),"center"!==n.options.touchZoom&&(this._pinchStartLatLng=n.containerPointToLatLng(i.add(e)._divideBy(2))),this._startDist=i.distanceTo(e),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),ht(document,"touchmove",this._onTouchMove,this),ht(document,"touchend",this._onTouchEnd,this),ft(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),o=i.mouseEventToContainerPoint(t.touches[1]),s=e.distanceTo(o)/this._startDist;if(this._zoom=i.getScaleZoom(s,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&s<1||this._zoom>i.getMaxZoom()&&1<s)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1==s)return}else{var r=e._add(o)._divideBy(2)._subtract(this._centerPoint);if(1==s&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),v(this._animRequest);var a=n(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=g(a,this,!0),ft(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,v(this._animRequest),ut(document,"touchmove",this._onTouchMove,this),ut(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});fe.addInitHook("addHandler","touchZoom",Ln),fe.BoxZoom=gn,fe.DoubleClickZoom=vn,fe.Drag=yn,fe.Keyboard=xn,fe.ScrollWheelZoom=wn,fe.Tap=Pn,fe.TouchZoom=Ln,t.version="1.7.1",t.Control=ge,t.control=Lt,t.Browser=Xi,t.Evented=ii,t.Mixin=Te,t.Util=Qt,t.Class=y,t.Handler=Pe,t.extend=i,t.bind=n,t.stamp=o,t.setOptions=c,t.DomEvent=pe,t.DomUtil=ue,t.PosAnimation=me,t.Draggable=Se,t.LineUtil=Ze,t.PolyUtil=Ee,t.Point=x,t.point=w,t.Bounds=P,t.bounds=b,t.Transformation=S,t.transformation=Z,t.Projection=Ae,t.LatLng=z,t.latLng=C,t.LatLngBounds=T,t.latLngBounds=M,t.CRS=oi,t.GeoJSON=Xe,t.geoJSON=Wt,t.geoJson=$e,t.Layer=Ne,t.LayerGroup=De,t.layerGroup=function(t,i){return new De(t,i)},t.FeatureGroup=je,t.featureGroup=function(t,i){return new je(t,i)},t.ImageOverlay=Qe,t.imageOverlay=function(t,i,e){return new Qe(t,i,e)},t.VideoOverlay=tn,t.videoOverlay=function(t,i,e){return new tn(t,i,e)},t.SVGOverlay=en,t.svgOverlay=function(t,i,e){return new en(t,i,e)},t.DivOverlay=nn,t.Popup=on,t.popup=function(t,i){return new on(t,i)},t.Tooltip=sn,t.tooltip=function(t,i){return new sn(t,i)},t.Icon=We,t.icon=function(t){return new We(t)},t.DivIcon=rn,t.divIcon=function(t){return new rn(t)},t.Marker=Ue,t.marker=function(t,i){return new Ue(t,i)},t.TileLayer=hn,t.tileLayer=Ht,t.GridLayer=an,t.gridLayer=function(t){return new an(t)},t.SVG=mn,t.svg=Ut,t.Renderer=ln,t.Canvas=cn,t.canvas=Ft,t.Path=Ve,t.CircleMarker=qe,t.circleMarker=function(t,i){return new qe(t,i)},t.Circle=Ge,t.circle=function(t,i,e){return new Ge(t,i,e)},t.Polyline=Ke,t.polyline=function(t,i){return new Ke(t,i)},t.Polygon=Ye,t.polygon=function(t,i){return new Ye(t,i)},t.Rectangle=fn,t.rectangle=function(t,i){return new fn(t,i)},t.Map=fe,t.map=function(t,i){return new fe(t,i)};var bn=window.L;t.noConflict=function(){return window.L=bn,this},window.L=t});
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):t.proj4=s()}(this,function(){"use strict";function t(t,s){if(t[s])return t[s];for(var i,a=Object.keys(t),h=s.toLowerCase().replace(qt,""),e=-1;++e<a.length;)if(i=a[e],i.toLowerCase().replace(qt,"")===h)return t[i]}function s(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Lt}function i(t){return new s(t).output()}function a(t,s,i){Array.isArray(s)&&(i.unshift(s),s=null);var a=s?{}:t,e=i.reduce(function(t,s){return h(s,t),t},a);s&&(t[s]=e)}function h(t,s){if(Array.isArray(t)){var i=t.shift();if("PARAMETER"===i&&(i=t.shift()),1===t.length)return Array.isArray(t[0])?(s[i]={},void h(t[0],s[i])):void(s[i]=t[0]);if(t.length)if("TOWGS84"!==i){if("AXIS"===i)return i in s||(s[i]=[]),void s[i].push(t);Array.isArray(i)||(s[i]={});var e;switch(i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return s[i]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&h(t[2],s[i]));case"SPHEROID":case"ELLIPSOID":return s[i]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&h(t[3],s[i]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void a(s,i,t);default:for(e=-1;++e<t.length;)if(!Array.isArray(t[e]))return h(t,s[i]);return a(s,i,t)}}else s[i]=t;else s[i]=!0}else s[t]=!0}function e(t,s){var i=s[0],a=s[1];!(i in t)&&a in t&&(t[i]=t[a],3===s.length&&(t[i]=s[2](t[i])))}function n(t){return t*Ft}function r(t){function s(s){return s*(t.to_meter||1)}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var i="",a=0,h=t.AXIS.length;a<h;++a){var r=[t.AXIS[a][0].toLowerCase(),t.AXIS[a][1].toLowerCase()];-1!==r[0].indexOf("north")||("y"===r[0]||"lat"===r[0])&&"north"===r[1]?i+="n":-1!==r[0].indexOf("south")||("y"===r[0]||"lat"===r[0])&&"south"===r[1]?i+="s":-1!==r[0].indexOf("east")||("x"===r[0]||"lon"===r[0])&&"east"===r[1]?i+="e":-1===r[0].indexOf("west")&&("x"!==r[0]&&"lon"!==r[0]||"west"!==r[1])||(i+="w")}2===i.length&&(i+="u"),3===i.length&&(t.axis=i)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var o=t.GEOGCS;"GEOGCS"===t.type&&(o=t),o&&(o.DATUM?t.datumCode=o.DATUM.name.toLowerCase():t.datumCode=o.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==t.datumCode&&"new_zealand_1949"!==t.datumCode||(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(t.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=o.DATUM.SPHEROID.a,t.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(t.datum_params=o.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",n],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",n],["x0","false_easting",s],["y0","false_northing",s],["long0","central_meridian",n],["lat0","latitude_of_origin",n],["lat0","standard_parallel_1",n],["lat1","standard_parallel_1",n],["lat2","standard_parallel_2",n],["azimuth","Azimuth"],["alpha","azimuth",n],["srsCode","name"]].forEach(function(s){return e(t,s)}),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=n(t.lat1>0?90:-90),t.lat_ts=t.lat1)}function o(t){var s=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?o[t]=Rt(arguments[1]):o[t]=Dt(arguments[1]):o[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?o.apply(s,t):o(t)});if("string"==typeof t){if(t in o)return o[t]}else"EPSG"in t?o["EPSG:"+t.EPSG]=t:"ESRI"in t?o["ESRI:"+t.ESRI]=t:"IAU2000"in t?o["IAU2000:"+t.IAU2000]=t:console.log(t);return}}function l(t){return"string"==typeof t}function u(t){return t in o}function c(t){return Ut.some(function(s){return t.indexOf(s)>-1})}function M(s){var i=t(s,"authority");if(i){var a=t(i,"epsg");return a&&Qt.indexOf(a)>-1}}function f(s){var i=t(s,"extension");if(i)return t(i,"proj4")}function d(t){return"+"===t[0]}function p(t){if(!l(t))return t;if(u(t))return o[t];if(c(t)){var s=Dt(t);if(M(s))return o["EPSG:3857"];var i=f(s);return i?Rt(i):s}return d(t)?Rt(t):void 0}function m(t){return t}function y(t,s){var i=$t.length;return t.names?($t[i]=t,t.names.forEach(function(t){Yt[t.toLowerCase()]=i}),this):(console.log(s),!0)}function _(t,s,i,a){var h=t*t,e=s*s,n=(h-e)/h,r=0;return a?(h=(t*=1-n*(bt+n*(wt+n*At)))*t,n=0):r=Math.sqrt(n),{es:n,e:r,ep2:(h-e)/e}}function x(s,i,a,h,e){if(!s){var n=t(ss,h);n||(n=is),s=n.a,i=n.b,a=n.rf}return a&&!i&&(i=(1-1/a)*s),(0===a||Math.abs(s-i)<Et)&&(e=!0,i=s),{a:s,b:i,rf:a,sphere:e}}function g(t,s,i,a,h,e,n){var r={};return r.datum_type=void 0===t||"none"===t?xt:_t,s&&(r.datum_params=s.map(parseFloat),0===r.datum_params[0]&&0===r.datum_params[1]&&0===r.datum_params[2]||(r.datum_type=pt),r.datum_params.length>3&&(0===r.datum_params[3]&&0===r.datum_params[4]&&0===r.datum_params[5]&&0===r.datum_params[6]||(r.datum_type=mt,r.datum_params[3]*=gt,r.datum_params[4]*=gt,r.datum_params[5]*=gt,r.datum_params[6]=r.datum_params[6]/1e6+1))),n&&(r.datum_type=yt,r.grids=n),r.a=i,r.b=a,r.es=h,r.ep2=e,r}function v(t){return void 0===t?null:t.split(",").map(b)}function b(t){if(0===t.length)return null;var s="@"===t[0];return s&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!s,grid:null,isNull:!0}:{name:t,mandatory:!s,grid:hs[t]||null,isNull:!1}}function w(t){return t/3600*Math.PI/180}function A(t){var s=t.getInt32(8,!1);return 11!==s&&(11!==(s=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function E(t,s){return{nFields:t.getInt32(8,s),nSubgridFields:t.getInt32(24,s),nSubgrids:t.getInt32(40,s),shiftType:N(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,s),fromSemiMinorAxis:t.getFloat64(136,s),toSemiMajorAxis:t.getFloat64(152,s),toSemiMinorAxis:t.getFloat64(168,s)}}function N(t,s,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(s,i)))}function C(t,s,i){for(var a=[],h=0;h<s.nSubgrids;h++){var e=S(t,176,i),n=I(t,176,e,i),r=Math.round(1+(e.upperLongitude-e.lowerLongitude)/e.longitudeInterval),o=Math.round(1+(e.upperLatitude-e.lowerLatitude)/e.latitudeInterval);a.push({ll:[w(e.lowerLongitude),w(e.lowerLatitude)],del:[w(e.longitudeInterval),w(e.latitudeInterval)],lim:[r,o],count:e.gridNodeCount,cvs:P(n)})}return a}function P(t){return t.map(function(t){return[w(t.longitudeShift),w(t.latitudeShift)]})}function S(t,s,i){return{name:N(t,s+8,s+16).trim(),parent:N(t,s+24,s+24+8).trim(),lowerLatitude:t.getFloat64(s+72,i),upperLatitude:t.getFloat64(s+88,i),lowerLongitude:t.getFloat64(s+104,i),upperLongitude:t.getFloat64(s+120,i),latitudeInterval:t.getFloat64(s+136,i),longitudeInterval:t.getFloat64(s+152,i),gridNodeCount:t.getInt32(s+168,i)}}function I(t,s,i,a){for(var h=s+176,e=[],n=0;n<i.gridNodeCount;n++){var r={latitudeShift:t.getFloat32(h+16*n,a),longitudeShift:t.getFloat32(h+16*n+4,a),latitudeAccuracy:t.getFloat32(h+16*n+8,a),longitudeAccuracy:t.getFloat32(h+16*n+12,a)};e.push(r)}return e}function O(s,i){if(!(this instanceof O))return new O(s);i=i||function(t){if(t)throw t};var a=p(s);if("object"==typeof a){var h=O.projections.get(a.projName);if(h){if(a.datumCode&&"none"!==a.datumCode){var e=t(as,a.datumCode);e&&(a.datum_params=a.datum_params||(e.towgs84?e.towgs84.split(","):null),a.ellps=e.ellipse,a.datumName=e.datumName?e.datumName:a.datumCode)}a.k0=a.k0||1,a.axis=a.axis||"enu",a.ellps=a.ellps||"wgs84",a.lat1=a.lat1||a.lat0;var n=x(a.a,a.b,a.rf,a.ellps,a.sphere),r=_(n.a,n.b,n.rf,a.R_A),o=v(a.nadgrids),l=a.datum||g(a.datumCode,a.datum_params,n.a,n.b,r.es,r.ep2,o);Wt(this,a),Wt(this,h),this.a=n.a,this.b=n.b,this.rf=n.rf,this.sphere=n.sphere,this.es=r.es,this.e=r.e,this.ep2=r.ep2,this.datum=l,this.init(),i(null,this)}else i(s)}else i(s)}function k(t,s){return t.datum_type===s.datum_type&&!(t.a!==s.a||Math.abs(t.es-s.es)>5e-11)&&(t.datum_type===pt?t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]:t.datum_type!==mt||t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]&&t.datum_params[3]===s.datum_params[3]&&t.datum_params[4]===s.datum_params[4]&&t.datum_params[5]===s.datum_params[5]&&t.datum_params[6]===s.datum_params[6])}function q(t,s,i){var a,h,e,n,r=t.x,o=t.y,l=t.z?t.z:0;if(o<-vt&&o>-1.001*vt)o=-vt;else if(o>vt&&o<1.001*vt)o=vt;else{if(o<-vt)return{x:-1/0,y:-1/0,z:t.z};if(o>vt)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),h=Math.sin(o),n=Math.cos(o),e=h*h,a=i/Math.sqrt(1-s*e),{x:(a+l)*n*Math.cos(r),y:(a+l)*n*Math.sin(r),z:(a*(1-s)+l)*h}}function R(t,s,i,a){var h,e,n,r,o,l,u,c,M,f,d,p,m,y,_,x,g=t.x,v=t.y,b=t.z?t.z:0;if(h=Math.sqrt(g*g+v*v),e=Math.sqrt(g*g+v*v+b*b),h/i<1e-12){if(y=0,e/i<1e-12)return _=vt,x=-a,{x:t.x,y:t.y,z:t.z}}else y=Math.atan2(v,g);n=b/e,c=(r=h/e)*(1-s)*(o=1/Math.sqrt(1-s*(2-s)*r*r)),M=n*o,m=0;do m++,l=s*(u=i/Math.sqrt(1-s*M*M))/(u+(x=h*c+b*M-u*(1-s*M*M))),p=(d=n*(o=1/Math.sqrt(1-l*(2-l)*r*r)))*c-(f=r*(1-l)*o)*M,c=f,M=d;while(p*p>1e-24&&m<30);return _=Math.atan(d/Math.abs(f)),{x:y,y:_,z:x}}function L(t,s,i){if(s===pt)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(s===mt){var a=i[0],h=i[1],e=i[2],n=i[3],r=i[4],o=i[5],l=i[6];return{x:l*(t.x-o*t.y+r*t.z)+a,y:l*(o*t.x+t.y-n*t.z)+h,z:l*(-r*t.x+n*t.y+t.z)+e}}}function T(t,s,i){if(s===pt)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(s===mt){var a=i[0],h=i[1],e=i[2],n=i[3],r=i[4],o=i[5],l=i[6],u=(t.x-a)/l,c=(t.y-h)/l,M=(t.z-e)/l;return{x:u+o*c-r*M,y:-o*u+c+n*M,z:r*u-n*c+M}}}function G(t){return t===pt||t===mt}function j(t,s,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var a={x:-i.x,y:i.y},h={x:Number.NaN,y:Number.NaN},e=[],n=0;n<t.grids.length;n++){var r=t.grids[n];if(e.push(r.name),r.isNull){h=a;break}if(null!==r.grid){var o=r.grid.subgrids[0],l=(Math.abs(o.del[1])+Math.abs(o.del[0]))/1e4,u=o.ll[0]-l,c=o.ll[1]-l,M=o.ll[0]+(o.lim[0]-1)*o.del[0]+l,f=o.ll[1]+(o.lim[1]-1)*o.del[1]+l;if(!(c>a.y||u>a.x||f<a.y||M<a.x||(h=B(a,s,o),isNaN(h.x))))break}else if(r.mandatory)return console.log("Unable to find mandatory grid '"+r.name+"'"),-1}return isNaN(h.x)?(console.log("Failed to find a grid shift table for location '"+-a.x*Ct+" "+a.y*Ct+" tried: '"+e+"'"),-1):(i.x=-h.x,i.y=h.y,0)}function B(t,s,i){var a={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return a;var h={x:t.x,y:t.y};h.x-=i.ll[0],h.y-=i.ll[1],h.x=Jt(h.x-Math.PI)+Math.PI;var e=z(h,i);if(s){if(isNaN(e.x))return a;e.x=h.x-e.x,e.y=h.y-e.y;var n,r,o=9;do{if(r=z(e,i),isNaN(r.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}n={x:h.x-(r.x+e.x),y:h.y-(r.y+e.y)},e.x+=n.x,e.y+=n.y}while(o--&&Math.abs(n.x)>1e-12&&Math.abs(n.y)>1e-12);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),a;a.x=Jt(e.x+i.ll[0]),a.y=e.y+i.ll[1]}else isNaN(e.x)||(a.x=t.x+e.x,a.y=t.y+e.y);return a}function z(t,s){var i,a={x:t.x/s.del[0],y:t.y/s.del[1]},h={x:Math.floor(a.x),y:Math.floor(a.y)},e={x:a.x-1*h.x,y:a.y-1*h.y},n={x:Number.NaN,y:Number.NaN};if(h.x<0||h.x>=s.lim[0])return n;if(h.y<0||h.y>=s.lim[1])return n;i=h.y*s.lim[0]+h.x;var r={x:s.cvs[i][0],y:s.cvs[i][1]};i++;var o={x:s.cvs[i][0],y:s.cvs[i][1]};i+=s.lim[0];var l={x:s.cvs[i][0],y:s.cvs[i][1]};i--;var u={x:s.cvs[i][0],y:s.cvs[i][1]},c=e.x*e.y,M=e.x*(1-e.y),f=(1-e.x)*(1-e.y),d=(1-e.x)*e.y;return n.x=f*r.x+M*o.x+d*u.x+c*l.x,n.y=f*r.y+M*o.y+d*u.y+c*l.y,n}function F(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!==t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function D(t,s){return(t.datum.datum_type===pt||t.datum.datum_type===mt)&&"WGS84"!==s.datumCode||(s.datum.datum_type===pt||s.datum.datum_type===mt)&&"WGS84"!==t.datumCode}function U(t,s,i,a){var h;if(Array.isArray(i)&&(i=rs(i)),os(i),t.datum&&s.datum&&D(t,s)&&(i=U(t,h=new O("WGS84"),i,a),t=h),a&&"enu"!==t.axis&&(i=ns(t,!1,i)),"longlat"===t.projName)i={x:i.x*Nt,y:i.y*Nt,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=es(t.datum,s.datum,i))return s.from_greenwich&&(i={x:i.x-s.from_greenwich,y:i.y,z:i.z||0}),"longlat"===s.projName?i={x:i.x*Ct,y:i.y*Ct,z:i.z||0}:(i=s.forward(i),s.to_meter&&(i={x:i.x/s.to_meter,y:i.y/s.to_meter,z:i.z||0})),a&&"enu"!==s.axis?ns(s,!0,i):i}function Q(t,s,i,a){var h,e,n;return Array.isArray(i)?(h=U(t,s,i,a)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==s.name&&"geocent"===s.name?"number"==typeof h.z?[h.x,h.y,h.z].concat(i.splice(3)):[h.x,h.y,i[2]].concat(i.splice(3)):[h.x,h.y].concat(i.splice(2)):[h.x,h.y]):(e=U(t,s,i,a),2===(n=Object.keys(i)).length?e:(n.forEach(function(a){if(void 0!==t.name&&"geocent"===t.name||void 0!==s.name&&"geocent"===s.name){if("x"===a||"y"===a||"z"===a)return}else if("x"===a||"y"===a)return;e[a]=i[a]}),e))}function W(t){return t instanceof O?t:t.oProj?t.oProj:O(t)}function H(t,s,i){t=W(t);var a,h=!1;return void 0===s?(s=t,t=ls,h=!0):(void 0!==s.x||Array.isArray(s))&&(i=s,s=t,t=ls,h=!0),s=W(s),i?Q(t,s,i):(a={forward:function(i,a){return Q(t,s,i,a)},inverse:function(i,a){return Q(s,t,i,a)}},h&&(a.oProj=s),a)}function X(t,s){return s=s||5,tt(Z({lat:t[1],lon:t[0]}),s)}function J(t){var s=Y(ht(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat]:[(s.left+s.right)/2,(s.top+s.bottom)/2]}function K(t){return t*(Math.PI/180)}function V(t){return t/Math.PI*180}function Z(t){var s,i,a,h,e,n,r,o=t.lat,l=t.lon,u=6378137,c=K(o),M=K(l);r=Math.floor((l+180)/6)+1,180===l&&(r=60),o>=56&&o<64&&l>=3&&l<12&&(r=32),o>=72&&o<84&&(l>=0&&l<9?r=31:l>=9&&l<21?r=33:l>=21&&l<33?r=35:l>=33&&l<42&&(r=37)),n=K(6*(r-1)-180+3),s=u/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),i=Math.tan(c)*Math.tan(c),a=.006739496752268451*Math.cos(c)*Math.cos(c);var f=.9996*s*((h=Math.cos(c)*(M-n))+(1-i+a)*h*h*h/6+(5-18*i+i*i+72*a-.39089081163157013)*h*h*h*h*h/120)+5e5,d=.9996*((e=u*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c)))+s*Math.tan(c)*(h*h/2+(5-i+9*a+4*a*a)*h*h*h*h/24+(61-58*i+i*i+600*a-2.2240339282485886)*h*h*h*h*h*h/720));return o<0&&(d+=1e7),{northing:Math.round(d),easting:Math.round(f),zoneNumber:r,zoneLetter:$(o)}}function Y(t){var s=t.northing,i=t.easting,a=t.zoneLetter,h=t.zoneNumber;if(h<0||h>60)return null;var e,n,r,o,l,u,c,M,f=6378137,d=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),p=i-5e5,m=s;a<"N"&&(m-=1e7),u=6*(h-1)-180+3,M=(c=m/.9996/6367449.145945056)+(3*d/2-27*d*d*d/32)*Math.sin(2*c)+(21*d*d/16-55*d*d*d*d/32)*Math.sin(4*c)+151*d*d*d/96*Math.sin(6*c),e=f/Math.sqrt(1-.00669438*Math.sin(M)*Math.sin(M)),n=Math.tan(M)*Math.tan(M),r=.006739496752268451*Math.cos(M)*Math.cos(M),o=.99330562*f/Math.pow(1-.00669438*Math.sin(M)*Math.sin(M),1.5),l=p/(.9996*e);var y=M-e*Math.tan(M)/o*(l*l/2-(5+3*n+10*r-4*r*r-.06065547077041606)*l*l*l*l/24+(61+90*n+298*r+45*n*n-1.6983531815716497-3*r*r)*l*l*l*l*l*l/720);y=V(y);var _=(l-(1+2*n+r)*l*l*l/6+(5-2*r+28*n-3*r*r+.05391597401814761+24*n*n)*l*l*l*l*l/120)/Math.cos(M);_=u+V(_);var x;if(t.accuracy){var g=Y({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});x={top:g.lat,right:g.lon,bottom:y,left:_}}else x={lat:y,lon:_};return x}function $(t){var s="Z";return 84>=t&&t>=72?s="X":72>t&&t>=64?s="W":64>t&&t>=56?s="V":56>t&&t>=48?s="U":48>t&&t>=40?s="T":40>t&&t>=32?s="S":32>t&&t>=24?s="R":24>t&&t>=16?s="Q":16>t&&t>=8?s="P":8>t&&t>=0?s="N":0>t&&t>=-8?s="M":-8>t&&t>=-16?s="L":-16>t&&t>=-24?s="K":-24>t&&t>=-32?s="J":-32>t&&t>=-40?s="H":-40>t&&t>=-48?s="G":-48>t&&t>=-56?s="F":-56>t&&t>=-64?s="E":-64>t&&t>=-72?s="D":-72>t&&t>=-80&&(s="C"),s}function tt(t,s){var i="00000"+t.easting,a="00000"+t.northing;return t.zoneNumber+t.zoneLetter+st(t.easting,t.northing,t.zoneNumber)+i.substr(i.length-5,s)+a.substr(a.length-5,s)}function st(t,s,i){var a=it(i);return at(Math.floor(t/1e5),Math.floor(s/1e5)%20,a)}function it(t){var s=t%us;return 0===s&&(s=us),s}function at(t,s,i){var a=i-1,h=cs.charCodeAt(a),e=Ms.charCodeAt(a),n=h+t-1,r=e+s,o=!1;return n>ys&&(n=n-ys+fs-1,o=!0),(n===ds||h<ds&&n>ds||(n>ds||h<ds)&&o)&&n++,(n===ps||h<ps&&n>ps||(n>ps||h<ps)&&o)&&++n===ds&&n++,n>ys&&(n=n-ys+fs-1),r>ms?(r=r-ms+fs-1,o=!0):o=!1,(r===ds||e<ds&&r>ds||(r>ds||e<ds)&&o)&&r++,(r===ps||e<ps&&r>ps||(r>ps||e<ps)&&o)&&++r===ds&&r++,r>ms&&(r=r-ms+fs-1),String.fromCharCode(n)+String.fromCharCode(r)}function ht(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var s,i=t.length,a=null,h="",e=0;!/[A-Z]/.test(s=t.charAt(e));){if(e>=2)throw"MGRSPoint bad conversion from: "+t;h+=s,e++}var n=parseInt(h,10);if(0===e||e+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(e++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;a=t.substring(e,e+=2);for(var o=it(n),l=et(a.charAt(0),o),u=nt(a.charAt(1),o);u<rt(r);)u+=2e6;var c=i-e;if(c%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var M,f,d,p,m,y=c/2,_=0,x=0;return y>0&&(M=1e5/Math.pow(10,y),f=t.substring(e,e+y),_=parseFloat(f)*M,d=t.substring(e+y),x=parseFloat(d)*M),p=_+l,m=x+u,{easting:p,northing:m,zoneLetter:r,zoneNumber:n,accuracy:M}}function et(t,s){for(var i=cs.charCodeAt(s-1),a=1e5,h=!1;i!==t.charCodeAt(0);){if(++i===ds&&i++,i===ps&&i++,i>ys){if(h)throw"Bad character: "+t;i=fs,h=!0}a+=1e5}return a}function nt(t,s){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i=Ms.charCodeAt(s-1),a=0,h=!1;i!==t.charCodeAt(0);){if(++i===ds&&i++,i===ps&&i++,i>ms){if(h)throw"Bad character: "+t;i=fs,h=!0}a+=1e5}return a}function rt(t){var s;switch(t){case"C":s=11e5;break;case"D":s=2e6;break;case"E":s=28e5;break;case"F":s=37e5;break;case"G":s=46e5;break;case"H":s=55e5;break;case"J":s=64e5;break;case"K":s=73e5;break;case"L":s=82e5;break;case"M":s=91e5;break;case"N":s=0;break;case"P":s=8e5;break;case"Q":s=17e5;break;case"R":s=26e5;break;case"S":s=35e5;break;case"T":s=44e5;break;case"U":s=53e5;break;case"V":s=62e5;break;case"W":s=7e6;break;case"X":s=79e5;break;default:s=-1}if(s>=0)return s;throw"Invalid zone letter: "+t}function ot(t,s,i){if(!(this instanceof ot))return new ot(t,s,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===s){var a=t.split(",");this.x=parseFloat(a[0],10),this.y=parseFloat(a[1],10),this.z=parseFloat(a[2],10)||0}else this.x=t,this.y=s,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}function lt(t){var s=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],i="object"==typeof t.PROJECTION?Object.keys(t.PROJECTION)[0]:t.PROJECTION;return"no_uoff"in t||"no_off"in t||-1!==s.indexOf(i)}function ut(t){var s,i=[];return i[0]=t*si,s=t*t,i[0]+=s*ii,i[1]=s*hi,s*=t,i[0]+=s*ai,i[1]+=s*ei,i[2]=s*ni,i}function ct(t,s){var i=t+t;return t+s[0]*Math.sin(i)+s[1]*Math.sin(i+i)+s[2]*Math.sin(i+i+i)}function Mt(t,s,i,a){var h;return t<Et?(a.value=Ni.AREA_0,h=0):(h=Math.atan2(s,i),Math.abs(h)<=Pt?a.value=Ni.AREA_0:h>Pt&&h<=vt+Pt?(a.value=Ni.AREA_1,h-=vt):h>vt+Pt||h<=-(vt+Pt)?(a.value=Ni.AREA_2,h=h>=0?h-It:h+It):(a.value=Ni.AREA_3,h+=vt)),h}function ft(t,s){var i=t+s;return i<-It?i+=St:i>+It&&(i-=St),i}function dt(t,s,i,a){for(var h=s;a;--a){var e=t(h);if(h-=e,Math.abs(e)<i)break}return h}var pt=1,mt=2,yt=3,_t=4,xt=5,gt=484813681109536e-20,vt=Math.PI/2,bt=.16666666666666666,wt=.04722222222222222,At=.022156084656084655,Et=1e-10,Nt=.017453292519943295,Ct=57.29577951308232,Pt=Math.PI/4,St=2*Math.PI,It=3.14159265359,Ot={};Ot.greenwich=0,Ot.lisbon=-9.131906111111,Ot.paris=2.337229166667,Ot.bogota=-74.080916666667,Ot.madrid=-3.687938888889,Ot.rome=12.452333333333,Ot.bern=7.439583333333,Ot.jakarta=106.807719444444,Ot.ferro=-17.666666666667,Ot.brussels=4.367975,Ot.stockholm=18.058277777778,Ot.athens=23.7163375,Ot.oslo=10.722916666667;var kt={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},qt=/[\s_\-\/\(\)]/g,Rt=function(s){var i,a,h,e={},n=s.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,s){var i=s.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),r={proj:"projName",datum:"datumCode",rf:function(t){e.rf=parseFloat(t)},lat_0:function(t){e.lat0=t*Nt},lat_1:function(t){e.lat1=t*Nt},lat_2:function(t){e.lat2=t*Nt},lat_ts:function(t){e.lat_ts=t*Nt},lon_0:function(t){e.long0=t*Nt},lon_1:function(t){e.long1=t*Nt},lon_2:function(t){e.long2=t*Nt},alpha:function(t){e.alpha=parseFloat(t)*Nt},gamma:function(t){e.rectified_grid_angle=parseFloat(t)},lonc:function(t){e.longc=t*Nt},x_0:function(t){e.x0=parseFloat(t)},y_0:function(t){e.y0=parseFloat(t)},k_0:function(t){e.k0=parseFloat(t)},k:function(t){e.k0=parseFloat(t)},a:function(t){e.a=parseFloat(t)},b:function(t){e.b=parseFloat(t)},r_a:function(){e.R_A=!0},zone:function(t){e.zone=parseInt(t,10)},south:function(){e.utmSouth=!0},towgs84:function(t){e.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){e.to_meter=parseFloat(t)},units:function(s){e.units=s;var i=t(kt,s);i&&(e.to_meter=i.to_meter)},from_greenwich:function(t){e.from_greenwich=t*Nt},pm:function(s){var i=t(Ot,s);e.from_greenwich=(i||parseFloat(s))*Nt},nadgrids:function(t){"@null"===t?e.datumCode="none":e.nadgrids=t},axis:function(t){3===t.length&&-1!=="ewnsud".indexOf(t.substr(0,1))&&-1!=="ewnsud".indexOf(t.substr(1,1))&&-1!=="ewnsud".indexOf(t.substr(2,1))&&(e.axis=t)},approx:function(){e.approx=!0}};for(i in n)a=n[i],i in r?"function"==typeof(h=r[i])?h(a):e[h]=a:e[i]=a;return"string"==typeof e.datumCode&&"WGS84"!==e.datumCode&&(e.datumCode=e.datumCode.toLowerCase()),e},Lt=1,Tt=/\s/,Gt=/[A-Za-z]/,jt=/[A-Za-z84]/,Bt=/[,\]]/,zt=/[\d\.E\-\+]/;s.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;Tt.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case Lt:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},s.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(Bt.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},s.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=Lt)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=Lt,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},s.prototype.number=function(t){if(!zt.test(t)){if(Bt.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},s.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},s.prototype.keyword=function(t){if(jt.test(t))this.word+=t;else{if("["===t){var s=[];return s.push(this.word),this.level++,null===this.root?this.root=s:this.currentObject.push(s),this.stack.push(this.currentObject),this.currentObject=s,void(this.state=Lt)}if(!Bt.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},s.prototype.neutral=function(t){if(Gt.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(zt.test(t))return this.word=t,void(this.state=3);if(!Bt.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},s.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var Ft=.017453292519943295,Dt=function(t){var s=i(t),a=s.shift(),e=s.shift();s.unshift(["name",e]),s.unshift(["type",a]);var n={};return h(s,n),r(n),n};!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(o);var Ut=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],Qt=["3857","900913","3785","102113"],Wt=function(t,s){t=t||{};var i,a;if(!s)return t;for(a in s)void 0!==(i=s[a])&&(t[a]=i);return t},Ht=function(t,s,i){var a=t*s;return i/Math.sqrt(1-a*a)},Xt=function(t){return t<0?-1:1},Jt=function(t){return Math.abs(t)<=It?t:t-Xt(t)*St},Kt=function(t,s,i){var a=t*i,h=.5*t;return a=Math.pow((1-a)/(1+a),h),Math.tan(.5*(vt-s))/a},Vt=function(t,s){for(var i,a,h=.5*t,e=vt-2*Math.atan(s),n=0;n<=15;n++)if(i=t*Math.sin(e),a=vt-2*Math.atan(s*Math.pow((1-i)/(1+i),h))-e,e+=a,Math.abs(a)<=1e-10)return e;return-9999},Zt=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Ht(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var s=t.x,i=t.y;if(i*Ct>90&&i*Ct<-90&&s*Ct>180&&s*Ct<-180)return null;var a,h;if(Math.abs(Math.abs(i)-vt)<=Et)return null;if(this.sphere)a=this.x0+this.a*this.k0*Jt(s-this.long0),h=this.y0+this.a*this.k0*Math.log(Math.tan(Pt+.5*i));else{var e=Math.sin(i),n=Kt(this.e,i,e);a=this.x0+this.a*this.k0*Jt(s-this.long0),h=this.y0-this.a*this.k0*Math.log(n)}return t.x=a,t.y=h,t},inverse:function(t){var s,i,a=t.x-this.x0,h=t.y-this.y0;if(this.sphere)i=vt-2*Math.atan(Math.exp(-h/(this.a*this.k0)));else{var e=Math.exp(-h/(this.a*this.k0));if(-9999===(i=Vt(this.e,e)))return null}return s=Jt(this.long0+a/(this.a*this.k0)),t.x=s,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:m,inverse:m,names:["longlat","identity"]}],Yt={},$t=[],ts={start:function(){Zt.forEach(y)},add:y,get:function(t){if(!t)return!1;var s=t.toLowerCase();return void 0!==Yt[s]&&$t[Yt[s]]?$t[Yt[s]]:void 0}},ss={};ss.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},ss.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},ss.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},ss.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},ss.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},ss.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},ss.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},ss.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},ss.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},ss.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},ss.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},ss.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},ss.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},ss.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},ss.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},ss.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},ss.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},ss.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},ss.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},ss.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},ss.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},ss.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},ss.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},ss.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},ss.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},ss.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},ss.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},ss.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},ss.hough={a:6378270,rf:297,ellipseName:"Hough"},ss.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},ss.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},ss.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},ss.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},ss.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},ss.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},ss.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},ss.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},ss.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},ss.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},ss.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},ss.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var is=ss.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};ss.sphere={
a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var as={};as.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},as.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},as.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},as.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},as.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},as.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},as.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},as.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},as.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},as.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},as.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},as.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},as.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},as.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},as.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},as.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},as.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var hs={};O.projections=ts,O.projections.start();var es=function(t,s,i){if(k(t,s))return i;if(t.datum_type===xt||s.datum_type===xt)return i;var a=t.a,h=t.es;if(t.datum_type===yt){if(0!==j(t,!1,i))return;a=6378137,h=.0066943799901413165}var e=s.a,n=s.b,r=s.es;return s.datum_type===yt&&(e=6378137,n=6356752.314,r=.0066943799901413165),h!==r||a!==e||G(t.datum_type)||G(s.datum_type)?(i=q(i,h,a),G(t.datum_type)&&(i=L(i,t.datum_type,t.datum_params)),G(s.datum_type)&&(i=T(i,s.datum_type,s.datum_params)),i=R(i,r,e,n),s.datum_type!==yt||0===j(s,!0,i)?i:void 0):i},ns=function(t,s,i){var a,h,e,n=i.x,r=i.y,o=i.z||0,l={};for(e=0;e<3;e++)if(!s||2!==e||void 0!==i.z)switch(0===e?(a=n,h=-1!=="ew".indexOf(t.axis[e])?"x":"y"):1===e?(a=r,h=-1!=="ns".indexOf(t.axis[e])?"y":"x"):(a=o,h="z"),t.axis[e]){case"e":l[h]=a;break;case"w":l[h]=-a;break;case"n":l[h]=a;break;case"s":l[h]=-a;break;case"u":void 0!==i[h]&&(l.z=a);break;case"d":void 0!==i[h]&&(l.z=-a);break;default:return null}return l},rs=function(t){var s={x:t[0],y:t[1]};return t.length>2&&(s.z=t[2]),t.length>3&&(s.m=t[3]),s},os=function(t){F(t.x),F(t.y)},ls=O("WGS84"),us=6,cs="AJSAJS",Ms="AFAFAF",fs=65,ds=73,ps=79,ms=86,ys=90,_s={forward:X,inverse:function(t){var s=Y(ht(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat,s.lon,s.lat]:[s.left,s.bottom,s.right,s.top]},toPoint:J};ot.fromMGRS=function(t){return new ot(J(t))},ot.prototype.toMGRS=function(t){return X([this.x,this.y],t)};var xs=.01068115234375,gs=function(t){var s=[];s[0]=1-t*(.25+t*(.046875+t*(.01953125+t*xs))),s[1]=t*(.75-t*(.046875+t*(.01953125+t*xs)));var i=t*t;return s[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,s[3]=i*(.3645833333333333-.005696614583333333*t),s[4]=i*t*.3076171875,s},vs=function(t,s,i,a){return i*=s,s*=s,a[0]*t-i*(a[1]+s*(a[2]+s*(a[3]+s*a[4])))},bs=function(t,s,i){for(var a=1/(1-s),h=t,e=20;e;--e){var n=Math.sin(h),r=1-s*n*n;if(r=(vs(h,n,Math.cos(h),i)-t)*(r*Math.sqrt(r))*a,h-=r,Math.abs(r)<Et)return h}return h},ws={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=gs(this.es),this.ml0=vs(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var s,i,a,h=t.x,e=t.y,n=Jt(h-this.long0),r=Math.sin(e),o=Math.cos(e);if(this.es){var l=o*n,u=Math.pow(l,2),c=this.ep2*Math.pow(o,2),M=Math.pow(c,2),f=Math.abs(o)>Et?Math.tan(e):0,d=Math.pow(f,2),p=Math.pow(d,2);s=1-this.es*Math.pow(r,2),l/=Math.sqrt(s);var m=vs(e,r,o,this.en);i=this.a*(this.k0*l*(1+u/6*(1-d+c+u/20*(5-18*d+p+14*c-58*d*c+u/42*(61+179*p-p*d-479*d)))))+this.x0,a=this.a*(this.k0*(m-this.ml0+r*n*l/2*(1+u/12*(5-d+9*c+4*M+u/30*(61+p-58*d+270*c-330*d*c+u/56*(1385+543*p-p*d-3111*d))))))+this.y0}else{var y=o*Math.sin(n);if(Math.abs(Math.abs(y)-1)<Et)return 93;if(i=.5*this.a*this.k0*Math.log((1+y)/(1-y))+this.x0,a=o*Math.cos(n)/Math.sqrt(1-Math.pow(y,2)),(y=Math.abs(a))>=1){if(y-1>Et)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return t.x=i,t.y=a,t},inverse:function(t){var s,i,a,h,e=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);if(this.es)if(s=this.ml0+n/this.k0,i=bs(s,this.es,this.en),Math.abs(i)<vt){var r=Math.sin(i),o=Math.cos(i),l=Math.abs(o)>Et?Math.tan(i):0,u=this.ep2*Math.pow(o,2),c=Math.pow(u,2),M=Math.pow(l,2),f=Math.pow(M,2);s=1-this.es*Math.pow(r,2);var d=e*Math.sqrt(s)/this.k0,p=Math.pow(d,2);a=i-(s*=l)*p/(1-this.es)*.5*(1-p/12*(5+3*M-9*u*M+u-4*c-p/30*(61+90*M-252*u*M+45*f+46*u-p/56*(1385+3633*M+4095*f+1574*f*M)))),h=Jt(this.long0+d*(1-p/6*(1+2*M+u-p/20*(5+28*M+24*f+8*u*M+6*u-p/42*(61+662*M+1320*f+720*f*M))))/o)}else a=vt*Xt(n),h=0;else{var m=Math.exp(e/this.k0),y=.5*(m-1/m),_=this.lat0+n/this.k0,x=Math.cos(_);s=Math.sqrt((1-Math.pow(x,2))/(1+Math.pow(y,2))),a=Math.asin(s),n<0&&(a=-a),h=0===y&&0===x?0:Jt(Math.atan2(y,x)+this.long0)}return t.x=h,t.y=a,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},As=function(t){var s=Math.exp(t);return s=(s-1/s)/2},Es=function(t,s){t=Math.abs(t),s=Math.abs(s);var i=Math.max(t,s),a=Math.min(t,s)/(i||1);return i*Math.sqrt(1+Math.pow(a,2))},Ns=function(t){var s=1+t,i=s-1;return 0===i?t:t*Math.log(s)/i},Cs=function(t){var s=Math.abs(t);return s=Ns(s*(1+s/(Es(1,s)+1))),t<0?-s:s},Ps=function(t,s){for(var i,a=2*Math.cos(2*s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return s+i*Math.sin(2*s)},Ss=function(t,s){for(var i,a=2*Math.cos(s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return Math.sin(s)*i},Is=function(t){var s=Math.exp(t);return s=(s+1/s)/2},Os=function(t,s,i){for(var a,h,e=Math.sin(s),n=Math.cos(s),r=As(i),o=Is(i),l=2*n*o,u=-2*e*r,c=t.length-1,M=t[c],f=0,d=0,p=0;--c>=0;)a=d,h=f,M=l*(d=M)-a-u*(f=p)+t[c],p=u*d-h+l*f;return l=e*o,u=n*r,[l*M-u*p,l*p+u*M]},ks={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(ws.init.apply(this),this.forward=ws.forward,this.inverse=ws.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),s=t/(2-t),i=s;this.cgb[0]=s*(2+s*(-2/3+s*(s*(116/45+s*(26/45+s*(-2854/675)))-2))),this.cbg[0]=s*(s*(2/3+s*(4/3+s*(-82/45+s*(32/45+s*(4642/4725)))))-2),i*=s,this.cgb[1]=i*(7/3+s*(s*(-227/45+s*(2704/315+s*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+s*(-16/15+s*(-13/9+s*(904/315+s*(-1522/945))))),i*=s,this.cgb[2]=i*(56/15+s*(-136/35+s*(-1262/105+s*(73814/2835)))),this.cbg[2]=i*(-26/15+s*(34/21+s*(1.6+s*(-12686/2835)))),i*=s,this.cgb[3]=i*(4279/630+s*(-332/35+s*(-399572/14175))),this.cbg[3]=i*(1237/630+s*(s*(-24832/14175)-2.4)),i*=s,this.cgb[4]=i*(4174/315+s*(-144838/6237)),this.cbg[4]=i*(-734/315+s*(109598/31185)),i*=s,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(s,2),this.Qn=this.k0/(1+s)*(1+i*(.25+i*(1/64+i/256))),this.utg[0]=s*(s*(2/3+s*(-37/96+s*(1/360+s*(81/512+s*(-96199/604800)))))-.5),this.gtu[0]=s*(.5+s*(-2/3+s*(5/16+s*(41/180+s*(-127/288+s*(7891/37800)))))),this.utg[1]=i*(-1/48+s*(-1/15+s*(437/1440+s*(-46/105+s*(1118711/3870720))))),this.gtu[1]=i*(13/48+s*(s*(557/1440+s*(281/630+s*(-1983433/1935360)))-.6)),i*=s,this.utg[2]=i*(-17/480+s*(37/840+s*(209/4480+s*(-5569/90720)))),this.gtu[2]=i*(61/240+s*(-103/140+s*(15061/26880+s*(167603/181440)))),i*=s,this.utg[3]=i*(-4397/161280+s*(11/504+s*(830251/7257600))),this.gtu[3]=i*(49561/161280+s*(-179/168+s*(6601661/7257600))),i*=s,this.utg[4]=i*(-4583/161280+s*(108847/3991680)),this.gtu[4]=i*(34729/80640+s*(-3418889/1995840)),i*=s,this.utg[5]=-.03233083094085698*i,this.gtu[5]=.6650675310896665*i;var a=Ps(this.cbg,this.lat0);this.Zb=-this.Qn*(a+Ss(this.gtu,2*a))},forward:function(t){var s=Jt(t.x-this.long0),i=t.y;i=Ps(this.cbg,i);var a=Math.sin(i),h=Math.cos(i),e=Math.sin(s),n=Math.cos(s);i=Math.atan2(a,n*h),s=Math.atan2(e*h,Es(a,h*n)),s=Cs(Math.tan(s));var r=Os(this.gtu,2*i,2*s);i+=r[0],s+=r[1];var o,l;return Math.abs(s)<=2.623395162778?(o=this.a*(this.Qn*s)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(o=1/0,l=1/0),t.x=o,t.y=l,t},inverse:function(t){var s=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);i=(i-this.Zb)/this.Qn,s/=this.Qn;var a,h;if(Math.abs(s)<=2.623395162778){var e=Os(this.utg,2*i,2*s);i+=e[0],s+=e[1],s=Math.atan(As(s));var n=Math.sin(i),r=Math.cos(i),o=Math.sin(s),l=Math.cos(s);i=Math.atan2(n*l,Es(o,l*r)),s=Math.atan2(o,l*r),a=Jt(s+this.long0),h=Ps(this.cgb,i)}else a=1/0,h=1/0;return t.x=a,t.y=h,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},qs=function(t,s){if(void 0===t){if((t=Math.floor(30*(Jt(s)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t},Rs={init:function(){var t=qs(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*Nt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ks.init.apply(this),this.forward=ks.forward,this.inverse=ks.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Ls=function(t,s){return Math.pow((1-t)/(1+t),s)},Ts=20,Gs={init:function(){var t=Math.sin(this.lat0),s=Math.cos(this.lat0);s*=s,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*s*s/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Pt)/(Math.pow(Math.tan(.5*this.lat0+Pt),this.C)*Ls(this.e*t,this.ratexp))},forward:function(t){var s=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+Pt),this.C)*Ls(this.e*Math.sin(i),this.ratexp))-vt,t.x=this.C*s,t},inverse:function(t){for(var s=t.x/this.C,i=t.y,a=Math.pow(Math.tan(.5*i+Pt)/this.K,1/this.C),h=Ts;h>0&&(i=2*Math.atan(a*Ls(this.e*Math.sin(t.y),-.5*this.e))-vt,!(Math.abs(i-t.y)<1e-14));--h)t.y=i;return h?(t.x=s,t.y=i,t):null},names:["gauss"]},js={init:function(){Gs.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var s,i,a,h;return t.x=Jt(t.x-this.long0),Gs.forward.apply(this,[t]),s=Math.sin(t.y),i=Math.cos(t.y),a=Math.cos(t.x),h=this.k0*this.R2/(1+this.sinc0*s+this.cosc0*i*a),t.x=h*i*Math.sin(t.x),t.y=h*(this.cosc0*s-this.sinc0*i*a),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var s,i,a,h,e;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,e=Math.sqrt(t.x*t.x+t.y*t.y)){var n=2*Math.atan2(e,this.R2);s=Math.sin(n),i=Math.cos(n),h=Math.asin(i*this.sinc0+t.y*s*this.cosc0/e),a=Math.atan2(t.x*s,e*this.cosc0*i-t.y*this.sinc0*s)}else h=this.phic0,a=0;return t.x=a,t.y=h,Gs.inverse.apply(this,[t]),t.x=Jt(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},Bs={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Et&&(this.k0=.5*(1+Xt(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Et&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Et&&(this.k0=.5*this.cons*Ht(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Kt(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Ht(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-vt,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var s,i,a,h,e,n,r=t.x,o=t.y,l=Math.sin(o),u=Math.cos(o),c=Jt(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=Et&&Math.abs(o+this.lat0)<=Et?(t.x=NaN,t.y=NaN,t):this.sphere?(s=2*this.k0/(1+this.sinlat0*l+this.coslat0*u*Math.cos(c)),t.x=this.a*s*u*Math.sin(c)+this.x0,t.y=this.a*s*(this.coslat0*l-this.sinlat0*u*Math.cos(c))+this.y0,t):(i=2*Math.atan(this.ssfn_(o,l,this.e))-vt,h=Math.cos(i),a=Math.sin(i),Math.abs(this.coslat0)<=Et?(e=Kt(this.e,o*this.con,this.con*l),n=2*this.a*this.k0*e/this.cons,t.x=this.x0+n*Math.sin(r-this.long0),t.y=this.y0-this.con*n*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)<Et?(s=2*this.a*this.k0/(1+h*Math.cos(c)),t.y=s*a):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*a+this.cosX0*h*Math.cos(c))),t.y=s*(this.cosX0*a-this.sinX0*h*Math.cos(c))+this.y0),t.x=s*h*Math.sin(c)+this.x0,t))},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e,n=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var r=2*Math.atan(n/(2*this.a*this.k0));return s=this.long0,i=this.lat0,n<=Et?(t.x=s,t.y=i,t):(i=Math.asin(Math.cos(r)*this.sinlat0+t.y*Math.sin(r)*this.coslat0/n),s=Jt(Math.abs(this.coslat0)<Et?this.lat0>0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y):this.long0+Math.atan2(t.x*Math.sin(r),n*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=s,t.y=i,t)}if(Math.abs(this.coslat0)<=Et){if(n<=Et)return i=this.lat0,s=this.long0,t.x=s,t.y=i,t;t.x*=this.con,t.y*=this.con,a=n*this.cons/(2*this.a*this.k0),i=this.con*Vt(this.e,a),s=this.con*Jt(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else h=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),s=this.long0,n<=Et?e=this.X0:(e=Math.asin(Math.cos(h)*this.sinX0+t.y*Math.sin(h)*this.cosX0/n),s=Jt(this.long0+Math.atan2(t.x*Math.sin(h),n*this.cosX0*Math.cos(h)-t.y*this.sinX0*Math.sin(h)))),i=-1*Vt(this.e,Math.tan(.5*(vt+e)));return t.x=s,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,s,i){return s*=i,Math.tan(.5*(vt+t))*Math.pow((1-s)/(1+s),.5*i)}},zs={init:function(){var t=this.lat0;this.lambda0=this.long0;var s=Math.sin(t),i=this.a,a=1/this.rf,h=2*a-Math.pow(a,2),e=this.e=Math.sqrt(h);this.R=this.k0*i*Math.sqrt(1-h)/(1-h*Math.pow(s,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(s/this.alpha);var n=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),o=Math.log((1+e*s)/(1-e*s));this.K=n-this.alpha*r+this.alpha*e/2*o},forward:function(t){var s=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),a=-this.alpha*(s+i)+this.K,h=2*(Math.atan(Math.exp(a))-Math.PI/4),e=this.alpha*(t.x-this.lambda0),n=Math.atan(Math.sin(e)/(Math.sin(this.b0)*Math.tan(h)+Math.cos(this.b0)*Math.cos(e))),r=Math.asin(Math.cos(this.b0)*Math.sin(h)-Math.sin(this.b0)*Math.cos(h)*Math.cos(e));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*n+this.x0,t},inverse:function(t){for(var s=t.x-this.x0,i=t.y-this.y0,a=s/this.R,h=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),e=Math.asin(Math.cos(this.b0)*Math.sin(h)+Math.sin(this.b0)*Math.cos(h)*Math.cos(a)),n=Math.atan(Math.sin(a)/(Math.cos(this.b0)*Math.cos(a)-Math.sin(this.b0)*Math.tan(h))),r=this.lambda0+n/this.alpha,o=0,l=e,u=-1e3,c=0;Math.abs(l-u)>1e-7;){if(++c>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+e/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),u=l,l=2*Math.atan(Math.exp(o))-Math.PI/2}return t.x=r,t.y=l,t},names:["somerc"]},Fs=1e-7,Ds={init:function(){var t,s,i,a,h,e,n,r,o,l,u,c=0,M=0,f=0,d=0,p=0,m=0,y=0;this.no_off=lt(this),this.no_rot="no_rot"in this;var _=!1;"alpha"in this&&(_=!0);var x=!1;if("rectified_grid_angle"in this&&(x=!0),_&&(y=this.alpha),x&&(c=this.rectified_grid_angle*Nt),_||x)M=this.longc;else if(f=this.long1,p=this.lat1,d=this.long2,m=this.lat2,Math.abs(p-m)<=Fs||(t=Math.abs(p))<=Fs||Math.abs(t-vt)<=Fs||Math.abs(Math.abs(this.lat0)-vt)<=Fs||Math.abs(Math.abs(m)-vt)<=Fs)throw new Error;var g=1-this.es;s=Math.sqrt(g),Math.abs(this.lat0)>Et?(r=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*r*r,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/g),this.A=this.B*this.k0*s/t,(h=(a=this.B*s/(i*Math.sqrt(t)))*a-1)<=0?h=0:(h=Math.sqrt(h),this.lat0<0&&(h=-h)),this.E=h+=a,this.E*=Math.pow(Kt(this.e,this.lat0,r),this.B)):(this.B=1/s,this.A=this.k0,this.E=a=h=1),_||x?(_?(u=Math.asin(Math.sin(y)/a),x||(c=y)):(u=c,y=Math.asin(a*Math.sin(u))),this.lam0=M-Math.asin(.5*(h-1/h)*Math.tan(u))/this.B):(e=Math.pow(Kt(this.e,p,Math.sin(p)),this.B),n=Math.pow(Kt(this.e,m,Math.sin(m)),this.B),h=this.E/e,o=(n-e)/(n+e),l=((l=this.E*this.E)-n*e)/(l+n*e),(t=f-d)<-Math.pi?d-=St:t>Math.pi&&(d+=St),this.lam0=Jt(.5*(f+d)-Math.atan(l*Math.tan(.5*this.B*(f-d))/o)/this.B),u=Math.atan(2*Math.sin(this.B*Jt(f-this.lam0))/(h-1/h)),c=y=Math.asin(a*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(a*a-1)/Math.cos(y))),this.lat0<0&&(this.u_0=-this.u_0)),h=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(Pt-h)),this.v_pole_s=this.ArB*Math.log(Math.tan(Pt+h))},forward:function(t){var s,i,a,h,e,n,r,o,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-vt)>Et){if(e=this.E/Math.pow(Kt(this.e,t.y,Math.sin(t.y)),this.B),n=1/e,s=.5*(e-n),i=.5*(e+n),h=Math.sin(this.B*t.x),a=(s*this.singam-h*this.cosgam)/i,Math.abs(Math.abs(a)-1)<Et)throw new Error;o=.5*this.ArB*Math.log((1-a)/(1+a)),n=Math.cos(this.B*t.x),r=Math.abs(n)<Fs?this.A*t.x:this.ArB*Math.atan2(s*this.cosgam+h*this.singam,n)}else o=t.y>0?this.v_pole_n:this.v_pole_s,r=this.ArB*t.y;return this.no_rot?(l.x=r,l.y=o):(r-=this.u_0,l.x=o*this.cosrot+r*this.sinrot,l.y=r*this.cosrot-o*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var s,i,a,h,e,n,r,o={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,s=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,s=t.y*this.cosrot+t.x*this.sinrot+this.u_0),a=Math.exp(-this.BrA*i),h=.5*(a-1/a),e=.5*(a+1/a),n=Math.sin(this.BrA*s),r=(n*this.cosgam+h*this.singam)/e,Math.abs(Math.abs(r)-1)<Et)o.x=0,o.y=r<0?-vt:vt;else{if(o.y=this.E/Math.sqrt((1+r)/(1-r)),o.y=Vt(this.e,Math.pow(o.y,1/this.B)),o.y===1/0)throw new Error;o.x=-this.rB*Math.atan2(h*this.cosgam-n*this.singam,Math.cos(this.BrA*s))}return o.x+=this.lam0,o},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},Us={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<Et)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var s=Math.sin(this.lat1),i=Math.cos(this.lat1),a=Ht(this.e,s,i),h=Kt(this.e,this.lat1,s),e=Math.sin(this.lat2),n=Math.cos(this.lat2),r=Ht(this.e,e,n),o=Kt(this.e,this.lat2,e),l=Kt(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Et?this.ns=Math.log(a/r)/Math.log(h/o):this.ns=s,isNaN(this.ns)&&(this.ns=s),this.f0=a/(this.ns*Math.pow(h,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var s=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=Et&&(i=Xt(i)*(vt-2*Et));var a,h,e=Math.abs(Math.abs(i)-vt);if(e>Et)a=Kt(this.e,i,Math.sin(i)),h=this.a*this.f0*Math.pow(a,this.ns);else{if((e=i*this.ns)<=0)return null;h=0}var n=this.ns*Jt(s-this.long0);return t.x=this.k0*(h*Math.sin(n))+this.x0,t.y=this.k0*(this.rh-h*Math.cos(n))+this.y0,t},inverse:function(t){var s,i,a,h,e,n=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(s=Math.sqrt(n*n+r*r),i=1):(s=-Math.sqrt(n*n+r*r),i=-1);var o=0;if(0!==s&&(o=Math.atan2(i*n,i*r)),0!==s||this.ns>0){if(i=1/this.ns,a=Math.pow(s/(this.a*this.f0),i),-9999===(h=Vt(this.e,a)))return null}else h=-vt;return e=Jt(o/this.ns+this.long0),t.x=e,t.y=h,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"]},Qs={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y,u=Jt(o-this.long0);return s=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/s)-this.s45),a=-u*this.alfa,h=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(a)),e=Math.asin(Math.cos(i)*Math.sin(a)/Math.cos(h)),n=this.n*e,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(h/2+this.s45),this.n),t.y=r*Math.cos(n)/1,t.x=r*Math.sin(n)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var s,i,a,h,e,n,r,o=t.x;t.x=t.y,t.y=o,this.czech||(t.y*=-1,t.x*=-1),e=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.y,t.x)/Math.sin(this.s0),a=2*(Math.atan(Math.pow(this.ro0/e,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),s=Math.asin(Math.cos(this.ad)*Math.sin(a)-Math.sin(this.ad)*Math.cos(a)*Math.cos(h)),i=Math.asin(Math.cos(a)*Math.sin(h)/Math.cos(s)),t.x=this.long0-i/this.alfa,n=s,r=0;var l=0;do t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(s/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(n))/(1-this.e*Math.sin(n)),this.e/2))-this.s45),Math.abs(n-t.y)<1e-10&&(r=1),n=t.y,l+=1;while(0===r&&l<15);return l>=15?null:t},names:["Krovak","krovak"]},Ws=function(t,s,i,a,h){return t*h-s*Math.sin(2*h)+i*Math.sin(4*h)-a*Math.sin(6*h)},Hs=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},Xs=function(t){return.375*t*(1+.25*t*(1+.46875*t))},Js=function(t){return.05859375*t*t*(1+.75*t)},Ks=function(t){return t*t*t*(35/3072)},Vs=function(t,s,i){var a=s*i;return t/Math.sqrt(1-a*a)},Zs=function(t){return Math.abs(t)<vt?t:t-Xt(t)*Math.PI},Ys=function(t,s,i,a,h){var e,n;e=t/s;for(var r=0;r<15;r++)if(n=(t-(s*e-i*Math.sin(2*e)+a*Math.sin(4*e)-h*Math.sin(6*e)))/(s-2*i*Math.cos(2*e)+4*a*Math.cos(4*e)-6*h*Math.cos(6*e)),e+=n,Math.abs(n)<=1e-10)return e;return NaN},$s={init:function(){this.sphere||(this.e0=Hs(this.es),this.e1=Xs(this.es),this.e2=Js(this.es),this.e3=Ks(this.es),this.ml0=this.a*Ws(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var s,i,a=t.x,h=t.y;if(a=Jt(a-this.long0),this.sphere)s=this.a*Math.asin(Math.cos(h)*Math.sin(a)),i=this.a*(Math.atan2(Math.tan(h),Math.cos(a))-this.lat0);else{var e=Math.sin(h),n=Math.cos(h),r=Vs(this.a,this.e,e),o=Math.tan(h)*Math.tan(h),l=a*Math.cos(h),u=l*l,c=this.es*n*n/(1-this.es);s=r*l*(1-u*o*(1/6-(8-o+8*c)*u/120)),i=this.a*Ws(this.e0,this.e1,this.e2,this.e3,h)-this.ml0+r*e/n*u*(.5+(5-o+6*c)*u/24)}return t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a=t.x/this.a,h=t.y/this.a;if(this.sphere){var e=h+this.lat0;s=Math.asin(Math.sin(e)*Math.cos(a)),i=Math.atan2(Math.tan(a),Math.cos(e))}else{var n=this.ml0/this.a+h,r=Ys(n,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(r)-vt)<=Et)return t.x=this.long0,t.y=vt,h<0&&(t.y*=-1),t;var o=Vs(this.a,this.e,Math.sin(r)),l=o*o*o/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(r),2),c=a*this.a/o,M=c*c;s=r-o*Math.tan(r)/l*c*c*(.5-(1+3*u)*c*c/24),i=c*(1-M*(u/3+(1+3*u)*u*M/15))/Math.cos(r)}return t.x=Jt(i+this.long0),t.y=Zs(s),t},names:["Cassini","Cassini_Soldner","cass"]},ti=function(t,s){var i;return t>1e-7?(i=t*s,(1-t*t)*(s/(1-i*i)-.5/t*Math.log((1-i)/(1+i)))):2*s},si=.3333333333333333,ii=.17222222222222222,ai=.10257936507936508,hi=.06388888888888888,ei=.0664021164021164,ni=.016415012942191543,ri={init:function(){var t=Math.abs(this.lat0);if(Math.abs(t-vt)<Et?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<Et?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var s;switch(this.qp=ti(this.e,1),this.mmf=.5/(1-this.es),this.apa=ut(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),s=Math.sin(this.lat0),this.sinb1=ti(this.e,s)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*s*s)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var s,i,a,h,e,n,r,o,l,u,c=t.x,M=t.y;if(c=Jt(c-this.long0),this.sphere){if(e=Math.sin(M),u=Math.cos(M),a=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+u*a:1+this.sinph0*e+this.cosph0*u*a)<=Et)return null;s=(i=Math.sqrt(2/i))*u*Math.sin(c),i*=this.mode===this.EQUIT?e:this.cosph0*e-this.sinph0*u*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(M+this.lat0)<Et)return null;i=Pt-.5*M,s=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(c),i*=a}}else{switch(r=0,o=0,l=0,a=Math.cos(c),h=Math.sin(c),e=Math.sin(M),n=ti(this.e,e),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(r=n/this.qp,o=Math.sqrt(1-r*r)),this.mode){case this.OBLIQ:l=1+this.sinb1*r+this.cosb1*o*a;break;case this.EQUIT:l=1+o*a;break;case this.N_POLE:l=vt+M,n=this.qp-n;break;case this.S_POLE:l=M-vt,n=this.qp+n}if(Math.abs(l)<Et)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),i=this.mode===this.OBLIQ?this.ymf*l*(this.cosb1*r-this.sinb1*o*a):(l=Math.sqrt(2/(1+o*a)))*r*this.ymf,s=this.xmf*l*o*h;break;case this.N_POLE:case this.S_POLE:n>=0?(s=(l=Math.sqrt(n))*h,i=a*(this.mode===this.S_POLE?l:-l)):s=i=0}}return t.x=this.a*s+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e,n,r,o=t.x/this.a,l=t.y/this.a;if(this.sphere){var u,c=0,M=0;if(u=Math.sqrt(o*o+l*l),(i=.5*u)>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(M=Math.sin(i),c=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(u)<=Et?0:Math.asin(l*M/u),o*=M,l=c*u;break;case this.OBLIQ:i=Math.abs(u)<=Et?this.lat0:Math.asin(c*this.sinph0+l*M*this.cosph0/u),o*=M*this.cosph0,l=(c-Math.sin(i)*this.sinph0)*u;break;case this.N_POLE:l=-l,i=vt-i;break;case this.S_POLE:i-=vt}s=0!==l||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(o,l):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(o/=this.dd,l*=this.dd,(n=Math.sqrt(o*o+l*l))<Et)return t.x=this.long0,t.y=this.lat0,t;h=2*Math.asin(.5*n/this.rq),a=Math.cos(h),o*=h=Math.sin(h),this.mode===this.OBLIQ?(r=a*this.sinb1+l*h*this.cosb1/n,e=this.qp*r,l=n*this.cosb1*a-l*this.sinb1*h):(r=l*h/n,e=this.qp*r,l=n*a)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(l=-l),!(e=o*o+l*l))return t.x=this.long0,t.y=this.lat0,t;r=1-e/this.qp,this.mode===this.S_POLE&&(r=-r)}s=Math.atan2(o,l),i=ct(Math.asin(r),this.apa)}return t.x=Jt(this.long0+s),t.y=i,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},oi=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)},li={init:function(){Math.abs(this.lat1+this.lat2)<Et||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Ht(this.e3,this.sin_po,this.cos_po),this.qs1=ti(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Ht(this.e3,this.sin_po,this.cos_po),this.qs2=ti(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=ti(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>Et?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var s=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var a=ti(this.e3,this.sin_phi,this.cos_phi),h=this.a*Math.sqrt(this.c-this.ns0*a)/this.ns0,e=this.ns0*Jt(s-this.long0),n=h*Math.sin(e)+this.x0,r=this.rh-h*Math.cos(e)+this.y0;return t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(s=Math.sqrt(t.x*t.x+t.y*t.y),a=1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),a=-1),h=0,0!==s&&(h=Math.atan2(a*t.x,a*t.y)),a=s*this.ns0/this.a,this.sphere?n=Math.asin((this.c-a*a)/(2*this.ns0)):(i=(this.c-a*a)/this.ns0,n=this.phi1z(this.e3,i)),e=Jt(h/this.ns0+this.long0),t.x=e,t.y=n,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,s){var i,a,h,e,n,r=oi(.5*s);if(t<Et)return r;for(var o=t*t,l=1;l<=25;l++)if(i=Math.sin(r),a=Math.cos(r),h=t*i,e=1-h*h,n=.5*e*e/a*(s/(1-o)-i/e+.5/t*Math.log((1-h)/(1+h))),r+=n,Math.abs(n)<=1e-7)return r;return null}},ui={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y;return a=Jt(o-this.long0),s=Math.sin(l),i=Math.cos(l),h=Math.cos(a),(e=this.sin_p14*s+this.cos_p14*i*h)>0||Math.abs(e)<=Et?(n=this.x0+1*this.a*i*Math.sin(a)/e,r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)/e):(n=this.x0+this.infinity_dist*i*Math.sin(a),r=this.y0+this.infinity_dist*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(s=Math.sqrt(t.x*t.x+t.y*t.y))?(h=Math.atan2(s,this.rc),i=Math.sin(h),a=Math.cos(h),n=oi(a*this.sin_p14+t.y*i*this.cos_p14/s),e=Math.atan2(t.x*i,s*this.cos_p14*a-t.y*this.sin_p14*i),e=Jt(this.long0+e)):(n=this.phic0,e=0),t.x=e,t.y=n,t},names:["gnom"]},ci=function(t,s){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(s)-i)<1e-6)return s<0?-1*vt:vt;for(var a,h,e,n,r=Math.asin(.5*s),o=0;o<30;o++)if(h=Math.sin(r),e=Math.cos(r),n=t*h,a=Math.pow(1-n*n,2)/(2*e)*(s/(1-t*t)-h/(1-n*n)+.5/t*Math.log((1-n)/(1+n))),r+=a,Math.abs(a)<=1e-10)return r;return NaN},Mi={init:function(){this.sphere||(this.k0=Ht(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var s,i,a=t.x,h=t.y,e=Jt(a-this.long0);if(this.sphere)s=this.x0+this.a*e*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(h)/Math.cos(this.lat_ts);else{var n=ti(this.e,Math.sin(h));s=this.x0+this.a*this.k0*e,i=this.y0+this.a*n*.5/this.k0}return t.x=s,t.y=i,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i;return this.sphere?(s=Jt(this.long0+t.x/this.a/Math.cos(this.lat_ts)),
i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=ci(this.e,2*t.y*this.k0/this.a),s=Jt(this.long0+t.x/(this.a*this.k0))),t.x=s,t.y=i,t},names:["cea"]},fi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var s=t.x,i=t.y,a=Jt(s-this.long0),h=Zs(i-this.lat0);return t.x=this.x0+this.a*a*this.rc,t.y=this.y0+this.a*h,t},inverse:function(t){var s=t.x,i=t.y;return t.x=Jt(this.long0+(s-this.x0)/(this.a*this.rc)),t.y=Zs(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},di=20,pi={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Hs(this.es),this.e1=Xs(this.es),this.e2=Js(this.es),this.e3=Ks(this.es),this.ml0=this.a*Ws(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var s,i,a,h=t.x,e=t.y,n=Jt(h-this.long0);if(a=n*Math.sin(e),this.sphere)Math.abs(e)<=Et?(s=this.a*n,i=-1*this.a*this.lat0):(s=this.a*Math.sin(a)/Math.tan(e),i=this.a*(Zs(e-this.lat0)+(1-Math.cos(a))/Math.tan(e)));else if(Math.abs(e)<=Et)s=this.a*n,i=-1*this.ml0;else{var r=Vs(this.a,this.e,Math.sin(e))/Math.tan(e);s=r*Math.sin(a),i=this.a*Ws(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+r*(1-Math.cos(a))}return t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(t){var s,i,a,h,e,n,r,o,l;if(a=t.x-this.x0,h=t.y-this.y0,this.sphere)if(Math.abs(h+this.a*this.lat0)<=Et)s=Jt(a/this.a+this.long0),i=0;else{n=this.lat0+h/this.a,r=a*a/this.a/this.a+n*n,o=n;var u;for(e=di;e;--e)if(u=Math.tan(o),l=-1*(n*(o*u+1)-o-.5*(o*o+r)*u)/((o-n)/u-1),o+=l,Math.abs(l)<=Et){i=o;break}s=Jt(this.long0+Math.asin(a*Math.tan(o)/this.a)/Math.sin(i))}else if(Math.abs(h+this.ml0)<=Et)i=0,s=Jt(this.long0+a/this.a);else{n=(this.ml0+h)/this.a,r=a*a/this.a/this.a+n*n,o=n;var c,M,f,d,p;for(e=di;e;--e)if(p=this.e*Math.sin(o),c=Math.sqrt(1-p*p)*Math.tan(o),M=this.a*Ws(this.e0,this.e1,this.e2,this.e3,o),f=this.e0-2*this.e1*Math.cos(2*o)+4*this.e2*Math.cos(4*o)-6*this.e3*Math.cos(6*o),d=M/this.a,l=(n*(c*d+1)-d-.5*c*(d*d+r))/(this.es*Math.sin(2*o)*(d*d+r-2*n*d)/(4*c)+(n-d)*(c*f-2/Math.sin(2*o))-f),o-=l,Math.abs(l)<=Et){i=o;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),s=Jt(this.long0+Math.asin(a*c/this.a)/Math.sin(i))}return t.x=s,t.y=i,t},names:["Polyconic","poly"]},mi={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var s,i=t.x,a=t.y-this.lat0,h=i-this.long0,e=a/gt*1e-5,n=h,r=1,o=0;for(s=1;s<=10;s++)r*=e,o+=this.A[s]*r;var l,u=o,c=n,M=1,f=0,d=0,p=0;for(s=1;s<=6;s++)l=f*u+M*c,M=M*u-f*c,f=l,d=d+this.B_re[s]*M-this.B_im[s]*f,p=p+this.B_im[s]*M+this.B_re[s]*f;return t.x=p*this.a+this.x0,t.y=d*this.a+this.y0,t},inverse:function(t){var s,i,a=t.x,h=t.y,e=a-this.x0,n=(h-this.y0)/this.a,r=e/this.a,o=1,l=0,u=0,c=0;for(s=1;s<=6;s++)i=l*n+o*r,o=o*n-l*r,l=i,u=u+this.C_re[s]*o-this.C_im[s]*l,c=c+this.C_im[s]*o+this.C_re[s]*l;for(var M=0;M<this.iterations;M++){var f,d=u,p=c,m=n,y=r;for(s=2;s<=6;s++)f=p*u+d*c,d=d*u-p*c,p=f,m+=(s-1)*(this.B_re[s]*d-this.B_im[s]*p),y+=(s-1)*(this.B_im[s]*d+this.B_re[s]*p);d=1,p=0;var _=this.B_re[1],x=this.B_im[1];for(s=2;s<=6;s++)f=p*u+d*c,d=d*u-p*c,p=f,_+=s*(this.B_re[s]*d-this.B_im[s]*p),x+=s*(this.B_im[s]*d+this.B_re[s]*p);var g=_*_+x*x;u=(m*_+y*x)/g,c=(y*_-m*x)/g}var v=u,b=c,w=1,A=0;for(s=1;s<=9;s++)w*=v,A+=this.D[s]*w;var E=this.lat0+A*gt*1e5,N=this.long0+b;return t.x=N,t.y=E,t},names:["New_Zealand_Map_Grid","nzmg"]},yi={init:function(){},forward:function(t){var s=t.x,i=t.y,a=Jt(s-this.long0),h=this.x0+this.a*a,e=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=h,t.y=e,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s=Jt(this.long0+t.x/this.a),i=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=s,t.y=i,t},names:["Miller_Cylindrical","mill"]},_i=20,xi={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=gs(this.es)},forward:function(t){var s,i,a=t.x,h=t.y;if(a=Jt(a-this.long0),this.sphere){if(this.m)for(var e=this.n*Math.sin(h),n=_i;n;--n){var r=(this.m*h+Math.sin(h)-e)/(this.m+Math.cos(h));if(h-=r,Math.abs(r)<Et)break}else h=1!==this.n?Math.asin(this.n*Math.sin(h)):h;s=this.a*this.C_x*a*(this.m+Math.cos(h)),i=this.a*this.C_y*h}else{var o=Math.sin(h),l=Math.cos(h);i=this.a*vs(h,o,l,this.en),s=this.a*a*l/Math.sqrt(1-this.es*o*o)}return t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h;return t.x-=this.x0,a=t.x/this.a,t.y-=this.y0,s=t.y/this.a,this.sphere?(s/=this.C_y,a/=this.C_x*(this.m+Math.cos(s)),this.m?s=oi((this.m*s+Math.sin(s))/this.n):1!==this.n&&(s=oi(Math.sin(s)/this.n)),a=Jt(a+this.long0),s=Zs(s)):(s=bs(t.y/this.a,this.es,this.en),(h=Math.abs(s))<vt?(h=Math.sin(s),i=this.long0+t.x*Math.sqrt(1-this.es*h*h)/(this.a*Math.cos(s)),a=Jt(i)):h-Et<vt&&(a=this.long0)),t.x=a,t.y=s,t},names:["Sinusoidal","sinu"]},gi={init:function(){},forward:function(t){for(var s=t.x,i=t.y,a=Jt(s-this.long0),h=i,e=Math.PI*Math.sin(i);;){var n=-(h+Math.sin(h)-e)/(1+Math.cos(h));if(h+=n,Math.abs(n)<Et)break}h/=2,Math.PI/2-Math.abs(i)<Et&&(a=0);var r=.900316316158*this.a*a*Math.cos(h)+this.x0,o=1.4142135623731*this.a*Math.sin(h)+this.y0;return t.x=r,t.y=o,t},inverse:function(t){var s,i;t.x-=this.x0,t.y-=this.y0,i=t.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),s=Math.asin(i);var a=Jt(this.long0+t.x/(.900316316158*this.a*Math.cos(s)));a<-Math.PI&&(a=-Math.PI),a>Math.PI&&(a=Math.PI),i=(2*s+Math.sin(2*s))/Math.PI,Math.abs(i)>1&&(i=1);var h=Math.asin(i);return t.x=a,t.y=h,t},names:["Mollweide","moll"]},vi={init:function(){Math.abs(this.lat1+this.lat2)<Et||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Hs(this.es),this.e1=Xs(this.es),this.e2=Js(this.es),this.e3=Ks(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Ht(this.e,this.sinphi,this.cosphi),this.ml1=Ws(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Et?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Ht(this.e,this.sinphi,this.cosphi),this.ml2=Ws(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Ws(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var s,i=t.x,a=t.y;if(this.sphere)s=this.a*(this.g-a);else{var h=Ws(this.e0,this.e1,this.e2,this.e3,a);s=this.a*(this.g-h)}var e=this.ns*Jt(i-this.long0),n=this.x0+s*Math.sin(e),r=this.y0+this.rh-s*Math.cos(e);return t.x=n,t.y=r,t},inverse:function(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var s,i,a,h;this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1);var e=0;if(0!==i&&(e=Math.atan2(s*t.x,s*t.y)),this.sphere)return h=Jt(this.long0+e/this.ns),a=Zs(this.g-i/this.a),t.x=h,t.y=a,t;var n=this.g-i/this.a;return a=Ys(n,this.e0,this.e1,this.e2,this.e3),h=Jt(this.long0+e/this.ns),t.x=h,t.y=a,t},names:["Equidistant_Conic","eqdc"]},bi={init:function(){this.R=this.a},forward:function(t){var s,i,a=t.x,h=t.y,e=Jt(a-this.long0);Math.abs(h)<=Et&&(s=this.x0+this.R*e,i=this.y0);var n=oi(2*Math.abs(h/Math.PI));(Math.abs(e)<=Et||Math.abs(Math.abs(h)-vt)<=Et)&&(s=this.x0,i=h>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var r=.5*Math.abs(Math.PI/e-e/Math.PI),o=r*r,l=Math.sin(n),u=Math.cos(n),c=u/(l+u-1),M=c*c,f=c*(2/l-1),d=f*f,p=Math.PI*this.R*(r*(c-d)+Math.sqrt(o*(c-d)*(c-d)-(d+o)*(M-d)))/(d+o);e<0&&(p=-p),s=this.x0+p;var m=o+c;return p=Math.PI*this.R*(f*m-r*Math.sqrt((d+o)*(o+1)-m*m))/(d+o),i=h>=0?this.y0+p:this.y0-p,t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,u,c,M,f;return t.x-=this.x0,t.y-=this.y0,c=Math.PI*this.R,a=t.x/c,h=t.y/c,e=a*a+h*h,n=-Math.abs(h)*(1+e),r=n-2*h*h+a*a,o=-2*n+1+2*h*h+e*e,f=h*h/o+(2*r*r*r/o/o/o-9*n*r/o/o)/27,l=(n-r*r/3/o)/o,u=2*Math.sqrt(-l/3),c=3*f/l/u,Math.abs(c)>1&&(c=c>=0?1:-1),M=Math.acos(c)/3,i=t.y>=0?(-u*Math.cos(M+Math.PI/3)-r/3/o)*Math.PI:-(-u*Math.cos(M+Math.PI/3)-r/3/o)*Math.PI,s=Math.abs(a)<Et?this.long0:Jt(this.long0+Math.PI*(e-1+Math.sqrt(1+2*(a*a-h*h)+e*e))/2/a),t.x=s,t.y=i,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]},wi={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var s,i,a,h,e,n,r,o,l,u,c,M,f,d,p,m,y,_,x,g,v,b,w,A=t.x,E=t.y,N=Math.sin(t.y),C=Math.cos(t.y),P=Jt(A-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=Et?(t.x=this.x0+this.a*(vt-E)*Math.sin(P),t.y=this.y0-this.a*(vt-E)*Math.cos(P),t):Math.abs(this.sin_p12+1)<=Et?(t.x=this.x0+this.a*(vt+E)*Math.sin(P),t.y=this.y0+this.a*(vt+E)*Math.cos(P),t):(_=this.sin_p12*N+this.cos_p12*C*Math.cos(P),m=Math.acos(_),y=m?m/Math.sin(m):1,t.x=this.x0+this.a*y*C*Math.sin(P),t.y=this.y0+this.a*y*(this.cos_p12*N-this.sin_p12*C*Math.cos(P)),t):(s=Hs(this.es),i=Xs(this.es),a=Js(this.es),h=Ks(this.es),Math.abs(this.sin_p12-1)<=Et?(e=this.a*Ws(s,i,a,h,vt),n=this.a*Ws(s,i,a,h,E),t.x=this.x0+(e-n)*Math.sin(P),t.y=this.y0-(e-n)*Math.cos(P),t):Math.abs(this.sin_p12+1)<=Et?(e=this.a*Ws(s,i,a,h,vt),n=this.a*Ws(s,i,a,h,E),t.x=this.x0+(e+n)*Math.sin(P),t.y=this.y0+(e+n)*Math.cos(P),t):(r=N/C,o=Vs(this.a,this.e,this.sin_p12),l=Vs(this.a,this.e,N),u=Math.atan((1-this.es)*r+this.es*o*this.sin_p12/(l*C)),c=Math.atan2(Math.sin(P),this.cos_p12*Math.tan(u)-this.sin_p12*Math.cos(P)),x=0===c?Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.abs(Math.abs(c)-Math.PI)<=Et?-Math.asin(this.cos_p12*Math.sin(u)-this.sin_p12*Math.cos(u)):Math.asin(Math.sin(P)*Math.cos(u)/Math.sin(c)),M=this.e*this.sin_p12/Math.sqrt(1-this.es),f=this.e*this.cos_p12*Math.cos(c)/Math.sqrt(1-this.es),d=M*f,p=f*f,g=x*x,v=g*x,b=v*x,w=b*x,m=o*x*(1-g*p*(1-p)/6+v/8*d*(1-2*p)+b/120*(p*(4-7*p)-3*M*M*(1-7*p))-w/48*d),t.x=this.x0+m*Math.sin(c),t.y=this.y0+m*Math.cos(c),t))},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e,n,r,o,l,u,c,M,f,d,p,m,y,_,x,g,v,b,w,A;if(this.sphere){if((s=Math.sqrt(t.x*t.x+t.y*t.y))>2*vt*this.a)return;return i=s/this.a,a=Math.sin(i),h=Math.cos(i),e=this.long0,Math.abs(s)<=Et?n=this.lat0:(n=oi(h*this.sin_p12+t.y*a*this.cos_p12/s),r=Math.abs(this.lat0)-vt,e=Jt(Math.abs(r)<=Et?this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y):this.long0+Math.atan2(t.x*a,s*this.cos_p12*h-t.y*this.sin_p12*a))),t.x=e,t.y=n,t}return o=Hs(this.es),l=Xs(this.es),u=Js(this.es),c=Ks(this.es),Math.abs(this.sin_p12-1)<=Et?(M=this.a*Ws(o,l,u,c,vt),s=Math.sqrt(t.x*t.x+t.y*t.y),f=M-s,n=Ys(f/this.a,o,l,u,c),e=Jt(this.long0+Math.atan2(t.x,-1*t.y)),t.x=e,t.y=n,t):Math.abs(this.sin_p12+1)<=Et?(M=this.a*Ws(o,l,u,c,vt),s=Math.sqrt(t.x*t.x+t.y*t.y),f=s-M,n=Ys(f/this.a,o,l,u,c),e=Jt(this.long0+Math.atan2(t.x,t.y)),t.x=e,t.y=n,t):(s=Math.sqrt(t.x*t.x+t.y*t.y),m=Math.atan2(t.x,t.y),d=Vs(this.a,this.e,this.sin_p12),y=Math.cos(m),_=this.e*this.cos_p12*y,x=-_*_/(1-this.es),g=3*this.es*(1-x)*this.sin_p12*this.cos_p12*y/(1-this.es),v=s/d,b=v-x*(1+x)*Math.pow(v,3)/6-g*(1+3*x)*Math.pow(v,4)/24,w=1-x*b*b/2-v*b*b*b/6,p=Math.asin(this.sin_p12*Math.cos(b)+this.cos_p12*Math.sin(b)*y),e=Jt(this.long0+Math.asin(Math.sin(m)*Math.sin(b)/Math.cos(p))),A=Math.sin(p),n=Math.atan2((A-this.es*w*this.sin_p12)*Math.tan(p),A*(1-this.es)),t.x=e,t.y=n,t)},names:["Azimuthal_Equidistant","aeqd"]},Ai={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y;return a=Jt(o-this.long0),s=Math.sin(l),i=Math.cos(l),h=Math.cos(a),((e=this.sin_p14*s+this.cos_p14*i*h)>0||Math.abs(e)<=Et)&&(n=1*this.a*i*Math.sin(a),r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n,r;return t.x-=this.x0,t.y-=this.y0,s=Math.sqrt(t.x*t.x+t.y*t.y),i=oi(s/this.a),a=Math.sin(i),h=Math.cos(i),n=this.long0,Math.abs(s)<=Et?(r=this.lat0,t.x=n,t.y=r,t):(r=oi(h*this.sin_p14+t.y*a*this.cos_p14/s),e=Math.abs(this.lat0)-vt,Math.abs(e)<=Et?(n=Jt(this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y)),t.x=n,t.y=r,t):(n=Jt(this.long0+Math.atan2(t.x*a,s*this.cos_p14*h-t.y*this.sin_p14*a)),t.x=n,t.y=r,t))},names:["ortho"]},Ei={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Ni={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4},Ci={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=vt-Pt/2?this.face=Ei.TOP:this.lat0<=-(vt-Pt/2)?this.face=Ei.BOTTOM:Math.abs(this.long0)<=Pt?this.face=Ei.FRONT:Math.abs(this.long0)<=vt+Pt?this.face=this.long0>0?Ei.RIGHT:Ei.LEFT:this.face=Ei.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var s,i,a,h,e,n,r={x:0,y:0},o={value:0};if(t.x-=this.long0,s=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===Ei.TOP)h=vt-s,i>=Pt&&i<=vt+Pt?(o.value=Ni.AREA_0,a=i-vt):i>vt+Pt||i<=-(vt+Pt)?(o.value=Ni.AREA_1,a=i>0?i-It:i+It):i>-(vt+Pt)&&i<=-Pt?(o.value=Ni.AREA_2,a=i+vt):(o.value=Ni.AREA_3,a=i);else if(this.face===Ei.BOTTOM)h=vt+s,i>=Pt&&i<=vt+Pt?(o.value=Ni.AREA_0,a=-i+vt):i<Pt&&i>=-Pt?(o.value=Ni.AREA_1,a=-i):i<-Pt&&i>=-(vt+Pt)?(o.value=Ni.AREA_2,a=-i-vt):(o.value=Ni.AREA_3,a=i>0?-i+It:-i-It);else{var l,u,c,M,f,d;this.face===Ei.RIGHT?i=ft(i,+vt):this.face===Ei.BACK?i=ft(i,+It):this.face===Ei.LEFT&&(i=ft(i,-vt)),M=Math.sin(s),f=Math.cos(s),d=Math.sin(i),l=f*Math.cos(i),u=f*d,c=M,this.face===Ei.FRONT?a=Mt(h=Math.acos(l),c,u,o):this.face===Ei.RIGHT?a=Mt(h=Math.acos(u),c,-l,o):this.face===Ei.BACK?a=Mt(h=Math.acos(-l),c,-u,o):this.face===Ei.LEFT?a=Mt(h=Math.acos(-u),c,l,o):(h=a=0,o.value=Ni.AREA_0)}return n=Math.atan(12/It*(a+Math.acos(Math.sin(a)*Math.cos(Pt))-vt)),e=Math.sqrt((1-Math.cos(h))/(Math.cos(n)*Math.cos(n))/(1-Math.cos(Math.atan(1/Math.cos(a))))),o.value===Ni.AREA_1?n+=vt:o.value===Ni.AREA_2?n+=It:o.value===Ni.AREA_3&&(n+=1.5*It),r.x=e*Math.cos(n),r.y=e*Math.sin(n),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,u={lam:0,phi:0},c={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),s=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?c.value=Ni.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(c.value=Ni.AREA_1,s-=vt):t.x<0&&-t.x>=Math.abs(t.y)?(c.value=Ni.AREA_2,s=s<0?s+It:s-It):(c.value=Ni.AREA_3,s+=vt),l=It/12*Math.tan(s),e=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),n=Math.atan(e),a=Math.cos(s),h=Math.tan(i),(r=1-a*a*h*h*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?r=-1:r>1&&(r=1),this.face===Ei.TOP)o=Math.acos(r),u.phi=vt-o,c.value===Ni.AREA_0?u.lam=n+vt:c.value===Ni.AREA_1?u.lam=n<0?n+It:n-It:c.value===Ni.AREA_2?u.lam=n-vt:u.lam=n;else if(this.face===Ei.BOTTOM)o=Math.acos(r),u.phi=o-vt,c.value===Ni.AREA_0?u.lam=-n+vt:c.value===Ni.AREA_1?u.lam=-n:c.value===Ni.AREA_2?u.lam=-n-vt:u.lam=n<0?-n-It:-n+It;else{var M,f,d;l=(M=r)*M,f=(l+=(d=l>=1?0:Math.sqrt(1-l)*Math.sin(n))*d)>=1?0:Math.sqrt(1-l),c.value===Ni.AREA_1?(l=f,f=-d,d=l):c.value===Ni.AREA_2?(f=-f,d=-d):c.value===Ni.AREA_3&&(l=f,f=d,d=-l),this.face===Ei.RIGHT?(l=M,M=-f,f=l):this.face===Ei.BACK?(M=-M,f=-f):this.face===Ei.LEFT&&(l=M,M=f,f=-l),u.phi=Math.acos(-d)-vt,u.lam=Math.atan2(f,M),this.face===Ei.RIGHT?u.lam=ft(u.lam,-vt):this.face===Ei.BACK?u.lam=ft(u.lam,-It):this.face===Ei.LEFT&&(u.lam=ft(u.lam,+vt))}if(0!==this.es){var p,m,y;p=u.phi<0?1:0,m=Math.tan(u.phi),y=this.b/Math.sqrt(m*m+this.one_minus_f_squared),u.phi=Math.atan(Math.sqrt(this.a*this.a-y*y)/(this.one_minus_f*y)),p&&(u.phi=-u.phi)}return u.lam+=this.long0,t.x=u.lam,t.y=u.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Pi=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Si=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ii=.8487,Oi=1.3523,ki=Ct/5,qi=1/ki,Ri=18,Li=function(t,s){return t[0]+s*(t[1]+s*(t[2]+s*t[3]))},Ti=function(t,s){return t[1]+s*(2*t[2]+3*s*t[3])},Gi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var s=Jt(t.x-this.long0),i=Math.abs(t.y),a=Math.floor(i*ki);a<0?a=0:a>=Ri&&(a=Ri-1),i=Ct*(i-qi*a);var h={x:Li(Pi[a],i)*s,y:Li(Si[a],i)};return t.y<0&&(h.y=-h.y),h.x=h.x*this.a*Ii+this.x0,h.y=h.y*this.a*Oi+this.y0,h},inverse:function(t){var s={x:(t.x-this.x0)/(this.a*Ii),y:Math.abs(t.y-this.y0)/(this.a*Oi)};if(s.y>=1)s.x/=Pi[Ri][0],s.y=t.y<0?-vt:vt;else{var i=Math.floor(s.y*Ri);for(i<0?i=0:i>=Ri&&(i=Ri-1);;)if(Si[i][0]>s.y)--i;else{if(!(Si[i+1][0]<=s.y))break;++i}var a=Si[i],h=5*(s.y-a[0])/(Si[i+1][0]-a[0]);h=dt(function(t){return(Li(a,t)-s.y)/Ti(a,t)},h,Et,100),s.x/=Li(Pi[i],h),s.y=(5*i+h)*Nt,t.y<0&&(s.y=-s.y)}return s.x=Jt(s.x+this.long0),s},names:["Robinson","robin"]},ji={init:function(){this.name="geocent"},forward:function(t){return q(t,this.es,this.a)},inverse:function(t){return R(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},Bi={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},zi={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}},Fi={init:function(){if(Object.keys(zi).forEach(function(t){if(void 0===this[t])this[t]=zi[t].def;else{if(zi[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);zi[t].num&&(this[t]=parseFloat(this[t]))}zi[t].degrees&&(this[t]=this[t]*Nt)}.bind(this)),Math.abs(Math.abs(this.lat0)-vt)<Et?this.mode=this.lat0<0?Bi.S_POLE:Bi.N_POLE:Math.abs(this.lat0)<Et?this.mode=Bi.EQUIT:(this.mode=Bi.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,s=this.azi;this.cg=Math.cos(s),this.sg=Math.sin(s),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var s,i,a=Math.sin(t.y),h=Math.cos(t.y),e=Math.cos(t.x);switch(this.mode){case Bi.OBLIQ:i=this.sinph0*a+this.cosph0*h*e;break;case Bi.EQUIT:i=h*e;break;case Bi.S_POLE:i=-a;break;case Bi.N_POLE:i=a}switch(i=this.pn1/(this.p-i),s=i*h*Math.sin(t.x),this.mode){case Bi.OBLIQ:i*=this.cosph0*a-this.sinph0*h*e;break;case Bi.EQUIT:i*=a;break;case Bi.N_POLE:i*=-h*e;break;case Bi.S_POLE:i*=h*e}var n,r;return n=i*this.cg+s*this.sg,r=1/(n*this.sw*this.h1+this.cw),s=(s*this.cg-i*this.sg)*this.cw*r,i=n*r,t.x=s*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var s,i,a,h={x:t.x,y:t.y};a=1/(this.pn1-t.y*this.sw),s=this.pn1*t.x*a,i=this.pn1*t.y*this.cw*a,t.x=s*this.cg+i*this.sg,t.y=i*this.cg-s*this.sg;var e=Es(t.x,t.y);if(Math.abs(e)<Et)h.x=0,h.y=t.y;else{var n,r;switch(r=1-e*e*this.pfact,r=(this.p-Math.sqrt(r))/(this.pn1/e+e/this.pn1),n=Math.sqrt(1-r*r),this.mode){case Bi.OBLIQ:h.y=Math.asin(n*this.sinph0+t.y*r*this.cosph0/e),t.y=(n-this.sinph0*Math.sin(h.y))*e,t.x*=r*this.cosph0;break;case Bi.EQUIT:h.y=Math.asin(t.y*r/e),t.y=n*e,t.x*=r;break;case Bi.N_POLE:h.y=Math.asin(n),t.y=-t.y;break;case Bi.S_POLE:h.y=-Math.asin(n)}h.x=Math.atan2(t.x,t.y)}return t.x=h.x+this.long0,t.y=h.y,t},names:["Tilted_Perspective","tpers"]};return H.defaultDatum="WGS84",H.Proj=O,H.WGS84=new H.Proj("WGS84"),H.Point=ot,H.toPoint=rs,H.defs=o,H.nadgrid=function(t,s){var i=new DataView(s),a=A(i),h=E(i,a);h.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var e={header:h,subgrids:C(i,h,a)};return hs[t]=e,e},H.transform=U,H.mgrs=_s,H.version="2.7.5",function(t){t.Proj.projections.add(ws),t.Proj.projections.add(ks),t.Proj.projections.add(Rs),t.Proj.projections.add(js),t.Proj.projections.add(Bs),t.Proj.projections.add(zs),t.Proj.projections.add(Ds),t.Proj.projections.add(Us),t.Proj.projections.add(Qs),t.Proj.projections.add($s),t.Proj.projections.add(ri),t.Proj.projections.add(li),t.Proj.projections.add(ui),t.Proj.projections.add(Mi),t.Proj.projections.add(fi),t.Proj.projections.add(pi),t.Proj.projections.add(mi),t.Proj.projections.add(yi),t.Proj.projections.add(xi),t.Proj.projections.add(gi),t.Proj.projections.add(vi),t.Proj.projections.add(bi),t.Proj.projections.add(wi),t.Proj.projections.add(Ai),t.Proj.projections.add(Ci),t.Proj.projections.add(Gi),t.Proj.projections.add(ji),t.Proj.projections.add(Fi)}(H),H});
/** @license
 *
 *  Copyright (C) 2012 K. Arthur Endsley (kaendsle@mtu.edu)
 *  Michigan Tech Research Institute (MTRI)
 *  3600 Green Court, Suite 100, Ann Arbor, MI, 48105
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
!function(t,e){"function"==typeof define&&define.amd?define(function(){return e()}):"undefined"!=typeof module&&"object"==typeof exports?module.exports=e():t.Wkt=e()}(this,function(){var t,e,s,i;return s=this,i=function(t){return t instanceof i?t:this instanceof i?void(this._wrapped=t):new i(t)},t=function(t,e){return t.substring(0,e.length)===e},e=function(t,e){return t.substring(t.length-e.length)===e},i.delimiter=" ",i.isArray=function(t){return!(!t||t.constructor!==Array)},i.trim=function(s,i){for(i=i||" ";t(s,i);)s=s.substring(1);for(;e(s,i);)s=s.substring(0,s.length-1);return s},i.Wkt=function(t){this.delimiter=i.delimiter||" ",this.wrapVertices=!0,this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+|\+/,numeric:/-*\d+(\.*\d+)?/,comma:/\s*,\s*/,parenComma:/\)\s*,\s*\(/,coord:/-*\d+\.*\d+ -*\d+\.*\d+/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,ogcTypes:/^(multi)?(point|line|polygon|box)?(string)?$/i,crudeJson:/^{.*"(type|coordinates|geometries|features)":.*}$/},this._stripWhitespaceAndParens=function(t){var e=t.trim(),s=e.replace(/^\(?(.*?)\)?$/,"$1");return s},this.components=void 0,t&&"string"==typeof t?this.read(t):t&&void 0!==typeof t&&this.fromObject(t)},i.Wkt.prototype.isCollection=function(){switch(this.type.slice(0,5)){case"multi":return!0;case"polyg":return!0;default:return!1}},i.Wkt.prototype.sameCoords=function(t,e){return t.x===e.x&&t.y===e.y},i.Wkt.prototype.fromObject=function(t){var e;return e=t.hasOwnProperty("type")&&t.hasOwnProperty("coordinates")?this.fromJson(t):this.deconstruct.call(this,t),this.components=e.components,this.isRectangle=e.isRectangle||!1,this.type=e.type,this},i.Wkt.prototype.toObject=function(t){var e=this.construct[this.type].call(this,t);return"object"!=typeof e||i.isArray(e)||(e.properties=this.properties),e},i.Wkt.prototype.toString=function(t){return this.write()},i.Wkt.prototype.fromJson=function(t){var e,s,n,o,r,p;if(this.type=t.type.toLowerCase(),this.components=[],t.hasOwnProperty("geometry"))return this.fromJson(t.geometry),this.properties=t.properties,this;if(o=t.coordinates,i.isArray(o[0])){for(e in o)if(o.hasOwnProperty(e))if(i.isArray(o[e][0])){p=[];for(s in o[e])if(o[e].hasOwnProperty(s))if(i.isArray(o[e][s][0])){r=[];for(n in o[e][s])o[e][s].hasOwnProperty(n)&&r.push({x:o[e][s][n][0],y:o[e][s][n][1]});p.push(r)}else p.push({x:o[e][s][0],y:o[e][s][1]});this.components.push(p)}else"multipoint"===this.type?this.components.push([{x:o[e][0],y:o[e][1]}]):this.components.push({x:o[e][0],y:o[e][1]})}else this.components.push({x:o[0],y:o[1]});return this},i.Wkt.prototype.toJson=function(){var t,e,s,n,o,r,p;if(t=this.components,e={coordinates:[],type:function(){var t,e,s;e=this.regExes.ogcTypes.exec(this.type).slice(1),s=[];for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&s.push(e[t].toLowerCase().slice(0,1).toUpperCase()+e[t].toLowerCase().slice(1));return s}.call(this).join("")},"box"===this.type.toLowerCase()){e.type="Polygon",e.bbox=[];for(s in t)t.hasOwnProperty(s)&&(e.bbox=e.bbox.concat([t[s].x,t[s].y]));return e.coordinates=[[[t[0].x,t[0].y],[t[0].x,t[1].y],[t[1].x,t[1].y],[t[1].x,t[0].y],[t[0].x,t[0].y]]],e}for(s in t)if(t.hasOwnProperty(s))if(i.isArray(t[s])){p=[];for(n in t[s])if(t[s].hasOwnProperty(n))if(i.isArray(t[s][n])){r=[];for(o in t[s][n])t[s][n].hasOwnProperty(o)&&r.push([t[s][n][o].x,t[s][n][o].y]);p.push(r)}else t[s].length>1?p.push([t[s][n].x,t[s][n].y]):p=p.concat([t[s][n].x,t[s][n].y]);e.coordinates.push(p)}else t.length>1?e.coordinates.push([t[s].x,t[s].y]):e.coordinates=e.coordinates.concat([t[s].x,t[s].y]);return e},i.Wkt.prototype.merge=function(t){var e=this.type.slice(0,5);if(this.type!==t.type&&this.type.slice(5,this.type.length)!==t.type)throw TypeError("The input geometry types must agree or the calling this.Wkt.Wkt instance must be a multigeometry of the other");switch(e){case"point":this.components=[this.components.concat(t.components)];break;case"multi":this.components=this.components.concat("multi"===t.type.slice(0,5)?t.components:[t.components]);break;default:this.components=[this.components,t.components]}return"multi"!==e&&(this.type="multi"+this.type),this},i.Wkt.prototype.read=function(t){var e;if(e=this.regExes.typeStr.exec(t))this.type=e[1].toLowerCase(),this.base=e[2],this.ingest[this.type]&&(this.components=this.ingest[this.type].apply(this,[this.base]));else{if(!this.regExes.crudeJson.test(t))throw console.log("Invalid WKT string provided to read()"),{name:"WKTError",message:"Invalid WKT string provided to read()"};if("object"!=typeof JSON||"function"!=typeof JSON.parse)throw console.log("JSON.parse() is not available; cannot parse GeoJSON strings"),{name:"JSONError",message:"JSON.parse() is not available; cannot parse GeoJSON strings"};this.fromJson(JSON.parse(t))}return this},i.Wkt.prototype.write=function(t){var e,s,i;for(t=t||this.components,s=[],s.push(this.type.toUpperCase()+"("),e=0;e<t.length;e+=1){if(this.isCollection()&&e>0&&s.push(","),!this.extract[this.type])return null;i=this.extract[this.type].apply(this,[t[e]]),this.isCollection()&&"multipoint"!==this.type?s.push("("+i+")"):(s.push(i),e!==t.length-1&&"multipoint"!==this.type&&s.push(","))}return s.push(")"),s.join("")},i.Wkt.prototype.extract={point:function(t){return String(t.x)+this.delimiter+String(t.y)},multipoint:function(t){var e,s,i=[];for(e=0;e<t.length;e+=1)s=this.extract.point.apply(this,[t[e]]),this.wrapVertices&&(s="("+s+")"),i.push(s);return i.join(",")},linestring:function(t){return this.extract.point.apply(this,[t])},multilinestring:function(t){var e,s=[];if(t.length)for(e=0;e<t.length;e+=1)s.push(this.extract.linestring.apply(this,[t[e]]));else s.push(this.extract.point.apply(this,[t]));return s.join(",")},polygon:function(t){return this.extract.multilinestring.apply(this,[t])},multipolygon:function(t){var e,s=[];for(e=0;e<t.length;e+=1)s.push("("+this.extract.polygon.apply(this,[t[e]])+")");return s.join(",")},box:function(t){return this.extract.linestring.apply(this,[t])},geometrycollection:function(t){console.log("The geometrycollection WKT type is not yet supported.")}},i.Wkt.prototype.ingest={point:function(t){var e=i.trim(t).split(this.regExes.spaces);return[{x:parseFloat(this.regExes.numeric.exec(e[0])[0]),y:parseFloat(this.regExes.numeric.exec(e[1])[0])}]},multipoint:function(t){var e,s,n;for(s=[],n=i.trim(t).split(this.regExes.comma),e=0;e<n.length;e+=1)s.push(this.ingest.point.apply(this,[n[e]]));return s},linestring:function(t){var e,s,i;for(s=this.ingest.multipoint.apply(this,[t]),i=[],e=0;e<s.length;e+=1)i=i.concat(s[e]);return i},multilinestring:function(t){var e,s,n,o;for(s=[],o=i.trim(t).split(this.regExes.doubleParenComma),1===o.length&&(o=i.trim(t).split(this.regExes.parenComma)),e=0;e<o.length;e+=1)n=this._stripWhitespaceAndParens(o[e]),s.push(this.ingest.linestring.apply(this,[n]));return s},polygon:function(t){var e,s,n,o,r,p;for(p=i.trim(t).split(this.regExes.parenComma),n=[],e=0;e<p.length;e+=1){for(r=this._stripWhitespaceAndParens(p[e]).split(this.regExes.comma),o=[],s=0;s<r.length;s+=1){var h=r[s].split(this.regExes.spaces);if(h.length>2&&(h=h.filter(function(t){return""!=t})),2===h.length){var a=h[0],c=h[1];o.push({x:parseFloat(a),y:parseFloat(c)})}}n.push(o)}return n},box:function(t){var e,s,i;for(s=this.ingest.multipoint.apply(this,[t]),i=[],e=0;e<s.length;e+=1)i=i.concat(s[e]);return i},multipolygon:function(t){var e,s,n,o;for(s=[],o=i.trim(t).split(this.regExes.doubleParenComma),e=0;e<o.length;e+=1)n=this._stripWhitespaceAndParens(o[e]),s.push(this.ingest.polygon.apply(this,[n]));return s},geometrycollection:function(t){console.log("The geometrycollection WKT type is not yet supported.")}},i});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).Leaflet=e.Leaflet||{},e.Leaflet.markercluster={}))}(this,function(e){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),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 t=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(e){if(e instanceof L.LayerGroup)return this.addLayers([e]);if(!e.getLatLng)return this._nonPointGroup.addLayer(e),this.fire("layeradd",{layer:e}),this;if(!this._map)return this._needsClustering.push(e),this.fire("layeradd",{layer:e}),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom),this.fire("layeradd",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=e,i=this._zoom;if(e.__parent)for(;t.__parent._zoom>=i;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,t):this._animationAddLayerNonAnimated(e,t)),this},removeLayer:function(e){return e instanceof L.LayerGroup?this.removeLayers([e]):(e.getLatLng?this._map?e.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),this.fire("layerremove",{layer:e}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),e.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(e)&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow())):(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e})):(this._nonPointGroup.removeLayer(e),this.fire("layerremove",{layer:e})),this)},addLayers:function(e,t){if(!L.Util.isArray(e))return this.addLayer(e);var i,r=this._featureGroup,n=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,a=this.options.chunkProgress,h=e.length,l=0,u=!0;if(this._map){var _=(new Date).getTime(),d=L.bind(function(){var p=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();l<h;l++){if(s&&l%200==0){var c=(new Date).getTime()-p;if(o<c)break}if((i=e[l])instanceof L.LayerGroup)u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),t||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var f=i.__parent.getAllChildMarkers(),m=f[0]===i?f[1]:f[0];r.removeLayer(m)}}else n.addLayer(i),t||this.fire("layeradd",{layer:i})}a&&a(l,h,(new Date).getTime()-_),l===h?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(d,this.options.chunkDelay)},this);d()}else for(var p=this._needsClustering;l<h;l++)(i=e[l])instanceof L.LayerGroup?(u&&(e=e.slice(),u=!1),this._extractNonGroupLayers(i,e),h=e.length):i.getLatLng?this.hasLayer(i)||p.push(i):n.addLayer(i);return this},removeLayers:function(e){var t,i,r=e.length,n=this._featureGroup,s=this._nonPointGroup,o=!0;if(!this._map){for(t=0;t<r;t++)(i=e[t])instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),r=e.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 a=e.slice(),h=r;for(t=0;t<h;t++)(i=a[t])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),h=a.length):this._unspiderfyLayer(i)}for(t=0;t<r;t++)(i=e[t])instanceof L.LayerGroup?(o&&(e=e.slice(),o=!1),this._extractNonGroupLayers(i,e),r=e.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),n.hasLayer(i)&&(n.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(e){e.off(this._childMarkerEventHandlers,this),delete e.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;this._topClusterLevel&&e.extend(this._topClusterLevel._bounds);for(var t=this._needsClustering.length-1;0<=t;t--)e.extend(this._needsClustering[t].getLatLng());return e.extend(this._nonPointGroup.getBounds()),e},eachLayer:function(e,t){var i,r,n,s=this._needsClustering.slice(),o=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),r=s.length-1;0<=r;r--){for(i=!0,n=o.length-1;0<=n;n--)if(o[n].layer===s[r]){i=!1;break}i&&e.call(t,s[r])}this._nonPointGroup.eachLayer(e,t)},getLayers:function(){var e=[];return this.eachLayer(function(t){e.push(t)}),e},getLayer:function(e){var t=null;return e=parseInt(e,10),this.eachLayer(function(i){L.stamp(i)===e&&(t=i)}),t},hasLayer:function(e){if(!e)return!1;var t,i=this._needsClustering;for(t=i.length-1;0<=t;t--)if(i[t]===e)return!0;for(t=(i=this._needsRemoving).length-1;0<=t;t--)if(i[t].layer===e)return!1;return!(!e.__parent||e.__parent._group!==this)||this._nonPointGroup.hasLayer(e)},zoomToShowLayer:function(e,t){var i=this._map;"function"!=typeof t&&(t=function(){});var r=function(){!i.hasLayer(e)&&!i.hasLayer(e.__parent)||this._inZoomAnimation||(this._map.off("moveend",r,this),this.off("animationend",r,this),i.hasLayer(e)?t():e.__parent._icon&&(this.once("spiderfied",t,this),e.__parent.spiderfy()))};e._icon&&this._map.getBounds().contains(e.getLatLng())?t():e.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",r,this),this._map.panTo(e.getLatLng())):(this._map.on("moveend",r,this),this.on("animationend",r,this),e.__parent.zoomToBounds())},onAdd:function(e){var t,i,r;if(this._map=e,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(e),this._nonPointGroup.addTo(e),this._gridClusters||this._generateInitialClusters(),this._maxLat=e.options.crs.projection.MAX_LATITUDE,t=0,i=this._needsRemoving.length;t<i;t++)(r=this._needsRemoving[t]).newlatlng=r.layer._latlng,r.layer._latlng=r.latlng;for(t=0,i=this._needsRemoving.length;t<i;t++)r=this._needsRemoving[t],this._removeLayer(r.layer,!0),r.layer._latlng=r.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(e){e.off("zoomend",this._zoomEnd,this),e.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(e){for(var t=e;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:function(e,t){for(var i=e.length-1;0<=i;i--)if(e[i]===t)return e.splice(i,1),!0},_removeFromGridUnclustered:function(e,t){for(var i=this._map,r=this._gridUnclustered,n=Math.floor(this._map.getMinZoom());n<=t&&r[t].removeObject(e,i.project(e.getLatLng(),t));t--);},_childMarkerDragStart:function(e){e.target.__dragStart=e.target._latlng},_childMarkerMoved:function(e){if(!this._ignoreMove&&!e.target.__dragStart){var t=e.target._popup&&e.target._popup.isOpen();this._moveChild(e.target,e.oldLatLng,e.latlng),t&&e.target.openPopup()}},_moveChild:function(e,t,i){e._latlng=t,this.removeLayer(e),e._latlng=i,this.addLayer(e)},_childMarkerDragEnd:function(e){var t=e.target.__dragStart;delete e.target.__dragStart,t&&this._moveChild(e.target,t,e.target._latlng)},_removeLayer:function(e,t,i){var r=this._gridClusters,n=this._gridUnclustered,s=this._featureGroup,o=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(e,this._maxZoom);var h,l=e.__parent,u=l._markers;for(this._arraySplice(u,e);l&&(l._childCount--,l._boundsNeedUpdate=!0,!(l._zoom<a));)t&&l._childCount<=1?(h=l._markers[0]===e?l._markers[1]:l._markers[0],r[l._zoom].removeObject(l,o.project(l._cLatLng,l._zoom)),n[l._zoom].addObject(h,o.project(h.getLatLng(),l._zoom)),this._arraySplice(l.__parent._childClusters,l),l.__parent._markers.push(h),h.__parent=l.__parent,l._icon&&(s.removeLayer(l),i||s.addLayer(h))):l._iconNeedsUpdate=!0,l=l.__parent;delete e.__parent},_isOrIsParent:function(e,t){for(;t;){if(e===t)return!0;t=t.parentNode}return!1},fire:function(e,t,i){if(t&&t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;e="cluster"+e}L.FeatureGroup.prototype.fire.call(this,e,t,i)},listens:function(e,t){return L.FeatureGroup.prototype.listens.call(this,e,t)||L.FeatureGroup.prototype.listens.call(this,"cluster"+e,t)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),i=" marker-cluster-";return i+=t<10?"small":t<100?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=this._map,t=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,r=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom;(t||r||n)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),e.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(e){var t=e.layer,i=t;if("clusterkeypress"!==e.type||!e.originalEvent||13===e.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),this.options.spiderfyOnEveryZoom&&t.spiderfy(),e.originalEvent&&13===e.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(e){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),2<e.layer.getChildCount()&&e.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(e.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,r=this.options.spiderfyOnEveryZoom,n=this._map;(e||i||r)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),t&&(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 e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,r=i;"function"!=typeof i&&(r=function(){return i}),null!==this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var n=e;t<=n;n--)this._gridClusters[n]=new L.DistanceGrid(r(n)),this._gridUnclustered[n]=new L.DistanceGrid(r(n));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(e,t){var i,r,n=this._gridClusters,s=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(e),e.on(this._childMarkerEventHandlers,this);o<=t;t--){i=this._map.project(e.getLatLng(),t);var a=n[t].getNearObject(i);if(a)return a._addChild(e),void(e.__parent=a);if(a=s[t].getNearObject(i)){var h=a.__parent;h&&this._removeLayer(a,!1);var l=new this._markerCluster(this,t,a,e);n[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l;var u=e.__parent=l;for(r=t-1;r>h._zoom;r--)u=new this._markerCluster(this,r,u),n[r].addObject(u,this._map.project(a.getLatLng(),r));return h._addChild(u),void this._removeFromGridUnclustered(a,t)}s[t].addObject(e,i)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(e){e instanceof L.MarkerCluster&&e._iconNeedsUpdate&&e._updateIcon()})},_enqueue:function(e){this._queue.push(e),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var e=0;e<this._queue.length;e++)this._queue[e].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var e=Math.round(this._map._zoom);this._processQueue(),this._zoom<e&&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,e)):this._zoom>e?(this._animationStart(),this._animationZoomOut(this._zoom,e)):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(e){var t=this._maxLat;return void 0!==t&&(e.getNorth()>=t&&(e._northEast.lat=1/0),e.getSouth()<=-t&&(e._southWest.lat=-1/0)),e},_animationAddLayerNonAnimated:function(e,t){if(t===e)this._featureGroup.addLayer(e);else if(2===t._childCount){t._addToMap();var i=t.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else t._updateIcon()},_extractNonGroupLayers:function(e,t){var i,r=e.getLayers(),n=0;for(t=t||[];n<r.length;n++)(i=r[n])instanceof L.LayerGroup?this._extractNonGroupLayers(i,t):t.push(i);return t},_overrideMarkerIcon:function(e){return e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}})}});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(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(e,t){var i,r=this._getExpandedVisibleBounds(),n=this._featureGroup,s=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(r,e,s,function(s){var o,a=s._latlng,h=s._markers;for(r.contains(a)||(a=null),s._isSingleParent()&&e+1===t?(n.removeLayer(s),s._recursivelyAddChildrenToMap(null,t,r)):(s.clusterHide(),s._recursivelyAddChildrenToMap(a,t,r)),i=h.length-1;0<=i;i--)o=h[i],r.contains(o._latlng)||n.removeLayer(o)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(r,t),n.eachLayer(function(e){e instanceof L.MarkerCluster||!e._icon||e.clusterShow()}),this._topClusterLevel._recursively(r,e,t,function(e){e._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(r,e,s,function(e){n.removeLayer(e),e.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),e,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){var i=this,r=this._featureGroup;r.addLayer(e),t!==e&&(2<t._childCount?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.clusterHide(),this._enqueue(function(){r.removeLayer(e),e.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(e,t,i){var r=this._getExpandedVisibleBounds(),n=Math.floor(this._map.getMinZoom());e._recursivelyAnimateChildrenInAndAddSelfToMap(r,n,t+1,i);var s=this;this._forceLayout(),e._recursivelyBecomeVisible(r,i),this._enqueue(function(){if(1===e._childCount){var o=e._markers[0];this._ignoreMove=!0,o.setLatLng(o.getLatLng()),this._ignoreMove=!1,o.clusterShow&&o.clusterShow()}else e._recursively(r,i,n,function(e){e._recursivelyRemoveChildrenFromMap(r,n,t+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(e){return new L.MarkerClusterGroup(e)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(e,t,i,r){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:e.options.clusterPane}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),r&&this._addChild(r)},getAllChildMarkers:function(e,t){e=e||[];for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i].getAllChildMarkers(e,t);for(var r=this._markers.length-1;0<=r;r--)t&&this._markers[r].__dragStart||e.push(this._markers[r]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(e){for(var t,i=this._childClusters.slice(),r=this._group._map,n=r.getBoundsZoom(this._bounds),s=this._zoom+1,o=r.getZoom();0<i.length&&s<n;){s++;var a=[];for(t=0;t<i.length;t++)a=a.concat(i[t]._childClusters);i=a}s<n?this._group._map.setView(this._latlng,s):n<=o?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,e)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this._bounds),e},_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(e,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_setClusterCenter:function(e){this._cLatLng||(this._cLatLng=e._cLatLng||e._latlng)},_resetBounds:function(){var e=this._bounds;e._southWest&&(e._southWest.lat=1/0,e._southWest.lng=1/0),e._northEast&&(e._northEast.lat=-1/0,e._northEast.lng=-1/0)},_recalculateBounds:function(){var e,t,i,r,n=this._markers,s=this._childClusters,o=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),e=0;e<n.length;e++)i=n[e]._latlng,this._bounds.extend(i),o+=i.lat,a+=i.lng;for(e=0;e<s.length;e++)(t=s[e])._boundsNeedUpdate&&t._recalculateBounds(),this._bounds.extend(t._bounds),i=t._wLatLng,r=t._childCount,o+=i.lat*r,a+=i.lng*r;this._latlng=this._wLatLng=new L.LatLng(o/h,a/h),this._boundsNeedUpdate=!1}},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(e,t,i){this._recursively(e,this._group._map.getMinZoom(),i-1,function(e){var i,r,n=e._markers;for(i=n.length-1;0<=i;i--)(r=n[i])._icon&&(r._setPos(t),r.clusterHide())},function(e){var i,r,n=e._childClusters;for(i=n.length-1;0<=i;i--)(r=n[i])._icon&&(r._setPos(t),r.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,i,r){this._recursively(e,r,t,function(n){n._recursivelyAnimateChildrenIn(e,n._group._map.latLngToLayerPoint(n.getLatLng()).round(),i),n._isSingleParent()&&i-1===r?(n.clusterShow(),n._recursivelyRemoveChildrenFromMap(e,t,i)):n.clusterHide(),n._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,this._group._map.getMinZoom(),t,null,function(e){e.clusterShow()})},_recursivelyAddChildrenToMap:function(e,t,i){this._recursively(i,this._group._map.getMinZoom()-1,t,function(r){if(t!==r._zoom)for(var n=r._markers.length-1;0<=n;n--){var s=r._markers[n];i.contains(s._latlng)&&(e&&(s._backupLatlng=s.getLatLng(),s.setLatLng(e),s.clusterHide&&s.clusterHide()),r._group._featureGroup.addLayer(s))}},function(t){t._addToMap(e)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;0<=t;t--){var i=this._markers[t];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(e-1===this._zoom)for(var r=this._childClusters.length-1;0<=r;r--)this._childClusters[r]._restorePosition();else for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,i,r){var n,s;this._recursively(e,t-1,i-1,function(e){for(s=e._markers.length-1;0<=s;s--)n=e._markers[s],r&&r.contains(n._latlng)||(e._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())},function(e){for(s=e._childClusters.length-1;0<=s;s--)n=e._childClusters[s],r&&r.contains(n._latlng)||(e._group._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow())})},_recursively:function(e,t,i,r,n){var s,o,a=this._childClusters,h=this._zoom;if(t<=h&&(r&&r(this),n&&h===i&&n(this)),h<t||h<i)for(s=a.length-1;0<=s;s--)(o=a[s])._boundsNeedUpdate&&o._recalculateBounds(),e.intersects(o._bounds)&&o._recursively(e,t,i,r,n)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var e=this.options.opacity;return this.setOpacity(0),this.options.opacity=e,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var i=this._getCoord(t.x),r=this._getCoord(t.y),n=this._grid,s=n[r]=n[r]||{},o=s[i]=s[i]||[],a=L.Util.stamp(e);this._objectPoint[a]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var i,r,n=this._getCoord(t.x),s=this._getCoord(t.y),o=this._grid,a=o[s]=o[s]||{},h=a[n]=a[n]||[];for(delete this._objectPoint[L.Util.stamp(e)],i=0,r=h.length;i<r;i++)if(h[i]===e)return h.splice(i,1),1===r&&delete a[n],!0},eachObject:function(e,t){var i,r,n,s,o,a,h=this._grid;for(i in h)for(r in o=h[i])for(n=0,s=(a=o[r]).length;n<s;n++)e.call(t,a[n])&&(n--,s--)},getNearObject:function(e){var t,i,r,n,s,o,a,h,l=this._getCoord(e.x),u=this._getCoord(e.y),_=this._objectPoint,d=this._sqCellSize,p=null;for(t=u-1;t<=u+1;t++)if(n=this._grid[t])for(i=l-1;i<=l+1;i++)if(s=n[i])for(r=0,o=s.length;r<o;r++)a=s[r],((h=this._sqDist(_[L.Util.stamp(a)],e))<d||h<=d&&null===p)&&(d=h,p=a);return p},_getCoord:function(e){var t=Math.floor(e/this._cellSize);return isFinite(t)?t:e},_sqDist:function(e,t){var i=t.x-e.x,r=t.y-e.y;return i*i+r*r}},L.QuickHull={getDistant:function(e,t){var i=t[1].lat-t[0].lat;return(t[0].lng-t[1].lng)*(e.lat-t[0].lat)+i*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var i,r,n,s=0,o=null,a=[];for(i=t.length-1;0<=i;i--)r=t[i],0<(n=this.getDistant(r,e))&&(a.push(r),s<n&&(s=n,o=r));return{maxPoint:o,newPoints:a}},buildConvexHull:function(e,t){var i=[],r=this.findMostDistantPointFromBaseLine(e,t);return r.maxPoint?i=(i=i.concat(this.buildConvexHull([e[0],r.maxPoint],r.newPoints))).concat(this.buildConvexHull([r.maxPoint,e[1]],r.newPoints)):[e[0]]},getConvexHull:function(e){var t,i=!1,r=!1,n=!1,s=!1,o=null,a=null,h=null,l=null,u=null,_=null;for(t=e.length-1;0<=t;t--){var d=e[t];(!1===i||d.lat>i)&&(i=(o=d).lat),(!1===r||d.lat<r)&&(r=(a=d).lat),(!1===n||d.lng>n)&&(n=(h=d).lng),(!1===s||d.lng<s)&&(s=(l=d).lng)}return u=r!==i?(_=a,o):(_=l,h),[].concat(this.buildConvexHull([_,u],e),this.buildConvexHull([u,_],e))}},L.MarkerCluster.include({getConvexHull:function(){var e,t,i=this.getAllChildMarkers(),r=[];for(t=i.length-1;0<=t;t--)e=i[t].getLatLng(),r.push(e);return L.QuickHull.getConvexHull(r)}}),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 e,t=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),e=(this._group._spiderfied=this)._group.options.spiderfyShapePositions?this._group.options.spiderfyShapePositions(t.length,i):t.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(t.length,i):(i.y+=10,this._generatePointsCircle(t.length,i)),this._animationSpiderfy(t,e)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var i,r,n=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+e)/this._2PI,s=this._2PI/e,o=[];for(n=Math.max(n,35),o.length=e,i=0;i<e;i++)r=this._circleStartAngle+i*s,o[i]=new L.Point(t.x+n*Math.cos(r),t.y+n*Math.sin(r))._round();return o},_generatePointsSpiral:function(e,t){var i,r=this._group.options.spiderfyDistanceMultiplier,n=r*this._spiralLengthStart,s=r*this._spiralFootSeparation,o=r*this._spiralLengthFactor*this._2PI,a=0,h=[];for(i=h.length=e;0<=i;i--)i<e&&(h[i]=new L.Point(t.x+n*Math.cos(a),t.y+n*Math.sin(a))._round()),n+=o/(a+=s/n+5e-4*i);return h},_noanimationUnspiderfy:function(){var e,t,i=this._group,r=i._map,n=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),t=s.length-1;0<=t;t--)e=s[t],n.removeLayer(e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset&&e.setZIndexOffset(0),e._spiderLeg&&(r.removeLayer(e._spiderLeg),delete e._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(e,t){var i,r,n,s,o=this._group,a=o._map,h=o._featureGroup,l=this._group.options.spiderLegPolylineOptions;for(o._ignoreMove=!0,i=0;i<e.length;i++)s=a.layerPointToLatLng(t[i]),r=e[i],n=new L.Polyline([this._latlng,s],l),a.addLayer(n),r._spiderLeg=n,r._preSpiderfyLatlng=r._latlng,r.setLatLng(s),r.setZIndexOffset&&r.setZIndexOffset(1e6),h.addLayer(r);this.setOpacity(.3),o._ignoreMove=!1,o.fire("spiderfied",{cluster:this,markers:e})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(e,t){var i,r,n,s,o,a,h=this,l=this._group,u=l._map,_=l._featureGroup,d=this._latlng,p=u.latLngToLayerPoint(d),c=L.Path.SVG,f=L.extend({},this._group.options.spiderLegPolylineOptions),m=f.opacity;for(void 0===m&&(m=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),c?(f.opacity=0,f.className=(f.className||"")+" leaflet-cluster-spider-leg"):f.opacity=m,l._ignoreMove=!0,i=0;i<e.length;i++)r=e[i],a=u.layerPointToLatLng(t[i]),n=new L.Polyline([d,a],f),u.addLayer(n),r._spiderLeg=n,c&&(o=(s=n._path).getTotalLength()+.1,s.style.strokeDasharray=o,s.style.strokeDashoffset=o),r.setZIndexOffset&&r.setZIndexOffset(1e6),r.clusterHide&&r.clusterHide(),_.addLayer(r),r._setPos&&r._setPos(p);for(l._forceLayout(),l._animationStart(),i=e.length-1;0<=i;i--)a=u.layerPointToLatLng(t[i]),(r=e[i])._preSpiderfyLatlng=r._latlng,r.setLatLng(a),r.clusterShow&&r.clusterShow(),c&&((s=(n=r._spiderLeg)._path).style.strokeDashoffset=0,n.setStyle({opacity:m}));this.setOpacity(.3),l._ignoreMove=!1,setTimeout(function(){l._animationEnd(),l.fire("spiderfied",{cluster:h,markers:e})},200)},_animationUnspiderfy:function(e){var t,i,r,n,s,o,a=this,h=this._group,l=h._map,u=h._featureGroup,_=e?l._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):l.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),p=L.Path.SVG;for(h._ignoreMove=!0,h._animationStart(),this.setOpacity(1),i=d.length-1;0<=i;i--)(t=d[i])._preSpiderfyLatlng&&(t.closePopup(),t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,o=!0,t._setPos&&(t._setPos(_),o=!1),t.clusterHide&&(t.clusterHide(),o=!1),o&&u.removeLayer(t),p&&(s=(n=(r=t._spiderLeg)._path).getTotalLength()+.1,n.style.strokeDashoffset=s,r.setStyle({opacity:0})));h._ignoreMove=!1,setTimeout(function(){var e=0;for(i=d.length-1;0<=i;i--)(t=d[i])._spiderLeg&&e++;for(i=d.length-1;0<=i;i--)(t=d[i])._spiderLeg&&(t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),1<e&&u.removeLayer(t),l.removeLayer(t._spiderLeg),delete t._spiderLeg);h._animationEnd(),h.fire("unspiderfied",{cluster:a,markers:d})},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(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(this._featureGroup.removeLayer(e),e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(e){return e?e instanceof L.MarkerClusterGroup?e=e._topClusterLevel.getAllChildMarkers():e instanceof L.LayerGroup?e=e._layers:e instanceof L.MarkerCluster?e=e.getAllChildMarkers():e instanceof L.Marker&&(e=[e]):e=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(e),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(e),this},_flagParentsIconsNeedUpdate:function(e){var t,i;for(t in e)for(i=e[t].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(e){var t,i;for(t in e)i=e[t],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(e,t){var i=this.options.icon;return L.setOptions(i,e),this.setIcon(i),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),e.MarkerClusterGroup=t,e.MarkerCluster=i,Object.defineProperty(e,"__esModule",{value:!0})});
/*
 * Control like L.Control.Layers, but showing layers in a tree.
 * Do not forget to include the css file.
 */
!function(e){if("undefined"==typeof e)throw new Error("Leaflet must be included first");e.Control.Layers.Tree=e.Control.Layers.extend({options:{closedSymbol:"+",openedSymbol:"&minus;",spaceSymbol:" ",selectorBack:!1,namedToggle:!1,collapseAll:"",expandAll:"",labelIsSelector:"both"},_initClassesNames:function(){this.cls={children:"leaflet-layerstree-children",childrenNopad:"leaflet-layerstree-children-nopad",hide:"leaflet-layerstree-hide",closed:"leaflet-layerstree-closed",opened:"leaflet-layerstree-opened",space:"leaflet-layerstree-header-space",pointer:"leaflet-layerstree-header-pointer",header:"leaflet-layerstree-header",neverShow:"leaflet-layerstree-nevershow",node:"leaflet-layerstree-node",name:"leaflet-layerstree-header-name",label:"leaflet-layerstree-header-label",selAllCheckbox:"leaflet-layerstree-sel-all-checkbox"}},initialize:function(t,l,s){this._scrollTop=0,this._initClassesNames(),this._baseTree=null,this._overlaysTree=null,e.Util.setOptions(this,s),e.Control.Layers.prototype.initialize.call(this,null,null,s),this._setTrees(t,l)},setBaseTree:function(e){return this._setTrees(e)},setOverlayTree:function(e){return this._setTrees(void 0,e)},addBaseLayer:function(e,t){throw"addBaseLayer is disabled"},addOverlay:function(e,t){throw"addOverlay is disabled"},removeLayer:function(e){throw"removeLayer is disabled"},collapse:function(){return this._scrollTop=this._sect().scrollTop,e.Control.Layers.prototype.collapse.call(this)},expand:function(){e.Control.Layers.prototype.expand.call(this);this._sect().scrollTop=this._scrollTop},onAdd:function(t){function l(e){e._layersTreeName&&(a.innerHTML=e._layersTreeName)}var s=e.Control.Layers.prototype.onAdd.call(this,t);if(this.options.namedToggle){var a=this._container.getElementsByClassName("leaflet-control-layers-toggle")[0];e.DomUtil.addClass(a,"leaflet-layerstree-named-toggle"),t.eachLayer(function(e){l(e)}),t.on("baselayerchange",function(e){l(e.layer)},this)}return s},expandTree:function(e){var t=e?this._overlaysList:this._baseLayersList;return t&&this._applyOnTree(t,!1),this._localExpand()},collapseTree:function(e){var t=e?this._overlaysList:this._baseLayersList;return t&&this._applyOnTree(t,!0),this._localExpand()},expandSelected:function(t){function l(t){var a=t.parentElement;if(a){if(e.DomUtil.hasClass(a,s.cls.children)&&!e.DomUtil.hasClass(t,s.cls.childrenNopad)&&e.DomUtil.removeClass(a,i),e.DomUtil.hasClass(a,s.cls.node)){var r=a.getElementsByClassName(s.cls.header)[0];s._applyOnTree(r,!1)}l(a)}}var s=this,a=t?this._overlaysList:this._baseLayersList;if(!a)return this;for(var i=this.cls.hide,r=this._layerControlInputs||a.getElementsByTagName("input"),n=0;n<r.length;n++){var o=r[n];this._getLayer&&!!this._getLayer(o.layerId).overlay!=!!t||o.checked&&l(o.parentElement.parentElement.parentElement.parentElement)}return this._localExpand()},_sect:function(){return this._section||this._form},_setTrees:function(e,t){function l(e,t,s){return e&&e.layer&&(s||(e.layer._layersTreeName=e.name||e.label),t[a++]=e.layer),e&&e.children&&e.children.length&&e.children.forEach(function(e){l(e,t,s)}),t}function s(e){return Array.isArray(e)?{noShow:!0,children:e}:e}var a=0;this._layerControlInputs&&(this._layerControlInputs=[]);for(var i=0;i<this._layers.length;++i)this._layers[i].layer.off("add remove",this._onLayerChange,this);this._layers=[],void 0!==e&&(this._baseTree=s(e)),void 0!==t&&(this._overlaysTree=s(t));var r=l(this._baseTree,{});for(var i in r)this._addLayer(r[i],i);var n=l(this._overlaysTree,{},!0);for(i in n)this._addLayer(n[i],i,!0);return this._map?this._update():this},_localExpand:function(){if(this._map&&e.DomUtil.hasClass(this._container,"leaflet-control-layers-expanded")){var t=this._sect().scrollTop;this.expand(),this._sect().scrollTop=t,this._scrollTop=t}return this},_applyOnTree:function(t,l){var s=[{cls:this.cls.children,hide:l},{cls:this.cls.opened,hide:l},{cls:this.cls.closed,hide:!l}];s.forEach(function(l){for(var s=t.getElementsByClassName(l.cls),a=0;a<s.length;a++){var i=s[a];e.DomUtil.hasClass(i,this.cls.childrenNopad)||(l.hide?e.DomUtil.addClass(i,this.cls.hide):e.DomUtil.removeClass(i,this.cls.hide))}},this)},_addItem:function(e){},_update:function(){return this._container?(e.Control.Layers.prototype._update.call(this),this._addTreeLayout(this._baseTree,!1),this._addTreeLayout(this._overlaysTree,!0),this._localExpand()):this},_addTreeLayout:function(e,t){if(e){var l=t?this._overlaysList:this._baseLayersList;this._expandCollapseAll(t,this.options.collapseAll,this.collapseTree),this._expandCollapseAll(t,this.options.expandAll,this.expandTree),this._iterateTreeLayout(e,l,t,[],e.noShow),this._checkDisabledLayers&&this._checkDisabledLayers()}},_expandCollapseAll:function(t,l,s,a){var i=t?this._overlaysList:this._baseLayersList;if(a=a?a:this,l){var r=document.createElement("div");r.className="leaflet-layerstree-expand-collapse",i.appendChild(r),r.innerHTML=l,r.tabIndex=0,e.DomEvent.on(r,"click keydown",function(e){"keydown"===e.type&&32!==e.keyCode||(r.blur(),s.call(a,t),this._localExpand())},this)}},_iterateTreeLayout:function(t,l,s,a,i){function r(t,l,s,a){var i=e.DomUtil.create(t,l,s);return a&&(i.innerHTML=a),i}function n(e){var t=e.querySelector("input[type=checkbox]"),l=!0,s=!0,a=e.querySelectorAll("input[type=checkbox]");[].forEach.call(a,function(e){e===t||(e.indeterminate?(l=!1,s=!1):e.checked?s=!1:e.checked||(l=!1))}),l?(t.indeterminate=!1,t.checked=!0):s?(t.indeterminate=!1,t.checked=!1):(t.indeterminate=!0,t.checked=!1)}function o(t,l){a.forEach(function(s){e.DomEvent.on(t,"click",function(e){n(s)},l)},l)}function c(e){return"string"==typeof e||e instanceof String}function h(e){return e&&"[object Function]"==={}.toString.call(e)}function d(e,t){for(var s=l.getElementsByTagName("input"),a=0;a<s.length;a++){var i=s[a];"checkbox"===i.type&&(i.checked=e,i.indeterminate=!1)}t._onInputClick()}if(t){var p=r("div",this.cls.header,l),y=r("span"),u=r("span"),f=r("span",this.cls.closed,y,this.options.closedSymbol),m=r("span",this.cls.opened,y,this.options.openedSymbol),_=r("span",this.cls.space,null,this.options.spaceSymbol);this.options.selectorBack?(y.insertBefore(_,f),p.appendChild(u),p.appendChild(y)):(y.appendChild(_),p.appendChild(y),p.appendChild(u));var v;t.selectAllCheckbox&&(v=this._createCheckboxElement(!1),v.className+=" "+this.cls.selAllCheckbox);var C=this.cls.hide;if(t.children){var b=r("div",this.cls.children,l),T=t.layer?y:p;e.DomUtil.addClass(T,this.cls.pointer),T.tabIndex=0,e.DomEvent.on(T,"click keydown",function(t){"keydown"===t.type&&32!==t.keyCode||(T.blur(),e.DomUtil.hasClass(m,C)?(e.DomUtil.addClass(f,C),e.DomUtil.removeClass(m,C),e.DomUtil.removeClass(b,C)):(e.DomUtil.removeClass(f,C),e.DomUtil.addClass(m,C),e.DomUtil.addClass(b,C)),this._localExpand())},this),v&&a.splice(0,0,l),t.children.forEach(function(e){var t=r("div",this.cls.node,b);this._iterateTreeLayout(e,t,s,a)},this),v&&a.splice(0,1)}else e.DomUtil.addClass(y,this.cls.neverShow);var L;L=t.layer&&("both"===this.options.labelIsSelector||s&&"overlay"===this.options.labelIsSelector||!s&&"base"===this.options.labelIsSelector)?"label":"span";var k=r(L,this.cls.label,u);if(t.layer){var x,E=this._map.hasLayer(t.layer),D=s?t.radioGroup:"leaflet-base-layers_"+e.Util.stamp(this);D?x=this._createRadioElement(D,E):(x=this._createCheckboxElement(E),o(x,this)),this._layerControlInputs&&this._layerControlInputs.push(x),x.layerId=e.Util.stamp(t.layer),e.DomEvent.on(x,"click",this._onInputClick,this),k.appendChild(x)}t.selectAllCheckbox&&(k.appendChild(v),c(t.selectAllCheckbox)&&(v.title=t.selectAllCheckbox),e.DomEvent.on(v,"click",function(e){e.stopPropagation(),d(v.checked,this)},this),n(l),o(v,this));r("span",this.cls.name,k,t.label);e.DomUtil.addClass(t.collapsed?m:f,C),t.collapsed&&b&&e.DomUtil.addClass(b,C),i&&(e.DomUtil.addClass(p,this.cls.neverShow),e.DomUtil.addClass(b,this.cls.childrenNopad));var g=t.eventedClasses;g instanceof Array||(g=[g]);for(var U=0;U<g.length;U++){var S=g[U];if(S&&S.className){var A=l.querySelector("."+S.className);A&&e.DomEvent.on(A,S.event||"click",function(e){return function(s){s.stopPropagation();var a=h(e)?e(s,l,t,this._map):e;void 0!==a&&null!==a&&d(a,this)}}(S.selectAll),this)}}}},_createCheckboxElement:function(e){var t=document.createElement("input");return t.type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=e,t}}),e.control.layers.tree=function(t,l,s){return new e.Control.Layers.Tree(t,l,s)}}(L);
/*
 * jQuery FlexSlider v2.7.2
 * Copyright 2012 WooThemes
 * Contributing Author: Tyler Smith
 */
!function(e){var t=!0;e.flexslider=function(a,n){var i=e(a);"undefined"==typeof n.rtl&&"rtl"==e("html").attr("dir")&&(n.rtl=!0),i.vars=e.extend({},e.flexslider.defaults,n);var r,s=i.vars.namespace,o=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,l=("ontouchstart"in window||o||window.DocumentTouch&&document instanceof DocumentTouch)&&i.vars.touch,d="click touchend MSPointerUp keyup",c="",u="vertical"===i.vars.direction,v=i.vars.reverse,p=i.vars.itemWidth>0,m="fade"===i.vars.animation,f=""!==i.vars.asNavFor,g={};e.data(a,"flexslider",i),g={init:function(){i.animating=!1,i.currentSlide=parseInt(i.vars.startAt?i.vars.startAt:0,10),isNaN(i.currentSlide)&&(i.currentSlide=0),i.animatingTo=i.currentSlide,i.atEnd=0===i.currentSlide||i.currentSlide===i.last,i.containerSelector=i.vars.selector.substr(0,i.vars.selector.search(" ")),i.slides=e(i.vars.selector,i),i.container=e(i.containerSelector,i),i.count=i.slides.length,i.syncExists=e(i.vars.sync).length>0,"slide"===i.vars.animation&&(i.vars.animation="swing"),i.prop=u?"top":i.vars.rtl?"marginRight":"marginLeft",i.args={},i.manualPause=!1,i.stopped=!1,i.started=!1,i.startTimeout=null,i.transitions=!i.vars.video&&!m&&i.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(void 0!==e.style[t[a]])return i.pfx=t[a].replace("Perspective","").toLowerCase(),i.prop="-"+i.pfx+"-transform",!0;return!1}(),i.isFirefox=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,i.ensureAnimationEnd="",""!==i.vars.controlsContainer&&(i.controlsContainer=e(i.vars.controlsContainer).length>0&&e(i.vars.controlsContainer)),""!==i.vars.manualControls&&(i.manualControls=e(i.vars.manualControls).length>0&&e(i.vars.manualControls)),""!==i.vars.customDirectionNav&&(i.customDirectionNav=2===e(i.vars.customDirectionNav).length&&e(i.vars.customDirectionNav)),i.vars.randomize&&(i.slides.sort(function(){return Math.round(Math.random())-.5}),i.container.empty().append(i.slides)),i.doMath(),i.setup("init"),i.vars.controlNav&&g.controlNav.setup(),i.vars.directionNav&&g.directionNav.setup(),i.vars.keyboard&&(1===e(i.containerSelector).length||i.vars.multipleKeyboard)&&e(document).bind("keyup",function(e){var t=e.keyCode;if(!i.animating&&(39===t||37===t)){var a=i.vars.rtl?37===t?i.getTarget("next"):39===t&&i.getTarget("prev"):39===t?i.getTarget("next"):37===t&&i.getTarget("prev");i.flexAnimate(a,i.vars.pauseOnAction)}}),i.vars.mousewheel&&i.bind("mousewheel",function(e,t,a,n){e.preventDefault();var r=t<0?i.getTarget("next"):i.getTarget("prev");i.flexAnimate(r,i.vars.pauseOnAction)}),i.vars.pausePlay&&g.pausePlay.setup(),i.vars.slideshow&&i.vars.pauseInvisible&&g.pauseInvisible.init(),i.vars.slideshow&&(i.vars.pauseOnHover&&i.hover(function(){i.manualPlay||i.manualPause||i.pause()},function(){i.manualPause||i.manualPlay||i.stopped||i.play()}),i.vars.pauseInvisible&&g.pauseInvisible.isHidden()||(i.vars.initDelay>0?i.startTimeout=setTimeout(i.play,i.vars.initDelay):i.play())),f&&g.asNav.setup(),l&&i.vars.touch&&g.touch(),(!m||m&&i.vars.smoothHeight)&&e(window).bind("resize orientationchange focus",g.resize),i.find("img").attr("draggable","false"),setTimeout(function(){i.vars.start(i)},200)},asNav:{setup:function(){i.asNav=!0,i.animatingTo=Math.floor(i.currentSlide/i.move),i.currentItem=i.currentSlide,i.slides.removeClass(s+"active-slide").eq(i.currentItem).addClass(s+"active-slide"),o?(a._slider=i,i.slides.each(function(){var t=this;t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),t.addEventListener("MSGestureTap",function(t){t.preventDefault();var a=e(this),n=a.index();e(i.vars.asNavFor).data("flexslider").animating||a.hasClass("active")||(i.direction=i.currentItem<n?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction,!1,!0,!0))})})):i.slides.on(d,function(t){t.preventDefault();var a,n=e(this),r=n.index();a=i.vars.rtl?-1*(n.offset().right-e(i).scrollLeft()):n.offset().left-e(i).scrollLeft(),a<=0&&n.hasClass(s+"active-slide")?i.flexAnimate(i.getTarget("prev"),!0):e(i.vars.asNavFor).data("flexslider").animating||n.hasClass(s+"active-slide")||(i.direction=i.currentItem<r?"next":"prev",i.flexAnimate(r,i.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){i.manualControls?g.controlNav.setupManual():g.controlNav.setupPaging()},setupPaging:function(){var t,a,n="thumbnails"===i.vars.controlNav?"control-thumbs":"control-paging",r=1;if(i.controlNavScaffold=e('<ol class="'+s+"control-nav "+s+n+'"></ol>'),i.pagingCount>1)for(var o=0;o<i.pagingCount;o++){if(a=i.slides.eq(o),void 0===a.attr("data-thumb-alt")&&a.attr("data-thumb-alt",""),t=e("<a></a>").attr("href","#").text(r),"thumbnails"===i.vars.controlNav&&(t=e("<img/>").attr("src",a.attr("data-thumb"))),""!==a.attr("data-thumb-alt")&&t.attr("alt",a.attr("data-thumb-alt")),"thumbnails"===i.vars.controlNav&&!0===i.vars.thumbCaptions){var l=a.attr("data-thumbcaption");if(""!==l&&void 0!==l){var u=e("<span></span>").addClass(s+"caption").text(l);t.append(u)}}var v=e("<li>");t.appendTo(v),v.append("</li>"),i.controlNavScaffold.append(v),r++}i.controlsContainer?e(i.controlsContainer).append(i.controlNavScaffold):i.append(i.controlNavScaffold),g.controlNav.set(),g.controlNav.active(),i.controlNavScaffold.delegate("a, img",d,function(t){if(t.preventDefault(),""===c||c===t.type){var a=e(this),n=i.controlNav.index(a);a.hasClass(s+"active")||(i.direction=n>i.currentSlide?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction))}""===c&&(c=t.type),g.setToClearWatchedEvent()})},setupManual:function(){i.controlNav=i.manualControls,g.controlNav.active(),i.controlNav.bind(d,function(t){if(t.preventDefault(),""===c||c===t.type){var a=e(this),n=i.controlNav.index(a);a.hasClass(s+"active")||(n>i.currentSlide?i.direction="next":i.direction="prev",i.flexAnimate(n,i.vars.pauseOnAction))}""===c&&(c=t.type),g.setToClearWatchedEvent()})},set:function(){var t="thumbnails"===i.vars.controlNav?"img":"a";i.controlNav=e("."+s+"control-nav li "+t,i.controlsContainer?i.controlsContainer:i)},active:function(){i.controlNav.removeClass(s+"active").eq(i.animatingTo).addClass(s+"active")},update:function(t,a){i.pagingCount>1&&"add"===t?i.controlNavScaffold.append(e('<li><a href="#">'+i.count+"</a></li>")):1===i.pagingCount?i.controlNavScaffold.find("li").remove():i.controlNav.eq(a).closest("li").remove(),g.controlNav.set(),i.pagingCount>1&&i.pagingCount!==i.controlNav.length?i.update(a,t):g.controlNav.active()}},directionNav:{setup:function(){var t=e('<ul class="'+s+'direction-nav"><li class="'+s+'nav-prev"><a class="'+s+'prev" href="#">'+i.vars.prevText+'</a></li><li class="'+s+'nav-next"><a class="'+s+'next" href="#">'+i.vars.nextText+"</a></li></ul>");i.customDirectionNav?i.directionNav=i.customDirectionNav:i.controlsContainer?(e(i.controlsContainer).append(t),i.directionNav=e("."+s+"direction-nav li a",i.controlsContainer)):(i.append(t),i.directionNav=e("."+s+"direction-nav li a",i)),g.directionNav.update(),i.directionNav.bind(d,function(t){t.preventDefault();var a;""!==c&&c!==t.type||(a=e(this).hasClass(s+"next")?i.getTarget("next"):i.getTarget("prev"),i.flexAnimate(a,i.vars.pauseOnAction)),""===c&&(c=t.type),g.setToClearWatchedEvent()})},update:function(){var e=s+"disabled";1===i.pagingCount?i.directionNav.addClass(e).attr("tabindex","-1"):i.vars.animationLoop?i.directionNav.removeClass(e).removeAttr("tabindex"):0===i.animatingTo?i.directionNav.removeClass(e).filter("."+s+"prev").addClass(e).attr("tabindex","-1"):i.animatingTo===i.last?i.directionNav.removeClass(e).filter("."+s+"next").addClass(e).attr("tabindex","-1"):i.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('<div class="'+s+'pauseplay"><a href="#"></a></div>');i.controlsContainer?(i.controlsContainer.append(t),i.pausePlay=e("."+s+"pauseplay a",i.controlsContainer)):(i.append(t),i.pausePlay=e("."+s+"pauseplay a",i)),g.pausePlay.update(i.vars.slideshow?s+"pause":s+"play"),i.pausePlay.bind(d,function(t){t.preventDefault(),""!==c&&c!==t.type||(e(this).hasClass(s+"pause")?(i.manualPause=!0,i.manualPlay=!1,i.pause()):(i.manualPause=!1,i.manualPlay=!0,i.play())),""===c&&(c=t.type),g.setToClearWatchedEvent()})},update:function(e){"play"===e?i.pausePlay.removeClass(s+"pause").addClass(s+"play").html(i.vars.playText):i.pausePlay.removeClass(s+"play").addClass(s+"pause").html(i.vars.pauseText)}},touch:function(){function e(e){e.stopPropagation(),i.animating?e.preventDefault():(i.pause(),a._gesture.addPointer(e.pointerId),w=0,d=u?i.h:i.w,f=Number(new Date),l=p&&v&&i.animatingTo===i.last?0:p&&v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:v?(i.last-i.currentSlide+i.cloneOffset)*d:(i.currentSlide+i.cloneOffset)*d)}function t(e){e.stopPropagation();var t=e.target._slider;if(t){var n=-e.translationX,i=-e.translationY;return w+=u?i:n,c=(t.vars.rtl?-1:1)*w,x=u?Math.abs(w)<Math.abs(-n):Math.abs(w)<Math.abs(-i),e.detail===e.MSGESTURE_FLAG_INERTIA?void setImmediate(function(){a._gesture.stop()}):void((!x||Number(new Date)-f>500)&&(e.preventDefault(),!m&&t.transitions&&(t.vars.animationLoop||(c=w/(0===t.currentSlide&&w<0||t.currentSlide===t.last&&w>0?Math.abs(w)/d+2:1)),t.setProps(l+c,"setTouch"))))}}function n(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!x&&null!==c){var a=v?-c:c,n=a>0?t.getTarget("next"):t.getTarget("prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>d/2)?t.flexAnimate(n,t.vars.pauseOnAction):m||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}r=null,s=null,c=null,l=null,w=0}}var r,s,l,d,c,f,g,h,S,x=!1,y=0,b=0,w=0;o?(a.style.msTouchAction="none",a._gesture=new MSGesture,a._gesture.target=a,a.addEventListener("MSPointerDown",e,!1),a._slider=i,a.addEventListener("MSGestureChange",t,!1),a.addEventListener("MSGestureEnd",n,!1)):(g=function(e){i.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(i.pause(),d=u?i.h:i.w,f=Number(new Date),y=e.touches[0].pageX,b=e.touches[0].pageY,l=p&&v&&i.animatingTo===i.last?0:p&&v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:v?(i.last-i.currentSlide+i.cloneOffset)*d:(i.currentSlide+i.cloneOffset)*d,r=u?b:y,s=u?y:b,a.addEventListener("touchmove",h,!1),a.addEventListener("touchend",S,!1))},h=function(e){y=e.touches[0].pageX,b=e.touches[0].pageY,c=u?r-b:(i.vars.rtl?-1:1)*(r-y),x=u?Math.abs(c)<Math.abs(y-s):Math.abs(c)<Math.abs(b-s);var t=500;(!x||Number(new Date)-f>t)&&(e.preventDefault(),!m&&i.transitions&&(i.vars.animationLoop||(c/=0===i.currentSlide&&c<0||i.currentSlide===i.last&&c>0?Math.abs(c)/d+2:1),i.setProps(l+c,"setTouch")))},S=function(e){if(a.removeEventListener("touchmove",h,!1),i.animatingTo===i.currentSlide&&!x&&null!==c){var t=v?-c:c,n=t>0?i.getTarget("next"):i.getTarget("prev");i.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(t)>50||Math.abs(t)>d/2)?i.flexAnimate(n,i.vars.pauseOnAction):m||i.flexAnimate(i.currentSlide,i.vars.pauseOnAction,!0)}a.removeEventListener("touchend",S,!1),r=null,s=null,c=null,l=null},a.addEventListener("touchstart",g,!1))},resize:function(){!i.animating&&i.is(":visible")&&(p||i.doMath(),m?g.smoothHeight():p?(i.slides.width(i.computedW),i.update(i.pagingCount),i.setProps()):u?(i.viewport.height(i.h),i.setProps(i.h,"setTotal")):(i.vars.smoothHeight&&g.smoothHeight(),i.newSlides.width(i.computedW),i.setProps(i.computedW,"setTotal")))},smoothHeight:function(e){if(!u||m){var t=m?i:i.viewport;e?t.animate({height:i.slides.eq(i.animatingTo).innerHeight()},e):t.innerHeight(i.slides.eq(i.animatingTo).innerHeight())}},sync:function(t){var a=e(i.vars.sync).data("flexslider"),n=i.animatingTo;switch(t){case"animate":a.flexAnimate(n,i.vars.pauseOnAction,!1,!0);break;case"play":a.playing||a.asNav||a.play();break;case"pause":a.pause()}},uniqueID:function(t){return t.filter("[id]").add(t.find("[id]")).each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")}),t},pauseInvisible:{visProp:null,init:function(){var e=g.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){g.pauseInvisible.isHidden()?i.startTimeout?clearTimeout(i.startTimeout):i.pause():i.started?i.play():i.vars.initDelay>0?setTimeout(i.play,i.vars.initDelay):i.play()})}},isHidden:function(){var e=g.pauseInvisible.getHiddenProp();return!!e&&document[e]},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},setToClearWatchedEvent:function(){clearTimeout(r),r=setTimeout(function(){c=""},3e3)}},i.flexAnimate=function(t,a,n,r,o){if(i.vars.animationLoop||t===i.currentSlide||(i.direction=t>i.currentSlide?"next":"prev"),f&&1===i.pagingCount&&(i.direction=i.currentItem<t?"next":"prev"),!i.animating&&(i.canAdvance(t,o)||n)&&i.is(":visible")){if(f&&r){var d=e(i.vars.asNavFor).data("flexslider");if(i.atEnd=0===t||t===i.count-1,d.flexAnimate(t,!0,!1,!0,o),i.direction=i.currentItem<t?"next":"prev",d.direction=i.direction,Math.ceil((t+1)/i.visible)-1===i.currentSlide||0===t)return i.currentItem=t,i.slides.removeClass(s+"active-slide").eq(t).addClass(s+"active-slide"),!1;i.currentItem=t,i.slides.removeClass(s+"active-slide").eq(t).addClass(s+"active-slide"),t=Math.floor(t/i.visible)}if(i.animating=!0,i.animatingTo=t,a&&i.pause(),i.vars.before(i),i.syncExists&&!o&&g.sync("animate"),i.vars.controlNav&&g.controlNav.active(),p||i.slides.removeClass(s+"active-slide").eq(t).addClass(s+"active-slide"),i.atEnd=0===t||t===i.last,i.vars.directionNav&&g.directionNav.update(),t===i.last&&(i.vars.end(i),i.vars.animationLoop||i.pause()),m)l?(i.slides.eq(i.currentSlide).css({opacity:0,zIndex:1}),i.slides.eq(t).css({opacity:1,zIndex:2}),i.wrapup(x)):(i.slides.eq(i.currentSlide).css({zIndex:1}).animate({opacity:0},i.vars.animationSpeed,i.vars.easing),i.slides.eq(t).css({zIndex:2}).animate({opacity:1},i.vars.animationSpeed,i.vars.easing,i.wrapup));else{var c,h,S,x=u?i.slides.filter(":first").height():i.computedW;p?(c=i.vars.itemMargin,S=(i.itemW+c)*i.move*i.animatingTo,h=S>i.limit&&1!==i.visible?i.limit:S):h=0===i.currentSlide&&t===i.count-1&&i.vars.animationLoop&&"next"!==i.direction?v?(i.count+i.cloneOffset)*x:0:i.currentSlide===i.last&&0===t&&i.vars.animationLoop&&"prev"!==i.direction?v?0:(i.count+1)*x:v?(i.count-1-t+i.cloneOffset)*x:(t+i.cloneOffset)*x,i.setProps(h,"",i.vars.animationSpeed),i.transitions?(i.vars.animationLoop&&i.atEnd||(i.animating=!1,i.currentSlide=i.animatingTo),i.container.unbind("webkitTransitionEnd transitionend"),i.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(i.ensureAnimationEnd),i.wrapup(x)}),clearTimeout(i.ensureAnimationEnd),i.ensureAnimationEnd=setTimeout(function(){i.wrapup(x)},i.vars.animationSpeed+100)):i.container.animate(i.args,i.vars.animationSpeed,i.vars.easing,function(){i.wrapup(x)})}i.vars.smoothHeight&&g.smoothHeight(i.vars.animationSpeed)}},i.wrapup=function(e){m||p||(0===i.currentSlide&&i.animatingTo===i.last&&i.vars.animationLoop?i.setProps(e,"jumpEnd"):i.currentSlide===i.last&&0===i.animatingTo&&i.vars.animationLoop&&i.setProps(e,"jumpStart")),i.animating=!1,i.currentSlide=i.animatingTo,i.vars.after(i)},i.animateSlides=function(){!i.animating&&t&&i.flexAnimate(i.getTarget("next"))},i.pause=function(){clearInterval(i.animatedSlides),i.animatedSlides=null,i.playing=!1,i.vars.pausePlay&&g.pausePlay.update("play"),i.syncExists&&g.sync("pause")},i.play=function(){i.playing&&clearInterval(i.animatedSlides),i.animatedSlides=i.animatedSlides||setInterval(i.animateSlides,i.vars.slideshowSpeed),i.started=i.playing=!0,i.vars.pausePlay&&g.pausePlay.update("pause"),i.syncExists&&g.sync("play")},i.stop=function(){i.pause(),i.stopped=!0},i.canAdvance=function(e,t){var a=f?i.pagingCount-1:i.last;return!!t||(!(!f||i.currentItem!==i.count-1||0!==e||"prev"!==i.direction)||(!f||0!==i.currentItem||e!==i.pagingCount-1||"next"===i.direction)&&(!(e===i.currentSlide&&!f)&&(!!i.vars.animationLoop||(!i.atEnd||0!==i.currentSlide||e!==a||"next"===i.direction)&&(!i.atEnd||i.currentSlide!==a||0!==e||"next"!==i.direction))))},i.getTarget=function(e){return i.direction=e,"next"===e?i.currentSlide===i.last?0:i.currentSlide+1:0===i.currentSlide?i.last:i.currentSlide-1},i.setProps=function(e,t,a){var n=function(){var a=e?e:(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo,n=function(){if(p)return"setTouch"===t?e:v&&i.animatingTo===i.last?0:v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:i.animatingTo===i.last?i.limit:a;switch(t){case"setTotal":return v?(i.count-1-i.currentSlide+i.cloneOffset)*e:(i.currentSlide+i.cloneOffset)*e;case"setTouch":return v?e:e;case"jumpEnd":return v?e:i.count*e;case"jumpStart":return v?i.count*e:e;default:return e}}();return n*(i.vars.rtl?1:-1)+"px"}();i.transitions&&(n=i.isFirefox?u?"translate3d(0,"+n+",0)":"translate3d("+(parseInt(n)+"px")+",0,0)":u?"translate3d(0,"+n+",0)":"translate3d("+((i.vars.rtl?-1:1)*parseInt(n)+"px")+",0,0)",a=void 0!==a?a/1e3+"s":"0s",i.container.css("-"+i.pfx+"-transition-duration",a),i.container.css("transition-duration",a)),i.args[i.prop]=n,(i.transitions||void 0===a)&&i.container.css(i.args),i.container.css("transform",n)},i.setup=function(t){if(m)i.vars.rtl?i.slides.css({width:"100%","float":"right",marginLeft:"-100%",position:"relative"}):i.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===t&&(l?i.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+i.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(i.currentSlide).css({opacity:1,zIndex:2}):0==i.vars.fadeFirstSlide?i.slides.css({opacity:0,display:"block",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).css({opacity:1}):i.slides.css({opacity:0,display:"block",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).animate({opacity:1},i.vars.animationSpeed,i.vars.easing)),i.vars.smoothHeight&&g.smoothHeight();else{var a,n;"init"===t&&(i.viewport=e('<div class="'+s+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(i).append(i.container),i.cloneCount=0,i.cloneOffset=0,v&&(n=e.makeArray(i.slides).reverse(),i.slides=e(n),i.container.empty().append(i.slides))),i.vars.animationLoop&&!p&&(i.cloneCount=2,i.cloneOffset=1,"init"!==t&&i.container.find(".clone").remove(),i.container.append(g.uniqueID(i.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(g.uniqueID(i.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),i.newSlides=e(i.vars.selector,i),a=v?i.count-1-i.currentSlide+i.cloneOffset:i.currentSlide+i.cloneOffset,u&&!p?(i.container.height(200*(i.count+i.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){i.newSlides.css({display:"block"}),i.doMath(),i.viewport.height(i.h),i.setProps(a*i.h,"init")},"init"===t?100:0)):(i.container.width(200*(i.count+i.cloneCount)+"%"),i.setProps(a*i.computedW,"init"),setTimeout(function(){i.doMath(),i.vars.rtl&&i.isFirefox?i.newSlides.css({width:i.computedW,marginRight:i.computedM,"float":"right",display:"block"}):i.newSlides.css({width:i.computedW,marginRight:i.computedM,"float":"left",display:"block"}),i.vars.smoothHeight&&g.smoothHeight()},"init"===t?100:0))}p||i.slides.removeClass(s+"active-slide").eq(i.currentSlide).addClass(s+"active-slide"),i.vars.init(i)},i.doMath=function(){var e=i.slides.first(),t=i.vars.itemMargin,a=i.vars.minItems,n=i.vars.maxItems;i.w=void 0===i.viewport?i.width():i.viewport.width(),i.isFirefox&&(i.w=i.width()),i.h=e.height(),i.boxPadding=e.outerWidth()-e.width(),p?(i.itemT=i.vars.itemWidth+t,i.itemM=t,i.minW=a?a*i.itemT:i.w,i.maxW=n?n*i.itemT-t:i.w,i.itemW=i.minW>i.w?(i.w-t*(a-1))/a:i.maxW<i.w?(i.w-t*(n-1))/n:i.vars.itemWidth>i.w?i.w:i.vars.itemWidth,i.visible=Math.floor(i.w/i.itemW),i.move=i.vars.move>0&&i.vars.move<i.visible?i.vars.move:i.visible,i.pagingCount=Math.ceil((i.count-i.visible)/i.move+1),i.last=i.pagingCount-1,i.limit=1===i.pagingCount?0:i.vars.itemWidth>i.w?i.itemW*(i.count-1)+t*(i.count-1):(i.itemW+t)*i.count-i.w-t):(i.itemW=i.w,i.itemM=t,i.pagingCount=i.count,i.last=i.count-1),i.computedW=i.itemW-i.boxPadding,i.computedM=i.itemM},i.update=function(e,t){i.doMath(),p||(e<i.currentSlide?i.currentSlide+=1:e<=i.currentSlide&&0!==e&&(i.currentSlide-=1),i.animatingTo=i.currentSlide),i.vars.controlNav&&!i.manualControls&&("add"===t&&!p||i.pagingCount>i.controlNav.length?g.controlNav.update("add"):("remove"===t&&!p||i.pagingCount<i.controlNav.length)&&(p&&i.currentSlide>i.last&&(i.currentSlide-=1,i.animatingTo-=1),g.controlNav.update("remove",i.last))),i.vars.directionNav&&g.directionNav.update()},i.addSlide=function(t,a){var n=e(t);i.count+=1,i.last=i.count-1,u&&v?void 0!==a?i.slides.eq(i.count-a).after(n):i.container.prepend(n):void 0!==a?i.slides.eq(a).before(n):i.container.append(n),i.update(a,"add"),i.slides=e(i.vars.selector+":not(.clone)",i),i.setup(),i.vars.added(i)},i.removeSlide=function(t){var a=isNaN(t)?i.slides.index(e(t)):t;i.count-=1,i.last=i.count-1,isNaN(t)?e(t,i.slides).remove():u&&v?i.slides.eq(i.last).remove():i.slides.eq(t).remove(),i.doMath(),i.update(a,"remove"),i.slides=e(i.vars.selector+":not(.clone)",i),i.setup(),i.vars.removed(i)},g.init()},e(window).blur(function(e){t=!1}).focus(function(e){t=!0}),e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},e.fn.flexslider=function(t){if(void 0===t&&(t={}),"object"==typeof t)return this.each(function(){var a=e(this),n=t.selector?t.selector:".slides > li",i=a.find(n);1===i.length&&t.allowOneSlide===!1||0===i.length?(i.fadeIn(400),t.start&&t.start(a)):void 0===a.data("flexslider")&&new e.flexslider(this,t)});var a=e(this).data("flexslider");switch(t){case"play":a.play();break;case"pause":a.pause();break;case"stop":a.stop();break;case"next":a.flexAnimate(a.getTarget("next"),!0);break;case"prev":case"previous":a.flexAnimate(a.getTarget("prev"),!0);break;default:"number"==typeof t&&a.flexAnimate(t,!0)}}}(jQuery);
/*!
 Leaflet.MarkerCluster.LayerSupport 2.0.1+649b3a9
 (c) 2015-2018 Boris Seang
 License MIT
 */
!function(e,r){"function"==typeof define&&define.amd?define(["leaflet"],r):r("object"==typeof module&&module.exports?require("leaflet"):e.L)}(this,function(e,r){e.MarkerClusterGroup.LayerSupport=e.MarkerClusterGroup.extend({options:{singleAddRemoveBufferDuration:0},initialize:function(r){e.MarkerClusterGroup.prototype.initialize.call(this,r),this._featureGroup=new o,this._featureGroup.addEventParent(this),this._nonPointGroup=new o,this._nonPointGroup.addEventParent(this),this._layers={},this._proxyLayerGroups={},this._proxyLayerGroupsNeedRemoving={},this._singleAddRemoveBuffer=[]},checkIn:function(e){var r=this._toArray(e);return this._checkInGetSeparated(r),this},checkOut:function(r){var o,t,i=this._toArray(r),a=this._separateSingleFromGroupLayers(i,{groups:[],singles:[]}),s=a.groups,n=a.singles;for(o=0;o<n.length;o++)t=n[o],delete this._layers[e.stamp(t)],delete t._mcgLayerSupportGroup;for(this._originalRemoveLayers(n),o=0;o<s.length;o++)t=s[o],this._dismissProxyLayerGroup(t);return this},addLayers:function(r){var o,t,i,a=this._toArray(r),s=this._checkInGetSeparated(a),n=s.groups;for(this._originalAddLayers(s.singles),o=0;o<n.length;o++)t=n[o],i=e.stamp(t),this._proxyLayerGroups[i]=t,delete this._proxyLayerGroupsNeedRemoving[i],this._map&&this._map._originalAddLayer(t)},addLayer:function(e){return this._bufferSingleAddRemove(e,"addLayers"),this},_originalAddLayer:e.MarkerClusterGroup.prototype.addLayer,_originalAddLayers:e.MarkerClusterGroup.prototype.addLayers,removeLayers:function(r){var o,t,i=this._toArray(r),a=this._separateSingleFromGroupLayers(i,{groups:[],singles:[]}),s=a.groups,n=a.singles,p=0;for(this._originalRemoveLayers(n);p<s.length;p++)o=s[p],t=e.stamp(o),delete this._proxyLayerGroups[t],this._map?this._map._originalRemoveLayer(o):this._proxyLayerGroupsNeedRemoving[t]=o;return this},removeLayer:function(e){return this._bufferSingleAddRemove(e,"removeLayers"),this},_originalRemoveLayer:e.MarkerClusterGroup.prototype.removeLayer,_originalRemoveLayers:e.MarkerClusterGroup.prototype.removeLayers,onAdd:function(r){r._originalAddLayer=r._originalAddLayer||r.addLayer,r._originalRemoveLayer=r._originalRemoveLayer||r.removeLayer,e.extend(r,i);var o,t,a,s=this._removePreAddedLayers(r);this._originalOnAdd.call(this,r);for(o in this._proxyLayerGroups)t=this._proxyLayerGroups[o],r._originalAddLayer(t);for(o in this._proxyLayerGroupsNeedRemoving)t=this._proxyLayerGroupsNeedRemoving[o],r._originalRemoveLayer(t),delete this._proxyLayerGroupsNeedRemoving[o];for(a=0;a<s.length;a++)r.addLayer(s[a])},_originalOnAdd:e.MarkerClusterGroup.prototype.onAdd,_bufferSingleAddRemove:function(r,o){var t,i=this.options.singleAddRemoveBufferDuration;i>0?(this._singleAddRemoveBuffer.push({type:o,layer:r}),this._singleAddRemoveBufferTimeout||(t=e.bind(this._processSingleAddRemoveBuffer,this),this._singleAddRemoveBufferTimeout=setTimeout(t,i))):this[o](r)},_processSingleAddRemoveBuffer:function(){for(var e,r,o=this._singleAddRemoveBuffer,t=0,i=[];t<o.length;t++)e=o[t],r||(r=e.type),e.type===r?i.push(e.layer):(this[r](i),r=e.type,i=[e.layer]);this[r](i),o.length=0,clearTimeout(this._singleAddRemoveBufferTimeout),this._singleAddRemoveBufferTimeout=null},_checkInGetSeparated:function(r){var o,t,i=this._separateSingleFromGroupLayers(r,{groups:[],singles:[]}),a=i.groups,s=i.singles;for(o=0;o<a.length;o++)t=a[o],this._recruitLayerGroupAsProxy(t);for(o=0;o<s.length;o++)t=s[o],this._removeFromOtherGroupsOrMap(t),this._layers[e.stamp(t)]=t,t._mcgLayerSupportGroup=this;return i},_separateSingleFromGroupLayers:function(r,o){for(var t,i=o.groups,a=o.singles,s=e.Util.isArray,n=0;n<r.length;n++)t=r[n],t instanceof e.LayerGroup?(i.push(t),this._separateSingleFromGroupLayers(t.getLayers(),o)):s(t)?this._separateSingleFromGroupLayers(t,o):a.push(t);return o},_recruitLayerGroupAsProxy:function(r){var o=r._proxyMcgLayerSupportGroup;if(o){if(o===this)return;o.checkOut(r)}else this._removeFromOwnMap(r);r._proxyMcgLayerSupportGroup=this,r._originalAddLayer=r._originalAddLayer||r.addLayer,r._originalRemoveLayer=r._originalRemoveLayer||r.removeLayer,r._originalOnAdd=r._originalOnAdd||r.onAdd,r._originalOnRemove=r._originalOnRemove||r.onRemove,e.extend(r,t)},_dismissProxyLayerGroup:function(o){if(o._proxyMcgLayerSupportGroup!==r&&o._proxyMcgLayerSupportGroup===this){delete o._proxyMcgLayerSupportGroup,o.addLayer=o._originalAddLayer,o.removeLayer=o._originalRemoveLayer,o.onAdd=o._originalOnAdd,o.onRemove=o._originalOnRemove;var t=e.stamp(o);delete this._proxyLayerGroups[t],delete this._proxyLayerGroupsNeedRemoving[t],this._removeFromOwnMap(o)}},_removeFromOtherGroupsOrMap:function(e){var r=e._mcgLayerSupportGroup;if(r){if(r===this)return;r.checkOut(e)}else e.__parent?e.__parent._group.removeLayer(e):this._removeFromOwnMap(e)},_removeFromOwnMap:function(e){e._map&&e._map.removeLayer(e)},_removePreAddedLayers:function(e){var r,o=this._layers,t=[];for(var i in o)r=o[i],r._map&&(t.push(r),e._originalRemoveLayer(r));return t},_toArray:function(r){return e.Util.isArray(r)?r:[r]}});var o=e.FeatureGroup.extend({addLayer:function(r){if(this.hasLayer(r))return this;r.addEventParent(this);var o=e.stamp(r);return this._layers[o]=r,this._map&&this._map._originalAddLayer(r),this.fire("layeradd",{layer:r})},removeLayer:function(r){if(!this.hasLayer(r))return this;r in this._layers&&(r=this._layers[r]),r.removeEventParent(this);var o=e.stamp(r);return this._map&&this._layers[o]&&this._map._originalRemoveLayer(this._layers[o]),delete this._layers[o],this.fire("layerremove",{layer:r})},onAdd:function(e){this._map=e,this.eachLayer(e._originalAddLayer,e)},onRemove:function(e){this.eachLayer(e._originalRemoveLayer,e),this._map=null}}),t={addLayer:function(e){var r=this.getLayerId(e);return this._layers[r]=e,this._map?this._proxyMcgLayerSupportGroup.addLayer(e):this._proxyMcgLayerSupportGroup.checkIn(e),this},removeLayer:function(e){var r=e in this._layers?e:this.getLayerId(e);return this._proxyMcgLayerSupportGroup.removeLayer(e),delete this._layers[r],this},onAdd:function(){this._proxyMcgLayerSupportGroup.addLayers(this.getLayers())},onRemove:function(){this._proxyMcgLayerSupportGroup.removeLayers(this.getLayers())}},i={addLayer:function(e){return e._mcgLayerSupportGroup?e._mcgLayerSupportGroup._originalAddLayer(e):this._originalAddLayer(e)},removeLayer:function(e){return e._mcgLayerSupportGroup?e._mcgLayerSupportGroup._originalRemoveLayer(e):this._originalRemoveLayer(e)}};e.markerClusterGroup.layerSupport=function(r){return new e.MarkerClusterGroup.LayerSupport(r)}});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("leaflet")):"function"==typeof define&&define.amd?define(["leaflet"],n):n(t.L)}(this,function(t){"use strict";function n(t,n){var i=n.x-t.x,o=n.y-t.y;return Math.sqrt(i*i+o*o)}function i(t){if("string"==typeof t&&t.indexOf("%")!==-1)return{value:parseFloat(t)/100,isInPixels:!1};var n=t?parseFloat(t):0;return{value:n,isInPixels:n>0}}function o(t){return t.reduce(function(t,i,o,e){if(o>0&&!p(i,e[o-1])){var r=e[o-1],a=t.length>0?t[t.length-1].distB:0,u=n(r,i);t.push({a:r,b:i,distA:a,distB:a+u,heading:s(r,i)})}return t},[])}function e(t,n){var i=o(t),e=i.length;if(0===e)return[];var s=i[e-1].distB,p=a(n.offset,s),u=a(n.endOffset,s),h=a(n.repeat,s),l=s*h,c=p>0?s*p:0,f=u>0?s*u:0,d=[],y=c;do d.push(y),y+=l;while(l>0&&y<s-f);var g=0,m=i[0];return d.map(function(t){for(;t>m.distB&&g<e-1;)g++,m=i[g];var n=(t-m.distA)/(m.distB-m.distA);return{pt:r(m.a,m.b,n),heading:m.heading}})}function r(t,n,i){return n.x!==t.x?{x:t.x+i*(n.x-t.x),y:t.y+i*(n.y-t.y)}:{x:t.x,y:t.y+(n.y-t.y)*i}}t=t&&t.hasOwnProperty("default")?t["default"]:t;var s=function(t,n){return(180*Math.atan2(n.y-t.y,n.x-t.x)/Math.PI+90+360)%360},a=function(t,n){var i=t.value,o=t.isInPixels;return o?i/n:i},p=function(t,n){return t.x===n.x&&t.y===n.y};!function(){var t=L.Marker.prototype._initIcon,n=L.Marker.prototype._setPos,i="msTransform"===L.DomUtil.TRANSFORM;L.Marker.addInitHook(function(){var t=this.options.icon&&this.options.icon.options,n=t&&this.options.icon.options.iconAnchor;n&&(n=n[0]+"px "+n[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||n||"center bottom",this.options.rotationAngle=this.options.rotationAngle||0,this.on("drag",function(t){t.target._applyRotation()})}),L.Marker.include({_initIcon:function(){t.call(this)},_setPos:function(t){n.call(this,t),this._applyRotation()},_applyRotation:function(){this.options.rotationAngle&&(this._icon.style[L.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,i?this._icon.style[L.DomUtil.TRANSFORM]="rotate("+this.options.rotationAngle+"deg)":this._icon.style[L.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotationAngle+"deg)")},setRotationAngle:function(t){return this.options.rotationAngle=t,this.update(),this},setRotationOrigin:function(t){return this.options.rotationOrigin=t,this.update(),this}})}(),t.Symbol=t.Symbol||{},t.Symbol.Dash=t.Class.extend({options:{pixelSize:10,pathOptions:{}},initialize:function(n){t.Util.setOptions(this,n),this.options.pathOptions.clickable=!1},buildSymbol:function(n,i,o,e,r){var s=this.options,a=Math.PI/180;if(s.pixelSize<=1)return t.polyline([n.latLng,n.latLng],s.pathOptions);var p=o.project(n.latLng),u=-(n.heading-90)*a,h=t.point(p.x+s.pixelSize*Math.cos(u+Math.PI)/2,p.y+s.pixelSize*Math.sin(u)/2),l=p.add(p.subtract(h));return t.polyline([o.unproject(h),o.unproject(l)],s.pathOptions)}}),t.Symbol.dash=function(n){return new t.Symbol.Dash(n)},t.Symbol.ArrowHead=t.Class.extend({options:{polygon:!0,pixelSize:10,headAngle:60,pathOptions:{stroke:!1,weight:2}},initialize:function(n){t.Util.setOptions(this,n),this.options.pathOptions.clickable=!1},buildSymbol:function(n,i,o,e,r){return this.options.polygon?t.polygon(this._buildArrowPath(n,o),this.options.pathOptions):t.polyline(this._buildArrowPath(n,o),this.options.pathOptions)},_buildArrowPath:function(n,i){var o=Math.PI/180,e=i.project(n.latLng),r=-(n.heading-90)*o,s=this.options.headAngle/2*o,a=r+s,p=r-s,u=t.point(e.x-this.options.pixelSize*Math.cos(a),e.y+this.options.pixelSize*Math.sin(a)),h=t.point(e.x-this.options.pixelSize*Math.cos(p),e.y+this.options.pixelSize*Math.sin(p));return[i.unproject(u),n.latLng,i.unproject(h)]}}),t.Symbol.arrowHead=function(n){return new t.Symbol.ArrowHead(n)},t.Symbol.Marker=t.Class.extend({options:{markerOptions:{},rotate:!1},initialize:function(n){t.Util.setOptions(this,n),this.options.markerOptions.clickable=!1,this.options.markerOptions.draggable=!1},buildSymbol:function(n,i,o,e,r){return this.options.rotate&&(this.options.markerOptions.rotationAngle=n.heading+(this.options.angleCorrection||0)),t.marker(n.latLng,this.options.markerOptions)}}),t.Symbol.marker=function(n){return new t.Symbol.Marker(n)};var u=function(n){return n instanceof t.LatLng||Array.isArray(n)&&2===n.length&&"number"==typeof n[0]},h=function(t){return Array.isArray(t)&&u(t[0])};t.PolylineDecorator=t.FeatureGroup.extend({options:{patterns:[]},initialize:function(n,i){t.FeatureGroup.prototype.initialize.call(this),t.Util.setOptions(this,i),this._map=null,this._paths=this._initPaths(n),this._bounds=this._initBounds(),this._patterns=this._initPatterns(this.options.patterns)},_initPaths:function(n,i){var o=this;if(h(n)){var e=i?n.concat([n[0]]):n;return[e]}return n instanceof t.Polyline?this._initPaths(n.getLatLngs(),n instanceof t.Polygon):Array.isArray(n)?n.reduce(function(t,n){return t.concat(o._initPaths(n,i))},[]):[]},_initPatterns:function(t){return t.map(this._parsePatternDef)},setPatterns:function(t){this.options.patterns=t,this._patterns=this._initPatterns(this.options.patterns),this.redraw()},setPaths:function(t){this._paths=this._initPaths(t),this._bounds=this._initBounds(),this.redraw()},_parsePatternDef:function(t,n){return{symbolFactory:t.symbol,offset:i(t.offset),endOffset:i(t.endOffset),repeat:i(t.repeat)}},onAdd:function(t){this._map=t,this._draw(),this._map.on("moveend",this.redraw,this)},onRemove:function(n){this._map.off("moveend",this.redraw,this),this._map=null,t.FeatureGroup.prototype.onRemove.call(this,n)},_initBounds:function(){var n=this._paths.reduce(function(t,n){return t.concat(n)},[]);return t.latLngBounds(n)},getBounds:function(){return this._bounds},_buildSymbols:function(t,n,i){var o=this;return i.map(function(e,r){return n.buildSymbol(e,t,o._map,r,i.length)})},_getDirectionPoints:function(n,i){var o=this;if(n.length<2)return[];var r=n.map(function(t){return o._map.project(t)});return e(r,i).map(function(n){return{latLng:o._map.unproject(t.point(n.pt)),heading:n.heading}})},redraw:function(){this._map&&(this.clearLayers(),this._draw())},_getPatternLayers:function(n){var i=this,o=this._map.getBounds().pad(.1);return this._paths.map(function(e){var r=i._getDirectionPoints(e,n).filter(function(t){return o.contains(t.latLng)});return t.featureGroup(i._buildSymbols(e,n.symbolFactory,r))})},_draw:function(){var n=this;this._patterns.map(function(t){return n._getPatternLayers(t)}).forEach(function(i){n.addLayer(t.featureGroup(i))})}}),t.polylineDecorator=function(n,i){return new t.PolylineDecorator(n,i)}});
L.Control.Sidebar=L.Control.extend({includes:L.Evented.prototype||L.Mixin.Events,options:{closeButton:!0,position:"left",autoPan:!0},initialize:function(t,i){L.setOptions(this,i);var o=this._contentContainer=L.DomUtil.get(t);void 0!=o.parentNode&&o.parentNode.removeChild(o);var n="leaflet-",e=this._container=L.DomUtil.create("div",n+"sidebar "+this.options.position);if(L.DomUtil.addClass(o,n+"control"),e.appendChild(o),this.options.closeButton){var s=this._closeButton=L.DomUtil.create("a","close",e);s.innerHTML="&times;"}},addTo:function(t){var i=this._container,o=this._contentContainer;if(this.options.closeButton){var n=this._closeButton;L.DomEvent.on(n,"click",this.hide,this)}L.DomEvent.on(i,"transitionend",this._handleTransitionEvent,this).on(i,"webkitTransitionEnd",this._handleTransitionEvent,this);var e=t._controlContainer;e.insertBefore(i,e.firstChild),this._map=t;var s=L.DomEvent.stopPropagation,r=L.DomEvent._fakeStop||s;return L.DomEvent.on(o,"contextmenu",s).on(o,"click",r).on(o,"mousedown",s).on(o,"touchstart",s).on(o,"dblclick",r).on(o,"mousewheel",s).on(o,"wheel",s).on(o,"scroll",s).on(o,"MozMousePixelScroll",s),this},removeFrom:function(t){this.hide();var i=this._container,o=this._contentContainer,n=t._controlContainer;n.removeChild(i),this._map=null;var e=L.DomEvent.stopPropagation,s=L.DomEvent._fakeStop||e;if(L.DomEvent.off(o,"contextmenu",e).off(o,"click",s).off(o,"mousedown",e).off(o,"touchstart",e).off(o,"dblclick",s).off(o,"mousewheel",e).off(o,"wheel",e).off(o,"scroll",e).off(o,"MozMousePixelScroll",e),L.DomEvent.off(i,"transitionend",this._handleTransitionEvent,this).off(i,"webkitTransitionEnd",this._handleTransitionEvent,this),this._closeButton&&this._close){var r=this._closeButton;L.DomEvent.off(r,"click",this.hide,this)}return this},isVisible:function(){return L.DomUtil.hasClass(this._container,"visible")},show:function(){this.isVisible()||(L.DomUtil.addClass(this._container,"visible"),this.options.autoPan&&this._map.panBy([-this.getOffset()/2,0],{duration:.5}),this.fire("show"))},hide:function(t){this.isVisible()&&(L.DomUtil.removeClass(this._container,"visible"),this.options.autoPan&&this._map.panBy([this.getOffset()/2,0],{duration:.5}),this.fire("hide")),t&&L.DomEvent.stopPropagation(t)},toggle:function(){this.isVisible()?this.hide():this.show()},getContainer:function(){return this._contentContainer},getCloseButton:function(){return this._closeButton},setContent:function(t){var i=this.getContainer();if("string"==typeof t)i.innerHTML=t;else{for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(t)}return this},getOffset:function(){return"right"===this.options.position?-this._container.offsetWidth:this._container.offsetWidth},_handleTransitionEvent:function(t){"left"!=t.propertyName&&"right"!=t.propertyName||this.fire(this.isVisible()?"shown":"hidden")}}),L.control.sidebar=function(t,i){return new L.Control.Sidebar(t,i)};
!function(){function t(t){var i=[t.latLng([90,180]),t.latLng([90,-180]),t.latLng([-90,-180]),t.latLng([-90,180])];if(t.version<"1.0.0")t.extend(t.Polygon.prototype,{initialize:function(n,o){if(i=o.worldLatLngs?o.worldLatLngs:i,o&&o.invert&&!o.invertMultiPolygon){var s=[];s.push(i),s.push(n[0]),n=s}t.Polyline.prototype.initialize.call(this,n,o),this._initWithHoles(n)},getBounds:function(){return this.options.invert?new t.LatLngBounds(this._holes):new t.LatLngBounds(this.getLatLngs())}}),t.extend(t.MultiPolygon.prototype,{initialize:function(t,n){if(i=n.worldLatLngs?n.worldLatLngs:i,this._layers={},this._options=n,n.invert){n.invertMultiPolygon=!0;var o=[];o.push(i);for(var s in t)o.push(t[s][0]);t=[o]}this.setLatLngs(t)}});else{var o={toGeoJSON:t.Polygon.prototype.toGeoJSON};t.extend(t.Polygon.prototype,{_setLatLngs:function(o){if(this._originalLatLngs=o,n(this._originalLatLngs)&&(this._originalLatLngs=[this._originalLatLngs]),this.options.invert){i=this.options.worldLatLngs?this.options.worldLatLngs:i;var s=[];s.push(i);for(var e in o)s.push(o[e]);o=[s]}t.Polyline.prototype._setLatLngs.call(this,o)},getBounds:function(){return this._originalLatLngs?new t.LatLngBounds(this._originalLatLngs):new t.LatLngBounds(this.getLatLngs())},getLatLngs:function(){return this._originalLatLngs},toGeoJSON:function(i){if(!this.options.invert)return o.toGeoJSON.call(this,i);var s=!n(this._originalLatLngs),e=s&&!n(this._originalLatLngs[0]),a=t.GeoJSON.latLngsToCoords(this._originalLatLngs,e?2:s?1:0,!0,i);return s||(a=[a]),t.GeoJSON.getFeature(this,{type:(e?"Multi":"")+"Polygon",coordinates:a})}})}}var n=L.LineUtil.isFlat?L.LineUtil.isFlat:L.LineUtil._flat;"function"==typeof define&&define.amd?define(["leaflet"],function(n){t(n)}):t(L)}();
var List;List=function(){function t(n){if(r[n])return r[n].exports;var s=r[n]={exports:{}};return e[n](s,s.exports,t),s.exports}var e={"./src/add-async.js":/*!**************************!*\
  !*** ./src/add-async.js ***!
  \**************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */
/***/
function(t){t.exports=function(t){var e=function r(e,n,s){var i=e.splice(0,50);s=s||[],s=s.concat(t.add(i)),e.length>0?setTimeout(function(){r(e,n,s)},1):(t.update(),n(s))};return e}},"./src/filter.js":/*!***********************!*\
  !*** ./src/filter.js ***!
  \***********************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */
/***/
function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,n=0,s=r.length;n<s;n++){var i=r[n];e(i)?i.filtered=!0:i.filtered=!1}}return t.update(),t.trigger("filterComplete"),t.visibleItems}}},"./src/fuzzy-search.js":/*!*****************************!*\
  !*** ./src/fuzzy-search.js ***!
  \*****************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module, __webpack_require__ */
/*! CommonJS bailout: module.exports is used directly at 8:0-14 */
/***/
function(t,e,r){var n=(r(/*! ./utils/classes */"./src/utils/classes.js"),r(/*! ./utils/events */"./src/utils/events.js")),s=r(/*! ./utils/extend */"./src/utils/extend.js"),i=r(/*! ./utils/to-string */"./src/utils/to-string.js"),a=r(/*! ./utils/get-by-class */"./src/utils/get-by-class.js"),o=r(/*! ./utils/fuzzy */"./src/utils/fuzzy.js");t.exports=function(t,e){e=e||{},e=s({location:0,distance:100,threshold:.4,multiSearch:!0,searchClass:"fuzzy-search"},e);var r={search:function(n,s){for(var i=e.multiSearch?n.replace(/ +$/,"").split(/ +/):[n],a=0,o=t.items.length;a<o;a++)r.item(t.items[a],s,i)},item:function(t,e,n){for(var s=!0,i=0;i<n.length;i++){for(var a=!1,o=0,l=e.length;o<l;o++)r.values(t.values(),e[o],n[i])&&(a=!0);a||(s=!1)}t.found=s},values:function(t,r,n){if(t.hasOwnProperty(r)){var s=i(t[r]).toLowerCase();if(o(s,n,e))return!0}return!1}};return n.bind(a(t.listContainer,e.searchClass),"keyup",t.utils.events.debounce(function(e){var n=e.target||e.srcElement;t.search(n.value,r.search)},t.searchDelay)),function(e,n){t.search(e,n,r.search)}}},"./src/index.js":/*!**********************!*\
  !*** ./src/index.js ***!
  \**********************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module, __webpack_require__ */
/*! CommonJS bailout: module.exports is used directly at 11:0-14 */
/***/
function(t,e,r){var n=r(/*! string-natural-compare */"./node_modules/string-natural-compare/natural-compare.js"),s=r(/*! ./utils/get-by-class */"./src/utils/get-by-class.js"),i=r(/*! ./utils/extend */"./src/utils/extend.js"),a=r(/*! ./utils/index-of */"./src/utils/index-of.js"),o=r(/*! ./utils/events */"./src/utils/events.js"),l=r(/*! ./utils/to-string */"./src/utils/to-string.js"),u=r(/*! ./utils/classes */"./src/utils/classes.js"),c=r(/*! ./utils/get-attribute */"./src/utils/get-attribute.js"),f=r(/*! ./utils/to-array */"./src/utils/to-array.js");t.exports=function(t,e,d){var h,v=this,g=r(/*! ./item */"./src/item.js")(v),m=r(/*! ./add-async */"./src/add-async.js")(v),p=r(/*! ./pagination */"./src/pagination.js")(v);h={start:function(){v.listClass="list",v.searchClass="search",v.sortClass="sort",v.page=1e4,v.i=1,v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.searchColumns=void 0,v.searchDelay=0,v.handlers={updated:[]},v.valueNames=[],v.utils={getByClass:s,extend:i,indexOf:a,events:o,toString:l,naturalSort:n,classes:u,getAttribute:c,toArray:f},v.utils.extend(v,e),v.listContainer="string"==typeof t?document.getElementById(t):t,v.listContainer&&(v.list=s(v.listContainer,v.listClass,!0),v.parse=r(/*! ./parse */"./src/parse.js")(v),v.templater=r(/*! ./templater */"./src/templater.js")(v),v.search=r(/*! ./search */"./src/search.js")(v),v.filter=r(/*! ./filter */"./src/filter.js")(v),v.sort=r(/*! ./sort */"./src/sort.js")(v),v.fuzzySearch=r(/*! ./fuzzy-search */"./src/fuzzy-search.js")(v,e.fuzzySearch),this.handlers(),this.items(),this.pagination(),v.update())},handlers:function(){for(var t in v.handlers)v[t]&&v.handlers.hasOwnProperty(t)&&v.on(t,v[t])},items:function(){v.parse(v.list),void 0!==d&&v.add(d)},pagination:function(){if(void 0!==e.pagination){e.pagination===!0&&(e.pagination=[{}]),void 0===e.pagination[0]&&(e.pagination=[e.pagination]);for(var t=0,r=e.pagination.length;t<r;t++)p(e.pagination[t])}}},this.reIndex=function(){v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.parse(v.list)},this.toJSON=function(){for(var t=[],e=0,r=v.items.length;e<r;e++)t.push(v.items[e].values());return t},this.add=function(t,e){if(0!==t.length){if(e)return void m(t.slice(0),e);var r=[],n=!1;void 0===t[0]&&(t=[t]);for(var s=0,i=t.length;s<i;s++){var a=null;n=v.items.length>v.page,a=new g(t[s],(void 0),n),v.items.push(a),r.push(a)}return v.update(),r}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var n=0,s=0,i=v.items.length;s<i;s++)v.items[s].values()[t]==e&&(v.templater.remove(v.items[s],r),v.items.splice(s,1),i--,s--,n++);return v.update(),n},this.get=function(t,e){for(var r=[],n=0,s=v.items.length;n<s;n++){var i=v.items[n];i.values()[t]==e&&r.push(i)}return r},this.size=function(){return v.items.length},this.clear=function(){return v.templater.clear(),v.items=[],v},this.on=function(t,e){return v.handlers[t].push(e),v},this.off=function(t,e){var r=v.handlers[t],n=a(r,e);return n>-1&&r.splice(n,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r<e;r++)t[r].matching()&&v.matchingItems.length+1>=v.i&&v.visibleItems.length<v.page?(t[r].show(),v.visibleItems.push(t[r]),v.matchingItems.push(t[r])):t[r].matching()?(v.matchingItems.push(t[r]),t[r].hide()):t[r].hide();return v.trigger("updated"),v},h.start()}},"./src/item.js":/*!*********************!*\
  !*** ./src/item.js ***!
  \*********************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */
/***/
function(t){t.exports=function(t){return function(e,r,n){var s=this;this._values={},this.found=!1,this.filtered=!1;var i=function(e,r,n){if(void 0===r)n?s.values(e,n):s.values(e);else{s.elm=r;var i=t.templater.get(s,e);s.values(i)}};this.values=function(e,r){if(void 0===e)return s._values;for(var n in e)s._values[n]=e[n];r!==!0&&t.templater.set(s,s.values())},this.show=function(){t.templater.show(s)},this.hide=function(){t.templater.hide(s)},this.matching=function(){return t.filtered&&t.searched&&s.found&&s.filtered||t.filtered&&!t.searched&&s.filtered||!t.filtered&&t.searched&&s.found||!t.filtered&&!t.searched},this.visible=function(){return!(!s.elm||s.elm.parentNode!=t.list)},i(e,r,n)}}},"./src/pagination.js":/*!***************************!*\
  !*** ./src/pagination.js ***!
  \***************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module, __webpack_require__ */
/*! CommonJS bailout: module.exports is used directly at 5:0-14 */
/***/
function(t,e,r){var n=r(/*! ./utils/classes */"./src/utils/classes.js"),s=r(/*! ./utils/events */"./src/utils/events.js"),i=r(/*! ./index */"./src/index.js");t.exports=function(t){var e=!1,r=function(r,s){if(t.page<1)return t.listContainer.style.display="none",void(e=!0);e&&(t.listContainer.style.display="block");var i,o=t.matchingItems.length,l=t.i,u=t.page,c=Math.ceil(o/u),f=Math.ceil(l/u),d=s.innerWindow||2,h=s.left||s.outerWindow||0,v=s.right||s.outerWindow||0;v=c-v,r.clear();for(var g=1;g<=c;g++){var m=f===g?"active":"";a.number(g,h,v,f,d)?(i=r.add({page:g,dotted:!1})[0],m&&n(i.elm).add(m),i.elm.firstChild.setAttribute("data-i",g),i.elm.firstChild.setAttribute("data-page",u)):a.dotted(r,g,h,v,f,d,r.size())&&(i=r.add({page:"...",dotted:!0})[0],n(i.elm).add("disabled"))}},a={number:function(t,e,r,n,s){return this.left(t,e)||this.right(t,r)||this.innerWindow(t,n,s)},left:function(t,e){return t<=e},right:function(t,e){return t>e},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,n,s,i,a){return this.dottedLeft(t,e,r,n,s,i)||this.dottedRight(t,e,r,n,s,i,a)},dottedLeft:function(t,e,r,n,s,i){return e==r+1&&!this.innerWindow(e,s,i)&&!this.right(e,n)},dottedRight:function(t,e,r,n,s,i,a){return!t.items[a-1].values().dotted&&(e==n&&!this.innerWindow(e,s,i)&&!this.right(e,n))}};return function(e){var n=new i(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:e.item||"<li><a class='page' href='#'></a></li>",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});s.bind(n.listContainer,"click",function(e){var r=e.target||e.srcElement,n=t.utils.getAttribute(r,"data-page"),s=t.utils.getAttribute(r,"data-i");s&&t.show((s-1)*n+1,n)}),t.on("updated",function(){r(n,e)}),r(n,e)}}},"./src/parse.js":/*!**********************!*\
  !*** ./src/parse.js ***!
  \**********************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module, __webpack_require__ */
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */
/***/
function(t,e,r){t.exports=function(t){var e=r(/*! ./item */"./src/item.js")(t),n=function(t){for(var e=t.childNodes,r=[],n=0,s=e.length;n<s;n++)void 0===e[n].data&&r.push(e[n]);return r},s=function(r,n){for(var s=0,i=r.length;s<i;s++)t.items.push(new e(n,r[s]))},i=function a(e,r){var n=e.splice(0,50);s(n,r),e.length>0?setTimeout(function(){a(e,r)},1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=n(t.list),r=t.valueNames;t.indexAsync?i(e,r):s(e,r)}}},"./src/search.js":/*!***********************!*\
  !*** ./src/search.js ***!
  \***********************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */
/***/
function(t){t.exports=function(t){var e,r,n,s={resetList:function(){t.i=1,t.templater.clear(),n=void 0},setOptions:function(t){2==t.length&&t[1]instanceof Array?e=t[1]:2==t.length&&"function"==typeof t[1]?(e=void 0,n=t[1]):3==t.length?(e=t[1],n=t[2]):e=void 0},setColumns:function(){0!==t.items.length&&void 0===e&&(e=void 0===t.searchColumns?s.toArray(t.items[0].values()):t.searchColumns)},setSearchString:function(e){e=t.utils.toString(e).toLowerCase(),e=e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),r=e},toArray:function(t){var e=[];for(var r in t)e.push(r);return e}},i={list:function(){for(var n,s=[],i=r;null!==(n=i.match(/"([^"]+)"/));)s.push(n[1]),i=i.substring(0,n.index)+i.substring(n.index+n[0].length);i=i.trim(),i.length&&(s=s.concat(i.split(/\s+/)));for(var a=0,o=t.items.length;a<o;a++){var l=t.items[a];if(l.found=!1,s.length){for(var u=0,c=s.length;u<c;u++){for(var f=!1,d=0,h=e.length;d<h;d++){var v=l.values(),g=e[d];if(v.hasOwnProperty(g)&&void 0!==v[g]&&null!==v[g]){var m="string"!=typeof v[g]?v[g].toString():v[g];if(m.toLowerCase().indexOf(s[u])!==-1){f=!0;break}}}if(!f)break}l.found=f}}},reset:function(){t.reset.search(),t.searched=!1}},a=function(a){return t.trigger("searchStart"),s.resetList(),s.setSearchString(a),s.setOptions(arguments),s.setColumns(),""===r?i.reset():(t.searched=!0,n?n(r,e):i.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",t.utils.events.debounce(function(e){var r=e.target||e.srcElement,n=""===r.value&&!t.searched;n||a(r.value)},t.searchDelay)),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",function(t){var e=t.target||t.srcElement;""===e.value&&a("")}),a}},"./src/sort.js":/*!*********************!*\
  !*** ./src/sort.js ***!
  \*********************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */
/***/
function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,n=e.els.length;r<n;r++)t.utils.classes(e.els[r]).remove("asc"),t.utils.classes(e.els[r]).remove("desc")},getOrder:function(e){var r=t.utils.getAttribute(e,"data-order");return"asc"==r||"desc"==r?r:t.utils.classes(e).has("desc")?"asc":t.utils.classes(e).has("asc")?"desc":"asc"},getInSensitive:function(e,r){var n=t.utils.getAttribute(e,"data-insensitive");"false"===n?r.insensitive=!1:r.insensitive=!0},setOrder:function(r){for(var n=0,s=e.els.length;n<s;n++){var i=e.els[n];if(t.utils.getAttribute(i,"data-sort")===r.valueName){var a=t.utils.getAttribute(i,"data-order");"asc"==a||"desc"==a?a==r.order&&t.utils.classes(i).add(r.order):t.utils.classes(i).add(r.order)}}}},r=function(){t.trigger("sortStart");var r={},n=arguments[0].currentTarget||arguments[0].srcElement||void 0;n?(r.valueName=t.utils.getAttribute(n,"data-sort"),e.getInSensitive(n,r),r.order=e.getOrder(n)):(r=arguments[1]||r,r.valueName=arguments[0],r.order=r.order||"asc",r.insensitive="undefined"==typeof r.insensitive||r.insensitive),e.clear(),e.setOrder(r);var s,i=r.sortFunction||t.sortFunction||null,a="desc"===r.order?-1:1;s=i?function(t,e){return i(t,e,r)*a}:function(e,n){var s=t.utils.naturalSort;return s.alphabet=t.alphabet||r.alphabet||void 0,!s.alphabet&&r.insensitive&&(s=t.utils.naturalSort.caseInsensitive),s(e.values()[r.valueName],n.values()[r.valueName])*a},t.items.sort(s),t.update(),t.trigger("sortComplete")};return t.handlers.sortStart=t.handlers.sortStart||[],t.handlers.sortComplete=t.handlers.sortComplete||[],e.els=t.utils.getByClass(t.listContainer,t.sortClass),t.utils.events.bind(e.els,"click",r),t.on("searchStart",e.clear),t.on("filterStart",e.clear),r}},"./src/templater.js":/*!**************************!*\
  !*** ./src/templater.js ***!
  \**************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 216:0-14 */
/***/
function(t){var e=function(t){var e,r=this,n=function(){var r;if("function"==typeof t.item)return void(e=function(e){var r=t.item(e);return a(r)});if(r="string"==typeof t.item?t.item.indexOf("<")===-1?document.getElementById(t.item):a(t.item):i(),!r)throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.");r=s(r,t.valueNames),e=function(){return r.cloneNode(!0)}},s=function(e,r){var n=e.cloneNode(!0);n.removeAttribute("id");for(var s=0,i=r.length;s<i;s++){var a=void 0,o=r[s];if(o.data)for(var l=0,u=o.data.length;l<u;l++)n.setAttribute("data-"+o.data[l],"");else o.attr&&o.name?(a=t.utils.getByClass(n,o.name,!0),a&&a.setAttribute(o.attr,"")):(a=t.utils.getByClass(n,o,!0),a&&(a.innerHTML=""))}return n},i=function(){for(var e=t.list.childNodes,r=0,n=e.length;r<n;r++)if(void 0===e[r].data)return e[r].cloneNode(!0)},a=function(t){if("string"==typeof t){if(/<tr[\s>]/g.exec(t)){var e=document.createElement("tbody");return e.innerHTML=t,e.firstElementChild}if(t.indexOf("<")!==-1){var r=document.createElement("div");return r.innerHTML=t,r.firstElementChild}}},o=function(e){for(var r=0,n=t.valueNames.length;r<n;r++){var s=t.valueNames[r];if(s.data){for(var i=s.data,a=0,o=i.length;a<o;a++)if(i[a]===e)return{data:e}}else{if(s.attr&&s.name&&s.name==e)return s;if(s===e)return e}}},l=function(e,r,n){var s=void 0,i=o(r);i&&(i.data?e.elm.setAttribute("data-"+i.data,n):i.attr&&i.name?(s=t.utils.getByClass(e.elm,i.name,!0),s&&s.setAttribute(i.attr,n)):(s=t.utils.getByClass(e.elm,i,!0),s&&(s.innerHTML=n)))};this.get=function(e,n){r.create(e);for(var s={},i=0,a=n.length;i<a;i++){var o=void 0,l=n[i];if(l.data)for(var u=0,c=l.data.length;u<c;u++)s[l.data[u]]=t.utils.getAttribute(e.elm,"data-"+l.data[u]);else l.attr&&l.name?(o=t.utils.getByClass(e.elm,l.name,!0),s[l.name]=o?t.utils.getAttribute(o,l.attr):""):(o=t.utils.getByClass(e.elm,l,!0),s[l]=o?o.innerHTML:"")}return s},this.set=function(t,e){if(!r.create(t))for(var n in e)e.hasOwnProperty(n)&&l(t,n,e[n])},this.create=function(t){return void 0===t.elm&&(t.elm=e(t.values()),r.set(t,t.values()),!0)},this.remove=function(e){e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.show=function(e){r.create(e),t.list.appendChild(e.elm)},this.hide=function(e){void 0!==e.elm&&e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.clear=function(){if(t.list.hasChildNodes())for(;t.list.childNodes.length>=1;)t.list.removeChild(t.list.firstChild)},n()};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":/*!******************************!*\
  !*** ./src/utils/classes.js ***!
  \******************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module, __webpack_require__ */
/*! CommonJS bailout: module.exports is used directly at 24:0-14 */
/***/
function(t,e,r){function n(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}var s=r(/*! ./index-of */"./src/utils/index-of.js"),i=/\s+/;Object.prototype.toString;t.exports=function(t){return new n(t)},n.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array(),r=s(e,t);return~r||e.push(t),this.el.className=e.join(" "),this},n.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=s(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},n.prototype.toggle=function(t,e){return this.list?("undefined"!=typeof e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):("undefined"!=typeof e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},n.prototype.array=function(){var t=this.el.getAttribute("class")||"",e=t.replace(/^\s+|\s+$/g,""),r=e.split(i);return""===r[0]&&r.shift(),r},n.prototype.has=n.prototype.contains=function(t){return this.list?this.list.contains(t):!!~s(this.array(),t)}},"./src/utils/events.js":/*!*****************************!*\
  !*** ./src/utils/events.js ***!
  \*****************************/
/*! default exports */
/*! export bind [provided] [no usage info] [missing usage info prevents renaming] */
/*! export debounce [provided] [no usage info] [missing usage info prevents renaming] */
/*! export unbind [provided] [no usage info] [missing usage info prevents renaming] */
/*! other exports [not provided] [no usage info] */
/*! runtime requirements: __webpack_exports__, __webpack_require__ */
/***/
function(t,e,r){var n=window.addEventListener?"addEventListener":"attachEvent",s=window.removeEventListener?"removeEventListener":"detachEvent",i="addEventListener"!==n?"on":"",a=r(/*! ./to-array */"./src/utils/to-array.js");/**
 * Bind `el` event `type` to `fn`.
 *
 * @param {Element} el, NodeList, HTMLCollection or Array
 * @param {String} type
 * @param {Function} fn
 * @param {Boolean} capture
 * @api public
 */
e.bind=function(t,e,r,s){t=a(t);for(var o=0,l=t.length;o<l;o++)t[o][n](i+e,r,s||!1)},e.unbind=function(t,e,r,n){t=a(t);for(var o=0,l=t.length;o<l;o++)t[o][s](i+e,r,n||!1)},e.debounce=function(t,e,r){var n;return e?function(){var s=this,i=arguments,a=function(){n=null,r||t.apply(s,i)},o=r&&!n;clearTimeout(n),n=setTimeout(a,e),o&&t.apply(s,i)}:t}},"./src/utils/extend.js":/*!*****************************!*\
  !*** ./src/utils/extend.js ***!
  \*****************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 4:0-14 */
/***/
function(t){t.exports=function(t){for(var e,r=Array.prototype.slice.call(arguments,1),n=0;e=r[n];n++)if(e)for(var s in e)t[s]=e[s];return t}},"./src/utils/fuzzy.js":/*!****************************!*\
  !*** ./src/utils/fuzzy.js ***!
  \****************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */
/***/
function(t){t.exports=function(t,e,r){function n(t,r){var n=t/e.length,s=Math.abs(o-r);return i?n+s/i:s?1:n}var s=r.location||0,i=r.distance||100,a=r.threshold||.4;if(e===t)return!0;if(e.length>32)return!1;var o=s,l=function(){var t,r={};for(t=0;t<e.length;t++)r[e.charAt(t)]=0;for(t=0;t<e.length;t++)r[e.charAt(t)]|=1<<e.length-t-1;return r}(),u=a,c=t.indexOf(e,o);c!=-1&&(u=Math.min(n(0,c),u),c=t.lastIndexOf(e,o+e.length),c!=-1&&(u=Math.min(n(0,c),u)));var f=1<<e.length-1;c=-1;for(var d,h,v,g=e.length+t.length,m=0;m<e.length;m++){for(d=0,h=g;d<h;)n(m,o+h)<=u?d=h:g=h,h=Math.floor((g-d)/2+d);g=h;var p=Math.max(1,o-h+1),y=Math.min(o+h,t.length)+e.length,C=Array(y+2);C[y+1]=(1<<m)-1;for(var b=y;b>=p;b--){var j=l[t.charAt(b-1)];if(0===m?C[b]=(C[b+1]<<1|1)&j:C[b]=(C[b+1]<<1|1)&j|((v[b+1]|v[b])<<1|1)|v[b+1],C[b]&f){var x=n(m,b-1);if(x<=u){if(u=x,c=b-1,!(c>o))break;p=Math.max(1,2*o-c)}}}if(n(m+1,o)>u)break;v=C}return!(c<0)}},"./src/utils/get-attribute.js":/*!************************************!*\
  !*** ./src/utils/get-attribute.js ***!
  \************************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 11:0-14 */
/***/
function(t){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var n=t.attributes,s=n.length,i=0;i<s;i++)void 0!==n[i]&&n[i].nodeName===e&&(r=n[i].nodeValue);return r}},"./src/utils/get-by-class.js":/*!***********************************!*\
  !*** ./src/utils/get-by-class.js ***!
  \***********************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 53:0-14 */
/***/
function(t){var e=function(t,e,r){return r?t.getElementsByClassName(e)[0]:t.getElementsByClassName(e)},r=function(t,e,r){return e="."+e,r?t.querySelector(e):t.querySelectorAll(e)},n=function(t,e,r){for(var n=[],s="*",i=t.getElementsByTagName(s),a=i.length,o=new RegExp("(^|\\s)"+e+"(\\s|$)"),l=0,u=0;l<a;l++)if(o.test(i[l].className)){if(r)return i[l];n[u]=i[l],u++}return n};t.exports=function(){return function(t,s,i,a){return a=a||{},a.test&&a.getElementsByClassName||!a.test&&document.getElementsByClassName?e(t,s,i):a.test&&a.querySelector||!a.test&&document.querySelector?r(t,s,i):n(t,s,i)}}()},"./src/utils/index-of.js":/*!*******************************!*\
  !*** ./src/utils/index-of.js ***!
  \*******************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 3:0-14 */
/***/
function(t){var e=[].indexOf;t.exports=function(t,r){if(e)return t.indexOf(r);for(var n=0,s=t.length;n<s;++n)if(t[n]===r)return n;return-1}},"./src/utils/to-array.js":/*!*******************************!*\
  !*** ./src/utils/to-array.js ***!
  \*******************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 11:0-14 */
/***/
function(t){function e(t){return"[object Array]"===Object.prototype.toString.call(t)}t.exports=function(t){if("undefined"==typeof t)return[];if(null===t)return[null];if(t===window)return[window];if("string"==typeof t)return[t];if(e(t))return t;if("number"!=typeof t.length)return[t];if("function"==typeof t&&t instanceof Function)return[t];for(var r=[],n=0,s=t.length;n<s;n++)(Object.prototype.hasOwnProperty.call(t,n)||n in t)&&r.push(t[n]);return r.length?r:[]}},"./src/utils/to-string.js":/*!********************************!*\
  !*** ./src/utils/to-string.js ***!
  \********************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 1:0-14 */
/***/
function(t){t.exports=function(t){return t=void 0===t?"":t,t=null===t?"":t,t=t.toString()}},"./node_modules/string-natural-compare/natural-compare.js":/*!****************************************************************!*\
  !*** ./node_modules/string-natural-compare/natural-compare.js ***!
  \****************************************************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: module */
/*! CommonJS bailout: module.exports is used directly at 124:0-14 */
/***/
function(t){"use strict";function e(t){return t>=48&&t<=57}function r(t,r){for(var n=(t+="").length,a=(r+="").length,o=0,l=0;o<n&&l<a;){var u=t.charCodeAt(o),c=r.charCodeAt(l);if(e(u)){if(!e(c))return u-c;for(var f=o,d=l;48===u&&++f<n;)u=t.charCodeAt(f);for(;48===c&&++d<a;)c=r.charCodeAt(d);for(var h=f,v=d;h<n&&e(t.charCodeAt(h));)++h;for(;v<a&&e(r.charCodeAt(v));)++v;var g=h-f-v+d;if(g)return g;for(;f<h;)if(g=t.charCodeAt(f++)-r.charCodeAt(d++))return g;o=h,l=v}else{if(u!==c)return u<i&&c<i&&s[u]!==-1&&s[c]!==-1?s[u]-s[c]:u-c;++o,++l}}return o>=n&&l<a&&n>=a?-1:l>=a&&o<n&&a>=n?1:n-a}var n,s,i=0;r.caseInsensitive=r.i=function(t,e){return r((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(r,{alphabet:{get:function(){return n},set:function(t){n=t,s=[];var e=0;if(n)for(;e<n.length;e++)s[n.charCodeAt(e)]=e;for(i=s.length,e=0;e<i;e++)void 0===s[e]&&(s[e]=-1)}}}),t.exports=r}},r={};return t("./src/index.js")}();
/***************************************************************************************************
LoadingOverlay - A flexible loading overlay jQuery plugin
    Author          : Gaspare Sganga
    Version         : 2.1.7
    License         : MIT
    Documentation   : https://gasparesganga.com/labs/jquery-loading-overlay/
***************************************************************************************************/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(e,s){"use strict";function t(s,t){s=e(s),t.size=p(t.size),t.maxSize=parseInt(t.maxSize,10)||0,t.minSize=parseInt(t.minSize,10)||0,t.resizeInterval=parseInt(t.resizeInterval,10)||0;var a=l(s),o=g(s);if(o===!1){if(o=e.extend({},x),o.container=s,o.wholePage=s.is("body"),a=e("<div>",{"class":"loadingoverlay"}).css(v.overlay).css("flex-direction","row"===t.direction.toLowerCase()?"row":"column"),t.backgroundClass?a.addClass(t.backgroundClass):a.css("background",t.background),o.wholePage&&a.css({position:"fixed",top:0,left:0,width:"100%",height:"100%"}),"undefined"!=typeof t.zIndex&&a.css("z-index",t.zIndex),t.image){e.isArray(t.imageColor)?0===t.imageColor.length?t.imageColor=!1:1===t.imageColor.length?t.imageColor={fill:t.imageColor[0]}:t.imageColor={fill:t.imageColor[0],stroke:t.imageColor[1]}:t.imageColor&&(t.imageColor={fill:t.imageColor});var r=c(a,t.imageOrder,t.imageAutoResize,t.imageResizeFactor,t.imageAnimation);"<svg"===t.image.slice(0,4).toLowerCase()&&"</svg>"===t.image.slice(-6).toLowerCase()?(r.append(t.image),r.children().css(v.element_svg),!t.imageClass&&t.imageColor&&r.find("*").css(t.imageColor)):".svg"===t.image.slice(-4).toLowerCase()||"data:image/svg"===t.image.slice(0,14).toLowerCase()?e.ajax({url:t.image,type:"GET",dataType:"html",global:!1}).done(function(e){r.html(e),r.children().css(v.element_svg),!t.imageClass&&t.imageColor&&r.find("*").css(t.imageColor)}):r.css({"background-image":"url("+t.image+")","background-position":"center","background-repeat":"no-repeat","background-size":"cover"}),t.imageClass&&r.addClass(t.imageClass)}if(t.fontawesome){var r=c(a,t.fontawesomeOrder,t.fontawesomeAutoResize,t.fontawesomeResizeFactor,t.fontawesomeAnimation).addClass("loadingoverlay_fa");e("<div>",{"class":t.fontawesome}).appendTo(r),t.fontawesomeColor&&r.css("color",t.fontawesomeColor)}if(t.custom)var r=c(a,t.customOrder,t.customAutoResize,t.customResizeFactor,t.customAnimation).append(t.custom);if(t.text&&(o.text=c(a,t.textOrder,t.textAutoResize,t.textResizeFactor,t.textAnimation).addClass("loadingoverlay_text").text(t.text),t.textClass?o.text.addClass(t.textClass):t.textColor&&o.text.css("color",t.textColor)),t.progress){var r=c(a,t.progressOrder,t.progressAutoResize,t.progressResizeFactor,!1).addClass("loadingoverlay_progress"),i=e("<div>").css(v.progress_wrapper).appendTo(r);o.progress={bar:e("<div>").css(v.progress_bar).appendTo(i),fixed:!1,margin:0,min:parseFloat(t.progressMin),max:parseFloat(t.progressMax),speed:parseInt(t.progressSpeed,10)};var d=(t.progressFixedPosition+"").replace(/\s\s+/g," ").toLowerCase().split(" ");2===d.length&&f(d[0])?(o.progress.fixed=d[0],o.progress.margin=p(d[1])):2===d.length&&f(d[1])?(o.progress.fixed=d[1],o.progress.margin=p(d[0])):1===d.length&&f(d[0])&&(o.progress.fixed=d[0],o.progress.margin=0),"top"===o.progress.fixed?r.css(v.progress_fixed).css("top",o.progress.margin?o.progress.margin.value+(o.progress.margin.fixed?o.progress.margin.units:"%"):0):"bottom"===o.progress.fixed&&r.css(v.progress_fixed).css("top","auto"),t.progressClass?o.progress.bar.addClass(t.progressClass):t.progressColor&&o.progress.bar.css("background",t.progressColor)}t.fade?t.fade===!0?t.fade=h.fade:"string"==typeof t.fade||"number"==typeof t.fade?t.fade=[t.fade,t.fade]:e.isArray(t.fade)&&t.fade.length<2&&(t.fade=[t.fade[0],t.fade[0]]):t.fade=[0,0],t.fade=[parseInt(t.fade[0],10),parseInt(t.fade[1],10)],o.settings=t,a.data("loadingoverlay_data",o),s.data("loadingoverlay",a),a.fadeTo(0,.01).appendTo("body"),n(s,!0),t.resizeInterval>0&&(o.resizeIntervalId=setInterval(function(){n(s,!1)},t.resizeInterval)),a.fadeTo(t.fade[0],1)}o.count++}function a(s,t){s=e(s);var a=l(s),o=g(s);o!==!1&&(o.count--,(t||o.count<=0)&&a.animate({opacity:0},o.settings.fade[1],function(){o.resizeIntervalId&&clearInterval(o.resizeIntervalId),e(this).remove(),s.removeData("loadingoverlay")}))}function o(s){n(e(s),!0)}function r(s,t){s=e(s);var a=g(s);a!==!1&&a.text&&(t===!1?a.text.hide():a.text.show().text(t))}function i(s,t){s=e(s);var a=g(s);if(a!==!1&&a.progress)if(t===!1)a.progress.bar.hide();else{var o=100*((parseFloat(t)||0)-a.progress.min)/(a.progress.max-a.progress.min);o<0&&(o=0),o>100&&(o=100),a.progress.bar.show().animate({width:o+"%"},a.progress.speed)}}function n(s,t){var a=l(s),o=g(s);if(o!==!1){if(!o.wholePage){var r="fixed"===s.css("position"),i=r?s[0].getBoundingClientRect():s.offset();a.css({position:r?"fixed":"absolute",top:i.top+parseInt(s.css("border-top-width"),10),left:i.left+parseInt(s.css("border-left-width"),10),width:s.innerWidth(),height:s.innerHeight()})}if(o.settings.size){var n=o.wholePage?e(window):s,c=o.settings.size.value;o.settings.size.fixed||(c=Math.min(n.innerWidth(),n.innerHeight())*c/100,o.settings.maxSize&&c>o.settings.maxSize&&(c=o.settings.maxSize),o.settings.minSize&&c<o.settings.minSize&&(c=o.settings.minSize)),a.children(".loadingoverlay_element").each(function(){var s=e(this);if(t||s.data("loadingoverlay_autoresize")){var a=s.data("loadingoverlay_resizefactor");s.hasClass("loadingoverlay_fa")||s.hasClass("loadingoverlay_text")?s.css("font-size",c*a+o.settings.size.units):s.hasClass("loadingoverlay_progress")?(o.progress.bar.css("height",c*a+o.settings.size.units),o.progress.fixed?"bottom"===o.progress.fixed&&s.css("bottom",o.progress.margin?o.progress.margin.value+(o.progress.margin.fixed?o.progress.margin.units:"%"):0).css("bottom","+="+c*a+o.settings.size.units):o.progress.bar.css("top",s.position().top).css("top","-="+c*a*.5+o.settings.size.units)):s.css({width:c*a+o.settings.size.units,height:c*a+o.settings.size.units})}})}}}function l(e){return e.data("loadingoverlay")}function g(t){var a=l(t),o="undefined"==typeof a?s:a.data("loadingoverlay_data");return"undefined"==typeof o?(e(".loadingoverlay").each(function(){var s=e(this),t=s.data("loadingoverlay_data");document.body.contains(t.container[0])||(t.resizeIntervalId&&clearInterval(t.resizeIntervalId),s.remove())}),!1):(a.toggle(t.is(":visible")),o)}function c(s,t,a,o,r){var i=e("<div>",{"class":"loadingoverlay_element",css:{order:t}}).css(v.element).data({loadingoverlay_autoresize:a,loadingoverlay_resizefactor:o}).appendTo(s);if(r===!0&&(r=h.animations.time+" "+h.animations.name),"string"==typeof r){var n,l,g=r.replace(/\s\s+/g," ").toLowerCase().split(" ");2===g.length&&d(g[0])&&m(g[1])?(n=g[1],l=g[0]):2===g.length&&d(g[1])&&m(g[0])?(n=g[0],l=g[1]):1===g.length&&d(g[0])?(n=h.animations.name,l=g[0]):1===g.length&&m(g[0])&&(n=g[0],l=h.animations.time),i.css({"animation-name":"loadingoverlay_animation__"+n,"animation-duration":l,"animation-timing-function":"linear","animation-iteration-count":"infinite"})}return i}function d(e){return!isNaN(parseFloat(e))&&("s"===e.slice(-1)||"ms"===e.slice(-2))}function m(e){return y.animations.indexOf(e)>-1}function f(e){return y.progressPosition.indexOf(e)>-1}function p(e){return!(!e||e<0)&&("string"==typeof e&&["vmin","vmax"].indexOf(e.slice(-4))>-1?{fixed:!0,units:e.slice(-4),value:e.slice(0,-4)}:"string"==typeof e&&["rem"].indexOf(e.slice(-3))>-1?{fixed:!0,units:e.slice(-3),value:e.slice(0,-3)}:"string"==typeof e&&["px","em","cm","mm","in","pt","pc","vh","vw"].indexOf(e.slice(-2))>-1?{fixed:!0,units:e.slice(-2),value:e.slice(0,-2)}:{fixed:!1,units:"px",value:parseFloat(e)})}var u={background:"rgba(255, 255, 255, 0.8)",backgroundClass:"",image:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'><circle r='80' cx='500' cy='90'/><circle r='80' cx='500' cy='910'/><circle r='80' cx='90' cy='500'/><circle r='80' cx='910' cy='500'/><circle r='80' cx='212' cy='212'/><circle r='80' cx='788' cy='212'/><circle r='80' cx='212' cy='788'/><circle r='80' cx='788' cy='788'/></svg>",imageAnimation:"2000ms rotate_right",imageAutoResize:!0,imageResizeFactor:1,imageColor:"#202020",imageClass:"",imageOrder:1,fontawesome:"",fontawesomeAnimation:"",fontawesomeAutoResize:!0,fontawesomeResizeFactor:1,fontawesomeColor:"#202020",fontawesomeOrder:2,custom:"",customAnimation:"",customAutoResize:!0,customResizeFactor:1,customOrder:3,text:"",textAnimation:"",textAutoResize:!0,textResizeFactor:.5,textColor:"#202020",textClass:"",textOrder:4,progress:!1,progressAutoResize:!0,progressResizeFactor:.25,progressColor:"#a0a0a0",progressClass:"",progressOrder:5,progressFixedPosition:"",progressSpeed:200,progressMin:0,progressMax:100,size:50,maxSize:120,minSize:20,direction:"column",fade:!0,resizeInterval:50,zIndex:2147483647},v={overlay:{"box-sizing":"border-box",position:"relative",display:"flex","flex-wrap":"nowrap","align-items":"center","justify-content":"space-around"},element:{"box-sizing":"border-box",overflow:"visible",flex:"0 0 auto",display:"flex","justify-content":"center","align-items":"center"},element_svg:{width:"100%",height:"100%"},progress_fixed:{position:"absolute",left:"0",width:"100%"},progress_wrapper:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},progress_bar:{position:"absolute",left:"0"}},x={count:0,container:s,settings:s,wholePage:s,resizeIntervalId:s,text:s,progress:s},y={animations:["rotate_right","rotate_left","fadein","pulse"],progressPosition:["top","bottom"]},h={animations:{name:"rotate_right",time:"2000ms"},fade:[400,200]};e.LoadingOverlaySetup=function(s){e.extend(!0,u,s)},e.LoadingOverlay=function(s,n){switch(s.toLowerCase()){case"show":t("body",e.extend(!0,{},u,n));break;case"hide":a("body",n);break;case"resize":o("body",n);break;case"text":r("body",n);break;case"progress":i("body",n)}},e.fn.LoadingOverlay=function(s,n){switch(s.toLowerCase()){case"show":return this.each(function(){t(this,e.extend(!0,{},u,n))});case"hide":return this.each(function(){a(this,n)});case"resize":return this.each(function(){o(this,n)});case"text":return this.each(function(){r(this,n)});case"progress":return this.each(function(){i(this,n)})}},e(function(){e("head").append(["<style>","@-webkit-keyframes loadingoverlay_animation__rotate_right {","to {","-webkit-transform : rotate(360deg);","transform : rotate(360deg);","}","}","@keyframes loadingoverlay_animation__rotate_right {","to {","-webkit-transform : rotate(360deg);","transform : rotate(360deg);","}","}","@-webkit-keyframes loadingoverlay_animation__rotate_left {","to {","-webkit-transform : rotate(-360deg);","transform : rotate(-360deg);","}","}","@keyframes loadingoverlay_animation__rotate_left {","to {","-webkit-transform : rotate(-360deg);","transform : rotate(-360deg);","}","}","@-webkit-keyframes loadingoverlay_animation__fadein {","0% {","opacity   : 0;","-webkit-transform : scale(0.1, 0.1);","transform : scale(0.1, 0.1);","}","50% {","opacity   : 1;","}","100% {","opacity   : 0;","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","}","@keyframes loadingoverlay_animation__fadein {","0% {","opacity   : 0;","-webkit-transform : scale(0.1, 0.1);","transform : scale(0.1, 0.1);","}","50% {","opacity   : 1;","}","100% {","opacity   : 0;","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","}","@-webkit-keyframes loadingoverlay_animation__pulse {","0% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","50% {","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","100% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","}","@keyframes loadingoverlay_animation__pulse {","0% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","50% {","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","100% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","}","</style>"].join(" "))})});
!function(t){var o,e;if("function"==typeof define&&define.amd)define(["leaflet","proj4"],t);else if("object"==typeof module&&"object"==typeof module.exports)o=require("leaflet"),e=require("proj4"),module.exports=t(o,e);else{if("undefined"==typeof window.L||"undefined"==typeof window.proj4)throw"Leaflet and proj4 must be loaded first";t(window.L,window.proj4)}}(function(t,o){return o.__esModule&&o["default"]&&(o=o["default"]),t.Proj={},t.Proj._isProj4Obj=function(t){return"undefined"!=typeof t.inverse&&"undefined"!=typeof t.forward},t.Proj.Projection=t.Class.extend({initialize:function(o,e,i){var n=t.Proj._isProj4Obj(o);this._proj=n?o:this._projFromCodeDef(o,e),this.bounds=n?e:i},project:function(o){var e=this._proj.forward([o.lng,o.lat]);return new t.Point(e[0],e[1])},unproject:function(o,e){var i=this._proj.inverse([o.x,o.y]);return new t.LatLng(i[1],i[0],e)},_projFromCodeDef:function(t,e){if(e)o.defs(t,e);else if(void 0===o.defs[t]){var i=t.split(":");if(i.length>3&&(t=i[i.length-3]+":"+i[i.length-1]),void 0===o.defs[t])throw"No projection definition for code "+t}return o(t)}}),t.Proj.CRS=t.Class.extend({includes:t.CRS,options:{transformation:new t.Transformation(1,0,(-1),0)},initialize:function(o,e,i){var n,s,r,a;if(t.Proj._isProj4Obj(o)?(s=o,n=s.srsCode,a=e||{},this.projection=new t.Proj.Projection(s,a.bounds)):(n=o,r=e,a=i||{},this.projection=new t.Proj.Projection(n,r,a.bounds)),t.Util.setOptions(this,a),this.code=n,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new t.Transformation(1,(-this.options.origin[0]),(-1),this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var l=this.options.resolutions.length-1;l>=0;l--)this.options.resolutions[l]&&(this._scales[l]=1/this.options.resolutions[l])}this.infinite=!this.options.bounds},scale:function(t){var o,e,i,n,s=Math.floor(t);return t===s?this._scales[t]:(o=this._scales[s],e=this._scales[s+1],i=e-o,n=t-s,o+i*n)},zoom:function(t){var o,e,i,n=this._closestElement(this._scales,t),s=this._scales.indexOf(n);return t===n?s:void 0===n?-(1/0):(e=s+1,o=this._scales[e],void 0===o?1/0:(i=o-n,(t-n)/i+s))},distance:t.CRS.Earth.distance,R:t.CRS.Earth.R,_closestElement:function(t,o){for(var e,i=t.length;i--;)t[i]<=o&&(void 0===e||e<t[i])&&(e=t[i]);return e}}),t.Proj.GeoJSON=t.GeoJSON.extend({initialize:function(o,e){this._callLevel=0,t.GeoJSON.prototype.initialize.call(this,o,e)},addData:function(o){var e;o&&(o.crs&&"name"===o.crs.type?e=new t.Proj.CRS(o.crs.properties.name):o.crs&&o.crs.type&&(e=new t.Proj.CRS(o.crs.type+":"+o.crs.properties.code)),void 0!==e&&(this.options.coordsToLatLng=function(o){var i=t.point(o[0],o[1]);return e.projection.unproject(i)})),this._callLevel++;try{t.GeoJSON.prototype.addData.call(this,o)}finally{this._callLevel--,0===this._callLevel&&delete this.options.coordsToLatLng}}}),t.Proj.geoJson=function(o,e){return new t.Proj.GeoJSON(o,e)},t.Proj.ImageOverlay=t.ImageOverlay.extend({initialize:function(o,e,i){t.ImageOverlay.prototype.initialize.call(this,o,null,i),this._projectedBounds=e},_animateZoom:function(o){var e=this._map.getZoomScale(o.zoom),i=t.point(this._projectedBounds.min.x,this._projectedBounds.max.y),n=this._projectedToNewLayerPoint(i,o.zoom,o.center);t.DomUtil.setTransform(this._image,n,e)},_reset:function(){var o=this._map.getZoom(),e=this._map.getPixelOrigin(),i=t.bounds(this._transform(this._projectedBounds.min,o)._subtract(e),this._transform(this._projectedBounds.max,o)._subtract(e)),n=i.getSize();t.DomUtil.setPosition(this._image,i.min),this._image.style.width=n.x+"px",this._image.style.height=n.y+"px"},_projectedToNewLayerPoint:function(t,o,e){var i=this._map.getSize()._divideBy(2),n=this._map.project(e,o)._subtract(i)._round(),s=n.add(this._map._getMapPanePos());return this._transform(t,o)._subtract(s)},_transform:function(t,o){var e=this._map.options.crs,i=e.transformation,n=e.scale(o);return i.transform(t,n)}}),t.Proj.imageOverlay=function(o,e,i){return new t.Proj.ImageOverlay(o,e,i)},t.Proj});
/*!
 * @fileOverview TouchSwipe - jQuery Plugin
 * @version 1.6.18
 *
 * @author Matt Bryson http://www.github.com/mattbryson
 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
 * @see http://labs.rampinteractive.co.uk/touchSwipe/
 * @see http://plugins.jquery.com/project/touchSwipe
 * @license
 * Copyright (c) 2010-2015 Matt Bryson
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 */
!function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function(e){"use strict";function n(n){return!n||void 0!==n.allowPageScroll||void 0===n.swipe&&void 0===n.swipeStatus||(n.allowPageScroll=s),void 0!==n.click&&void 0===n.tap&&(n.tap=n.click),n||(n={}),n=e.extend({},e.fn.swipe.defaults,n),this.each(function(){var r=e(this),i=r.data(D);i||(i=new t(this,n),r.data(D,i))})}function t(n,t){function r(n){if(!(ce()||e(n.target).closest(t.excludedElements,Ve).length>0)){var r=n.originalEvent?n.originalEvent:n;if(!r.pointerType||"mouse"!=r.pointerType||0!=t.fallbackToMouseEvents){var i,o=r.touches,l=o?o[0]:r;return We=m,o?ze=o.length:t.preventDefaultEvents!==!1&&n.preventDefault(),je=0,Ne=null,He=null,Xe=null,_e=0,qe=0,Qe=0,Ce=1,Fe=0,Ye=ve(),ue(),fe(0,l),!o||ze===t.fingers||t.fingers===y||X()?(Ze=Oe(),2==ze&&(fe(1,o[1]),qe=Qe=ye(Ge[0].start,Ge[1].start)),(t.swipeStatus||t.pinchStatus)&&(i=j(r,We))):i=!1,i===!1?(We=S,j(r,We),i):(t.hold&&(nn=setTimeout(e.proxy(function(){Ve.trigger("hold",[r.target]),t.hold&&(i=t.hold.call(Ve,r,r.target))},this),t.longTapThreshold)),se(!0),null)}}}function L(e){var n=e.originalEvent?e.originalEvent:e;if(We!==x&&We!==S&&!ae()){var r,i=n.touches,o=i?i[0]:n,l=pe(o);if(Be=Oe(),i&&(ze=i.length),t.hold&&clearTimeout(nn),We=b,2==ze&&(0==qe?(fe(1,i[1]),qe=Qe=ye(Ge[0].start,Ge[1].start)):(pe(i[1]),Qe=ye(Ge[0].end,Ge[1].end),Xe=me(Ge[0].end,Ge[1].end)),Ce=Ee(qe,Qe),Fe=Math.abs(qe-Qe)),ze===t.fingers||t.fingers===y||!i||X()){if(Ne=Se(l.start,l.end),He=Se(l.last,l.end),C(e,He),je=be(l.start,l.end),_e=Te(),ge(Ne,je),r=j(n,We),!t.triggerOnTouchEnd||t.triggerOnTouchLeave){var u=!0;if(t.triggerOnTouchLeave){var a=Me(this);u=Pe(l.end,a)}!t.triggerOnTouchEnd&&u?We=U(b):t.triggerOnTouchLeave&&!u&&(We=U(x)),We!=S&&We!=x||j(n,We)}}else We=S,j(n,We);r===!1&&(We=S,j(n,We))}}function k(e){var n=e.originalEvent?e.originalEvent:e,r=n.touches;if(r){if(r.length&&!ae())return le(n),!0;if(r.length&&ae())return!0}return ae()&&(ze=Ke),Be=Oe(),_e=Te(),_()||!H()?(We=S,j(n,We)):t.triggerOnTouchEnd||t.triggerOnTouchEnd===!1&&We===b?(t.preventDefaultEvents!==!1&&e.cancelable!==!1&&e.preventDefault(),We=x,j(n,We)):!t.triggerOnTouchEnd&&B()?(We=x,N(n,We,g)):We===b&&(We=S,j(n,We)),se(!1),null}function R(){ze=0,Be=0,Ze=0,qe=0,Qe=0,Ce=1,ue(),se(!1)}function A(e){var n=e.originalEvent?e.originalEvent:e;t.triggerOnTouchLeave&&(We=U(x),j(n,We))}function I(){Ve.off(ke,r),Ve.off(Ue,R),Ve.off(Re,L),Ve.off(Ae,k),Ie&&Ve.off(Ie,A),se(!1)}function U(e){var n=e,r=Q(),i=H(),o=_();return!r||o?n=S:!i||e!=b||t.triggerOnTouchEnd&&!t.triggerOnTouchLeave?!i&&e==x&&t.triggerOnTouchLeave&&(n=S):n=x,n}function j(e,n){var t,r=e.touches;return(z()||W())&&(t=N(e,n,p)),(Y()||X())&&t!==!1&&(t=N(e,n,h)),ie()&&t!==!1?t=N(e,n,d):oe()&&t!==!1?t=N(e,n,v):re()&&t!==!1&&(t=N(e,n,g)),n===S&&R(e),n===x&&(r?r.length||R(e):R(e)),t}function N(n,r,s){var f;if(s==p){if(Ve.trigger("swipeStatus",[r,Ne||null,je||0,_e||0,ze,Ge,He]),t.swipeStatus&&(f=t.swipeStatus.call(Ve,n,r,Ne||null,je||0,_e||0,ze,Ge,He),f===!1))return!1;if(r==x&&V()){if(clearTimeout(en),clearTimeout(nn),Ve.trigger("swipe",[Ne,je,_e,ze,Ge,He]),t.swipe&&(f=t.swipe.call(Ve,n,Ne,je,_e,ze,Ge,He),f===!1))return!1;switch(Ne){case i:Ve.trigger("swipeLeft",[Ne,je,_e,ze,Ge,He]),t.swipeLeft&&(f=t.swipeLeft.call(Ve,n,Ne,je,_e,ze,Ge,He));break;case o:Ve.trigger("swipeRight",[Ne,je,_e,ze,Ge,He]),t.swipeRight&&(f=t.swipeRight.call(Ve,n,Ne,je,_e,ze,Ge,He));break;case l:Ve.trigger("swipeUp",[Ne,je,_e,ze,Ge,He]),t.swipeUp&&(f=t.swipeUp.call(Ve,n,Ne,je,_e,ze,Ge,He));break;case u:Ve.trigger("swipeDown",[Ne,je,_e,ze,Ge,He]),t.swipeDown&&(f=t.swipeDown.call(Ve,n,Ne,je,_e,ze,Ge,He))}}}if(s==h){if(Ve.trigger("pinchStatus",[r,Xe||null,Fe||0,_e||0,ze,Ce,Ge]),t.pinchStatus&&(f=t.pinchStatus.call(Ve,n,r,Xe||null,Fe||0,_e||0,ze,Ce,Ge),f===!1))return!1;if(r==x&&F())switch(Xe){case a:Ve.trigger("pinchIn",[Xe||null,Fe||0,_e||0,ze,Ce,Ge]),t.pinchIn&&(f=t.pinchIn.call(Ve,n,Xe||null,Fe||0,_e||0,ze,Ce,Ge));break;case c:Ve.trigger("pinchOut",[Xe||null,Fe||0,_e||0,ze,Ce,Ge]),t.pinchOut&&(f=t.pinchOut.call(Ve,n,Xe||null,Fe||0,_e||0,ze,Ce,Ge))}}return s==g?r!==S&&r!==x||(clearTimeout(en),clearTimeout(nn),J()&&!ee()?($e=Oe(),en=setTimeout(e.proxy(function(){$e=null,Ve.trigger("tap",[n.target]),t.tap&&(f=t.tap.call(Ve,n,n.target))},this),t.doubleTapThreshold)):($e=null,Ve.trigger("tap",[n.target]),t.tap&&(f=t.tap.call(Ve,n,n.target)))):s==d?r!==S&&r!==x||(clearTimeout(en),clearTimeout(nn),$e=null,Ve.trigger("doubletap",[n.target]),t.doubleTap&&(f=t.doubleTap.call(Ve,n,n.target))):s==v&&(r!==S&&r!==x||(clearTimeout(en),$e=null,Ve.trigger("longtap",[n.target]),t.longTap&&(f=t.longTap.call(Ve,n,n.target)))),f}function H(){var e=!0;return null!==t.threshold&&(e=je>=t.threshold),e}function _(){var e=!1;return null!==t.cancelThreshold&&null!==Ne&&(e=de(Ne)-je>=t.cancelThreshold),e}function q(){return null===t.pinchThreshold||Fe>=t.pinchThreshold}function Q(){var e;return e=!t.maxTimeThreshold||!(_e>=t.maxTimeThreshold)}function C(e,n){if(t.preventDefaultEvents!==!1)if(t.allowPageScroll===s)e.preventDefault();else{var r=t.allowPageScroll===f;switch(n){case i:(t.swipeLeft&&r||!r&&t.allowPageScroll!=w)&&e.preventDefault();break;case o:(t.swipeRight&&r||!r&&t.allowPageScroll!=w)&&e.preventDefault();break;case l:(t.swipeUp&&r||!r&&t.allowPageScroll!=T)&&e.preventDefault();break;case u:(t.swipeDown&&r||!r&&t.allowPageScroll!=T)&&e.preventDefault();break;case s:}}}function F(){var e=G(),n=Z(),t=q();return e&&n&&t}function X(){return!!(t.pinchStatus||t.pinchIn||t.pinchOut)}function Y(){return!(!F()||!X())}function V(){var e=Q(),n=H(),t=G(),r=Z(),i=_(),o=!i&&r&&t&&n&&e;return o}function W(){return!!(t.swipe||t.swipeStatus||t.swipeLeft||t.swipeRight||t.swipeUp||t.swipeDown)}function z(){return!(!V()||!W())}function G(){return ze===t.fingers||t.fingers===y||!O}function Z(){return 0!==Ge[0].end.x}function B(){return!!t.tap}function J(){return!!t.doubleTap}function K(){return!!t.longTap}function $(){if(null==$e)return!1;var e=Oe();return J()&&e-$e<=t.doubleTapThreshold}function ee(){return $()}function ne(){return(1===ze||!O)&&(isNaN(je)||je<t.threshold)}function te(){return _e>t.longTapThreshold&&E>je}function re(){return!(!ne()||!B())}function ie(){return!(!$()||!J())}function oe(){return!(!te()||!K())}function le(e){Je=Oe(),Ke=e.touches.length+1}function ue(){Je=0,Ke=0}function ae(){var e=!1;if(Je){var n=Oe()-Je;n<=t.fingerReleaseThreshold&&(e=!0)}return e}function ce(){return!(Ve.data(D+"_intouch")!==!0)}function se(e){Ve&&(e===!0?(Ve.on(Re,L),Ve.on(Ae,k),Ie&&Ve.on(Ie,A)):(Ve.off(Re,L,!1),Ve.off(Ae,k,!1),Ie&&Ve.off(Ie,A,!1)),Ve.data(D+"_intouch",e===!0))}function fe(e,n){var t={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return t.start.x=t.last.x=t.end.x=n.pageX||n.clientX,t.start.y=t.last.y=t.end.y=n.pageY||n.clientY,Ge[e]=t,t}function pe(e){var n=void 0!==e.identifier?e.identifier:0,t=he(n);return null===t&&(t=fe(n,e)),t.last.x=t.end.x,t.last.y=t.end.y,t.end.x=e.pageX||e.clientX,t.end.y=e.pageY||e.clientY,t}function he(e){return Ge[e]||null}function ge(e,n){e!=s&&(n=Math.max(n,de(e)),Ye[e].distance=n)}function de(e){return Ye[e]?Ye[e].distance:void 0}function ve(){var e={};return e[i]=we(i),e[o]=we(o),e[l]=we(l),e[u]=we(u),e}function we(e){return{direction:e,distance:0}}function Te(){return Be-Ze}function ye(e,n){var t=Math.abs(e.x-n.x),r=Math.abs(e.y-n.y);return Math.round(Math.sqrt(t*t+r*r))}function Ee(e,n){var t=n/e*1;return t.toFixed(2)}function me(){return 1>Ce?c:a}function be(e,n){return Math.round(Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2)))}function xe(e,n){var t=e.x-n.x,r=n.y-e.y,i=Math.atan2(r,t),o=Math.round(180*i/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function Se(e,n){if(De(e,n))return s;var t=xe(e,n);return 45>=t&&t>=0?i:360>=t&&t>=315?i:t>=135&&225>=t?o:t>45&&135>t?u:l}function Oe(){var e=new Date;return e.getTime()}function Me(n){n=e(n);var t=n.offset(),r={left:t.left,right:t.left+n.outerWidth(),top:t.top,bottom:t.top+n.outerHeight()};return r}function Pe(e,n){return e.x>n.left&&e.x<n.right&&e.y>n.top&&e.y<n.bottom}function De(e,n){return e.x==n.x&&e.y==n.y}var t=e.extend({},t),Le=O||P||!t.fallbackToMouseEvents,ke=Le?P?M?"MSPointerDown":"pointerdown":"touchstart":"mousedown",Re=Le?P?M?"MSPointerMove":"pointermove":"touchmove":"mousemove",Ae=Le?P?M?"MSPointerUp":"pointerup":"touchend":"mouseup",Ie=Le?P?"mouseleave":null:"mouseleave",Ue=P?M?"MSPointerCancel":"pointercancel":"touchcancel",je=0,Ne=null,He=null,_e=0,qe=0,Qe=0,Ce=1,Fe=0,Xe=0,Ye=null,Ve=e(n),We="start",ze=0,Ge={},Ze=0,Be=0,Je=0,Ke=0,$e=0,en=null,nn=null;try{Ve.on(ke,r),Ve.on(Ue,R)}catch(tn){e.error("events not supported "+ke+","+Ue+" on jQuery.swipe")}this.enable=function(){return this.disable(),Ve.on(ke,r),Ve.on(Ue,R),Ve},this.disable=function(){return I(),Ve},this.destroy=function(){I(),Ve.data(D,null),Ve=null},this.option=function(n,r){if("object"==typeof n)t=e.extend(t,n);else if(void 0!==t[n]){if(void 0===r)return t[n];t[n]=r}else{if(!n)return t;e.error("Option "+n+" does not exist on jQuery.swipe.options")}return null}}var r="1.6.18",i="left",o="right",l="up",u="down",a="in",c="out",s="none",f="auto",p="swipe",h="pinch",g="tap",d="doubletap",v="longtap",w="horizontal",T="vertical",y="all",E=10,m="start",b="move",x="end",S="cancel",O="ontouchstart"in window,M=window.navigator.msPointerEnabled&&!window.PointerEvent&&!O,P=(window.PointerEvent||window.navigator.msPointerEnabled)&&!O,D="TouchSwipe",L={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};e.fn.swipe=function(t){var r=e(this),i=r.data(D);if(i&&"string"==typeof t){if(i[t])return i[t].apply(i,Array.prototype.slice.call(arguments,1));e.error("Method "+t+" does not exist on jQuery.swipe")}else if(i&&"object"==typeof t)i.option.apply(i,arguments);else if(!(i||"object"!=typeof t&&t))return n.apply(this,arguments);return r},e.fn.swipe.version=r,e.fn.swipe.defaults=L,e.fn.swipe.phases={PHASE_START:m,PHASE_MOVE:b,PHASE_END:x,PHASE_CANCEL:S},e.fn.swipe.directions={LEFT:i,RIGHT:o,UP:l,DOWN:u,IN:a,OUT:c},e.fn.swipe.pageScroll={NONE:s,HORIZONTAL:w,VERTICAL:T,AUTO:f},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:y}});
/** @license
 *
 *  Copyright (C) 2012 K. Arthur Endsley (kaendsle@mtu.edu)
 *  Michigan Tech Research Institute (MTRI)
 *  3600 Green Court, Suite 100, Ann Arbor, MI, 48105
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
!function(t,o){"object"==typeof exports?module.exports=o(require("./wicket")):"function"==typeof define&&define.amd?define(["wicket"],o):o(t.Wkt)}(this,function(t){return t.Wkt.prototype.isRectangle=!1,t.Wkt.prototype.trunc=function(o){var n,r=[];for(n=0;n<o.length;n+=1)t.isArray(o[n])?r.push(this.trunc(o[n])):0!==n&&this.sameCoords(o[0],o[n])||r.push(o[n]);return r},t.Wkt.prototype.construct={point:function(t,o){var n=o||this.components;return n instanceof Array&&(n=n[0]),L.marker(this.coordsToLatLng(n),t)},multipoint:function(t){var o,n=[],r=this.components;for(o=0;o<r.length;o+=1)n.push(this.construct.point.call(this,t,r[o]));return L.featureGroup(n,t)},linestring:function(t,o){var n=o||this.components,r=this.coordsToLatLngs(n,0,this.coordsToLatLng);return L.polyline(r,t)},multilinestring:function(t){var o=this.components,n=this.coordsToLatLngs(o,1,this.coordsToLatLng);return L.multiPolyline?L.multiPolyline(n,t):L.polyline(n,t)},polygon:function(t){var o=this.trunc(this.components),n=this.coordsToLatLngs(o,1,this.coordsToLatLng);return L.polygon(n,t)},multipolygon:function(t){var o=this.trunc(this.components),n=this.coordsToLatLngs(o,2,this.coordsToLatLng);return L.multiPolygon?L.multiPolygon(n,t):L.polygon(n,t)},geometrycollection:function(t){var o,n,r;for(o=this.trunc(this.components),r=[],n=0;n<this.components.length;n+=1)r.push(this.construct[o[n].type].call(this,o[n]));return L.featureGroup(r,t)}},L.Util.extend(t.Wkt.prototype,{coordsToLatLngs:L.GeoJSON.coordsToLatLngs,coordsToLatLng:function(t,o){var n=o?t.x:t.y,r=o?t.y:t.x;return L.latLng(n,r,!0)}}),t.Wkt.prototype.deconstruct=function(o){var n,r,e,s,c,l,u,i;if(r=function(o){var n,e;for(e=[],n=0;n<o.length;n+=1)t.isArray(o[n])?e.push(r(o[n])):e.push({x:o[n].lng,y:o[n].lat});return e},o.constructor===L.Marker||o.constructor===L.marker)return{type:"point",components:[{x:o.getLatLng().lng,y:o.getLatLng().lat}]};if(o.constructor===L.Rectangle||o.constructor===L.rectangle)return u=o.getBounds(),{type:"polygon",isRectangle:!0,components:[[{x:u.getSouthWest().lng,y:u.getNorthEast().lat},{x:u.getNorthEast().lng,y:u.getNorthEast().lat},{x:u.getNorthEast().lng,y:u.getSouthWest().lat},{x:u.getSouthWest().lng,y:u.getSouthWest().lat},{x:u.getSouthWest().lng,y:u.getNorthEast().lat}]]};if((o.constructor===L.Polyline||o.constructor===L.polyline)&&(c=[],u=o.getLatLngs(),!u[0].equals(u[u.length-1]))){for(s=0;s<u.length;s+=1)c.push({x:u[s].lng,y:u[s].lat});return{type:"linestring",components:c}}if(o.constructor===L.Polygon||o.constructor===L.polygon){for(l=[],c=[],i=o.getLatLngs()[0],s=0;s<i.length;s+=1)c.push({x:i[s].lng,y:i[s].lat});if(c.push({x:i[0].lng,y:i[0].lat}),l.push(c),o._holes&&o._holes.length>0)for(c=r(o._holes),s=0;s<c.length;s++)c[s].push(c[s][0]),l.push(c[s]);return{type:"polygon",components:l}}if(o.constructor===L.MultiPolyline||o.constructor===L.MultiPolygon||o.constructor===L.LayerGroup||o.constructor===L.FeatureGroup){e=[],u=o._layers;for(n in u)u.hasOwnProperty(n)&&(u[n].getLatLngs||u[n].getLatLng)&&e.push(this.deconstruct(u[n]));return{type:function(){switch(o.constructor){case L.MultiPolyline:return"multilinestring";case L.MultiPolygon:return"multipolygon";case L.FeatureGroup:return function(){var t,n,r,e;n=!0,r=!0,e=!0;for(t in o._layers)o._layers.hasOwnProperty(t)&&(o._layers[t].constructor!==L.Marker&&(e=!1),o._layers[t].constructor!==L.Polyline&&(r=!1),o._layers[t].constructor!==L.Polygon&&(n=!1));return e?"multipoint":r?"multilinestring":n?"multipolygon":"geometrycollection"}();default:return"geometrycollection"}}(),components:function(){var t,o;for(o=[],t=0;t<e.length;t+=1)e[t].components&&o.push(e[t].components);return o}()}}o.constructor===L.Circle||o.constructor===L.circle?console.log("Deconstruction of L.Circle objects is not yet supported"):console.log("The passed object does not have any recognizable properties.")},t});
/**
 * Project: Lists with pagination for the output of specific data
 * Dependencies: jQuery
 * Author: Dirk Meinke
 * Homepage: https://www.die-netzwerkstatt.de/
 */
!function(i){"use strict";i.list={page:10,innerWindow:3,outerWindow:2,item:"<li class='page-item'><a class='page-link page' href='javascript:function Z(){Z=\"\"}Z()'></a></li>",valuesNames:["title","location"],initialize:function(i){const a=i[0],n=i.data("page")?i.data("page"):this.page,e=i.data("inner-window")?i.data("inner-window"):this.innerWindow,t=i.data("outer-window")?i.data("outer-window"):this.outerWindow,o=i.data("values")?i.data("values"):this.valuesNames,s={valueNames:o,page:n,pagination:[{innerWindow:e,outerWindow:t,item:this.item}]},d=new List(a,s);d.sort(o[0],{order:"asc"}),$(a).find(".undo").click(function(){$(a).find(".search").val(""),d.search()})}}}(window.NWS_REGIONAL_LIST=window.NWS_REGIONAL_LIST||{},jQuery);
/**
 * Project: Geo map with all possible contents

 * Dependencies: jQuery
 * Author: Dirk Meinke
 * Homepage: https://www.die-netzwerkstatt.de/
 */
!function(e,o){"use strict";e.leafletMap=function(){const e={searchSelector:".regionalMap.search",alertSelector:".regionalMap.alert",resetSelector:".regionalMap.reset",textSearchSelector:".textSearch",clusterMarkerGroup:L.markerClusterGroup.layerSupport({showCoverageOnHover:!1,spiderfyDistanceMultiplier:3}),allMarkers:{},mapLayers:{},maskLayer:L.layerGroup(),initializeMap:{},popupLoading:[],sidebarLoading:0,edith2map:{},sidebar:{},map:{controlPosition:"topleft",zoomControlPosition:"topleft",enableScroll:!1,enableToolTip:!1,fitBounds:!1,resetBounds:{},sidebar:!1,enableStartingPoints:!1,polylineDecorator:!1,startPoint:[54.4415267,9.4338914],startZoom:10,minZoom:1,maxZoom:18,mapbox:!1,mapboxKey:"",mapBoxStyle:"mapbox/outdoors-v11",currentColor:"#D71122",expandLayerTree:!1,collapsedLayerTree:!1,layerTree:{},totalTree:{},sidebarHtml:o("#nws-regional-map-sidebar"),url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"},tree:{closedSymbol:'<i class="fas fa-angle-right"></i>',openedSymbol:'<i class="fas fa-angle-down"></i>'},mask:{toolTipTimeout:5e3},popupOptions:{maxHeight:1e3,maxWidth:500,minWidth:200},initialize:function(o){this.mapZoom=o.data("map-zoom")?o.data("map-zoom"):this.mapZoom,this.map.startPoint=o.data("start-point")?o.data("start-point"):this.map.startPoint,this.map.url=""!==o.data("layer-url")?o.data("layer-url"):this.map.url,this.tree.closedSymbol=o.data("tree-closed")?o.data("tree-closed"):this.tree.closedSymbol,this.tree.openedSymbol=o.data("tree-opened")?o.data("tree-opened"):this.tree.openedSymbol,this.mask.toolTipTimeout=o.data("mask-timeout")?o.data("tree-mask-timeout"):this.mask.toolTipTimeout;const a=o.parent().find(this.searchSelector);a.length>0&&a.submit(function(t){t.preventDefault(),o.LoadingOverlay("show",{background:"rgba(255, 255, 255, 0.5)"}),e.getSearch(a,e.addSearchData,o)});const t=o.parent().find(this.resetSelector);t.length>0&&t.on("click touch",function(t){t.preventDefault(),o.LoadingOverlay("show",{background:"rgba(255, 255, 255, 0.5)"}),e.resetSearch(a,o)}),this.initializeMap=L.map(o[0],{scrollWheelZoom:!1}).setView(this.map.startPoint,this.mapZoom),L.tileLayer(this.map.url,{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>'}).addTo(this.initializeMap),o.LoadingOverlay("show",{background:"rgba(255, 255, 255, 0.5)"}),this.getData(o,this,this.render)},getData:function(e,a,t){function r(o){return!o.hasOwnProperty("error")&&(t(e,a,o),void e.LoadingOverlay("hide"))}const i=e.data("action");o.ajax({type:"POST",url:i,success:r})},getSearch:function(e,a,t){function r(o){return!o.hasOwnProperty("error")&&(a(e,o,t),void t.LoadingOverlay("hide"))}const i=e.attr("action"),n=e.serialize();o.ajax({type:"POST",url:i,data:n,success:r})},render:function(o,a,t){const r=t.settings.map;a.map.startPoint=r.startPoint?r.startPoint:a.map.startPoint,a.map.fitBounds=r.fitBounds?r.fitBounds:a.map.fitBounds,a.map.startZoom=r.startZoom?parseInt(r.startZoom):a.map.startZoom,a.map.minZoom=r.minZoom?parseInt(r.minZoom):a.map.minZoom,a.map.maxZoom=r.maxZoom?parseInt(r.maxZoom):a.map.maxZoom,a.map.enableScroll=r.enableScroll?r.enableScroll:a.map.enableScroll,a.map.enableStartingPoints=r.enableStartingPoints?r.enableStartingPoints:a.map.enableStartingPoints,a.map.polylineDecorator=r.polylineDecorator?r.polylineDecorator:a.map.polylineDecorator,a.map.controlPosition=r.controlPosition?r.controlPosition:a.map.controlPosition,a.map.zoomControlPosition=r.zoomControlPosition?r.zoomControlPosition:a.map.zoomControlPosition,a.map.sidebar=r.sidebar?r.sidebar:a.map.sidebar,a.map.expandLayerTree=r.expandLayerTree?r.expandLayerTree:a.map.expandLayerTree,a.map.collapsedLayerTree=r.collapsedLayerTree?r.collapsedLayerTree:a.map.collapsedLayerTree,a.map.mapboxKey=r.mapboxKey?r.mapboxKey:a.map.mapboxKey,a.map.mapBoxStyle=r.mapBoxStyle?r.mapBoxStyle:a.map.mapBoxStyle,a.map.mapbox=r.mapbox?r.mapbox:a.map.mapbox,a.popupOptions.minWidth=r.minWidth?r.minWidth:a.popupOptions.minWidth,a.popupOptions.maxWidth=r.maxWidth?r.maxWidth:a.popupOptions.maxWidth,a.popupOptions.maxHeight=r.maxHeight?r.maxHeight:a.popupOptions.maxHeight,a.map.sidebar&&(a.sidebar=L.control.sidebar("nws-regional-map-sidebar",{position:"left"}));var i="https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=";if("string"==typeof a.map.mapBoxStyle){const n=a.map.mapBoxStyle.split("http");n.length>1&&(i=a.map.mapBoxStyle)}a.map.mapbox&&""===a.map.mapboxKey&&(a.map.mapbox=!1);const p=L.tileLayer(i+a.map.mapboxKey,{attribution:'&copy; <a href="http://openstreetmap.org">OpenStreetMap</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',maxZoom:a.map.maxZoom,id:a.map.mapBoxStyle,accessToken:a.map.mapboxKey}),s=L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',maxZoom:a.map.maxZoom});a.initializeMap&&(a.initializeMap.off(),a.initializeMap.remove()),a.edith2map=L.map(o[0],{layers:[a.map.mapbox?p:s],maxZoom:a.map.maxZoom,zoomControl:!1,minZoom:a.map.minZoom,sleepNote:!1,scrollWheelZoom:!1}).setView(a.map.startPoint,a.map.startZoom),L.control.zoom({position:a.map.zoomControlPosition}).addTo(a.edith2map),a.map.enableScroll&&a.edith2map.scrollWheelZoom.enable(),String.prototype.replaceAll=function(e,o){const a=this;return a.replace(new RegExp(e,"g"),o)},a.clusterMarkerGroup.addTo(a.edith2map),a.maskLayer.addTo(a.edith2map),t.hasOwnProperty("mask")&&a.initializeMasks(t.mask),a.initializeLayers(t.layers),t.hasOwnProperty("tree")&&a.initializeTree(t.tree),t.hasOwnProperty("removeLayers")&&a.deactivateLayers(t.removeLayers),a.map.sidebar&&(a.edith2map.addControl(a.sidebar),a.edith2map.on("click",function(){a.sidebar.hide()})),e.map.resetBounds=e.map.bounds},initializeTree:function(a){if(e.totalTree={label:a.label,children:[],selectAllCheckbox:a.checkboxTitle},a.hasOwnProperty("children"))for(var t in a.children)a.children.hasOwnProperty(t)&&e.totalTree.children.push(e.enrichTree(a.children[t]));this.mobileCheck()&&(e.map.collapsedLayerTree=!0),e.layerTree=L.control.layers.tree([],e.totalTree,{namedToggle:!1,selectorBack:!1,closedSymbol:e.tree.closedSymbol,openedSymbol:e.tree.openedSymbol,selectAllCheckbox:!0,collapsed:e.map.collapsedLayerTree,position:e.map.controlPosition}).addTo(e.edith2map);var r=o(".leaflet-layerstree-header-label .leaflet-layerstree-sel-all-checkbox:checkbox");if(r.hasOwnProperty(0))for(var i=0;i<r.length;i++)r[i].checked===!1&&r[i].click();e.map.expandLayerTree||e.layerTree.collapseTree(!0)},enrichTree:function(o){var a=[];if(a.label=o.label,a.name=o.layerId,e.mapLayers.hasOwnProperty(o.layerId)&&(a.layer=e.mapLayers[o.layerId]),o.hasOwnProperty("children")){var t=0,r=[];a.selectAllCheckbox=o.checkboxTitle,a.collapsed=!!o.collapsed&&o.collapsed;for(var i in o.children)o.children.hasOwnProperty(i)&&(r[t]=e.enrichTree(o.children[i]),t++);a.children=r}return a},deactivateLayers:function(o){if(o){for(var a in o)o.hasOwnProperty(a)&&e.mapLayers.hasOwnProperty(a)&&e.edith2map.removeLayer(e.mapLayers[a]);e.map.expandLayerTree===!1&&e.layerTree.collapseTree(!0)}},initializeMasks:function(o){if(o)for(var a in o)if(o.hasOwnProperty(a)){var t=o[a];e.map.enableToolTip=t.enableToolTip,t.hasOwnProperty("feature")&&e.putGeoJsonOnMap(t.feature,e.maskLayer,t.style,t.invert)}},initializeLayers:function(o){if(o)for(var a in o)if(o.hasOwnProperty(a)){var t=o[a];if(e.mapLayers[a]=L.layerGroup(),t.hasOwnProperty("features"))for(var r in t.features)t.features.hasOwnProperty(r)&&(e.putFeatureOnMap(t.features[r],e.mapLayers[a]),e.map.fitBounds&&Object.keys(e.allMarkers).length>0&&e.edith2map.fitBounds(e.map.bounds));e.map.polylineDecorator?e.mapLayers[a].eachLayer(function(o){"arrow"!==o.type&&e.clusterMarkerGroup.addLayer(o)}):e.clusterMarkerGroup.checkIn(e.mapLayers[a]),e.mapLayers[a].addTo(e.edith2map)}},putFeatureOnMap:function(o,a,t){var r={};if(o.properties.hasOwnProperty("style")&&(r=o.properties.style),!e.map.enableStartingPoints||"LineString"!==o.geometry.type&&"MultiLineString"!==o.geometry.type||e.createStartingPoint(o,a),o.properties.hasOwnProperty("gpsCoordinates")&&void 0!==o.properties.gpsCoordinates&&o.properties.gpsCoordinates.hasOwnProperty(0)&&void 0!==o.properties.gpsCoordinates[0]&&o.properties.gpsCoordinates[0]<100){var i=e.putGeoJsonOnMap(o,a,r);return void 0!==t?(0===Object.keys(t).length?i.isValid()&&(t=L.latLngBounds(i)):i.isValid()&&t.extend(i),t):(e.map.bounds?i.isValid()&&e.map.bounds.extend(i):i.isValid()&&(e.map.bounds=L.latLngBounds(i)),e.map.bounds)}},putGeoJsonOnMap:function(a,t,r,i){var n=!1;if(void 0!==i&&(n=i),a.hasOwnProperty("id")){var p=a.id;if(e.allMarkers.hasOwnProperty(p)){var s="arrow_"+p;return e.allMarkers.hasOwnProperty(s)&&e.allMarkers[s].addTo(t),e.allMarkers[p].addTo(t).getBounds()}var l=L.Proj.geoJson(a,{invert:n,style:r,pointToLayer:function(e,o){var a=L.marker(o);if(e.properties.hasOwnProperty("icon")&&null!==e.properties.icon){if(e.properties.icon.hasOwnProperty("uri")){const t=e.properties.icon.width,r=e.properties.icon.height,i=r/4*-1;a=L.marker(o,{icon:new L.Icon({iconUrl:e.properties.icon.uri,iconSize:[t,r],popupAnchor:[0,i],tooltipAnchor:[5,i]})})}e.properties.icon.hasOwnProperty("source")&&(a=L.marker(o,{icon:new L.Icon({iconUrl:"data:image/svg+xml;base64,"+btoa(e.properties.icon.source),iconSize:[64,64],shadowSize:[64,64],iconAnchor:[38,48],shadowAnchor:[4,48],popupAnchor:[-6,-29],tooltipAnchor:[5,-29]})}))}return a},onEachFeature:function(a,i){if("Polygon"!==a.geometry.type){if(e.map.sidebar&&"premium"===a.properties.level){const n=o(e.sidebar.getContainer());e.sidebar.on("show",function(){e.layerTree&&null!==e.layerTree._map&&e.edith2map.removeControl(e.layerTree)}),e.sidebar.on("hide",function(){e.layerTree&&null===e.layerTree._map&&e.edith2map.addControl(e.layerTree)}),i.on({click:function(o){e.sidebarLoading!==a.id?(e.sidebar.setContent(""),e.sidebar.show(),n.LoadingOverlay("show"),e.renderSidebarContent(a,n)):e.sidebar.show(),L.DomEvent.stopPropagation(o)}})}else i.on({popupopen:function(){e.popupLoading.hasOwnProperty(a.id)||(e.popupLoading[a.id]=a.id,o(".leaflet-popup-content").LoadingOverlay("show"))}}),i.on({popupclose:function(){o(".leaflet-popup-content").LoadingOverlay("hide")}}),i.on({click:function(){e.popupLoading.hasOwnProperty(a.id)||e.renderPopupContent(a,i)}}),i.bindPopup("");if("LineString"===a.geometry.type||"MultiLineString"===a.geometry.type){if(a.properties.hasOwnProperty("title")){var p=new L.Tooltip;p.setContent(a.properties.title),i.on("mouseover",function(o){p.setLatLng(o.latlng),e.edith2map.openTooltip(p)}),i.on("mouseout",function(){e.edith2map.closeTooltip(p)}),i.on("mousemove",function(o){p.setLatLng(o.latlng),e.edith2map.openTooltip(p)})}}else i.on({mouseover:function(){e.renderToolTip(a,i)}}),i.bindTooltip("");if(e.map.polylineDecorator&&("LineString"===a.geometry.type||"MultiLineString"===a.geometry.type)){var s=L.polylineDecorator(i,{patterns:[{offset:10,endOffset:10,repeat:75,symbol:L.Symbol.arrowHead({polygon:!0,headAngle:50,pixelSize:10,pathOptions:r})}]}).bindTooltip(a.properties.title),l="arrow_"+a.id;s.type="arrow",e.allMarkers[l]=s,s.addTo(t),e.edith2map.panBy([1,0])}}else"Polygon"===a.geometry.type&&e.map.enableToolTip&&i.on({click:function(){e.renderMaskToolTip(a)}})}});return e.allMarkers[p]=l,l.addTo(t).getBounds()}},renderToolTip:function(e,o){e.properties.hasOwnProperty("title")&&o.bindTooltip(e.properties.title)},renderMaskToolTip:function(o){if(o.properties.hasOwnProperty("title")){var a=new L.Tooltip,t=e.edith2map.getBounds(),r=o.properties.title;a.setLatLng(t.getCenter()),a.setContent(r),e.edith2map.openTooltip(a),setTimeout(function(){e.edith2map.closeTooltip(a)},e.mask.toolTipTimeout)}},renderPopupContent:function(a,t){a.properties.hasOwnProperty("uri")&&e.getContent(a.properties.uri,function(a){e.isNotEmpty(a)&&(t.bindPopup(a,e.popupOptions),t.openPopup(t),o(".leaflet-popup-content").LoadingOverlay("hide"))})},renderSidebarContent:function(o,a){o.properties.hasOwnProperty("sidebarUri")&&e.getContent(o.properties.sidebarUri,function(t){e.isNotEmpty(t)&&(e.sidebarLoading=o.id,e.sidebar.setContent(t),a.LoadingOverlay("hide"))})},getContent:function(e,a){function t(e){return!e.hasOwnProperty("error")&&void a(e)}o.ajax({type:"POST",url:e,success:t})},addSearchData:function(o,a,t){if(t.children(e.alertSelector).remove(),a.hasOwnProperty("layers")){for(var r in e.allMarkers)if(e.allMarkers.hasOwnProperty(r)&&r.search("mask")===-1){var i=e.allMarkers[r];e.edith2map.removeLayer(i)}e.map.bounds=!1;const n=e.map.fitBounds;e.map.fitBounds=!0,e.initializeLayers(a.layers),e.map.fitBounds=n}else a.hasOwnProperty("empty")&&(t.on("click",function(){t.children(e.alertSelector).remove()}),t.append(a.empty))},resetSearch:function(o,a){o.find(e.textSearchSelector).val(""),a.children(e.alertSelector).remove();for(var t in e.allMarkers)if(e.allMarkers.hasOwnProperty(t)&&t.search("mask")===-1){var r=e.allMarkers[t];e.edith2map.addLayer(r).getBounds()}e.edith2map.fitBounds(e.map.resetBounds),a.LoadingOverlay("hide")},isNotEmpty:function(e){var o=!0;return""===e&&void 0===e&&(o=!1),o},createStartingPoint:function(o,a){if(void 0!==a){var t=JSON.parse(JSON.stringify(o));t.geometry.coordinates=[t.geometry.coordinates[0][0],t.geometry.coordinates[0][1]],t.geometry.type="Point",t.id="start_"+t.id,e.putGeoJsonOnMap(t,a,{})}},flattenCoordinates:function(e){return Array.isArray(e)?Array.isArray(e[0])?e=this.flattenCoordinates(e[0]):e:null},reproject:function(e){if(void 0!==e&&"Point"===e.type&&void 0!==e.coordinates)return proj4("EPSG:3857","EPSG:4326",[e.coordinates[0],e.coordinates[1]])},mobileCheck:function(){var e=!1;return function(o){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(o)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(o.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e}};return e}}(window.NWS_REGIONAL_MAP=window.NWS_REGIONAL_MAP||{},jQuery);
/**
 * Project: EDITH2 regional map
 * Dependencies: jQuery
 * Author: Dirk Meinke
 * Homepage: https://www.die-netzwerkstatt.de/
 */
!function(i,n){"use strict";i.initListView=function(){n(".regionalMap.list").each(function(){NWS_REGIONAL_LIST.list.initialize(n(this))})},i.initImageFlexslider=function(){n(".flexslider.carousel.regionalMap").flexslider({animation:"slide",controlNav:!0,animationLoop:!0,slideshow:!0,slideshowSpeed:1e4,animationSpeed:1e3,directionNav:!1}),n(function(){n(".imageFlexslider li.clone a.lightbox").removeAttr("class")}),n(".nav-tabs .nav-link").each(function(){const i=n(this);i.click(function(t){t.preventDefault(),i.tab("show"),setTimeout(function(){n(".flexslider").resize()},0)})})},i.initLeafletMap=function(){n(".regionalMap.map").each(function(){NWS_REGIONAL_MAP.leafletMap().initialize(n(this))})},i.initFormLoadingOverlay=function(){n(".registration.loading-overlay").bind("submit",function(){n(".registration.loading-overlay").LoadingOverlay("show")})},i.initFormEmailToUsername=function(){n(".registration.email").bind("change",function(){const i=n(this).val();n(".registration.username").val(i)})},i.initScrollToElement=function(){const i=n(".registration.scroll"),t=i.data("scroll"),o=i.data("duration")?i.data("duration"):2e3;t&&n(window).on("load",function(){const t=n("h1"),e=t.length?parseInt(t.offset().top):parseInt(i.offset().top);n("html, body").animate({scrollTop:e},o)})},i.initHelpToolTip=function(){n.isFunction(n.fn.bsTooltip)?n(".help").bsTooltip():n(".help").tooltip()}}(window.NWSMAP=window.NWSMAP||{},jQuery);
/**
 * Project: EDITH2 regional map
 * Dependencies: jQuery
 * Author: Dirk Meinke
 * Homepage: https://www.die-netzwerkstatt.de/
 */
!function(i,n){"use strict";n.isFunction(n.fn.tooltip)&&(n.fn.bsTooltip=n.fn.tooltip),n(function(){i.initListView(),i.initImageFlexslider(),i.initLeafletMap(),i.initFormLoadingOverlay(),i.initFormEmailToUsername(),i.initScrollToElement(),i.initHelpToolTip()})}(window.NWSMAP=window.NWSMAP||{},jQuery);
/**
 * @preserve
 * Project: Bootstrap Hover Dropdown
 * Author: Cameron Spear
 * Version: v2.0.11
 * Contributors: Mattia Larentis
 * Dependencies: Bootstrap's Dropdown plugin, jQuery
 * Description: A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
 * License: MIT
 * Homepage: http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
 */
;(function ($, window, undefined) {
    // outside the scope of the jQuery plugin to
    // keep track of all dropdowns
    var $allDropdowns = $();

    // if instantlyCloseOthers is true, then it will instantly
    // shut other nav items when a new one is hovered over
    $.fn.dropdownHover = function (options) {
        // don't do anything if touch is supported
        // (plugin causes some issues on mobile)
        if('ontouchstart' in document) return this; // don't want to affect chaining

        // the element we really care about
        // is the dropdown-toggle's parent
        $allDropdowns = $allDropdowns.add(this.parent());

        return this.each(function () {
            var $this = $(this),
                $parent = $this.parent(),
                defaults = {
                    delay: 500,
                    instantlyCloseOthers: true
                },
                data = {
                    delay: $(this).data('delay'),
                    instantlyCloseOthers: $(this).data('close-others')
                },
                showEvent   = 'show.bs.dropdown',
                hideEvent   = 'hide.bs.dropdown',
                // shownEvent  = 'shown.bs.dropdown',
                // hiddenEvent = 'hidden.bs.dropdown',
                settings = $.extend(true, {}, defaults, options, data),
                timeout;

            $parent.hover(function (event) {
                // so a neighbor can't open the dropdown
                if(!$parent.hasClass('open') && !$this.is(event.target)) {
                    // stop this event, stop executing any code
                    // in this callback but continue to propagate
                    return true;
                }

                openDropdown(event);
            }, function () {
                timeout = window.setTimeout(function () {
                    $parent.removeClass('open');
                    $this.trigger(hideEvent);
                }, settings.delay);
            });

            // this helps with button groups!
            $this.hover(function (event) {
                // this helps prevent a double event from firing.
                // see https://github.com/CWSpear/bootstrap-hover-dropdown/issues/55
                if(!$parent.hasClass('open') && !$parent.is(event.target)) {
                    // stop this event, stop executing any code
                    // in this callback but continue to propagate
                    return true;
                }

                openDropdown(event);
            });

            // handle submenus
            $parent.find('.dropdown-submenu').each(function (){
                var $this = $(this);
                var subTimeout;
                $this.hover(function () {
                    window.clearTimeout(subTimeout);
                    $this.children('.dropdown-menu').show();
                    // always close submenu siblings instantly
                    $this.siblings().children('.dropdown-menu').hide();
                }, function () {
                    var $submenu = $this.children('.dropdown-menu');
                    subTimeout = window.setTimeout(function () {
                        $submenu.hide();
                    }, settings.delay);
                });
            });

            function openDropdown(event) {
                $allDropdowns.find(':focus').blur();

                if(settings.instantlyCloseOthers === true)
                    $allDropdowns.removeClass('open');

                window.clearTimeout(timeout);
                $parent.addClass('open');
                $this.trigger(showEvent);
            }
        });
    };

    $(document).ready(function () {
        // apply dropdownHover to all elements with the data-hover="dropdown" attribute
        $('[data-hover="dropdown"]').dropdownHover();
    });
})(jQuery, this);

/*!
 * JavaScript Cookie v2.1.0
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		define(factory);
	} else if (typeof exports === 'object') {
		module.exports = factory();
	} else {
		var _OldCookies = window.Cookies;
		var api = window.Cookies = factory();
		api.noConflict = function () {
			window.Cookies = _OldCookies;
			return api;
		};
	}
}(function () {
	function extend () {
		var i = 0;
		var result = {};
		for (; i < arguments.length; i++) {
			var attributes = arguments[ i ];
			for (var key in attributes) {
				result[key] = attributes[key];
			}
		}
		return result;
	}

	function init (converter) {
		function api (key, value, attributes) {
			var result;

			// Write

			if (arguments.length > 1) {
				attributes = extend({
					path: '/'
				}, api.defaults, attributes);

				if (typeof attributes.expires === 'number') {
					var expires = new Date();
					expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
					attributes.expires = expires;
				}

				try {
					result = JSON.stringify(value);
					if (/^[\{\[]/.test(result)) {
						value = result;
					}
				} catch (e) {}

				if (!converter.write) {
					value = encodeURIComponent(String(value))
						.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
				} else {
					value = converter.write(value, key);
				}

				key = encodeURIComponent(String(key));
				key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
				key = key.replace(/[\(\)]/g, escape);

				return (document.cookie = [
					key, '=', value,
					attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE
					attributes.path    && '; path=' + attributes.path,
					attributes.domain  && '; domain=' + attributes.domain,
					attributes.secure ? '; secure' : ''
				].join(''));
			}

			// Read

			if (!key) {
				result = {};
			}

			// To prevent the for loop in the first place assign an empty array
			// in case there are no cookies at all. Also prevents odd result when
			// calling "get()"
			var cookies = document.cookie ? document.cookie.split('; ') : [];
			var rdecode = /(%[0-9A-Z]{2})+/g;
			var i = 0;

			for (; i < cookies.length; i++) {
				var parts = cookies[i].split('=');
				var name = parts[0].replace(rdecode, decodeURIComponent);
				var cookie = parts.slice(1).join('=');

				if (cookie.charAt(0) === '"') {
					cookie = cookie.slice(1, -1);
				}

				try {
					cookie = converter.read ?
						converter.read(cookie, name) : converter(cookie, name) ||
					cookie.replace(rdecode, decodeURIComponent);

					if (this.json) {
						try {
							cookie = JSON.parse(cookie);
						} catch (e) {}
					}

					if (key === name) {
						result = cookie;
						break;
					}

					if (!key) {
						result[name] = cookie;
					}
				} catch (e) {}
			}

			return result;
		}

		api.get = api.set = api;
		api.getJSON = function () {
			return api.apply({
				json: true
			}, [].slice.call(arguments));
		};
		api.defaults = {};

		api.remove = function (key, attributes) {
			api(key, '', extend(attributes, {
				expires: -1
			}));
		};

		api.withConverter = init;

		return api;
	}

	return init(function () {});
}));
/**
 * Project: Auto-complete the location search
 * Dependencies: jQuery
 * Author: Dirk Meinke
 * Homepage: https://www.die-netzwerkstatt.de/
 */
!function(t,o){function a(){return(o().modal||o().tab).Constructor.VERSION.split(".")}t.autoComplete={limit:10,url:"",postParam:"tx_nwsjurisdictionfindersh_pi1",initialize:function(t){this.url=t.data("url"),this.limit=t.data("limit")?t.data("limit"):this.limit,this.postParam=t.data("post-param")?t.data("post-param"):this.postParam,t.parent().on("click","a.dropdown-item",function(t){t.preventDefault()}),this.enableAutocomplete(t)},enableAutocomplete:function(e){e.autoComplete({resolver:"custom",preventEnter:!0,bootstrapVersion:a()[0],events:{search:function(a,e){const i={};i[t.autoComplete.postParam+"[search]"]=a,i[t.autoComplete.postParam+"[limit]"]=t.autoComplete.limit,o.ajax({type:"POST",url:t.autoComplete.url,data:i}).done(function(t){e(t.results)})},searchPost:function(t){return o.map(t,function(t){const o=t.text;return{value:JSON.stringify(t),text:o}})}}})}}}(window.NWS_JURISDICTION=window.NWS_JURISDICTION||{},jQuery);
/**
 * Project: Jurisdictionfinder
 * Dependencies: jQuery
 * Author: Dirk Meinke
 * Homepage: https://www.die-netzwerkstatt.de/
 */
!function(e,t){e.initPlaceAutoComplete=function(){t("select.autocomplete.search").each(function(){NWS_JURISDICTION.autoComplete.initialize(t(this))})}}(window.NWS=window.NWS||{},jQuery);
/**
 * Project: Jurisdictionfinder
 * Dependencies: jQuery
 * Author: Dirk Meinke
 * Homepage: https://www.die-netzwerkstatt.de/
 */
!function(n,i){i(function(){n.initPlaceAutoComplete()})}(window.NWS=window.NWS||{},jQuery);
/*
 * jQuery FlexSlider v2.7.2
 * Copyright 2012 WooThemes
 * Contributing Author: Tyler Smith
 */
!function(e){var t=!0;e.flexslider=function(a,n){var i=e(a);"undefined"==typeof n.rtl&&"rtl"==e("html").attr("dir")&&(n.rtl=!0),i.vars=e.extend({},e.flexslider.defaults,n);var r,s=i.vars.namespace,o=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,l=("ontouchstart"in window||o||window.DocumentTouch&&document instanceof DocumentTouch)&&i.vars.touch,d="click touchend MSPointerUp keyup",c="",u="vertical"===i.vars.direction,v=i.vars.reverse,p=i.vars.itemWidth>0,m="fade"===i.vars.animation,f=""!==i.vars.asNavFor,g={};e.data(a,"flexslider",i),g={init:function(){i.animating=!1,i.currentSlide=parseInt(i.vars.startAt?i.vars.startAt:0,10),isNaN(i.currentSlide)&&(i.currentSlide=0),i.animatingTo=i.currentSlide,i.atEnd=0===i.currentSlide||i.currentSlide===i.last,i.containerSelector=i.vars.selector.substr(0,i.vars.selector.search(" ")),i.slides=e(i.vars.selector,i),i.container=e(i.containerSelector,i),i.count=i.slides.length,i.syncExists=e(i.vars.sync).length>0,"slide"===i.vars.animation&&(i.vars.animation="swing"),i.prop=u?"top":i.vars.rtl?"marginRight":"marginLeft",i.args={},i.manualPause=!1,i.stopped=!1,i.started=!1,i.startTimeout=null,i.transitions=!i.vars.video&&!m&&i.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(void 0!==e.style[t[a]])return i.pfx=t[a].replace("Perspective","").toLowerCase(),i.prop="-"+i.pfx+"-transform",!0;return!1}(),i.isFirefox=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,i.ensureAnimationEnd="",""!==i.vars.controlsContainer&&(i.controlsContainer=e(i.vars.controlsContainer).length>0&&e(i.vars.controlsContainer)),""!==i.vars.manualControls&&(i.manualControls=e(i.vars.manualControls).length>0&&e(i.vars.manualControls)),""!==i.vars.customDirectionNav&&(i.customDirectionNav=2===e(i.vars.customDirectionNav).length&&e(i.vars.customDirectionNav)),i.vars.randomize&&(i.slides.sort(function(){return Math.round(Math.random())-.5}),i.container.empty().append(i.slides)),i.doMath(),i.setup("init"),i.vars.controlNav&&g.controlNav.setup(),i.vars.directionNav&&g.directionNav.setup(),i.vars.keyboard&&(1===e(i.containerSelector).length||i.vars.multipleKeyboard)&&e(document).bind("keyup",function(e){var t=e.keyCode;if(!i.animating&&(39===t||37===t)){var a=i.vars.rtl?37===t?i.getTarget("next"):39===t&&i.getTarget("prev"):39===t?i.getTarget("next"):37===t&&i.getTarget("prev");i.flexAnimate(a,i.vars.pauseOnAction)}}),i.vars.mousewheel&&i.bind("mousewheel",function(e,t,a,n){e.preventDefault();var r=t<0?i.getTarget("next"):i.getTarget("prev");i.flexAnimate(r,i.vars.pauseOnAction)}),i.vars.pausePlay&&g.pausePlay.setup(),i.vars.slideshow&&i.vars.pauseInvisible&&g.pauseInvisible.init(),i.vars.slideshow&&(i.vars.pauseOnHover&&i.hover(function(){i.manualPlay||i.manualPause||i.pause()},function(){i.manualPause||i.manualPlay||i.stopped||i.play()}),i.vars.pauseInvisible&&g.pauseInvisible.isHidden()||(i.vars.initDelay>0?i.startTimeout=setTimeout(i.play,i.vars.initDelay):i.play())),f&&g.asNav.setup(),l&&i.vars.touch&&g.touch(),(!m||m&&i.vars.smoothHeight)&&e(window).bind("resize orientationchange focus",g.resize),i.find("img").attr("draggable","false"),setTimeout(function(){i.vars.start(i)},200)},asNav:{setup:function(){i.asNav=!0,i.animatingTo=Math.floor(i.currentSlide/i.move),i.currentItem=i.currentSlide,i.slides.removeClass(s+"active-slide").eq(i.currentItem).addClass(s+"active-slide"),o?(a._slider=i,i.slides.each(function(){var t=this;t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),t.addEventListener("MSGestureTap",function(t){t.preventDefault();var a=e(this),n=a.index();e(i.vars.asNavFor).data("flexslider").animating||a.hasClass("active")||(i.direction=i.currentItem<n?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction,!1,!0,!0))})})):i.slides.on(d,function(t){t.preventDefault();var a,n=e(this),r=n.index();a=i.vars.rtl?-1*(n.offset().right-e(i).scrollLeft()):n.offset().left-e(i).scrollLeft(),a<=0&&n.hasClass(s+"active-slide")?i.flexAnimate(i.getTarget("prev"),!0):e(i.vars.asNavFor).data("flexslider").animating||n.hasClass(s+"active-slide")||(i.direction=i.currentItem<r?"next":"prev",i.flexAnimate(r,i.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){i.manualControls?g.controlNav.setupManual():g.controlNav.setupPaging()},setupPaging:function(){var t,a,n="thumbnails"===i.vars.controlNav?"control-thumbs":"control-paging",r=1;if(i.controlNavScaffold=e('<ol class="'+s+"control-nav "+s+n+'"></ol>'),i.pagingCount>1)for(var o=0;o<i.pagingCount;o++){if(a=i.slides.eq(o),void 0===a.attr("data-thumb-alt")&&a.attr("data-thumb-alt",""),t=e("<a></a>").attr("href","#").text(r),"thumbnails"===i.vars.controlNav&&(t=e("<img/>").attr("src",a.attr("data-thumb"))),""!==a.attr("data-thumb-alt")&&t.attr("alt",a.attr("data-thumb-alt")),"thumbnails"===i.vars.controlNav&&!0===i.vars.thumbCaptions){var l=a.attr("data-thumbcaption");if(""!==l&&void 0!==l){var u=e("<span></span>").addClass(s+"caption").text(l);t.append(u)}}var v=e("<li>");t.appendTo(v),v.append("</li>"),i.controlNavScaffold.append(v),r++}i.controlsContainer?e(i.controlsContainer).append(i.controlNavScaffold):i.append(i.controlNavScaffold),g.controlNav.set(),g.controlNav.active(),i.controlNavScaffold.delegate("a, img",d,function(t){if(t.preventDefault(),""===c||c===t.type){var a=e(this),n=i.controlNav.index(a);a.hasClass(s+"active")||(i.direction=n>i.currentSlide?"next":"prev",i.flexAnimate(n,i.vars.pauseOnAction))}""===c&&(c=t.type),g.setToClearWatchedEvent()})},setupManual:function(){i.controlNav=i.manualControls,g.controlNav.active(),i.controlNav.bind(d,function(t){if(t.preventDefault(),""===c||c===t.type){var a=e(this),n=i.controlNav.index(a);a.hasClass(s+"active")||(n>i.currentSlide?i.direction="next":i.direction="prev",i.flexAnimate(n,i.vars.pauseOnAction))}""===c&&(c=t.type),g.setToClearWatchedEvent()})},set:function(){var t="thumbnails"===i.vars.controlNav?"img":"a";i.controlNav=e("."+s+"control-nav li "+t,i.controlsContainer?i.controlsContainer:i)},active:function(){i.controlNav.removeClass(s+"active").eq(i.animatingTo).addClass(s+"active")},update:function(t,a){i.pagingCount>1&&"add"===t?i.controlNavScaffold.append(e('<li><a href="#">'+i.count+"</a></li>")):1===i.pagingCount?i.controlNavScaffold.find("li").remove():i.controlNav.eq(a).closest("li").remove(),g.controlNav.set(),i.pagingCount>1&&i.pagingCount!==i.controlNav.length?i.update(a,t):g.controlNav.active()}},directionNav:{setup:function(){var t=e('<ul class="'+s+'direction-nav"><li class="'+s+'nav-prev"><a class="'+s+'prev" href="#">'+i.vars.prevText+'</a></li><li class="'+s+'nav-next"><a class="'+s+'next" href="#">'+i.vars.nextText+"</a></li></ul>");i.customDirectionNav?i.directionNav=i.customDirectionNav:i.controlsContainer?(e(i.controlsContainer).append(t),i.directionNav=e("."+s+"direction-nav li a",i.controlsContainer)):(i.append(t),i.directionNav=e("."+s+"direction-nav li a",i)),g.directionNav.update(),i.directionNav.bind(d,function(t){t.preventDefault();var a;""!==c&&c!==t.type||(a=e(this).hasClass(s+"next")?i.getTarget("next"):i.getTarget("prev"),i.flexAnimate(a,i.vars.pauseOnAction)),""===c&&(c=t.type),g.setToClearWatchedEvent()})},update:function(){var e=s+"disabled";1===i.pagingCount?i.directionNav.addClass(e).attr("tabindex","-1"):i.vars.animationLoop?i.directionNav.removeClass(e).removeAttr("tabindex"):0===i.animatingTo?i.directionNav.removeClass(e).filter("."+s+"prev").addClass(e).attr("tabindex","-1"):i.animatingTo===i.last?i.directionNav.removeClass(e).filter("."+s+"next").addClass(e).attr("tabindex","-1"):i.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('<div class="'+s+'pauseplay"><a href="#"></a></div>');i.controlsContainer?(i.controlsContainer.append(t),i.pausePlay=e("."+s+"pauseplay a",i.controlsContainer)):(i.append(t),i.pausePlay=e("."+s+"pauseplay a",i)),g.pausePlay.update(i.vars.slideshow?s+"pause":s+"play"),i.pausePlay.bind(d,function(t){t.preventDefault(),""!==c&&c!==t.type||(e(this).hasClass(s+"pause")?(i.manualPause=!0,i.manualPlay=!1,i.pause()):(i.manualPause=!1,i.manualPlay=!0,i.play())),""===c&&(c=t.type),g.setToClearWatchedEvent()})},update:function(e){"play"===e?i.pausePlay.removeClass(s+"pause").addClass(s+"play").html(i.vars.playText):i.pausePlay.removeClass(s+"play").addClass(s+"pause").html(i.vars.pauseText)}},touch:function(){function e(e){e.stopPropagation(),i.animating?e.preventDefault():(i.pause(),a._gesture.addPointer(e.pointerId),w=0,d=u?i.h:i.w,f=Number(new Date),l=p&&v&&i.animatingTo===i.last?0:p&&v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:v?(i.last-i.currentSlide+i.cloneOffset)*d:(i.currentSlide+i.cloneOffset)*d)}function t(e){e.stopPropagation();var t=e.target._slider;if(t){var n=-e.translationX,i=-e.translationY;return w+=u?i:n,c=(t.vars.rtl?-1:1)*w,x=u?Math.abs(w)<Math.abs(-n):Math.abs(w)<Math.abs(-i),e.detail===e.MSGESTURE_FLAG_INERTIA?void setImmediate(function(){a._gesture.stop()}):void((!x||Number(new Date)-f>500)&&(e.preventDefault(),!m&&t.transitions&&(t.vars.animationLoop||(c=w/(0===t.currentSlide&&w<0||t.currentSlide===t.last&&w>0?Math.abs(w)/d+2:1)),t.setProps(l+c,"setTouch"))))}}function n(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!x&&null!==c){var a=v?-c:c,n=a>0?t.getTarget("next"):t.getTarget("prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>d/2)?t.flexAnimate(n,t.vars.pauseOnAction):m||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}r=null,s=null,c=null,l=null,w=0}}var r,s,l,d,c,f,g,h,S,x=!1,y=0,b=0,w=0;o?(a.style.msTouchAction="none",a._gesture=new MSGesture,a._gesture.target=a,a.addEventListener("MSPointerDown",e,!1),a._slider=i,a.addEventListener("MSGestureChange",t,!1),a.addEventListener("MSGestureEnd",n,!1)):(g=function(e){i.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(i.pause(),d=u?i.h:i.w,f=Number(new Date),y=e.touches[0].pageX,b=e.touches[0].pageY,l=p&&v&&i.animatingTo===i.last?0:p&&v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:p&&i.currentSlide===i.last?i.limit:p?(i.itemW+i.vars.itemMargin)*i.move*i.currentSlide:v?(i.last-i.currentSlide+i.cloneOffset)*d:(i.currentSlide+i.cloneOffset)*d,r=u?b:y,s=u?y:b,a.addEventListener("touchmove",h,!1),a.addEventListener("touchend",S,!1))},h=function(e){y=e.touches[0].pageX,b=e.touches[0].pageY,c=u?r-b:(i.vars.rtl?-1:1)*(r-y),x=u?Math.abs(c)<Math.abs(y-s):Math.abs(c)<Math.abs(b-s);var t=500;(!x||Number(new Date)-f>t)&&(e.preventDefault(),!m&&i.transitions&&(i.vars.animationLoop||(c/=0===i.currentSlide&&c<0||i.currentSlide===i.last&&c>0?Math.abs(c)/d+2:1),i.setProps(l+c,"setTouch")))},S=function(e){if(a.removeEventListener("touchmove",h,!1),i.animatingTo===i.currentSlide&&!x&&null!==c){var t=v?-c:c,n=t>0?i.getTarget("next"):i.getTarget("prev");i.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(t)>50||Math.abs(t)>d/2)?i.flexAnimate(n,i.vars.pauseOnAction):m||i.flexAnimate(i.currentSlide,i.vars.pauseOnAction,!0)}a.removeEventListener("touchend",S,!1),r=null,s=null,c=null,l=null},a.addEventListener("touchstart",g,!1))},resize:function(){!i.animating&&i.is(":visible")&&(p||i.doMath(),m?g.smoothHeight():p?(i.slides.width(i.computedW),i.update(i.pagingCount),i.setProps()):u?(i.viewport.height(i.h),i.setProps(i.h,"setTotal")):(i.vars.smoothHeight&&g.smoothHeight(),i.newSlides.width(i.computedW),i.setProps(i.computedW,"setTotal")))},smoothHeight:function(e){if(!u||m){var t=m?i:i.viewport;e?t.animate({height:i.slides.eq(i.animatingTo).innerHeight()},e):t.innerHeight(i.slides.eq(i.animatingTo).innerHeight())}},sync:function(t){var a=e(i.vars.sync).data("flexslider"),n=i.animatingTo;switch(t){case"animate":a.flexAnimate(n,i.vars.pauseOnAction,!1,!0);break;case"play":a.playing||a.asNav||a.play();break;case"pause":a.pause()}},uniqueID:function(t){return t.filter("[id]").add(t.find("[id]")).each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")}),t},pauseInvisible:{visProp:null,init:function(){var e=g.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){g.pauseInvisible.isHidden()?i.startTimeout?clearTimeout(i.startTimeout):i.pause():i.started?i.play():i.vars.initDelay>0?setTimeout(i.play,i.vars.initDelay):i.play()})}},isHidden:function(){var e=g.pauseInvisible.getHiddenProp();return!!e&&document[e]},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}},setToClearWatchedEvent:function(){clearTimeout(r),r=setTimeout(function(){c=""},3e3)}},i.flexAnimate=function(t,a,n,r,o){if(i.vars.animationLoop||t===i.currentSlide||(i.direction=t>i.currentSlide?"next":"prev"),f&&1===i.pagingCount&&(i.direction=i.currentItem<t?"next":"prev"),!i.animating&&(i.canAdvance(t,o)||n)&&i.is(":visible")){if(f&&r){var d=e(i.vars.asNavFor).data("flexslider");if(i.atEnd=0===t||t===i.count-1,d.flexAnimate(t,!0,!1,!0,o),i.direction=i.currentItem<t?"next":"prev",d.direction=i.direction,Math.ceil((t+1)/i.visible)-1===i.currentSlide||0===t)return i.currentItem=t,i.slides.removeClass(s+"active-slide").eq(t).addClass(s+"active-slide"),!1;i.currentItem=t,i.slides.removeClass(s+"active-slide").eq(t).addClass(s+"active-slide"),t=Math.floor(t/i.visible)}if(i.animating=!0,i.animatingTo=t,a&&i.pause(),i.vars.before(i),i.syncExists&&!o&&g.sync("animate"),i.vars.controlNav&&g.controlNav.active(),p||i.slides.removeClass(s+"active-slide").eq(t).addClass(s+"active-slide"),i.atEnd=0===t||t===i.last,i.vars.directionNav&&g.directionNav.update(),t===i.last&&(i.vars.end(i),i.vars.animationLoop||i.pause()),m)l?(i.slides.eq(i.currentSlide).css({opacity:0,zIndex:1}),i.slides.eq(t).css({opacity:1,zIndex:2}),i.wrapup(x)):(i.slides.eq(i.currentSlide).css({zIndex:1}).animate({opacity:0},i.vars.animationSpeed,i.vars.easing),i.slides.eq(t).css({zIndex:2}).animate({opacity:1},i.vars.animationSpeed,i.vars.easing,i.wrapup));else{var c,h,S,x=u?i.slides.filter(":first").height():i.computedW;p?(c=i.vars.itemMargin,S=(i.itemW+c)*i.move*i.animatingTo,h=S>i.limit&&1!==i.visible?i.limit:S):h=0===i.currentSlide&&t===i.count-1&&i.vars.animationLoop&&"next"!==i.direction?v?(i.count+i.cloneOffset)*x:0:i.currentSlide===i.last&&0===t&&i.vars.animationLoop&&"prev"!==i.direction?v?0:(i.count+1)*x:v?(i.count-1-t+i.cloneOffset)*x:(t+i.cloneOffset)*x,i.setProps(h,"",i.vars.animationSpeed),i.transitions?(i.vars.animationLoop&&i.atEnd||(i.animating=!1,i.currentSlide=i.animatingTo),i.container.unbind("webkitTransitionEnd transitionend"),i.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(i.ensureAnimationEnd),i.wrapup(x)}),clearTimeout(i.ensureAnimationEnd),i.ensureAnimationEnd=setTimeout(function(){i.wrapup(x)},i.vars.animationSpeed+100)):i.container.animate(i.args,i.vars.animationSpeed,i.vars.easing,function(){i.wrapup(x)})}i.vars.smoothHeight&&g.smoothHeight(i.vars.animationSpeed)}},i.wrapup=function(e){m||p||(0===i.currentSlide&&i.animatingTo===i.last&&i.vars.animationLoop?i.setProps(e,"jumpEnd"):i.currentSlide===i.last&&0===i.animatingTo&&i.vars.animationLoop&&i.setProps(e,"jumpStart")),i.animating=!1,i.currentSlide=i.animatingTo,i.vars.after(i)},i.animateSlides=function(){!i.animating&&t&&i.flexAnimate(i.getTarget("next"))},i.pause=function(){clearInterval(i.animatedSlides),i.animatedSlides=null,i.playing=!1,i.vars.pausePlay&&g.pausePlay.update("play"),i.syncExists&&g.sync("pause")},i.play=function(){i.playing&&clearInterval(i.animatedSlides),i.animatedSlides=i.animatedSlides||setInterval(i.animateSlides,i.vars.slideshowSpeed),i.started=i.playing=!0,i.vars.pausePlay&&g.pausePlay.update("pause"),i.syncExists&&g.sync("play")},i.stop=function(){i.pause(),i.stopped=!0},i.canAdvance=function(e,t){var a=f?i.pagingCount-1:i.last;return!!t||(!(!f||i.currentItem!==i.count-1||0!==e||"prev"!==i.direction)||(!f||0!==i.currentItem||e!==i.pagingCount-1||"next"===i.direction)&&(!(e===i.currentSlide&&!f)&&(!!i.vars.animationLoop||(!i.atEnd||0!==i.currentSlide||e!==a||"next"===i.direction)&&(!i.atEnd||i.currentSlide!==a||0!==e||"next"!==i.direction))))},i.getTarget=function(e){return i.direction=e,"next"===e?i.currentSlide===i.last?0:i.currentSlide+1:0===i.currentSlide?i.last:i.currentSlide-1},i.setProps=function(e,t,a){var n=function(){var a=e?e:(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo,n=function(){if(p)return"setTouch"===t?e:v&&i.animatingTo===i.last?0:v?i.limit-(i.itemW+i.vars.itemMargin)*i.move*i.animatingTo:i.animatingTo===i.last?i.limit:a;switch(t){case"setTotal":return v?(i.count-1-i.currentSlide+i.cloneOffset)*e:(i.currentSlide+i.cloneOffset)*e;case"setTouch":return v?e:e;case"jumpEnd":return v?e:i.count*e;case"jumpStart":return v?i.count*e:e;default:return e}}();return n*(i.vars.rtl?1:-1)+"px"}();i.transitions&&(n=i.isFirefox?u?"translate3d(0,"+n+",0)":"translate3d("+(parseInt(n)+"px")+",0,0)":u?"translate3d(0,"+n+",0)":"translate3d("+((i.vars.rtl?-1:1)*parseInt(n)+"px")+",0,0)",a=void 0!==a?a/1e3+"s":"0s",i.container.css("-"+i.pfx+"-transition-duration",a),i.container.css("transition-duration",a)),i.args[i.prop]=n,(i.transitions||void 0===a)&&i.container.css(i.args),i.container.css("transform",n)},i.setup=function(t){if(m)i.vars.rtl?i.slides.css({width:"100%","float":"right",marginLeft:"-100%",position:"relative"}):i.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===t&&(l?i.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+i.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(i.currentSlide).css({opacity:1,zIndex:2}):0==i.vars.fadeFirstSlide?i.slides.css({opacity:0,display:"block",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).css({opacity:1}):i.slides.css({opacity:0,display:"block",zIndex:1}).eq(i.currentSlide).css({zIndex:2}).animate({opacity:1},i.vars.animationSpeed,i.vars.easing)),i.vars.smoothHeight&&g.smoothHeight();else{var a,n;"init"===t&&(i.viewport=e('<div class="'+s+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(i).append(i.container),i.cloneCount=0,i.cloneOffset=0,v&&(n=e.makeArray(i.slides).reverse(),i.slides=e(n),i.container.empty().append(i.slides))),i.vars.animationLoop&&!p&&(i.cloneCount=2,i.cloneOffset=1,"init"!==t&&i.container.find(".clone").remove(),i.container.append(g.uniqueID(i.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(g.uniqueID(i.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),i.newSlides=e(i.vars.selector,i),a=v?i.count-1-i.currentSlide+i.cloneOffset:i.currentSlide+i.cloneOffset,u&&!p?(i.container.height(200*(i.count+i.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){i.newSlides.css({display:"block"}),i.doMath(),i.viewport.height(i.h),i.setProps(a*i.h,"init")},"init"===t?100:0)):(i.container.width(200*(i.count+i.cloneCount)+"%"),i.setProps(a*i.computedW,"init"),setTimeout(function(){i.doMath(),i.vars.rtl&&i.isFirefox?i.newSlides.css({width:i.computedW,marginRight:i.computedM,"float":"right",display:"block"}):i.newSlides.css({width:i.computedW,marginRight:i.computedM,"float":"left",display:"block"}),i.vars.smoothHeight&&g.smoothHeight()},"init"===t?100:0))}p||i.slides.removeClass(s+"active-slide").eq(i.currentSlide).addClass(s+"active-slide"),i.vars.init(i)},i.doMath=function(){var e=i.slides.first(),t=i.vars.itemMargin,a=i.vars.minItems,n=i.vars.maxItems;i.w=void 0===i.viewport?i.width():i.viewport.width(),i.isFirefox&&(i.w=i.width()),i.h=e.height(),i.boxPadding=e.outerWidth()-e.width(),p?(i.itemT=i.vars.itemWidth+t,i.itemM=t,i.minW=a?a*i.itemT:i.w,i.maxW=n?n*i.itemT-t:i.w,i.itemW=i.minW>i.w?(i.w-t*(a-1))/a:i.maxW<i.w?(i.w-t*(n-1))/n:i.vars.itemWidth>i.w?i.w:i.vars.itemWidth,i.visible=Math.floor(i.w/i.itemW),i.move=i.vars.move>0&&i.vars.move<i.visible?i.vars.move:i.visible,i.pagingCount=Math.ceil((i.count-i.visible)/i.move+1),i.last=i.pagingCount-1,i.limit=1===i.pagingCount?0:i.vars.itemWidth>i.w?i.itemW*(i.count-1)+t*(i.count-1):(i.itemW+t)*i.count-i.w-t):(i.itemW=i.w,i.itemM=t,i.pagingCount=i.count,i.last=i.count-1),i.computedW=i.itemW-i.boxPadding,i.computedM=i.itemM},i.update=function(e,t){i.doMath(),p||(e<i.currentSlide?i.currentSlide+=1:e<=i.currentSlide&&0!==e&&(i.currentSlide-=1),i.animatingTo=i.currentSlide),i.vars.controlNav&&!i.manualControls&&("add"===t&&!p||i.pagingCount>i.controlNav.length?g.controlNav.update("add"):("remove"===t&&!p||i.pagingCount<i.controlNav.length)&&(p&&i.currentSlide>i.last&&(i.currentSlide-=1,i.animatingTo-=1),g.controlNav.update("remove",i.last))),i.vars.directionNav&&g.directionNav.update()},i.addSlide=function(t,a){var n=e(t);i.count+=1,i.last=i.count-1,u&&v?void 0!==a?i.slides.eq(i.count-a).after(n):i.container.prepend(n):void 0!==a?i.slides.eq(a).before(n):i.container.append(n),i.update(a,"add"),i.slides=e(i.vars.selector+":not(.clone)",i),i.setup(),i.vars.added(i)},i.removeSlide=function(t){var a=isNaN(t)?i.slides.index(e(t)):t;i.count-=1,i.last=i.count-1,isNaN(t)?e(t,i.slides).remove():u&&v?i.slides.eq(i.last).remove():i.slides.eq(t).remove(),i.doMath(),i.update(a,"remove"),i.slides=e(i.vars.selector+":not(.clone)",i),i.setup(),i.vars.removed(i)},g.init()},e(window).blur(function(e){t=!1}).focus(function(e){t=!0}),e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},e.fn.flexslider=function(t){if(void 0===t&&(t={}),"object"==typeof t)return this.each(function(){var a=e(this),n=t.selector?t.selector:".slides > li",i=a.find(n);1===i.length&&t.allowOneSlide===!1||0===i.length?(i.fadeIn(400),t.start&&t.start(a)):void 0===a.data("flexslider")&&new e.flexslider(this,t)});var a=e(this).data("flexslider");switch(t){case"play":a.play();break;case"pause":a.pause();break;case"stop":a.stop();break;case"next":a.flexAnimate(a.getTarget("next"),!0);break;case"prev":case"previous":a.flexAnimate(a.getTarget("prev"),!0);break;default:"number"==typeof t&&a.flexAnimate(t,!0)}}}(jQuery);
/*!
 * @fileOverview TouchSwipe - jQuery Plugin
 * @version 1.6.18
 *
 * @author Matt Bryson http://www.github.com/mattbryson
 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
 * @see http://labs.rampinteractive.co.uk/touchSwipe/
 * @see http://plugins.jquery.com/project/touchSwipe
 * @license
 * Copyright (c) 2010-2015 Matt Bryson
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 */
!function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function(e){"use strict";function n(n){return!n||void 0!==n.allowPageScroll||void 0===n.swipe&&void 0===n.swipeStatus||(n.allowPageScroll=s),void 0!==n.click&&void 0===n.tap&&(n.tap=n.click),n||(n={}),n=e.extend({},e.fn.swipe.defaults,n),this.each(function(){var r=e(this),i=r.data(D);i||(i=new t(this,n),r.data(D,i))})}function t(n,t){function r(n){if(!(ce()||e(n.target).closest(t.excludedElements,Ve).length>0)){var r=n.originalEvent?n.originalEvent:n;if(!r.pointerType||"mouse"!=r.pointerType||0!=t.fallbackToMouseEvents){var i,o=r.touches,l=o?o[0]:r;return We=m,o?ze=o.length:t.preventDefaultEvents!==!1&&n.preventDefault(),je=0,Ne=null,He=null,Xe=null,_e=0,qe=0,Qe=0,Ce=1,Fe=0,Ye=ve(),ue(),fe(0,l),!o||ze===t.fingers||t.fingers===y||X()?(Ze=Oe(),2==ze&&(fe(1,o[1]),qe=Qe=ye(Ge[0].start,Ge[1].start)),(t.swipeStatus||t.pinchStatus)&&(i=j(r,We))):i=!1,i===!1?(We=S,j(r,We),i):(t.hold&&(nn=setTimeout(e.proxy(function(){Ve.trigger("hold",[r.target]),t.hold&&(i=t.hold.call(Ve,r,r.target))},this),t.longTapThreshold)),se(!0),null)}}}function L(e){var n=e.originalEvent?e.originalEvent:e;if(We!==x&&We!==S&&!ae()){var r,i=n.touches,o=i?i[0]:n,l=pe(o);if(Be=Oe(),i&&(ze=i.length),t.hold&&clearTimeout(nn),We=b,2==ze&&(0==qe?(fe(1,i[1]),qe=Qe=ye(Ge[0].start,Ge[1].start)):(pe(i[1]),Qe=ye(Ge[0].end,Ge[1].end),Xe=me(Ge[0].end,Ge[1].end)),Ce=Ee(qe,Qe),Fe=Math.abs(qe-Qe)),ze===t.fingers||t.fingers===y||!i||X()){if(Ne=Se(l.start,l.end),He=Se(l.last,l.end),C(e,He),je=be(l.start,l.end),_e=Te(),ge(Ne,je),r=j(n,We),!t.triggerOnTouchEnd||t.triggerOnTouchLeave){var u=!0;if(t.triggerOnTouchLeave){var a=Me(this);u=Pe(l.end,a)}!t.triggerOnTouchEnd&&u?We=U(b):t.triggerOnTouchLeave&&!u&&(We=U(x)),We!=S&&We!=x||j(n,We)}}else We=S,j(n,We);r===!1&&(We=S,j(n,We))}}function k(e){var n=e.originalEvent?e.originalEvent:e,r=n.touches;if(r){if(r.length&&!ae())return le(n),!0;if(r.length&&ae())return!0}return ae()&&(ze=Ke),Be=Oe(),_e=Te(),_()||!H()?(We=S,j(n,We)):t.triggerOnTouchEnd||t.triggerOnTouchEnd===!1&&We===b?(t.preventDefaultEvents!==!1&&e.cancelable!==!1&&e.preventDefault(),We=x,j(n,We)):!t.triggerOnTouchEnd&&B()?(We=x,N(n,We,g)):We===b&&(We=S,j(n,We)),se(!1),null}function R(){ze=0,Be=0,Ze=0,qe=0,Qe=0,Ce=1,ue(),se(!1)}function A(e){var n=e.originalEvent?e.originalEvent:e;t.triggerOnTouchLeave&&(We=U(x),j(n,We))}function I(){Ve.off(ke,r),Ve.off(Ue,R),Ve.off(Re,L),Ve.off(Ae,k),Ie&&Ve.off(Ie,A),se(!1)}function U(e){var n=e,r=Q(),i=H(),o=_();return!r||o?n=S:!i||e!=b||t.triggerOnTouchEnd&&!t.triggerOnTouchLeave?!i&&e==x&&t.triggerOnTouchLeave&&(n=S):n=x,n}function j(e,n){var t,r=e.touches;return(z()||W())&&(t=N(e,n,p)),(Y()||X())&&t!==!1&&(t=N(e,n,h)),ie()&&t!==!1?t=N(e,n,d):oe()&&t!==!1?t=N(e,n,v):re()&&t!==!1&&(t=N(e,n,g)),n===S&&R(e),n===x&&(r?r.length||R(e):R(e)),t}function N(n,r,s){var f;if(s==p){if(Ve.trigger("swipeStatus",[r,Ne||null,je||0,_e||0,ze,Ge,He]),t.swipeStatus&&(f=t.swipeStatus.call(Ve,n,r,Ne||null,je||0,_e||0,ze,Ge,He),f===!1))return!1;if(r==x&&V()){if(clearTimeout(en),clearTimeout(nn),Ve.trigger("swipe",[Ne,je,_e,ze,Ge,He]),t.swipe&&(f=t.swipe.call(Ve,n,Ne,je,_e,ze,Ge,He),f===!1))return!1;switch(Ne){case i:Ve.trigger("swipeLeft",[Ne,je,_e,ze,Ge,He]),t.swipeLeft&&(f=t.swipeLeft.call(Ve,n,Ne,je,_e,ze,Ge,He));break;case o:Ve.trigger("swipeRight",[Ne,je,_e,ze,Ge,He]),t.swipeRight&&(f=t.swipeRight.call(Ve,n,Ne,je,_e,ze,Ge,He));break;case l:Ve.trigger("swipeUp",[Ne,je,_e,ze,Ge,He]),t.swipeUp&&(f=t.swipeUp.call(Ve,n,Ne,je,_e,ze,Ge,He));break;case u:Ve.trigger("swipeDown",[Ne,je,_e,ze,Ge,He]),t.swipeDown&&(f=t.swipeDown.call(Ve,n,Ne,je,_e,ze,Ge,He))}}}if(s==h){if(Ve.trigger("pinchStatus",[r,Xe||null,Fe||0,_e||0,ze,Ce,Ge]),t.pinchStatus&&(f=t.pinchStatus.call(Ve,n,r,Xe||null,Fe||0,_e||0,ze,Ce,Ge),f===!1))return!1;if(r==x&&F())switch(Xe){case a:Ve.trigger("pinchIn",[Xe||null,Fe||0,_e||0,ze,Ce,Ge]),t.pinchIn&&(f=t.pinchIn.call(Ve,n,Xe||null,Fe||0,_e||0,ze,Ce,Ge));break;case c:Ve.trigger("pinchOut",[Xe||null,Fe||0,_e||0,ze,Ce,Ge]),t.pinchOut&&(f=t.pinchOut.call(Ve,n,Xe||null,Fe||0,_e||0,ze,Ce,Ge))}}return s==g?r!==S&&r!==x||(clearTimeout(en),clearTimeout(nn),J()&&!ee()?($e=Oe(),en=setTimeout(e.proxy(function(){$e=null,Ve.trigger("tap",[n.target]),t.tap&&(f=t.tap.call(Ve,n,n.target))},this),t.doubleTapThreshold)):($e=null,Ve.trigger("tap",[n.target]),t.tap&&(f=t.tap.call(Ve,n,n.target)))):s==d?r!==S&&r!==x||(clearTimeout(en),clearTimeout(nn),$e=null,Ve.trigger("doubletap",[n.target]),t.doubleTap&&(f=t.doubleTap.call(Ve,n,n.target))):s==v&&(r!==S&&r!==x||(clearTimeout(en),$e=null,Ve.trigger("longtap",[n.target]),t.longTap&&(f=t.longTap.call(Ve,n,n.target)))),f}function H(){var e=!0;return null!==t.threshold&&(e=je>=t.threshold),e}function _(){var e=!1;return null!==t.cancelThreshold&&null!==Ne&&(e=de(Ne)-je>=t.cancelThreshold),e}function q(){return null===t.pinchThreshold||Fe>=t.pinchThreshold}function Q(){var e;return e=!t.maxTimeThreshold||!(_e>=t.maxTimeThreshold)}function C(e,n){if(t.preventDefaultEvents!==!1)if(t.allowPageScroll===s)e.preventDefault();else{var r=t.allowPageScroll===f;switch(n){case i:(t.swipeLeft&&r||!r&&t.allowPageScroll!=w)&&e.preventDefault();break;case o:(t.swipeRight&&r||!r&&t.allowPageScroll!=w)&&e.preventDefault();break;case l:(t.swipeUp&&r||!r&&t.allowPageScroll!=T)&&e.preventDefault();break;case u:(t.swipeDown&&r||!r&&t.allowPageScroll!=T)&&e.preventDefault();break;case s:}}}function F(){var e=G(),n=Z(),t=q();return e&&n&&t}function X(){return!!(t.pinchStatus||t.pinchIn||t.pinchOut)}function Y(){return!(!F()||!X())}function V(){var e=Q(),n=H(),t=G(),r=Z(),i=_(),o=!i&&r&&t&&n&&e;return o}function W(){return!!(t.swipe||t.swipeStatus||t.swipeLeft||t.swipeRight||t.swipeUp||t.swipeDown)}function z(){return!(!V()||!W())}function G(){return ze===t.fingers||t.fingers===y||!O}function Z(){return 0!==Ge[0].end.x}function B(){return!!t.tap}function J(){return!!t.doubleTap}function K(){return!!t.longTap}function $(){if(null==$e)return!1;var e=Oe();return J()&&e-$e<=t.doubleTapThreshold}function ee(){return $()}function ne(){return(1===ze||!O)&&(isNaN(je)||je<t.threshold)}function te(){return _e>t.longTapThreshold&&E>je}function re(){return!(!ne()||!B())}function ie(){return!(!$()||!J())}function oe(){return!(!te()||!K())}function le(e){Je=Oe(),Ke=e.touches.length+1}function ue(){Je=0,Ke=0}function ae(){var e=!1;if(Je){var n=Oe()-Je;n<=t.fingerReleaseThreshold&&(e=!0)}return e}function ce(){return!(Ve.data(D+"_intouch")!==!0)}function se(e){Ve&&(e===!0?(Ve.on(Re,L),Ve.on(Ae,k),Ie&&Ve.on(Ie,A)):(Ve.off(Re,L,!1),Ve.off(Ae,k,!1),Ie&&Ve.off(Ie,A,!1)),Ve.data(D+"_intouch",e===!0))}function fe(e,n){var t={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return t.start.x=t.last.x=t.end.x=n.pageX||n.clientX,t.start.y=t.last.y=t.end.y=n.pageY||n.clientY,Ge[e]=t,t}function pe(e){var n=void 0!==e.identifier?e.identifier:0,t=he(n);return null===t&&(t=fe(n,e)),t.last.x=t.end.x,t.last.y=t.end.y,t.end.x=e.pageX||e.clientX,t.end.y=e.pageY||e.clientY,t}function he(e){return Ge[e]||null}function ge(e,n){e!=s&&(n=Math.max(n,de(e)),Ye[e].distance=n)}function de(e){return Ye[e]?Ye[e].distance:void 0}function ve(){var e={};return e[i]=we(i),e[o]=we(o),e[l]=we(l),e[u]=we(u),e}function we(e){return{direction:e,distance:0}}function Te(){return Be-Ze}function ye(e,n){var t=Math.abs(e.x-n.x),r=Math.abs(e.y-n.y);return Math.round(Math.sqrt(t*t+r*r))}function Ee(e,n){var t=n/e*1;return t.toFixed(2)}function me(){return 1>Ce?c:a}function be(e,n){return Math.round(Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2)))}function xe(e,n){var t=e.x-n.x,r=n.y-e.y,i=Math.atan2(r,t),o=Math.round(180*i/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function Se(e,n){if(De(e,n))return s;var t=xe(e,n);return 45>=t&&t>=0?i:360>=t&&t>=315?i:t>=135&&225>=t?o:t>45&&135>t?u:l}function Oe(){var e=new Date;return e.getTime()}function Me(n){n=e(n);var t=n.offset(),r={left:t.left,right:t.left+n.outerWidth(),top:t.top,bottom:t.top+n.outerHeight()};return r}function Pe(e,n){return e.x>n.left&&e.x<n.right&&e.y>n.top&&e.y<n.bottom}function De(e,n){return e.x==n.x&&e.y==n.y}var t=e.extend({},t),Le=O||P||!t.fallbackToMouseEvents,ke=Le?P?M?"MSPointerDown":"pointerdown":"touchstart":"mousedown",Re=Le?P?M?"MSPointerMove":"pointermove":"touchmove":"mousemove",Ae=Le?P?M?"MSPointerUp":"pointerup":"touchend":"mouseup",Ie=Le?P?"mouseleave":null:"mouseleave",Ue=P?M?"MSPointerCancel":"pointercancel":"touchcancel",je=0,Ne=null,He=null,_e=0,qe=0,Qe=0,Ce=1,Fe=0,Xe=0,Ye=null,Ve=e(n),We="start",ze=0,Ge={},Ze=0,Be=0,Je=0,Ke=0,$e=0,en=null,nn=null;try{Ve.on(ke,r),Ve.on(Ue,R)}catch(tn){e.error("events not supported "+ke+","+Ue+" on jQuery.swipe")}this.enable=function(){return this.disable(),Ve.on(ke,r),Ve.on(Ue,R),Ve},this.disable=function(){return I(),Ve},this.destroy=function(){I(),Ve.data(D,null),Ve=null},this.option=function(n,r){if("object"==typeof n)t=e.extend(t,n);else if(void 0!==t[n]){if(void 0===r)return t[n];t[n]=r}else{if(!n)return t;e.error("Option "+n+" does not exist on jQuery.swipe.options")}return null}}var r="1.6.18",i="left",o="right",l="up",u="down",a="in",c="out",s="none",f="auto",p="swipe",h="pinch",g="tap",d="doubletap",v="longtap",w="horizontal",T="vertical",y="all",E=10,m="start",b="move",x="end",S="cancel",O="ontouchstart"in window,M=window.navigator.msPointerEnabled&&!window.PointerEvent&&!O,P=(window.PointerEvent||window.navigator.msPointerEnabled)&&!O,D="TouchSwipe",L={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};e.fn.swipe=function(t){var r=e(this),i=r.data(D);if(i&&"string"==typeof t){if(i[t])return i[t].apply(i,Array.prototype.slice.call(arguments,1));e.error("Method "+t+" does not exist on jQuery.swipe")}else if(i&&"object"==typeof t)i.option.apply(i,arguments);else if(!(i||"object"!=typeof t&&t))return n.apply(this,arguments);return r},e.fn.swipe.version=r,e.fn.swipe.defaults=L,e.fn.swipe.phases={PHASE_START:m,PHASE_MOVE:b,PHASE_END:x,PHASE_CANCEL:S},e.fn.swipe.directions={LEFT:i,RIGHT:o,UP:l,DOWN:u,IN:a,OUT:c},e.fn.swipe.pageScroll={NONE:s,HORIZONTAL:w,VERTICAL:T,AUTO:f},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:y}});
/***************************************************************************************************
LoadingOverlay - A flexible loading overlay jQuery plugin
    Author          : Gaspare Sganga
    Version         : 2.1.7
    License         : MIT
    Documentation   : https://gasparesganga.com/labs/jquery-loading-overlay/
***************************************************************************************************/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(e,s){"use strict";function t(s,t){s=e(s),t.size=p(t.size),t.maxSize=parseInt(t.maxSize,10)||0,t.minSize=parseInt(t.minSize,10)||0,t.resizeInterval=parseInt(t.resizeInterval,10)||0;var a=l(s),o=g(s);if(o===!1){if(o=e.extend({},x),o.container=s,o.wholePage=s.is("body"),a=e("<div>",{"class":"loadingoverlay"}).css(v.overlay).css("flex-direction","row"===t.direction.toLowerCase()?"row":"column"),t.backgroundClass?a.addClass(t.backgroundClass):a.css("background",t.background),o.wholePage&&a.css({position:"fixed",top:0,left:0,width:"100%",height:"100%"}),"undefined"!=typeof t.zIndex&&a.css("z-index",t.zIndex),t.image){e.isArray(t.imageColor)?0===t.imageColor.length?t.imageColor=!1:1===t.imageColor.length?t.imageColor={fill:t.imageColor[0]}:t.imageColor={fill:t.imageColor[0],stroke:t.imageColor[1]}:t.imageColor&&(t.imageColor={fill:t.imageColor});var r=c(a,t.imageOrder,t.imageAutoResize,t.imageResizeFactor,t.imageAnimation);"<svg"===t.image.slice(0,4).toLowerCase()&&"</svg>"===t.image.slice(-6).toLowerCase()?(r.append(t.image),r.children().css(v.element_svg),!t.imageClass&&t.imageColor&&r.find("*").css(t.imageColor)):".svg"===t.image.slice(-4).toLowerCase()||"data:image/svg"===t.image.slice(0,14).toLowerCase()?e.ajax({url:t.image,type:"GET",dataType:"html",global:!1}).done(function(e){r.html(e),r.children().css(v.element_svg),!t.imageClass&&t.imageColor&&r.find("*").css(t.imageColor)}):r.css({"background-image":"url("+t.image+")","background-position":"center","background-repeat":"no-repeat","background-size":"cover"}),t.imageClass&&r.addClass(t.imageClass)}if(t.fontawesome){var r=c(a,t.fontawesomeOrder,t.fontawesomeAutoResize,t.fontawesomeResizeFactor,t.fontawesomeAnimation).addClass("loadingoverlay_fa");e("<div>",{"class":t.fontawesome}).appendTo(r),t.fontawesomeColor&&r.css("color",t.fontawesomeColor)}if(t.custom)var r=c(a,t.customOrder,t.customAutoResize,t.customResizeFactor,t.customAnimation).append(t.custom);if(t.text&&(o.text=c(a,t.textOrder,t.textAutoResize,t.textResizeFactor,t.textAnimation).addClass("loadingoverlay_text").text(t.text),t.textClass?o.text.addClass(t.textClass):t.textColor&&o.text.css("color",t.textColor)),t.progress){var r=c(a,t.progressOrder,t.progressAutoResize,t.progressResizeFactor,!1).addClass("loadingoverlay_progress"),i=e("<div>").css(v.progress_wrapper).appendTo(r);o.progress={bar:e("<div>").css(v.progress_bar).appendTo(i),fixed:!1,margin:0,min:parseFloat(t.progressMin),max:parseFloat(t.progressMax),speed:parseInt(t.progressSpeed,10)};var d=(t.progressFixedPosition+"").replace(/\s\s+/g," ").toLowerCase().split(" ");2===d.length&&f(d[0])?(o.progress.fixed=d[0],o.progress.margin=p(d[1])):2===d.length&&f(d[1])?(o.progress.fixed=d[1],o.progress.margin=p(d[0])):1===d.length&&f(d[0])&&(o.progress.fixed=d[0],o.progress.margin=0),"top"===o.progress.fixed?r.css(v.progress_fixed).css("top",o.progress.margin?o.progress.margin.value+(o.progress.margin.fixed?o.progress.margin.units:"%"):0):"bottom"===o.progress.fixed&&r.css(v.progress_fixed).css("top","auto"),t.progressClass?o.progress.bar.addClass(t.progressClass):t.progressColor&&o.progress.bar.css("background",t.progressColor)}t.fade?t.fade===!0?t.fade=h.fade:"string"==typeof t.fade||"number"==typeof t.fade?t.fade=[t.fade,t.fade]:e.isArray(t.fade)&&t.fade.length<2&&(t.fade=[t.fade[0],t.fade[0]]):t.fade=[0,0],t.fade=[parseInt(t.fade[0],10),parseInt(t.fade[1],10)],o.settings=t,a.data("loadingoverlay_data",o),s.data("loadingoverlay",a),a.fadeTo(0,.01).appendTo("body"),n(s,!0),t.resizeInterval>0&&(o.resizeIntervalId=setInterval(function(){n(s,!1)},t.resizeInterval)),a.fadeTo(t.fade[0],1)}o.count++}function a(s,t){s=e(s);var a=l(s),o=g(s);o!==!1&&(o.count--,(t||o.count<=0)&&a.animate({opacity:0},o.settings.fade[1],function(){o.resizeIntervalId&&clearInterval(o.resizeIntervalId),e(this).remove(),s.removeData("loadingoverlay")}))}function o(s){n(e(s),!0)}function r(s,t){s=e(s);var a=g(s);a!==!1&&a.text&&(t===!1?a.text.hide():a.text.show().text(t))}function i(s,t){s=e(s);var a=g(s);if(a!==!1&&a.progress)if(t===!1)a.progress.bar.hide();else{var o=100*((parseFloat(t)||0)-a.progress.min)/(a.progress.max-a.progress.min);o<0&&(o=0),o>100&&(o=100),a.progress.bar.show().animate({width:o+"%"},a.progress.speed)}}function n(s,t){var a=l(s),o=g(s);if(o!==!1){if(!o.wholePage){var r="fixed"===s.css("position"),i=r?s[0].getBoundingClientRect():s.offset();a.css({position:r?"fixed":"absolute",top:i.top+parseInt(s.css("border-top-width"),10),left:i.left+parseInt(s.css("border-left-width"),10),width:s.innerWidth(),height:s.innerHeight()})}if(o.settings.size){var n=o.wholePage?e(window):s,c=o.settings.size.value;o.settings.size.fixed||(c=Math.min(n.innerWidth(),n.innerHeight())*c/100,o.settings.maxSize&&c>o.settings.maxSize&&(c=o.settings.maxSize),o.settings.minSize&&c<o.settings.minSize&&(c=o.settings.minSize)),a.children(".loadingoverlay_element").each(function(){var s=e(this);if(t||s.data("loadingoverlay_autoresize")){var a=s.data("loadingoverlay_resizefactor");s.hasClass("loadingoverlay_fa")||s.hasClass("loadingoverlay_text")?s.css("font-size",c*a+o.settings.size.units):s.hasClass("loadingoverlay_progress")?(o.progress.bar.css("height",c*a+o.settings.size.units),o.progress.fixed?"bottom"===o.progress.fixed&&s.css("bottom",o.progress.margin?o.progress.margin.value+(o.progress.margin.fixed?o.progress.margin.units:"%"):0).css("bottom","+="+c*a+o.settings.size.units):o.progress.bar.css("top",s.position().top).css("top","-="+c*a*.5+o.settings.size.units)):s.css({width:c*a+o.settings.size.units,height:c*a+o.settings.size.units})}})}}}function l(e){return e.data("loadingoverlay")}function g(t){var a=l(t),o="undefined"==typeof a?s:a.data("loadingoverlay_data");return"undefined"==typeof o?(e(".loadingoverlay").each(function(){var s=e(this),t=s.data("loadingoverlay_data");document.body.contains(t.container[0])||(t.resizeIntervalId&&clearInterval(t.resizeIntervalId),s.remove())}),!1):(a.toggle(t.is(":visible")),o)}function c(s,t,a,o,r){var i=e("<div>",{"class":"loadingoverlay_element",css:{order:t}}).css(v.element).data({loadingoverlay_autoresize:a,loadingoverlay_resizefactor:o}).appendTo(s);if(r===!0&&(r=h.animations.time+" "+h.animations.name),"string"==typeof r){var n,l,g=r.replace(/\s\s+/g," ").toLowerCase().split(" ");2===g.length&&d(g[0])&&m(g[1])?(n=g[1],l=g[0]):2===g.length&&d(g[1])&&m(g[0])?(n=g[0],l=g[1]):1===g.length&&d(g[0])?(n=h.animations.name,l=g[0]):1===g.length&&m(g[0])&&(n=g[0],l=h.animations.time),i.css({"animation-name":"loadingoverlay_animation__"+n,"animation-duration":l,"animation-timing-function":"linear","animation-iteration-count":"infinite"})}return i}function d(e){return!isNaN(parseFloat(e))&&("s"===e.slice(-1)||"ms"===e.slice(-2))}function m(e){return y.animations.indexOf(e)>-1}function f(e){return y.progressPosition.indexOf(e)>-1}function p(e){return!(!e||e<0)&&("string"==typeof e&&["vmin","vmax"].indexOf(e.slice(-4))>-1?{fixed:!0,units:e.slice(-4),value:e.slice(0,-4)}:"string"==typeof e&&["rem"].indexOf(e.slice(-3))>-1?{fixed:!0,units:e.slice(-3),value:e.slice(0,-3)}:"string"==typeof e&&["px","em","cm","mm","in","pt","pc","vh","vw"].indexOf(e.slice(-2))>-1?{fixed:!0,units:e.slice(-2),value:e.slice(0,-2)}:{fixed:!1,units:"px",value:parseFloat(e)})}var u={background:"rgba(255, 255, 255, 0.8)",backgroundClass:"",image:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'><circle r='80' cx='500' cy='90'/><circle r='80' cx='500' cy='910'/><circle r='80' cx='90' cy='500'/><circle r='80' cx='910' cy='500'/><circle r='80' cx='212' cy='212'/><circle r='80' cx='788' cy='212'/><circle r='80' cx='212' cy='788'/><circle r='80' cx='788' cy='788'/></svg>",imageAnimation:"2000ms rotate_right",imageAutoResize:!0,imageResizeFactor:1,imageColor:"#202020",imageClass:"",imageOrder:1,fontawesome:"",fontawesomeAnimation:"",fontawesomeAutoResize:!0,fontawesomeResizeFactor:1,fontawesomeColor:"#202020",fontawesomeOrder:2,custom:"",customAnimation:"",customAutoResize:!0,customResizeFactor:1,customOrder:3,text:"",textAnimation:"",textAutoResize:!0,textResizeFactor:.5,textColor:"#202020",textClass:"",textOrder:4,progress:!1,progressAutoResize:!0,progressResizeFactor:.25,progressColor:"#a0a0a0",progressClass:"",progressOrder:5,progressFixedPosition:"",progressSpeed:200,progressMin:0,progressMax:100,size:50,maxSize:120,minSize:20,direction:"column",fade:!0,resizeInterval:50,zIndex:2147483647},v={overlay:{"box-sizing":"border-box",position:"relative",display:"flex","flex-wrap":"nowrap","align-items":"center","justify-content":"space-around"},element:{"box-sizing":"border-box",overflow:"visible",flex:"0 0 auto",display:"flex","justify-content":"center","align-items":"center"},element_svg:{width:"100%",height:"100%"},progress_fixed:{position:"absolute",left:"0",width:"100%"},progress_wrapper:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},progress_bar:{position:"absolute",left:"0"}},x={count:0,container:s,settings:s,wholePage:s,resizeIntervalId:s,text:s,progress:s},y={animations:["rotate_right","rotate_left","fadein","pulse"],progressPosition:["top","bottom"]},h={animations:{name:"rotate_right",time:"2000ms"},fade:[400,200]};e.LoadingOverlaySetup=function(s){e.extend(!0,u,s)},e.LoadingOverlay=function(s,n){switch(s.toLowerCase()){case"show":t("body",e.extend(!0,{},u,n));break;case"hide":a("body",n);break;case"resize":o("body",n);break;case"text":r("body",n);break;case"progress":i("body",n)}},e.fn.LoadingOverlay=function(s,n){switch(s.toLowerCase()){case"show":return this.each(function(){t(this,e.extend(!0,{},u,n))});case"hide":return this.each(function(){a(this,n)});case"resize":return this.each(function(){o(this,n)});case"text":return this.each(function(){r(this,n)});case"progress":return this.each(function(){i(this,n)})}},e(function(){e("head").append(["<style>","@-webkit-keyframes loadingoverlay_animation__rotate_right {","to {","-webkit-transform : rotate(360deg);","transform : rotate(360deg);","}","}","@keyframes loadingoverlay_animation__rotate_right {","to {","-webkit-transform : rotate(360deg);","transform : rotate(360deg);","}","}","@-webkit-keyframes loadingoverlay_animation__rotate_left {","to {","-webkit-transform : rotate(-360deg);","transform : rotate(-360deg);","}","}","@keyframes loadingoverlay_animation__rotate_left {","to {","-webkit-transform : rotate(-360deg);","transform : rotate(-360deg);","}","}","@-webkit-keyframes loadingoverlay_animation__fadein {","0% {","opacity   : 0;","-webkit-transform : scale(0.1, 0.1);","transform : scale(0.1, 0.1);","}","50% {","opacity   : 1;","}","100% {","opacity   : 0;","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","}","@keyframes loadingoverlay_animation__fadein {","0% {","opacity   : 0;","-webkit-transform : scale(0.1, 0.1);","transform : scale(0.1, 0.1);","}","50% {","opacity   : 1;","}","100% {","opacity   : 0;","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","}","@-webkit-keyframes loadingoverlay_animation__pulse {","0% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","50% {","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","100% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","}","@keyframes loadingoverlay_animation__pulse {","0% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","50% {","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","100% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","}","</style>"].join(" "))})});
!function(t){function e(i){if(s[i])return s[i].exports;var o=s[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var s={};e.m=t,e.c=s,e.d=function(t,s,i){e.o(t,s)||Object.defineProperty(t,s,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,s){if(1&s&&(t=e(t)),8&s)return t;if(4&s&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&s&&"string"!=typeof t)for(var o in t)e.d(i,o,function(e){return t[e]}.bind(null,o));return i},e.n=function(t){var s=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(s,"a",s),s},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,s){"use strict";function i(t,e){this._selectedItem=null,this._defaultValue=null,this._defaultText=null,this._isSelectElement=!1,this._settings={resolver:"ajax",resolverSettings:{},minLength:3,valueKey:"value",formatResult:this.defaultFormatResult,autoSelect:!0,noResultsText:"No results",bootstrapVersion:"auto",preventEnter:!1,events:{typed:null,searchPre:null,search:null,searchPost:null,select:null,focus:null}},this._el=t,this._$el=$(this._el),this._$el.is("select")&&(this._isSelectElement=!0),this.manageInlineDataAttributes(),"object"==typeof e&&(this._settings=$.extend(!0,{},this.getSettings(),e)),this._isSelectElement&&this.convertSelectToText(),this.init()}function o(t,e,s,i){this.initialized=!1,this.shown=!1,this.items=[],this.ddMouseover=!1,this._$el=t,this.formatItem=e,this.autoSelect=s,this.noResultsText=i}function n(t,e,s,i){this.initialized=!1,this.shown=!1,this.items=[],this.ddMouseover=!1,this._$el=t,this.formatItem=e,this.autoSelect=s,this.noResultsText=i}function r(t){return h.call(this,t)||this}function l(t){this._settings=$.extend(!0,{},this.getDefaults(),t)}s.r(e),s.d(e,"AutoComplete",function(){return _});var a,h,d,u=(a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s])})(t,e)},function(t,e){function s(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(s.prototype=e.prototype,new s)}),c=(l.prototype.getDefaults=function(){return{}},l.prototype.getResults=function(t,e,s){return this.results},l.prototype.search=function(t,e){e(this.getResults())},u(r,h=l),r.prototype.getDefaults=function(){return{url:"",method:"get",queryKey:"q",extraData:{},timeout:void 0,requestThrottling:500}},r.prototype.search=function(t,e){var s=this;null!=this.jqXHR&&this.jqXHR.abort();var i={};i[this._settings.queryKey]=t,$.extend(i,this._settings.extraData),this.requestTID&&window.clearTimeout(this.requestTID),this.requestTID=window.setTimeout(function(){s.jqXHR=$.ajax(s._settings.url,{method:s._settings.method,data:i,timeout:s._settings.timeout}),s.jqXHR.done(function(t){e(t)}),s.jqXHR.fail(function(t){var e;null===(e=s._settings)||void 0===e||e.fail(t)}),s.jqXHR.always(function(){s.jqXHR=null})},this._settings.requestThrottling)},r),f=(n.prototype.init=function(){var t=this,e=$.extend({},this._$el.position(),{height:this._$el[0].offsetHeight});this._dd=$("<ul />"),this._dd.addClass("bootstrap-autocomplete dropdown-menu"),this._dd.insertAfter(this._$el),this._dd.css({top:e.top+this._$el.outerHeight(),left:e.left,width:this._$el.outerWidth()}),this._dd.on("click","li",function(e){var s=$(e.currentTarget).data("item");t.itemSelectedLaunchEvent(s)}),this._dd.on("keyup",function(e){if(t.shown){switch(e.which){case 27:t.hide(),t._$el.focus()}return!1}}),this._dd.on("mouseenter",function(e){t.ddMouseover=!0}),this._dd.on("mouseleave",function(e){t.ddMouseover=!1}),this._dd.on("mouseenter","li",function(e){t.haveResults&&($(e.currentTarget).closest("ul").find("li.active").removeClass("active"),$(e.currentTarget).addClass("active"),t.mouseover=!0)}),this._dd.on("mouseleave","li",function(e){t.mouseover=!1}),this.initialized=!0},n.prototype.checkInitialized=function(){this.initialized||this.init()},Object.defineProperty(n.prototype,"isMouseOver",{get:function(){return this.mouseover},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isDdMouseOver",{get:function(){return this.ddMouseover},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"haveResults",{get:function(){return 0<this.items.length},enumerable:!1,configurable:!0}),n.prototype.focusNextItem=function(t){var e,s;this.haveResults&&(e=this._dd.find("li.active"),0===(s=t?e.prev():e.next()).length&&(s=t?this._dd.find("li").last():this._dd.find("li").first()),e.removeClass("active"),s.addClass("active"))},n.prototype.focusPreviousItem=function(){this.focusNextItem(!0)},n.prototype.selectFocusItem=function(){this._dd.find("li.active").trigger("click")},Object.defineProperty(n.prototype,"isItemFocused",{get:function(){return!!(this.isShown()&&0<this._dd.find("li.active").length)},enumerable:!1,configurable:!0}),n.prototype.show=function(){this.shown||(this._dd.dropdown().show(),this.shown=!0)},n.prototype.isShown=function(){return this.shown},n.prototype.hide=function(){this.shown&&(this._dd.dropdown().hide(),this.shown=!1)},n.prototype.updateItems=function(t,e){this.items=t,this.searchText=e,this.refreshItemList()},n.prototype.showMatchedText=function(t,e){var s=t.toLowerCase().indexOf(e.toLowerCase());if(-1<s){var i=s+e.length;return t.slice(0,s)+"<b>"+t.slice(s,i)+"</b>"+t.slice(i)}return t},n.prototype.refreshItemList=function(){var t=this;this.checkInitialized(),this._dd.empty();var e,s=[];0<this.items.length?this.items.forEach(function(e){var i,o,n=t.formatItem(e);"string"==typeof n&&(n={text:n}),i=t.showMatchedText(n.text,t.searchText),o=void 0!==n.html?n.html:i;var r=n.disabled,l=$("<li >");l.append($("<a>").attr("href","#!").html(o)).data("item",e),r&&l.addClass("disabled"),s.push(l)}):((e=$("<li >")).append($("<a>").attr("href","#!").html(this.noResultsText)).addClass("disabled"),s.push(e)),this._dd.append(s)},n.prototype.itemSelectedLaunchEvent=function(t){this._$el.trigger("autocomplete.select",t)},n),p=(o.prototype.getElPos=function(){return $.extend({},this._$el.position(),{height:this._$el[0].offsetHeight})},o.prototype.init=function(){var t=this,e=this.getElPos();this._dd=$("<div />"),this._dd.addClass("bootstrap-autocomplete dropdown-menu"),this._dd.insertAfter(this._$el),this._dd.css({top:e.top+this._$el.outerHeight(),left:e.left,width:this._$el.outerWidth()}),this._dd.on("click",".dropdown-item",function(e){var s=$(e.currentTarget).data("item");t.itemSelectedLaunchEvent(s),e.preventDefault()}),this._dd.on("keyup",function(e){if(t.shown){switch(e.which){case 27:t.hide(),t._$el.focus()}return!1}}),this._dd.on("mouseenter",function(e){t.ddMouseover=!0}),this._dd.on("mouseleave",function(e){t.ddMouseover=!1}),this._dd.on("mouseenter",".dropdown-item",function(e){t.haveResults&&($(e.currentTarget).closest("div").find(".dropdown-item.active").removeClass("active"),$(e.currentTarget).addClass("active"),t.mouseover=!0)}),this._dd.on("mouseleave",".dropdown-item",function(e){t.mouseover=!1}),this.initialized=!0},o.prototype.checkInitialized=function(){this.initialized||this.init()},Object.defineProperty(o.prototype,"isMouseOver",{get:function(){return this.mouseover},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isDdMouseOver",{get:function(){return this.ddMouseover},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"haveResults",{get:function(){return 0<this.items.length},enumerable:!1,configurable:!0}),o.prototype.focusNextItem=function(t){var e,s;this.haveResults&&(e=this._dd.find(".dropdown-item.active"),0===(s=t?e.prev():e.next()).length&&(s=t?this._dd.find(".dropdown-item").last():this._dd.find(".dropdown-item").first()),e.removeClass("active"),s.addClass("active"))},o.prototype.focusPreviousItem=function(){this.focusNextItem(!0)},o.prototype.selectFocusItem=function(){this._dd.find(".dropdown-item.active").trigger("click")},Object.defineProperty(o.prototype,"isItemFocused",{get:function(){return!!(this._dd&&this.isShown()&&0<this._dd.find(".dropdown-item.active").length)},enumerable:!1,configurable:!0}),o.prototype.show=function(){this.shown||(this.getElPos(),this._dd.addClass("show"),this.shown=!0,this._$el.trigger("autocomplete.dd.shown"))},o.prototype.isShown=function(){return this.shown},o.prototype.hide=function(){this.shown&&(this._dd.removeClass("show"),this.shown=!1,this._$el.trigger("autocomplete.dd.hidden"))},o.prototype.updateItems=function(t,e){this.items=t,this.searchText=e,this.refreshItemList()},o.prototype.showMatchedText=function(t,e){var s=t.toLowerCase().indexOf(e.toLowerCase());if(-1<s){var i=s+e.length;return t.slice(0,s)+"<b>"+t.slice(s,i)+"</b>"+t.slice(i)}return t},o.prototype.refreshItemList=function(){var t=this;this.checkInitialized(),this._dd.empty();var e,s=[];0<this.items.length?(this.items.forEach(function(e){var i,o,n=t.formatItem(e);"string"==typeof n&&(n={text:n}),i=t.showMatchedText(n.text,t.searchText),o=void 0!==n.html?n.html:i;var r=n.disabled,l=$("<a >");l.addClass("dropdown-item").css({overflow:"hidden","text-overflow":"ellipsis"}).html(o).data("item",e),r&&l.addClass("disabled"),s.push(l)}),this._dd.append(s),this.show()):""===this.noResultsText?this.hide():((e=$("<a >")).addClass("dropdown-item disabled").html(this.noResultsText),s.push(e),this._dd.append(s),this.show())},o.prototype.itemSelectedLaunchEvent=function(t){this._$el.trigger("autocomplete.select",t)},o),_=(i.prototype.manageInlineDataAttributes=function(){var t=this.getSettings();this._$el.data("url")&&(t.resolverSettings.url=this._$el.data("url")),this._$el.data("default-value")&&(this._defaultValue=this._$el.data("default-value")),this._$el.data("default-text")&&(this._defaultText=this._$el.data("default-text")),void 0!==this._$el.data("noresults-text")&&(t.noResultsText=this._$el.data("noresults-text"))},i.prototype.getSettings=function(){return this._settings},i.prototype.getBootstrapVersion=function(){var t="auto"===this._settings.bootstrapVersion?$.fn.button.Constructor.VERSION.split(".").map(parseInt):"4"===this._settings.bootstrapVersion?[4]:"3"===this._settings.bootstrapVersion?[3]:(console.error("INVALID value for 'bootstrapVersion' settings property: "+this._settings.bootstrapVersion+" defaulting to 4"),[4]);return t},i.prototype.convertSelectToText=function(){var t=$("<input>");t.attr("type","hidden"),t.attr("name",this._$el.attr("name")),this._defaultValue&&t.val(this._defaultValue),(this._selectHiddenField=t).insertAfter(this._$el);var e=$("<input>");e.attr("type","search"),e.attr("name",this._$el.attr("name")+"_text"),e.attr("id",this._$el.attr("id")),e.attr("disabled",this._$el.attr("disabled")),e.attr("placeholder",this._$el.attr("placeholder")),e.attr("autocomplete","off"),e.addClass(this._$el.attr("class")),this._defaultText&&e.val(this._defaultText);var s=this._$el.attr("required");s&&e.attr("required",s),e.data(i.NAME,this),this._$el.replaceWith(e),this._$el=e,this._el=e.get(0)},i.prototype.init=function(){this.bindDefaultEventListeners(),"ajax"===this._settings.resolver&&(this.resolver=new c(this._settings.resolverSettings)),4===this.getBootstrapVersion()[0]?this._dd=new p(this._$el,this._settings.formatResult,this._settings.autoSelect,this._settings.noResultsText):this._dd=new f(this._$el,this._settings.formatResult,this._settings.autoSelect,this._settings.noResultsText)},i.prototype.bindDefaultEventListeners=function(){var t=this;this._$el.on("keydown",function(e){switch(e.which){case 9:t._dd.isItemFocused?t._dd.selectFocusItem():t._selectedItem||""!==t._$el.val()&&t._$el.trigger("autocomplete.freevalue",t._$el.val()),t._dd.hide();break;case 13:t._dd.isItemFocused?t._dd.selectFocusItem():t._selectedItem||""!==t._$el.val()&&t._$el.trigger("autocomplete.freevalue",t._$el.val()),t._dd.hide(),t._settings.preventEnter&&e.preventDefault();break;case 40:t._dd.focusNextItem();break;case 38:t._dd.focusPreviousItem()}}),this._$el.on("keyup",function(e){switch(e.which){case 16:case 17:case 18:case 39:case 37:case 36:case 35:break;case 13:case 27:t._dd.hide();break;case 40:case 38:break;default:t._selectedItem=null;var s=t._$el.val();t.handlerTyped(s)}}),this._$el.on("blur",function(e){!t._dd.isMouseOver&&t._dd.isDdMouseOver&&t._dd.isShown()?(setTimeout(function(){t._$el.focus()}),t._$el.focus()):t._dd.isMouseOver||(t._isSelectElement?t._dd.isItemFocused?t._dd.selectFocusItem():(null!==t._selectedItem&&""!==t._$el.val()||(""!==t._$el.val()&&null!==t._defaultValue?(t._$el.val(t._defaultText),t._selectHiddenField.val(t._defaultValue)):(t._$el.val(""),t._selectHiddenField.val("")),t._selectedItem=null),t._$el.trigger("autocomplete.select",t._selectedItem)):null===t._selectedItem&&t._$el.trigger("autocomplete.freevalue",t._$el.val()),t._dd.hide())}),this._$el.on("autocomplete.select",function(e,s){t._selectedItem=s,t.itemSelectedDefaultHandler(s)}),this._$el.on("paste",function(e){setTimeout(function(){t._$el.trigger("keyup",e)},0)})},i.prototype.handlerTyped=function(t){null!==this._settings.events.typed&&!(t=this._settings.events.typed(t,this._$el))||(t.length>=this._settings.minLength?(this._searchText=t,this.handlerPreSearch()):this._dd.hide())},i.prototype.handlerPreSearch=function(){if(null!==this._settings.events.searchPre){var t=this._settings.events.searchPre(this._searchText,this._$el);if(!t)return;this._searchText=t}this.handlerDoSearch()},i.prototype.handlerDoSearch=function(){var t=this;null!==this._settings.events.search?this._settings.events.search(this._searchText,function(e){t.postSearchCallback(e)},this._$el):this.resolver&&this.resolver.search(this._searchText,function(e){t.postSearchCallback(e)})},i.prototype.postSearchCallback=function(t){this._settings.events.searchPost&&"boolean"==typeof(t=this._settings.events.searchPost(t,this._$el))&&!t||this.handlerStartShow(t)},i.prototype.handlerStartShow=function(t){this._dd.updateItems(t,this._searchText)},i.prototype.itemSelectedDefaultHandler=function(t){var e;null!=t?("string"==typeof(e=this._settings.formatResult(t))&&(e={text:e}),this._$el.val(e.text),this._isSelectElement&&this._selectHiddenField.val(e.value)):(this._$el.val(""),this._isSelectElement&&this._selectHiddenField.val("")),this._selectedItem=t,this._dd.hide()},i.prototype.defaultFormatResult=function(t){return"string"==typeof t?{text:t}:t.text?t:{text:t.toString()}},i.prototype.manageAPI=function(t,e){"set"===t?this.itemSelectedDefaultHandler(e):"clear"===t?this.itemSelectedDefaultHandler(null):"show"===t?this._$el.trigger("keyup"):"updateResolver"===t&&(this.resolver=new c(e))},i.NAME="autoComplete",i);d=jQuery,window,document,d.fn[_.NAME]=function(t,e){return this.each(function(){var s;(s=d(this).data(_.NAME))||(s=new _(this,t),d(this).data(_.NAME,s)),s.manageAPI(t,e)})}}]);
/**
 * Project: Shortening the long text
 * Dependencies: jQuery,Collapser - Plugin v2.0
 * Author: Dirk Meinke
 * Homepage: http://www.die-netzwerkstatt.de/
 */
$(document).ready(function(){var t=$(".tx-nwsmunicipalstatutes-collapse-text"),e=t.data("showtext"),a=t.data("hidetext");t.collapser({mode:"lines",truncate:6,showText:e,hideText:a,controlBtn:"btn btn-default btn-secondary"})});
/* jQuery - Collapser - Plugin v2.0 www.aakashweb.com (c) 2014 Aakash Chakravarthy MIT License. */
!function(t,e,o,i){function a(e,o){this.o=t.extend({},n,o),this.e=t(e),this.init()}var n={target:"next",mode:"words",speed:"slow",truncate:10,ellipsis:"...",effect:"fade",controlBtn:"",showText:"Show more",hideText:"Hide text",showClass:"show-class",hideClass:"hide-class",atStart:"hide",lockHide:!1,dynamic:!1,changeText:!1,beforeShow:null,afterShow:null,beforeHide:null,afterHide:null};a.prototype={init:function(){var o=this;o.mode=o.o.mode,o.remaining={},o.ctrlHtml=' <a href="#" data-ctrl class="'+(t.isFunction(o.o.controlBtn)?"":o.o.controlBtn)+'"></a>',t(o.e).each(function(){t(this).data("oCnt",o.e.html());var e=t.isFunction(o.o.atStart)?o.o.atStart.call(o.e):o.o.atStart,e="undefined"!=typeof o.e.attr("data-start")?o.e.attr("data-start"):e;"hide"==e?o.hide(o.e,0):o.show(o.e,0)});var i;t(e).on("resize",function(){o.o.dynamic&&"lines"==o.mode&&(clearTimeout(i),i=setTimeout(function(){o.reInit(o.e)},100))})},show:function(e,o){var i=this,a=t(e);"undefined"==typeof o&&(o=i.o.speed);var n=function(){t.isFunction(i.o.afterShow)&&i.o.afterShow.call(i.e,i)};switch(t.isFunction(i.o.beforeShow)&&i.o.beforeShow.call(i.e,i),i.mode){case"chars":case"words":var s=a.height();a.html(a.data("tHTML"));var l=a.height();a.height(s),a.animate({height:l},o,function(){a.height("auto"),n()}).removeClass(i.o.hideClass).addClass(i.o.showClass),a.data("tHTML",a.html());break;case"lines":0==a.children("div").length&&a.wrapInner("<div>");var c=a.children("div"),s=c.height(),l=c.html(a.data("oCnt")).css("height","").height();c.css("height",s),c.animate({height:l},o,function(){c.height("auto"),n()}),a.removeClass(i.o.hideClass).addClass(i.o.showClass);break;case"block":i.blockMode(a,"show",o,n)}return i.status=1,1==i.o.lockHide?(a.find("[data-ctrl]").remove(),""):void("block"==i.mode?a.off("click.coll").on("click.coll",function(t){t.preventDefault(),i.hide(a)}):(0!=a.find("[data-ctrl]").length||t.isFunction(i.o.controlBtn)||a.append(i.ctrlHtml),i.ctrlBtn=t.isFunction(i.o.controlBtn)?i.o.controlBtn.call(i.e):t(a.find("[data-ctrl]")),i.ctrlBtn.off("click.coll").on("click.coll",function(t){t.preventDefault(),i.hide(a)}).html(i.o.hideText)))},hide:function(e,o){var i=this,a=t(e);"undefined"==typeof o&&(o=i.o.speed);var n=function(){t.isFunction(i.o.afterHide)&&i.o.afterHide.call(i.e,i)};switch(t.isFunction(i.o.beforeHide)&&i.o.beforeHide.call(i.e,i),a.find("[data-ctrl]").remove(),i.mode){case"chars":var s=t.trim(a.text());i.remaining.chars=s.length-i.o.truncate,s.length>i.o.truncate&&(a.data("tHTML",a.html()),s=i.pad(s.slice(0,i.o.truncate),s.slice(i.o.truncate,s.length)),a.html(s).removeClass(i.o.showClass).addClass(i.o.hideClass),n());break;case"words":s=t.trim(a.text()),s=s.split(" "),i.remaining.words=s.length-i.o.truncate,s.length>i.o.truncate&&(a.data("tHTML",a.html()),s=i.pad(s.slice(0,i.o.truncate).join(" "),s.slice(i.o.truncate,s.length).join(" ")),a.html(s).removeClass(i.o.showClass).addClass(i.o.hideClass),n());break;case"lines":0==a.children("div").length&&a.wrapInner("<div>"),s=a.children("div").css("height",""),s.html(s.text());var l=s.height();"undefined"==typeof a.data("lHeight")?(temp=s.clone(),lHeight=temp.text("a").insertAfter(s).height(),a.data("lHeight",lHeight),s.next().remove()):lHeight=a.data("lHeight"),lines=l/lHeight,i.remaining.lines=lines-i.o.truncate,0<i.remaining.lines&&(s.css("overflow","hidden"),s.animate({height:lHeight*i.o.truncate},o).data("tHeight",l),a.removeClass(i.o.showClass).addClass(i.o.hideClass),0!=a.find("[data-ctrl]").length||t.isFunction(i.o.controlBtn)||a.append(i.ctrlHtml),n());break;case"block":i.blockMode(a,"hide",o,n)}i.status=0,"block"==i.mode?a.unbind("click.coll").bind("click.coll",function(t){t.preventDefault(),i.show(a)}):(i.ctrlBtn=t.isFunction(i.o.controlBtn)?i.o.controlBtn.call(i.e):t(a.find("[data-ctrl]")),i.ctrlBtn.off("click.coll").on("click.coll",function(t){t.preventDefault(),i.show(a)}).html(i.o.showText),n=i.o.showText,s={chars:["character","characters"],words:["word","words"],lines:["lines","lines"]},n=n.replace("%s",i.remaining[i.mode]+(1==i.remaining[i.mode]?" "+s[i.mode][0]:" "+s[i.mode][1])),i.ctrlBtn.html(n))},pad:function(e,o){return e+'<span class="coll-ellipsis">'+this.o.ellipsis+"</span>"+(t.isFunction(this.o.ctrlBtn)?"":this.ctrlHtml)+'<span class="coll-hidden" style="display:none">'+o+"</span>"},blockMode:function(e,o,i,a){var n=["fadeOut","slideUp","fadeIn","slideDown"],s="fade"==this.o.effect?0:1,n="hide"==o?n[s]:n[s+2];t.isFunction(this.o.target)?this.o.target.call(this.e)[n](i,a):t.fn[this.o.target]&&t(e)[this.o.target]()[n](i,a),"show"==o?(e.removeClass(this.o.showClass).addClass(this.o.hideClass),this.o.changeText&&e.text(this.o.hideText)):(e.removeClass(this.o.hideClass).addClass(this.o.showClass),this.o.changeText&&e.text(this.o.showText))},reInit:function(t){t.find("[data-ctrl]").remove(),t.html(this.e.data("oCnt")),0==this.status?this.hide(t,0):this.show(t,0)}},t.fn.collapser=function(e){return this.each(function(){t.data(this,"collapser")||t.data(this,"collapser",new a(this,e))})}}(jQuery,window,document);
/**
 * Project: local law
 * Dependencies: jQuery,plugin bootstrap collapse
 * Author: Dirk Meinke
 * Homepage: http://www.die-netzwerkstatt.de/
 */
$(document).ready(function(){"undefined"!=typeof NwsMunicipalStatutesId&&$("#lg"+NwsMunicipalStatutesId+"Cont").collapse({show:!0})});
/**
 * Project: local law
 * Dependencies: jQuery,plugin LoadingOverlay
 * Author: Dirk Meinke
 * Homepage: http://www.die-netzwerkstatt.de/
 */
$("document").ready(function(){$("#tx-nwsmunicipalstatutes-clearButton, #tx-nwsmunicipalstatutes-searchButton").click(function(){$(".tx-nwsmunicipalstatutes-content").LoadingOverlay("show")})});
/***************************************************************************************************
LoadingOverlay - A flexible loading overlay jQuery plugin
    Author          : Gaspare Sganga
    Version         : 2.1.7
    License         : MIT
    Documentation   : https://gasparesganga.com/labs/jquery-loading-overlay/
***************************************************************************************************/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(e,s){"use strict";function t(s,t){s=e(s),t.size=p(t.size),t.maxSize=parseInt(t.maxSize,10)||0,t.minSize=parseInt(t.minSize,10)||0,t.resizeInterval=parseInt(t.resizeInterval,10)||0;var a=l(s),o=g(s);if(o===!1){if(o=e.extend({},x),o.container=s,o.wholePage=s.is("body"),a=e("<div>",{"class":"loadingoverlay"}).css(v.overlay).css("flex-direction","row"===t.direction.toLowerCase()?"row":"column"),t.backgroundClass?a.addClass(t.backgroundClass):a.css("background",t.background),o.wholePage&&a.css({position:"fixed",top:0,left:0,width:"100%",height:"100%"}),"undefined"!=typeof t.zIndex&&a.css("z-index",t.zIndex),t.image){e.isArray(t.imageColor)?0===t.imageColor.length?t.imageColor=!1:1===t.imageColor.length?t.imageColor={fill:t.imageColor[0]}:t.imageColor={fill:t.imageColor[0],stroke:t.imageColor[1]}:t.imageColor&&(t.imageColor={fill:t.imageColor});var r=c(a,t.imageOrder,t.imageAutoResize,t.imageResizeFactor,t.imageAnimation);"<svg"===t.image.slice(0,4).toLowerCase()&&"</svg>"===t.image.slice(-6).toLowerCase()?(r.append(t.image),r.children().css(v.element_svg),!t.imageClass&&t.imageColor&&r.find("*").css(t.imageColor)):".svg"===t.image.slice(-4).toLowerCase()||"data:image/svg"===t.image.slice(0,14).toLowerCase()?e.ajax({url:t.image,type:"GET",dataType:"html",global:!1}).done(function(e){r.html(e),r.children().css(v.element_svg),!t.imageClass&&t.imageColor&&r.find("*").css(t.imageColor)}):r.css({"background-image":"url("+t.image+")","background-position":"center","background-repeat":"no-repeat","background-size":"cover"}),t.imageClass&&r.addClass(t.imageClass)}if(t.fontawesome){var r=c(a,t.fontawesomeOrder,t.fontawesomeAutoResize,t.fontawesomeResizeFactor,t.fontawesomeAnimation).addClass("loadingoverlay_fa");e("<div>",{"class":t.fontawesome}).appendTo(r),t.fontawesomeColor&&r.css("color",t.fontawesomeColor)}if(t.custom)var r=c(a,t.customOrder,t.customAutoResize,t.customResizeFactor,t.customAnimation).append(t.custom);if(t.text&&(o.text=c(a,t.textOrder,t.textAutoResize,t.textResizeFactor,t.textAnimation).addClass("loadingoverlay_text").text(t.text),t.textClass?o.text.addClass(t.textClass):t.textColor&&o.text.css("color",t.textColor)),t.progress){var r=c(a,t.progressOrder,t.progressAutoResize,t.progressResizeFactor,!1).addClass("loadingoverlay_progress"),i=e("<div>").css(v.progress_wrapper).appendTo(r);o.progress={bar:e("<div>").css(v.progress_bar).appendTo(i),fixed:!1,margin:0,min:parseFloat(t.progressMin),max:parseFloat(t.progressMax),speed:parseInt(t.progressSpeed,10)};var d=(t.progressFixedPosition+"").replace(/\s\s+/g," ").toLowerCase().split(" ");2===d.length&&f(d[0])?(o.progress.fixed=d[0],o.progress.margin=p(d[1])):2===d.length&&f(d[1])?(o.progress.fixed=d[1],o.progress.margin=p(d[0])):1===d.length&&f(d[0])&&(o.progress.fixed=d[0],o.progress.margin=0),"top"===o.progress.fixed?r.css(v.progress_fixed).css("top",o.progress.margin?o.progress.margin.value+(o.progress.margin.fixed?o.progress.margin.units:"%"):0):"bottom"===o.progress.fixed&&r.css(v.progress_fixed).css("top","auto"),t.progressClass?o.progress.bar.addClass(t.progressClass):t.progressColor&&o.progress.bar.css("background",t.progressColor)}t.fade?t.fade===!0?t.fade=h.fade:"string"==typeof t.fade||"number"==typeof t.fade?t.fade=[t.fade,t.fade]:e.isArray(t.fade)&&t.fade.length<2&&(t.fade=[t.fade[0],t.fade[0]]):t.fade=[0,0],t.fade=[parseInt(t.fade[0],10),parseInt(t.fade[1],10)],o.settings=t,a.data("loadingoverlay_data",o),s.data("loadingoverlay",a),a.fadeTo(0,.01).appendTo("body"),n(s,!0),t.resizeInterval>0&&(o.resizeIntervalId=setInterval(function(){n(s,!1)},t.resizeInterval)),a.fadeTo(t.fade[0],1)}o.count++}function a(s,t){s=e(s);var a=l(s),o=g(s);o!==!1&&(o.count--,(t||o.count<=0)&&a.animate({opacity:0},o.settings.fade[1],function(){o.resizeIntervalId&&clearInterval(o.resizeIntervalId),e(this).remove(),s.removeData("loadingoverlay")}))}function o(s){n(e(s),!0)}function r(s,t){s=e(s);var a=g(s);a!==!1&&a.text&&(t===!1?a.text.hide():a.text.show().text(t))}function i(s,t){s=e(s);var a=g(s);if(a!==!1&&a.progress)if(t===!1)a.progress.bar.hide();else{var o=100*((parseFloat(t)||0)-a.progress.min)/(a.progress.max-a.progress.min);o<0&&(o=0),o>100&&(o=100),a.progress.bar.show().animate({width:o+"%"},a.progress.speed)}}function n(s,t){var a=l(s),o=g(s);if(o!==!1){if(!o.wholePage){var r="fixed"===s.css("position"),i=r?s[0].getBoundingClientRect():s.offset();a.css({position:r?"fixed":"absolute",top:i.top+parseInt(s.css("border-top-width"),10),left:i.left+parseInt(s.css("border-left-width"),10),width:s.innerWidth(),height:s.innerHeight()})}if(o.settings.size){var n=o.wholePage?e(window):s,c=o.settings.size.value;o.settings.size.fixed||(c=Math.min(n.innerWidth(),n.innerHeight())*c/100,o.settings.maxSize&&c>o.settings.maxSize&&(c=o.settings.maxSize),o.settings.minSize&&c<o.settings.minSize&&(c=o.settings.minSize)),a.children(".loadingoverlay_element").each(function(){var s=e(this);if(t||s.data("loadingoverlay_autoresize")){var a=s.data("loadingoverlay_resizefactor");s.hasClass("loadingoverlay_fa")||s.hasClass("loadingoverlay_text")?s.css("font-size",c*a+o.settings.size.units):s.hasClass("loadingoverlay_progress")?(o.progress.bar.css("height",c*a+o.settings.size.units),o.progress.fixed?"bottom"===o.progress.fixed&&s.css("bottom",o.progress.margin?o.progress.margin.value+(o.progress.margin.fixed?o.progress.margin.units:"%"):0).css("bottom","+="+c*a+o.settings.size.units):o.progress.bar.css("top",s.position().top).css("top","-="+c*a*.5+o.settings.size.units)):s.css({width:c*a+o.settings.size.units,height:c*a+o.settings.size.units})}})}}}function l(e){return e.data("loadingoverlay")}function g(t){var a=l(t),o="undefined"==typeof a?s:a.data("loadingoverlay_data");return"undefined"==typeof o?(e(".loadingoverlay").each(function(){var s=e(this),t=s.data("loadingoverlay_data");document.body.contains(t.container[0])||(t.resizeIntervalId&&clearInterval(t.resizeIntervalId),s.remove())}),!1):(a.toggle(t.is(":visible")),o)}function c(s,t,a,o,r){var i=e("<div>",{"class":"loadingoverlay_element",css:{order:t}}).css(v.element).data({loadingoverlay_autoresize:a,loadingoverlay_resizefactor:o}).appendTo(s);if(r===!0&&(r=h.animations.time+" "+h.animations.name),"string"==typeof r){var n,l,g=r.replace(/\s\s+/g," ").toLowerCase().split(" ");2===g.length&&d(g[0])&&m(g[1])?(n=g[1],l=g[0]):2===g.length&&d(g[1])&&m(g[0])?(n=g[0],l=g[1]):1===g.length&&d(g[0])?(n=h.animations.name,l=g[0]):1===g.length&&m(g[0])&&(n=g[0],l=h.animations.time),i.css({"animation-name":"loadingoverlay_animation__"+n,"animation-duration":l,"animation-timing-function":"linear","animation-iteration-count":"infinite"})}return i}function d(e){return!isNaN(parseFloat(e))&&("s"===e.slice(-1)||"ms"===e.slice(-2))}function m(e){return y.animations.indexOf(e)>-1}function f(e){return y.progressPosition.indexOf(e)>-1}function p(e){return!(!e||e<0)&&("string"==typeof e&&["vmin","vmax"].indexOf(e.slice(-4))>-1?{fixed:!0,units:e.slice(-4),value:e.slice(0,-4)}:"string"==typeof e&&["rem"].indexOf(e.slice(-3))>-1?{fixed:!0,units:e.slice(-3),value:e.slice(0,-3)}:"string"==typeof e&&["px","em","cm","mm","in","pt","pc","vh","vw"].indexOf(e.slice(-2))>-1?{fixed:!0,units:e.slice(-2),value:e.slice(0,-2)}:{fixed:!1,units:"px",value:parseFloat(e)})}var u={background:"rgba(255, 255, 255, 0.8)",backgroundClass:"",image:"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'><circle r='80' cx='500' cy='90'/><circle r='80' cx='500' cy='910'/><circle r='80' cx='90' cy='500'/><circle r='80' cx='910' cy='500'/><circle r='80' cx='212' cy='212'/><circle r='80' cx='788' cy='212'/><circle r='80' cx='212' cy='788'/><circle r='80' cx='788' cy='788'/></svg>",imageAnimation:"2000ms rotate_right",imageAutoResize:!0,imageResizeFactor:1,imageColor:"#202020",imageClass:"",imageOrder:1,fontawesome:"",fontawesomeAnimation:"",fontawesomeAutoResize:!0,fontawesomeResizeFactor:1,fontawesomeColor:"#202020",fontawesomeOrder:2,custom:"",customAnimation:"",customAutoResize:!0,customResizeFactor:1,customOrder:3,text:"",textAnimation:"",textAutoResize:!0,textResizeFactor:.5,textColor:"#202020",textClass:"",textOrder:4,progress:!1,progressAutoResize:!0,progressResizeFactor:.25,progressColor:"#a0a0a0",progressClass:"",progressOrder:5,progressFixedPosition:"",progressSpeed:200,progressMin:0,progressMax:100,size:50,maxSize:120,minSize:20,direction:"column",fade:!0,resizeInterval:50,zIndex:2147483647},v={overlay:{"box-sizing":"border-box",position:"relative",display:"flex","flex-wrap":"nowrap","align-items":"center","justify-content":"space-around"},element:{"box-sizing":"border-box",overflow:"visible",flex:"0 0 auto",display:"flex","justify-content":"center","align-items":"center"},element_svg:{width:"100%",height:"100%"},progress_fixed:{position:"absolute",left:"0",width:"100%"},progress_wrapper:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},progress_bar:{position:"absolute",left:"0"}},x={count:0,container:s,settings:s,wholePage:s,resizeIntervalId:s,text:s,progress:s},y={animations:["rotate_right","rotate_left","fadein","pulse"],progressPosition:["top","bottom"]},h={animations:{name:"rotate_right",time:"2000ms"},fade:[400,200]};e.LoadingOverlaySetup=function(s){e.extend(!0,u,s)},e.LoadingOverlay=function(s,n){switch(s.toLowerCase()){case"show":t("body",e.extend(!0,{},u,n));break;case"hide":a("body",n);break;case"resize":o("body",n);break;case"text":r("body",n);break;case"progress":i("body",n)}},e.fn.LoadingOverlay=function(s,n){switch(s.toLowerCase()){case"show":return this.each(function(){t(this,e.extend(!0,{},u,n))});case"hide":return this.each(function(){a(this,n)});case"resize":return this.each(function(){o(this,n)});case"text":return this.each(function(){r(this,n)});case"progress":return this.each(function(){i(this,n)})}},e(function(){e("head").append(["<style>","@-webkit-keyframes loadingoverlay_animation__rotate_right {","to {","-webkit-transform : rotate(360deg);","transform : rotate(360deg);","}","}","@keyframes loadingoverlay_animation__rotate_right {","to {","-webkit-transform : rotate(360deg);","transform : rotate(360deg);","}","}","@-webkit-keyframes loadingoverlay_animation__rotate_left {","to {","-webkit-transform : rotate(-360deg);","transform : rotate(-360deg);","}","}","@keyframes loadingoverlay_animation__rotate_left {","to {","-webkit-transform : rotate(-360deg);","transform : rotate(-360deg);","}","}","@-webkit-keyframes loadingoverlay_animation__fadein {","0% {","opacity   : 0;","-webkit-transform : scale(0.1, 0.1);","transform : scale(0.1, 0.1);","}","50% {","opacity   : 1;","}","100% {","opacity   : 0;","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","}","@keyframes loadingoverlay_animation__fadein {","0% {","opacity   : 0;","-webkit-transform : scale(0.1, 0.1);","transform : scale(0.1, 0.1);","}","50% {","opacity   : 1;","}","100% {","opacity   : 0;","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","}","@-webkit-keyframes loadingoverlay_animation__pulse {","0% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","50% {","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","100% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","}","@keyframes loadingoverlay_animation__pulse {","0% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","50% {","-webkit-transform : scale(1, 1);","transform : scale(1, 1);","}","100% {","-webkit-transform : scale(0, 0);","transform : scale(0, 0);","}","}","</style>"].join(" "))})});