var markerClusterer=function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=s(t);if(e){var o=s(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return function(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,i)}}function h(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},d=function(t){return t&&t.Math==Math&&t},p=d("object"==typeof globalThis&&globalThis)||d("object"==typeof window&&window)||d("object"==typeof self&&self)||d("object"==typeof c&&c)||function(){return this}()||Function("return this")(),_={},m=function(t){try{return!!t()}catch(t){return!0}},f=!m((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),g=!m((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),v=g,y=Function.prototype.call,b=v?y.bind(y):function(){return y.apply(y,arguments)},L={},x={}.propertyIsEnumerable,w=Object.getOwnPropertyDescriptor,k=w&&!x.call({1:2},1);L.f=k?function(t){var e=w(this,t);return!!e&&e.enumerable}:x;var P,S,C=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},M=g,T=Function.prototype,z=T.bind,A=T.call,E=M&&z.bind(A,A),O=M?function(t){return t&&E(t)}:function(t){return t&&function(){return A.apply(t,arguments)}},I=O,j=I({}.toString),Z=I("".slice),B=function(t){return Z(j(t),8,-1)},N=O,D=m,R=B,F=p.Object,G=N("".split),H=D((function(){return!F("z").propertyIsEnumerable(0)}))?function(t){return"String"==R(t)?G(t,""):F(t)}:F,q=p.TypeError,$=function(t){if(null==t)throw q("Can't call method on "+t);return t},V=H,W=$,U=function(t){return V(W(t))},Y=function(t){return"function"==typeof t},K=Y,X=function(t){return"object"==typeof t?null!==t:K(t)},J=p,Q=Y,tt=function(t,e){return arguments.length<2?function(t){return Q(t)?t:void 0}(J[t]):J[t]&&J[t][e]},et=O({}.isPrototypeOf),it=p,nt=tt("navigator","userAgent")||"",ot=it.process,st=it.Deno,rt=ot&&ot.versions||st&&st.version,at=rt&&rt.v8;at&&(S=(P=at.split("."))[0]>0&&P[0]<4?1:+(P[0]+P[1])),!S&&nt&&(!(P=nt.match(/Edge\/(\d+)/))||P[1]>=74)&&(P=nt.match(/Chrome\/(\d+)/))&&(S=+P[1]);var ht=S,ut=ht,lt=m,ct=!!Object.getOwnPropertySymbols&&!lt((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ut&&ut<41})),dt=ct&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,pt=tt,_t=Y,mt=et,ft=dt,gt=p.Object,vt=ft?function(t){return"symbol"==typeof t}:function(t){var e=pt("Symbol");return _t(e)&&mt(e.prototype,gt(t))},yt=p.String,bt=Y,Lt=p.TypeError,xt=function(t){if(bt(t))return t;throw Lt(function(t){try{return yt(t)}catch(t){return"Object"}}(t)+" is not a function")},wt=xt,kt=b,Pt=Y,St=X,Ct=p.TypeError,Mt={exports:{}},Tt=p,zt=Object.defineProperty,At=function(t,e){try{zt(Tt,t,{value:e,configurable:!0,writable:!0})}catch(i){Tt[t]=e}return e},Et=At,Ot="__core-js_shared__",It=p[Ot]||Et(Ot,{}),jt=It;(Mt.exports=function(t,e){return jt[t]||(jt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.22.2",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Zt=$,Bt=p.Object,Nt=function(t){return Bt(Zt(t))},Dt=Nt,Rt=O({}.hasOwnProperty),Ft=Object.hasOwn||function(t,e){return Rt(Dt(t),e)},Gt=O,Ht=0,qt=Math.random(),$t=Gt(1..toString),Vt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+$t(++Ht+qt,36)},Wt=p,Ut=Mt.exports,Yt=Ft,Kt=Vt,Xt=ct,Jt=dt,Qt=Ut("wks"),te=Wt.Symbol,ee=te&&te.for,ie=Jt?te:te&&te.withoutSetter||Kt,ne=function(t){if(!Yt(Qt,t)||!Xt&&"string"!=typeof Qt[t]){var e="Symbol."+t;Xt&&Yt(te,t)?Qt[t]=te[t]:Qt[t]=Jt&&ee?ee(e):ie(e)}return Qt[t]},oe=b,se=X,re=vt,ae=ne,he=p.TypeError,ue=ae("toPrimitive"),le=function(t,e){if(!se(t)||re(t))return t;var i,n=function(t,e){var i=t[e];return null==i?void 0:wt(i)}(t,ue);if(n){if(void 0===e&&(e="default"),i=oe(n,t,e),!se(i)||re(i))return i;throw he("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var i,n;if("string"===e&&Pt(i=t.toString)&&!St(n=kt(i,t)))return n;if(Pt(i=t.valueOf)&&!St(n=kt(i,t)))return n;if("string"!==e&&Pt(i=t.toString)&&!St(n=kt(i,t)))return n;throw Ct("Can't convert object to primitive value")}(t,e)},ce=le,de=vt,pe=function(t){var e=ce(t,"string");return de(e)?e:e+""},_e=X,me=p.document,fe=_e(me)&&_e(me.createElement),ge=function(t){return fe?me.createElement(t):{}},ve=ge,ye=!f&&!m((function(){return 7!=Object.defineProperty(ve("div"),"a",{get:function(){return 7}}).a})),be=f,Le=b,xe=L,we=C,ke=U,Pe=pe,Se=Ft,Ce=ye,Me=Object.getOwnPropertyDescriptor;_.f=be?Me:function(t,e){if(t=ke(t),e=Pe(e),Ce)try{return Me(t,e)}catch(t){}if(Se(t,e))return we(!Le(xe.f,t,e),t[e])};var Te={},ze=f&&m((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ae=p,Ee=X,Oe=Ae.String,Ie=Ae.TypeError,je=function(t){if(Ee(t))return t;throw Ie(Oe(t)+" is not an object")},Ze=f,Be=ye,Ne=ze,De=je,Re=pe,Fe=p.TypeError,Ge=Object.defineProperty,He=Object.getOwnPropertyDescriptor;Te.f=Ze?Ne?function(t,e,i){if(De(t),e=Re(e),De(i),"function"==typeof t&&"prototype"===e&&"value"in i&&"writable"in i&&!i.writable){var n=He(t,e);n&&n.writable&&(t[e]=i.value,i={configurable:"configurable"in i?i.configurable:n.configurable,enumerable:"enumerable"in i?i.enumerable:n.enumerable,writable:!1})}return Ge(t,e,i)}:Ge:function(t,e,i){if(De(t),e=Re(e),De(i),Be)try{return Ge(t,e,i)}catch(t){}if("get"in i||"set"in i)throw Fe("Accessors not supported");return"value"in i&&(t[e]=i.value),t};var qe=Te,$e=C,Ve=f?function(t,e,i){return qe.f(t,e,$e(1,i))}:function(t,e,i){return t[e]=i,t},We={exports:{}},Ue=Y,Ye=It,Ke=O(Function.toString);Ue(Ye.inspectSource)||(Ye.inspectSource=function(t){return Ke(t)});var Xe,Je,Qe,ti=Ye.inspectSource,ei=Y,ii=ti,ni=p.WeakMap,oi=ei(ni)&&/native code/.test(ii(ni)),si=Mt.exports,ri=Vt,ai=si("keys"),hi=function(t){return ai[t]||(ai[t]=ri(t))},ui={},li=oi,ci=p,di=O,pi=X,_i=Ve,mi=Ft,fi=It,gi=hi,vi=ui,yi="Object already initialized",bi=ci.TypeError,Li=ci.WeakMap;if(li||fi.state){var xi=fi.state||(fi.state=new Li),wi=di(xi.get),ki=di(xi.has),Pi=di(xi.set);Xe=function(t,e){if(ki(xi,t))throw new bi(yi);return e.facade=t,Pi(xi,t,e),e},Je=function(t){return wi(xi,t)||{}},Qe=function(t){return ki(xi,t)}}else{var Si=gi("state");vi[Si]=!0,Xe=function(t,e){if(mi(t,Si))throw new bi(yi);return e.facade=t,_i(t,Si,e),e},Je=function(t){return mi(t,Si)?t[Si]:{}},Qe=function(t){return mi(t,Si)}}var Ci={set:Xe,get:Je,has:Qe,enforce:function(t){return Qe(t)?Je(t):Xe(t,{})},getterFor:function(t){return function(e){var i;if(!pi(e)||(i=Je(e)).type!==t)throw bi("Incompatible receiver, "+t+" required");return i}}},Mi=f,Ti=Ft,zi=Function.prototype,Ai=Mi&&Object.getOwnPropertyDescriptor,Ei=Ti(zi,"name"),Oi=Ei&&(!Mi||Mi&&Ai(zi,"name").configurable),Ii=p,ji=Y,Zi=Ft,Bi=Ve,Ni=At,Di=ti,Ri=Oi,Fi=Ci.get,Gi=Ci.enforce,Hi=String(String).split("String");(We.exports=function(t,e,i,n){var o,s=!!n&&!!n.unsafe,r=!!n&&!!n.enumerable,a=!!n&&!!n.noTargetGet,h=n&&void 0!==n.name?n.name:e;ji(i)&&("Symbol("===String(h).slice(0,7)&&(h="["+String(h).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Zi(i,"name")||Ri&&i.name!==h)&&Bi(i,"name",h),(o=Gi(i)).source||(o.source=Hi.join("string"==typeof h?h:""))),t!==Ii?(s?!a&&t[e]&&(r=!0):delete t[e],r?t[e]=i:Bi(t,e,i)):r?t[e]=i:Ni(e,i)})(Function.prototype,"toString",(function(){return ji(this)&&Fi(this).source||Di(this)}));var qi={},$i=Math.ceil,Vi=Math.floor,Wi=function(t){var e=+t;return e!=e||0===e?0:(e>0?Vi:$i)(e)},Ui=Wi,Yi=Math.max,Ki=Math.min,Xi=function(t,e){var i=Ui(t);return i<0?Yi(i+e,0):Ki(i,e)},Ji=Wi,Qi=Math.min,tn=function(t){return function(t){return t>0?Qi(Ji(t),9007199254740991):0}(t.length)},en=U,nn=Xi,on=tn,sn=function(t){return function(e,i,n){var o,s=en(e),r=on(s),a=nn(n,r);if(t&&i!=i){for(;r>a;)if((o=s[a++])!=o)return!0}else for(;r>a;a++)if((t||a in s)&&s[a]===i)return t||a||0;return!t&&-1}},rn={includes:sn(!0),indexOf:sn(!1)},an=Ft,hn=U,un=rn.indexOf,ln=ui,cn=O([].push),dn=function(t,e){var i,n=hn(t),o=0,s=[];for(i in n)!an(ln,i)&&an(n,i)&&cn(s,i);for(;e.length>o;)an(n,i=e[o++])&&(~un(s,i)||cn(s,i));return s},pn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_n=dn,mn=pn.concat("length","prototype");qi.f=Object.getOwnPropertyNames||function(t){return _n(t,mn)};var fn={};fn.f=Object.getOwnPropertySymbols;var gn=tt,vn=qi,yn=fn,bn=je,Ln=O([].concat),xn=gn("Reflect","ownKeys")||function(t){var e=vn.f(bn(t)),i=yn.f;return i?Ln(e,i(t)):e},wn=Ft,kn=xn,Pn=_,Sn=Te,Cn=m,Mn=Y,Tn=/#|\.prototype\./,zn=function(t,e){var i=En[An(t)];return i==In||i!=On&&(Mn(e)?Cn(e):!!e)},An=zn.normalize=function(t){return String(t).replace(Tn,".").toLowerCase()},En=zn.data={},On=zn.NATIVE="N",In=zn.POLYFILL="P",jn=zn,Zn=p,Bn=_.f,Nn=Ve,Dn=We.exports,Rn=At,Fn=function(t,e,i){for(var n=kn(e),o=Sn.f,s=Pn.f,r=0;r<n.length;r++){var a=n[r];wn(t,a)||i&&wn(i,a)||o(t,a,s(e,a))}},Gn=jn,Hn=function(t,e){var i,n,o,s,r,a=t.target,h=t.global,u=t.stat;if(i=h?Zn:u?Zn[a]||Rn(a,{}):(Zn[a]||{}).prototype)for(n in e){if(s=e[n],o=t.noTargetGet?(r=Bn(i,n))&&r.value:i[n],!Gn(h?n:a+(u?".":"#")+n,t.forced)&&void 0!==o){if(typeof s==typeof o)continue;Fn(s,o)}(t.sham||o&&o.sham)&&Nn(s,"sham",!0),Dn(i,n,s,t)}},qn=xt,$n=g,Vn=O(O.bind),Wn=B,Un=Array.isArray||function(t){return"Array"==Wn(t)},Yn={};Yn[ne("toStringTag")]="z";var Kn="[object z]"===String(Yn),Xn=p,Jn=Kn,Qn=Y,to=B,eo=ne("toStringTag"),io=Xn.Object,no="Arguments"==to(function(){return arguments}()),oo=Jn?to:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=io(t),eo))?i:no?to(e):"Object"==(n=to(e))&&Qn(e.callee)?"Arguments":n},so=O,ro=m,ao=Y,ho=oo,uo=ti,lo=function(){},co=[],po=tt("Reflect","construct"),_o=/^\s*(?:class|function)\b/,mo=so(_o.exec),fo=!_o.exec(lo),go=function(t){if(!ao(t))return!1;try{return po(lo,co,t),!0}catch(t){return!1}},vo=function(t){if(!ao(t))return!1;switch(ho(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fo||!!mo(_o,uo(t))}catch(t){return!0}};vo.sham=!0;var yo=!po||ro((function(){var t;return go(go.call)||!go(Object)||!go((function(){t=!0}))||t}))?vo:go,bo=p,Lo=Un,xo=yo,wo=X,ko=ne("species"),Po=bo.Array,So=function(t,e){return new(function(t){var e;return Lo(t)&&(e=t.constructor,(xo(e)&&(e===Po||Lo(e.prototype))||wo(e)&&null===(e=e[ko]))&&(e=void 0)),void 0===e?Po:e}(t))(0===e?0:e)},Co=H,Mo=Nt,To=tn,zo=So,Ao=O([].push),Eo=function(t){var e=1==t,i=2==t,n=3==t,o=4==t,s=6==t,r=7==t,a=5==t||s;return function(h,u,l,c){for(var d,p,_=Mo(h),m=Co(_),f=function(t,e){return qn(t),void 0===e?t:$n?Vn(t,e):function(){return t.apply(e,arguments)}}(u,l),g=To(m),v=0,y=c||zo,b=e?y(h,g):i||r?y(h,0):void 0;g>v;v++)if((a||v in m)&&(p=f(d=m[v],v,_),t))if(e)b[v]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return v;case 2:Ao(b,d)}else switch(t){case 4:return!1;case 7:Ao(b,d)}return s?-1:n||o?o:b}},Oo={forEach:Eo(0),map:Eo(1),filter:Eo(2),some:Eo(3),every:Eo(4),find:Eo(5),findIndex:Eo(6),filterReject:Eo(7)},Io=m,jo=ht,Zo=ne("species"),Bo=function(t){return jo>=51||!Io((function(){var e=[];return(e.constructor={})[Zo]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},No=Oo.map;function Do(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(i[n[o]]=t[n[o]])}return i}Hn({target:"Array",proto:!0,forced:!Bo("map")},{map:function(t){return No(this,t,arguments.length>1?arguments[1]:void 0)}});var Ro=xt,Fo=Nt,Go=H,Ho=tn,qo=p.TypeError,$o=function(t){return function(e,i,n,o){Ro(i);var s=Fo(e),r=Go(s),a=Ho(s),h=t?a-1:0,u=t?-1:1;if(n<2)for(;;){if(h in r){o=r[h],h+=u;break}if(h+=u,t?h<0:a<=h)throw qo("Reduce of empty array with no initial value")}for(;t?h>=0:a>h;h+=u)h in r&&(o=i(o,r[h],h,s));return o}},Vo={left:$o(!1),right:$o(!0)},Wo=m,Uo=function(t,e){var i=[][t];return!!i&&Wo((function(){i.call(null,e||function(){return 1},1)}))},Yo="process"==B(p.process),Ko=Vo.left,Xo=ht,Jo=Yo;Hn({target:"Array",proto:!0,forced:!Uo("reduce")||!Jo&&Xo>79&&Xo<83},{reduce:function(t){var e=arguments.length;return Ko(this,t,e,e>1?arguments[1]:void 0)}});var Qo=oo,ts=Kn?{}.toString:function(){return"[object "+Qo(this)+"]"},es=Kn,is=We.exports,ns=ts;es||is(Object.prototype,"toString",ns,{unsafe:!0});var os=Oo.filter;Hn({target:"Array",proto:!0,forced:!Bo("filter")},{filter:function(t){return os(this,t,arguments.length>1?arguments[1]:void 0)}});var ss=function(){function t(i){var n=i.markers,o=i.position;e(this,t),this.markers=n,o&&(o instanceof google.maps.LatLng?this._position=o:this._position=new google.maps.LatLng(o))}return n(t,[{key:"bounds",get:function(){if(0!==this.markers.length||this._position)return this.markers.reduce((function(t,e){return t.extend(e.getPosition())}),new google.maps.LatLngBounds(this._position,this._position))}},{key:"position",get:function(){return this._position||this.bounds.getCenter()}},{key:"count",get:function(){return this.markers.filter((function(t){return t.getVisible()})).length}},{key:"push",value:function(t){this.markers.push(t)}},{key:"delete",value:function(){this.marker&&(this.marker.setMap(null),delete this.marker),this.markers.length=0}}]),t}(),rs=function(t,e,i,n){var o=as(t.getBounds(),e,n);return i.filter((function(t){return o.contains(t.getPosition())}))},as=function(t,e,i){var n=us(t,e),o=n.northEast,s=n.southWest,r=ls({northEast:o,southWest:s},i);return cs(r,e)},hs=function(t,e){var i=(e.lat-t.lat)*Math.PI/180,n=(e.lng-t.lng)*Math.PI/180,o=Math.sin(i/2)*Math.sin(i/2)+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*Math.sin(n/2)*Math.sin(n/2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371},us=function(t,e){return{northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}},ls=function(t,e){var i=t.northEast,n=t.southWest;return i.x+=e,i.y-=e,n.x-=e,n.y+=e,{northEast:i,southWest:n}},cs=function(t,e){var i=t.northEast,n=t.southWest,o=new google.maps.LatLngBounds;return o.extend(e.fromDivPixelToLatLng(i)),o.extend(e.fromDivPixelToLatLng(n)),o},ds=function(){function t(i){var n=i.maxZoom,o=void 0===n?16:n;e(this,t),this.maxZoom=o}return n(t,[{key:"noop",value:function(t){var e=t.markers;return _s(e)}}]),t}(),ps=function(t){o(s,t);var i=a(s);function s(t){var n;e(this,s);var o=t.viewportPadding,r=void 0===o?60:o,a=Do(t,["viewportPadding"]);return(n=i.call(this,a)).viewportPadding=60,n.viewportPadding=r,n}return n(s,[{key:"calculate",value:function(t){var e=t.markers,i=t.map,n=t.mapCanvasProjection;return i.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e,map:i,mapCanvasProjection:n}),changed:!1}:{clusters:this.cluster({markers:rs(i,n,e,this.viewportPadding),map:i,mapCanvasProjection:n})}}}]),s}(ds),_s=function(t){return t.map((function(t){return new ss({position:t.getPosition(),markers:[t]})}))},ms=ge("span").classList,fs=ms&&ms.constructor&&ms.constructor.prototype,gs=fs===Object.prototype?void 0:fs,vs=Oo.forEach,ys=p,bs={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ls=gs,xs=Uo("forEach")?[].forEach:function(t){return vs(this,t,arguments.length>1?arguments[1]:void 0)},ws=Ve,ks=function(t){if(t&&t.forEach!==xs)try{ws(t,"forEach",xs)}catch(e){t.forEach=xs}};for(var Ps in bs)bs[Ps]&&ks(ys[Ps]&&ys[Ps].prototype);ks(Ls);var Ss=b;Hn({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Ss(URL.prototype.toString,this)}});var Cs=function(t){o(s,t);var i=a(s);function s(t){var n;e(this,s);var o=t.maxDistance,r=void 0===o?4e4:o,a=t.gridSize,h=void 0===a?40:a,u=Do(t,["maxDistance","gridSize"]);return(n=i.call(this,u)).clusters=[],n.maxDistance=r,n.gridSize=h,n}return n(s,[{key:"cluster",value:function(t){var e=this,i=t.markers,n=t.map,o=t.mapCanvasProjection;return this.clusters=[],i.forEach((function(t){e.addToClosestCluster(t,n,o)})),this.clusters}},{key:"addToClosestCluster",value:function(t,e,i){for(var n=this.maxDistance,o=null,s=0;s<this.clusters.length;s++){var r=this.clusters[s],a=hs(r.bounds.getCenter().toJSON(),t.getPosition().toJSON());a<n&&(n=a,o=r)}if(o&&as(o.bounds,i,this.gridSize).contains(t.getPosition()))o.push(t);else{var h=new ss({markers:[t]});this.clusters.push(h)}}}]),s}(ps),Ms=function(t){o(s,t);var i=a(s);function s(t){e(this,s);var n=Do(t,[]);return i.call(this,n)}return n(s,[{key:"calculate",value:function(t){var e=t.markers,i=t.map,n=t.mapCanvasProjection;return{clusters:this.cluster({markers:e,map:i,mapCanvasProjection:n}),changed:!1}}},{key:"cluster",value:function(t){return this.noop(t)}}]),s}(ds),Ts=dn,zs=pn,As=Object.keys||function(t){return Ts(t,zs)},Es=f,Os=O,Is=b,js=m,Zs=As,Bs=fn,Ns=L,Ds=Nt,Rs=H,Fs=Object.assign,Gs=Object.defineProperty,Hs=Os([].concat),qs=!Fs||js((function(){if(Es&&1!==Fs({b:1},Fs(Gs({},"a",{enumerable:!0,get:function(){Gs(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol(),n="abcdefghijklmnopqrst";return t[i]=7,n.split("").forEach((function(t){e[t]=t})),7!=Fs({},t)[i]||Zs(Fs({},e)).join("")!=n}))?function(t,e){for(var i=Ds(t),n=arguments.length,o=1,s=Bs.f,r=Ns.f;n>o;)for(var a,h=Rs(arguments[o++]),u=s?Hs(Zs(h),s(h)):Zs(h),l=u.length,c=0;l>c;)a=u[c++],Es&&!Is(r,h,a)||(i[a]=h[a]);return i}:Fs;Hn({target:"Object",stat:!0,forced:Object.assign!==qs},{assign:qs});var $s={exports:{}};$s.exports=function(){function t(i,n,o,s,r,a){if(!(r-s<=o)){var h=s+r>>1;e(i,n,h,s,r,a%2),t(i,n,o,s,h-1,a+1),t(i,n,o,h+1,r,a+1)}}function e(t,n,o,s,r,a){for(;r>s;){if(r-s>600){var h=r-s+1,u=o-s+1,l=Math.log(h),c=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*c*(h-c)/h)*(u-h/2<0?-1:1);e(t,n,o,Math.max(s,Math.floor(o-u*c/h+d)),Math.min(r,Math.floor(o+(h-u)*c/h+d)),a)}var p=n[2*o+a],_=s,m=r;for(i(t,n,s,o),n[2*r+a]>p&&i(t,n,s,r);_<m;){for(i(t,n,_,m),_++,m--;n[2*_+a]<p;)_++;for(;n[2*m+a]>p;)m--}n[2*s+a]===p?i(t,n,s,m):i(t,n,++m,r),m<=o&&(s=m+1),o<=m&&(r=m-1)}}function i(t,e,i,o){n(t,i,o),n(e,2*i,2*o),n(e,2*i+1,2*o+1)}function n(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function o(t,e,i,n){var o=t-i,s=e-n;return o*o+s*s}var s=function(t){return t[0]},r=function(t){return t[1]},a=function(e,i,n,o,a){void 0===i&&(i=s),void 0===n&&(n=r),void 0===o&&(o=64),void 0===a&&(a=Float64Array),this.nodeSize=o,this.points=e;for(var h=e.length<65536?Uint16Array:Uint32Array,u=this.ids=new h(e.length),l=this.coords=new a(2*e.length),c=0;c<e.length;c++)u[c]=c,l[2*c]=i(e[c]),l[2*c+1]=n(e[c]);t(u,l,o,0,u.length-1,0)};return a.prototype.range=function(t,e,i,n){return function(t,e,i,n,o,s,r){for(var a,h,u=[0,t.length-1,0],l=[];u.length;){var c=u.pop(),d=u.pop(),p=u.pop();if(d-p<=r)for(var _=p;_<=d;_++)a=e[2*_],h=e[2*_+1],a>=i&&a<=o&&h>=n&&h<=s&&l.push(t[_]);else{var m=Math.floor((p+d)/2);a=e[2*m],h=e[2*m+1],a>=i&&a<=o&&h>=n&&h<=s&&l.push(t[m]);var f=(c+1)%2;(0===c?i<=a:n<=h)&&(u.push(p),u.push(m-1),u.push(f)),(0===c?o>=a:s>=h)&&(u.push(m+1),u.push(d),u.push(f))}}return l}(this.ids,this.coords,t,e,i,n,this.nodeSize)},a.prototype.within=function(t,e,i){return function(t,e,i,n,s,r){for(var a=[0,t.length-1,0],h=[],u=s*s;a.length;){var l=a.pop(),c=a.pop(),d=a.pop();if(c-d<=r)for(var p=d;p<=c;p++)o(e[2*p],e[2*p+1],i,n)<=u&&h.push(t[p]);else{var _=Math.floor((d+c)/2),m=e[2*_],f=e[2*_+1];o(m,f,i,n)<=u&&h.push(t[_]);var g=(l+1)%2;(0===l?i-s<=m:n-s<=f)&&(a.push(d),a.push(_-1),a.push(g)),(0===l?i+s>=m:n+s>=f)&&(a.push(_+1),a.push(c),a.push(g))}}return h}(this.ids,this.coords,t,e,i,this.nodeSize)},a}();var Vs=$s.exports;const Ws={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Us=Math.fround||(Ys=new Float32Array(1),t=>(Ys[0]=+t,Ys[0]));var Ys;class Ks{constructor(t){this.options=or(Object.create(Ws),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:e,minZoom:i,maxZoom:n,nodeSize:o}=this.options;t.length;this.points=t;let s=[];for(let e=0;e<t.length;e++)t[e].geometry&&s.push(Js(t[e],e));this.trees[n+1]=new Vs(s,sr,rr,o,Float32Array);for(let t=n;t>=i;t--){Date.now();s=this._cluster(s,t),this.trees[t]=new Vs(s,sr,rr,o,Float32Array)}return this}getClusters(t,e){let i=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)i=-180,o=180;else if(i>o){const t=this.getClusters([i,n,180,s],e),r=this.getClusters([-180,n,o,s],e);return t.concat(r)}const r=this.trees[this._limitZoom(e)],a=r.range(er(i),ir(s),er(o),ir(n)),h=[];for(const t of a){const e=r.points[t];h.push(e.numPoints?Qs(e):this.points[e.index])}return h}getChildren(t){const e=this._getOriginId(t),i=this._getOriginZoom(t),n="No cluster with the specified id.",o=this.trees[i];if(!o)throw new Error(n);const s=o.points[e];if(!s)throw new Error(n);const r=this.options.radius/(this.options.extent*Math.pow(2,i-1)),a=o.within(s.x,s.y,r),h=[];for(const e of a){const i=o.points[e];i.parentId===t&&h.push(i.numPoints?Qs(i):this.points[i.index])}if(0===h.length)throw new Error(n);return h}getLeaves(t,e,i){e=e||10,i=i||0;const n=[];return this._appendLeaves(n,t,e,i,0),n}getTile(t,e,i){const n=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:s,radius:r}=this.options,a=r/s,h=(i-a)/o,u=(i+1+a)/o,l={features:[]};return this._addTileFeatures(n.range((e-a)/o,h,(e+1+a)/o,u),n.points,e,i,o,l),0===e&&this._addTileFeatures(n.range(1-a/o,h,1,u),n.points,o,i,o,l),e===o-1&&this._addTileFeatures(n.range(0,h,a/o,u),n.points,-1,i,o,l),l.features.length?l:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const i=this.getChildren(t);if(e++,1!==i.length)break;t=i[0].properties.cluster_id}return e}_appendLeaves(t,e,i,n,o){const s=this.getChildren(e);for(const e of s){const s=e.properties;if(s&&s.cluster?o+s.point_count<=n?o+=s.point_count:o=this._appendLeaves(t,s.cluster_id,i,n,o):o<n?o++:t.push(e),t.length===i)break}return o}_addTileFeatures(t,e,i,n,o,s){for(const r of t){const t=e[r],a=t.numPoints;let h,u,l;if(a)h=tr(t),u=t.x,l=t.y;else{const e=this.points[t.index];h=e.properties,u=er(e.geometry.coordinates[0]),l=ir(e.geometry.coordinates[1])}const c={type:1,geometry:[[Math.round(this.options.extent*(u*o-i)),Math.round(this.options.extent*(l*o-n))]],tags:h};let d;a?d=t.id:this.options.generateId?d=t.index:this.points[t.index].id&&(d=this.points[t.index].id),void 0!==d&&(c.id=d),s.features.push(c)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const i=[],{radius:n,extent:o,reduce:s,minPoints:r}=this.options,a=n/(o*Math.pow(2,e));for(let n=0;n<t.length;n++){const o=t[n];if(o.zoom<=e)continue;o.zoom=e;const h=this.trees[e+1],u=h.within(o.x,o.y,a),l=o.numPoints||1;let c=l;for(const t of u){const i=h.points[t];i.zoom>e&&(c+=i.numPoints||1)}if(c>l&&c>=r){let t=o.x*l,r=o.y*l,a=s&&l>1?this._map(o,!0):null;const d=(n<<5)+(e+1)+this.points.length;for(const i of u){const n=h.points[i];if(n.zoom<=e)continue;n.zoom=e;const u=n.numPoints||1;t+=n.x*u,r+=n.y*u,n.parentId=d,s&&(a||(a=this._map(o,!0)),s(a,this._map(n)))}o.parentId=d,i.push(Xs(t/c,r/c,d,c,a))}else if(i.push(o),c>1)for(const t of u){const n=h.points[t];n.zoom<=e||(n.zoom=e,i.push(n))}}return i}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e){if(t.numPoints)return e?or({},t.properties):t.properties;const i=this.points[t.index].properties,n=this.options.map(i);return e&&n===i?or({},n):n}}function Xs(t,e,i,n,o){return{x:Us(t),y:Us(e),zoom:1/0,id:i,parentId:-1,numPoints:n,properties:o}}function Js(t,e){const[i,n]=t.geometry.coordinates;return{x:Us(er(i)),y:Us(ir(n)),zoom:1/0,index:e,parentId:-1}}function Qs(t){return{type:"Feature",id:t.id,properties:tr(t),geometry:{type:"Point",coordinates:[(e=t.x,360*(e-.5)),nr(t.y)]}};var e}function tr(t){const e=t.numPoints,i=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return or(or({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:i})}function er(t){return t/360+.5}function ir(t){const e=Math.sin(t*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function nr(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function or(t,e){for(const i in e)t[i]=e[i];return t}function sr(t){return t.x}function rr(t){return t.y}var ar=function t(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var n,o,s;if(Array.isArray(e)){if((n=e.length)!=i.length)return!1;for(o=n;0!=o--;)if(!t(e[o],i[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===i.toString();if((n=(s=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(i,s[o]))return!1;for(o=n;0!=o--;){var r=s[o];if(!t(e[r],i[r]))return!1}return!0}return e!=e&&i!=i},hr=function(t){o(s,t);var i=a(s);function s(t){var n;e(this,s);var o=t.maxZoom,r=t.radius,a=void 0===r?60:r,h=Do(t,["maxZoom","radius"]);return(n=i.call(this,{maxZoom:o})).superCluster=new Ks(Object.assign({maxZoom:n.maxZoom,radius:a},h)),n.state={zoom:null},n}return n(s,[{key:"calculate",value:function(t){var e=!1;if(!ar(t.markers,this.markers)){e=!0,this.markers=h(t.markers);var i=this.markers.map((function(t){return{type:"Feature",geometry:{type:"Point",coordinates:[t.getPosition().lng(),t.getPosition().lat()]},properties:{marker:t}}}));this.superCluster.load(i)}var n={zoom:t.map.getZoom()};return e||this.state.zoom>this.maxZoom&&n.zoom>this.maxZoom||(e=e||!ar(this.state,n)),this.state=n,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}},{key:"cluster",value:function(t){var e=t.map;return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(this.transformCluster.bind(this))}},{key:"transformCluster",value:function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var i=[],n=!0,o=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(n=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){o=!0,s=t}finally{try{n||null==a.return||a.return()}finally{if(o)throw s}}return i}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.geometry.coordinates,2),i=e[0],n=e[1],o=t.properties;if(o.cluster)return new ss({markers:this.superCluster.getLeaves(o.cluster_id,1/0).map((function(t){return t.properties.marker})),position:new google.maps.LatLng({lat:n,lng:i})});var s=o.marker;return new ss({markers:[s],position:s.getPosition()})}}]),s}(ds),ur={},lr=f,cr=ze,dr=Te,pr=je,_r=U,mr=As;ur.f=lr&&!cr?Object.defineProperties:function(t,e){pr(t);for(var i,n=_r(e),o=mr(e),s=o.length,r=0;s>r;)dr.f(t,i=o[r++],n[i]);return t};var fr,gr=tt("document","documentElement"),vr=je,yr=ur,br=pn,Lr=ui,xr=gr,wr=ge,kr=hi("IE_PROTO"),Pr=function(){},Sr=function(t){return"<script>"+t+"<\/script>"},Cr=function(t){t.write(Sr("")),t.close();var e=t.parentWindow.Object;return t=null,e},Mr=function(){try{fr=new ActiveXObject("htmlfile")}catch(t){}var t,e;Mr="undefined"!=typeof document?document.domain&&fr?Cr(fr):((e=wr("iframe")).style.display="none",xr.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Sr("document.F=Object")),t.close(),t.F):Cr(fr);for(var i=br.length;i--;)delete Mr.prototype[br[i]];return Mr()};Lr[kr]=!0;var Tr=Object.create||function(t,e){var i;return null!==t?(Pr.prototype=vr(t),i=new Pr,Pr.prototype=null,i[kr]=t):i=Mr(),void 0===e?i:yr.f(i,e)},zr=Te,Ar=ne("unscopables"),Er=Array.prototype;null==Er[Ar]&&zr.f(Er,Ar,{configurable:!0,value:Tr(null)});var Or=rn.includes;Hn({target:"Array",proto:!0},{includes:function(t){return Or(this,t,arguments.length>1?arguments[1]:void 0)}}),function(t){Er[Ar][t]=!0}("includes");var Ir=X,jr=B,Zr=ne("match"),Br=p.TypeError,Nr=oo,Dr=p.String,Rr=function(t){if("Symbol"===Nr(t))throw TypeError("Cannot convert a Symbol value to a string");return Dr(t)},Fr=ne("match"),Gr=Hn,Hr=function(t){if(function(t){var e;return Ir(t)&&(void 0!==(e=t[Zr])?!!e:"RegExp"==jr(t))}(t))throw Br("The method doesn't accept regular expressions");return t},qr=$,$r=Rr,Vr=O("".indexOf);Gr({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[Fr]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~Vr($r(qr(this)),$r(Hr(t)),arguments.length>1?arguments[1]:void 0)}});var Wr=Hn,Ur=rn.indexOf,Yr=Uo,Kr=O([].indexOf),Xr=!!Kr&&1/Kr([1],1,-0)<0,Jr=Yr("indexOf");Wr({target:"Array",proto:!0,forced:Xr||!Jr},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Xr?Kr(this,t,e)||0:Ur(this,t,e)}});var Qr=pe,ta=Te,ea=C,ia=Hn,na=p,oa=Xi,sa=Wi,ra=tn,aa=Nt,ha=So,ua=function(t,e,i){var n=Qr(e);n in t?ta.f(t,n,ea(0,i)):t[n]=i},la=Bo("splice"),ca=na.TypeError,da=Math.max,pa=Math.min;ia({target:"Array",proto:!0,forced:!la},{splice:function(t,e){var i,n,o,s,r,a,h=aa(this),u=ra(h),l=oa(t,u),c=arguments.length;if(0===c?i=n=0:1===c?(i=0,n=u-l):(i=c-2,n=pa(da(sa(e),0),u-l)),u+i-n>9007199254740991)throw ca("Maximum allowed length exceeded");for(o=ha(h,n),s=0;s<n;s++)(r=l+s)in h&&ua(o,s,h[r]);if(o.length=n,i<n){for(s=l;s<u-n;s++)a=s+i,(r=s+n)in h?h[a]=h[r]:delete h[a];for(s=u;s>u-n+i;s--)delete h[s-1]}else if(i>n)for(s=u-n;s>l;s--)a=s+i-1,(r=s+n-1)in h?h[a]=h[r]:delete h[a];for(s=0;s<i;s++)h[s+l]=arguments[s+2];return h.length=u-n+i,o}});var _a=p,ma=Y,fa=_a.String,ga=_a.TypeError,va=O,ya=je,ba=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=va(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),e=i instanceof Array}catch(t){}return function(i,n){return ya(i),function(t){if("object"==typeof t||ma(t))return t;throw ga("Can't set "+fa(t)+" as a prototype")}(n),e?t(i,n):i.__proto__=n,i}}():void 0),La=Y,xa=X,wa=ba,ka=O(1..valueOf),Pa=$,Sa=Rr,Ca=O("".replace),Ma="[\t\n\v\f\r                　\u2028\u2029\ufeff]",Ta=RegExp("^"+Ma+Ma+"*"),za=RegExp(Ma+Ma+"*$"),Aa=function(t){return function(e){var i=Sa(Pa(e));return 1&t&&(i=Ca(i,Ta,"")),2&t&&(i=Ca(i,za,"")),i}},Ea={start:Aa(1),end:Aa(2),trim:Aa(3)},Oa=f,Ia=p,ja=O,Za=jn,Ba=We.exports,Na=Ft,Da=et,Ra=vt,Fa=le,Ga=m,Ha=qi.f,qa=_.f,$a=Te.f,Va=ka,Wa=Ea.trim,Ua="Number",Ya=Ia.Number,Ka=Ya.prototype,Xa=Ia.TypeError,Ja=ja("".slice),Qa=ja("".charCodeAt),th=function(t){var e,i,n,o,s,r,a,h,u=Fa(t,"number");if(Ra(u))throw Xa("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2)if(u=Wa(u),43===(e=Qa(u,0))||45===e){if(88===(i=Qa(u,2))||120===i)return NaN}else if(48===e){switch(Qa(u,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+u}for(r=(s=Ja(u,2)).length,a=0;a<r;a++)if((h=Qa(s,a))<48||h>o)return NaN;return parseInt(s,n)}return+u};if(Za(Ua,!Ya(" 0o1")||!Ya("0b1")||Ya("+0x1"))){for(var eh,ih=function(t){var e=arguments.length<1?0:Ya(function(t){var e=Fa(t,"number");return"bigint"==typeof e?e:th(e)}(t)),i=this;return Da(Ka,i)&&Ga((function(){Va(i)}))?function(t,e,i){var n,o;return wa&&La(n=e.constructor)&&n!==i&&xa(o=n.prototype)&&o!==i.prototype&&wa(t,o),t}(Object(e),i,ih):e},nh=Oa?Ha(Ya):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),oh=0;nh.length>oh;oh++)Na(Ya,eh=nh[oh])&&!Na(ih,eh)&&$a(ih,eh,qa(Ya,eh));ih.prototype=Ka,Ka.constructor=ih,Ba(Ia,Ua,ih)}var sh,rh=n((function t(i,n){e(this,t),this.markers={sum:i.length};var o=n.map((function(t){return t.count})),s=o.reduce((function(t,e){return t+e}),0);this.clusters={count:n.length,markers:{mean:s/n.length,sum:s,min:Math.min.apply(Math,h(o)),max:Math.max.apply(Math,h(o))}}})),ah=function(){function t(){e(this,t)}return n(t,[{key:"render",value:function(t,e){var i=t.count,n=t.position,o=i>Math.max(10,e.clusters.markers.mean)?"#ff0000":"#0000ff",s=window.btoa('\n  <svg fill="'.concat(o,'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">\n    <circle cx="120" cy="120" opacity=".6" r="70" />\n    <circle cx="120" cy="120" opacity=".3" r="90" />\n    <circle cx="120" cy="120" opacity=".2" r="110" />\n  </svg>'));return new google.maps.Marker({position:n,icon:{url:"data:image/svg+xml;base64,".concat(s),scaledSize:new google.maps.Size(45,45)},label:{text:String(i),color:"rgba(255,255,255,0.9)",fontSize:"12px"},title:"Cluster of ".concat(i," markers"),zIndex:Number(google.maps.Marker.MAX_ZINDEX)+i})}}]),t}(),hh=n((function t(){e(this,t),function(t,e){for(var i in e.prototype)t.prototype[i]=e.prototype[i]}(t,google.maps.OverlayView)}));t.MarkerClustererEvents=void 0,(sh=t.MarkerClustererEvents||(t.MarkerClustererEvents={})).CLUSTERING_BEGIN="clusteringbegin",sh.CLUSTERING_END="clusteringend",sh.CLUSTER_CLICK="click";var uh=function(t,e,i){i.fitBounds(e.bounds)},lh=function(i){o(r,i);var s=a(r);function r(t){var i,n=t.map,o=t.markers,a=void 0===o?[]:o,u=t.algorithm,l=void 0===u?new hr({}):u,c=t.renderer,d=void 0===c?new ah:c,p=t.onClusterClick,_=void 0===p?uh:p;return e(this,r),(i=s.call(this)).markers=h(a),i.clusters=[],i.algorithm=l,i.renderer=d,i.onClusterClick=_,n&&i.setMap(n),i}return n(r,[{key:"addMarker",value:function(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}},{key:"addMarkers",value:function(t,e){var i=this;t.forEach((function(t){i.addMarker(t,!0)})),e||this.render()}},{key:"removeMarker",value:function(t,e){var i=this.markers.indexOf(t);return-1!==i&&(t.setMap(null),this.markers.splice(i,1),e||this.render(),!0)}},{key:"removeMarkers",value:function(t,e){var i=this,n=!1;return t.forEach((function(t){n=i.removeMarker(t,!0)||n})),n&&!e&&this.render(),n}},{key:"clearMarkers",value:function(t){this.markers.length=0,t||this.render()}},{key:"render",value:function(){var e=this.getMap();if(e instanceof google.maps.Map&&this.getProjection()){google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_BEGIN,this);var i=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()}),n=i.clusters,o=i.changed;(o||null==o)&&(this.reset(),this.clusters=n,this.renderClusters()),google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_END,this)}}},{key:"onAdd",value:function(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}},{key:"onRemove",value:function(){google.maps.event.removeListener(this.idleListener),this.reset()}},{key:"reset",value:function(){this.markers.forEach((function(t){return t.setMap(null)})),this.clusters.forEach((function(t){return t.delete()})),this.clusters=[]}},{key:"renderClusters",value:function(){var e=this,i=new rh(this.markers,this.clusters),n=this.getMap();this.clusters.forEach((function(o){1===o.markers.length?o.marker=o.markers[0]:(o.marker=e.renderer.render(o,i),e.onClusterClick&&o.marker.addListener("click",(function(i){google.maps.event.trigger(e,t.MarkerClustererEvents.CLUSTER_CLICK,o),e.onClusterClick(i,o,n)}))),o.marker.setMap(n)}))}}]),r}(hh);return t.AbstractAlgorithm=ds,t.AbstractViewportAlgorithm=ps,t.Cluster=ss,t.ClusterStats=rh,t.DefaultRenderer=ah,t.GridAlgorithm=Cs,t.MarkerClusterer=lh,t.NoopAlgorithm=Ms,t.SuperClusterAlgorithm=hr,t.defaultOnClusterClickHandler=uh,t.distanceBetweenPoints=hs,t.extendBoundsToPaddedViewport=as,t.extendPixelBounds=ls,t.filterMarkersToPaddedViewport=rs,t.noop=_s,t.pixelBoundsToLatLngBounds=cs,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
/* @preserve
 * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com
 * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade
 */!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,(function(t){"use strict";function e(t){for(var e,i,n=1,o=arguments.length;n<o;n++)for(e in i=arguments[n])t[e]=i[e];return t}var i=Object.create||function(t){return n.prototype=t,new n};function n(){}function o(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var s=0;function r(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function a(t,e,i){var n,o,s=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(s,e),n=!0)};return r}function h(t,e,i){var n=e[1],o=n-(e=e[0]);return t===n&&i?t:((t-e)%o+o)%o+e}function u(){return!1}function l(t,e){return!1===e?t:(e=Math.pow(10,void 0===e?6:e),Math.round(t*e)/e)}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return c(t).split(/\s+/)}function p(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function _(t,e,i){var n,o=[];for(n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function f(t,e){return t.replace(m,(function(t,i){if(void 0===(i=e[i]))throw new Error("No value provided for variable "+t);return"function"==typeof i?i(e):i}))}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var x=0;function w(t){var e=+new Date,i=Math.max(0,16-(e-x));return x=e+i,window.setTimeout(t,i)}var k=window.requestAnimationFrame||b("RequestAnimationFrame")||w,P=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function S(t,e,i){if(!i||k!==w)return k.call(window,o(t,e));t.call(e)}function C(t){t&&P.call(window,t)}var M={__proto__:null,extend:e,create:i,bind:o,get lastId(){return s},stamp:r,throttle:a,wrapNum:h,falseFn:u,formatNum:l,trim:c,splitWords:d,setOptions:p,getParamString:_,template:f,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:k,cancelFn:P,requestAnimFrame:S,cancelAnimFrame:C};function T(){}T.extend=function(t){function n(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var o,s=n.__super__=this.prototype,r=i(s);for(o in(r.constructor=n).prototype=r,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(n[o]=this[o]);if(t.statics&&e(n,t.statics),t.includes){var a=t.includes;if("undefined"!=typeof L&&L&&L.Mixin){a=g(a)?a:[a];for(var h=0;h<a.length;h++)a[h],L.Mixin.Events}e.apply(null,[r].concat(t.includes))}return e(r,t),delete r.statics,delete r.includes,r.options&&(r.options=s.options?i(s.options):{},e(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},n},T.include=function(t){var i=this.prototype.options;return e(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},T.mergeOptions=function(t){return e(this.prototype.options,t),this},T.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var z={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=d(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=d(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,i){if("function"!=typeof e);else{this._events=this._events||{};for(var n=this._events[t],o=(t=(n||(this._events[t]=n=[]),{fn:e,ctx:i=i===this?void 0:i}),n),s=0,r=o.length;s<r;s++)if(o[s].fn===e&&o[s].ctx===i)return;o.push(t)}},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(1===arguments.length){if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=u;delete this._events[t]}else if(i===this&&(i=void 0),"function"!=typeof e);else for(o=0,s=n.length;o<s;o++){var r=n[o];if(r.ctx===i&&r.fn===e)return this._firingCount&&(r.fn=u,this._events[t]=n=n.slice()),void n.splice(o,1)}},fire:function(t,i,n){if(!this.listens(t,n))return this;var o=e({},i,{type:t,target:this,sourceTarget:i&&i.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,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,i){if("object"==typeof t){for(var n in t)this.once(n,t[n],e);return this}var s=o((function(){this.off(t,e,i).off(t,s,i)}),this);return this.on(t,e,i).on(t,s,i)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}},A=(z.addEventListener=z.on,z.removeEventListener=z.clearAllEventListeners=z.off,z.addOneTimeEventListener=z.once,z.fireEvent=z.fire,z.hasEventListeners=z.listens,T.extend(z));function E(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var O=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function I(t,e,i){return t instanceof E?t:g(t)?new E(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new E(t.x,t.y):new E(t,e,i)}function j(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function Z(t,e){return!t||t instanceof j?t:new j(t,e)}function B(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function N(t,e){return t instanceof B?t:new B(t,e)}function D(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function R(t,e,i){return t instanceof D?t:g(t)&&"object"!=typeof t[0]?3===t.length?new D(t[0],t[1],t[2]):2===t.length?new D(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new D(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new D(t,e,i)}E.prototype={clone:function(){return new E(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new E(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new E(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=O(this.x),this.y=O(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x;t=t.y-this.y;return Math.sqrt(e*e+t*t)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},j.prototype={extend:function(t){return t=I(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new E((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new E(this.min.x,this.max.y)},getTopRight:function(){return new E(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return(t=("number"==typeof t[0]||t instanceof E?I:Z)(t))instanceof j?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=Z(t);var e=this.min,i=this.max,n=t.min,o=(t=t.max).x>=e.x&&n.x<=i.x;t=t.y>=e.y&&n.y<=i.y;return o&&t},overlaps:function(t){t=Z(t);var e=this.min,i=this.max,n=t.min,o=(t=t.max).x>e.x&&n.x<i.x;t=t.y>e.y&&n.y<i.y;return o&&t},isValid:function(){return!(!this.min||!this.max)}},B.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof D)i=e=t;else{if(!(t instanceof B))return t?this.extend(R(t)||N(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new D(e.lat,e.lng),this._northEast=new D(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t;t=Math.abs(e.lng-i.lng)*t;return new B(new D(e.lat-n,e.lng-t),new D(i.lat+n,i.lng+t))},getCenter:function(){return new D((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 D(this.getNorth(),this.getWest())},getSouthEast:function(){return new D(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 D||"lat"in t?R:N)(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof B?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=(t=t.getNorthEast()).lat>=e.lat&&n.lat<=i.lat;t=t.lng>=e.lng&&n.lng<=i.lng;return o&&t},overlaps:function(t){t=N(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=(t=t.getNorthEast()).lat>e.lat&&n.lat<i.lat;t=t.lng>e.lng&&n.lng<i.lng;return o&&t},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=N(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}};var F={latLngToPoint:function(t,e){return t=this.projection.project(t),e=this.scale(e),this.transformation._transform(t,e)},pointToLatLng:function(t,e){return e=this.scale(e),t=this.transformation.untransform(t,e),this.projection.unproject(t)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds;t=this.scale(t);return new j(this.transformation.transform(e.min,t),this.transformation.transform(e.max,t))},infinite:!(D.prototype={equals:function(t,e){return!!t&&(t=R(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return G.distance(this,R(t))},wrap:function(){return G.wrapLatLng(this)},toBounds:function(t){var e=(t=180*t/40075017)/Math.cos(Math.PI/180*this.lat);return N([this.lat-t,this.lng-e],[this.lat+t,this.lng+e])},clone:function(){return new D(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var e=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new D(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat;e=e.lng-i.lng;return 0==n&&0==e?t:(i=t.getSouthWest(),t=t.getNorthEast(),new B(new D(i.lat-n,i.lng-e),new D(t.lat-n,t.lng-e)))}},G=e({},F,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2);e=Math.sin((e.lng-t.lng)*i/2),t=s*s+Math.cos(n)*Math.cos(o)*e*e,i=2*Math.atan2(Math.sqrt(t),Math.sqrt(1-t));return this.R*i}}),H={R:H=6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE;i=Math.max(Math.min(i,t.lat),-i),i=Math.sin(i*e);return new E(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(t){var e=180/Math.PI;return new D((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:new j([-(H*=Math.PI),-H],[H,H])};function q(t,e,i,n){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function $(t,e,i,n){return new q(t,e,i,n)}q.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return t.x=(e=e||1)*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return new E((t.x/(e=e||1)-this._b)/this._a,(t.y/e-this._d)/this._c)}};var V=e({},G,{code:"EPSG:3857",projection:H,transformation:$(V=.5/(Math.PI*H.R),.5,-V,.5)}),W=e({},V,{code:"EPSG:900913"});function U(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Y(t,e){for(var i,n,o,s,r="",a=0,h=t.length;a<h;a++){for(i=0,n=(o=t[a]).length;i<n;i++)r+=(i?"L":"M")+(s=o[i]).x+" "+s.y;r+=e?Mt.svg?"z":"x":""}return r||"M0 0"}var K=document.documentElement.style,X="ActiveXObject"in window,J=X&&!document.addEventListener,Q="msLaunchUri"in navigator&&!("documentMode"in document),tt=Ct("webkit"),et=Ct("android"),it=Ct("android 2")||Ct("android 3"),nt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ot=(nt=et&&Ct("Google")&&nt<537&&!("AudioNode"in window),!!window.opera),st=!Q&&Ct("chrome"),rt=Ct("gecko")&&!tt&&!ot&&!X,at=!st&&Ct("safari"),ht=Ct("phantom"),ut="OTransition"in K,lt=0===navigator.platform.indexOf("Win"),ct=X&&"transition"in K,dt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!it,pt=(K="MozPerspective"in K,!window.L_DISABLE_3D&&(ct||dt||K)&&!ut&&!ht),_t=(Hi="undefined"!=typeof orientation||Ct("mobile"))&&tt,mt=Hi&&dt,ft=!window.PointerEvent&&window.MSPointerEvent,gt=!(!window.PointerEvent&&!ft),vt="ontouchstart"in window||!!window.TouchEvent,yt=!window.L_NO_TOUCH&&(vt||gt),bt=Hi&&ot,Lt=Hi&&rt,xt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),wt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),kt=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!U("svg").createSVGRect),St=!!Pt&&((St=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(St.firstChild&&St.firstChild.namespaceURI));function Ct(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Mt={ie:X,ielt9:J,edge:Q,webkit:tt,android:et,android23:it,androidStock:nt,opera:ot,chrome:st,gecko:rt,safari:at,phantom:ht,opera12:ut,win:lt,ie3d:ct,webkit3d:dt,gecko3d:K,any3d:pt,mobile:Hi,mobileWebkit:_t,mobileWebkit3d:mt,msPointer:ft,pointer:gt,touch:yt,touchNative:vt,mobileOpera:bt,mobileGecko:Lt,retina:xt,passiveEvents:wt,canvas:kt,svg:Pt,vml:!Pt&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='<v:shape adj="1"/>',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:St},Tt=Mt.msPointer?"MSPointerDown":"pointerdown",zt=Mt.msPointer?"MSPointerMove":"pointermove",At=Mt.msPointer?"MSPointerUp":"pointerup",Et=Mt.msPointer?"MSPointerCancel":"pointercancel",Ot={touchstart:Tt,touchmove:zt,touchend:At,touchcancel:Et},It={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&ze(e),Rt(t,e)},touchmove:Rt,touchend:Rt,touchcancel:Rt},jt={},Zt=!1;function Bt(t){jt[t.pointerId]=t}function Nt(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Dt(t){delete jt[t.pointerId]}function Rt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],jt)e.touches.push(jt[i]);e.changedTouches=[e],t(e)}}var Ft=200;var Gt,Ht,qt,$t,Vt,Wt,Ut=le(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=le(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Kt="webkitTransition"===Yt||"OTransition"===Yt?Yt+"End":"transitionend";function Xt(t){return"string"==typeof t?document.getElementById(t):t}function Jt(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function Qt(t,e,i){return(t=document.createElement(t)).className=e||"",i&&i.appendChild(t),t}function te(t){var e=t.parentNode;e&&e.removeChild(t)}function ee(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ie(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ne(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function oe(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=he(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function se(t,e){var i;if(void 0!==t.classList)for(var n=d(e),o=0,s=n.length;o<s;o++)t.classList.add(n[o]);else oe(t,e)||ae(t,((i=he(t))?i+" ":"")+e)}function re(t,e){void 0!==t.classList?t.classList.remove(e):ae(t,c((" "+he(t)+" ").replace(" "+e+" "," ")))}function ae(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function he(t){return void 0===(t=t.correspondingElement?t.correspondingElement:t).className.baseVal?t.className:t.className.baseVal}function ue(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}}function le(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function ce(t,e,i){e=e||new E(0,0),t.style[Ut]=(Mt.ie3d?"translate("+e.x+"px,"+e.y+"px)":"translate3d("+e.x+"px,"+e.y+"px,0)")+(i?" scale("+i+")":"")}function de(t,e){t._leaflet_pos=e,Mt.any3d?ce(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function pe(t){return t._leaflet_pos||new E(0,0)}function _e(){be(window,"dragstart",ze)}function me(){xe(window,"dragstart",ze)}function fe(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(ge(),Wt=(Vt=t).style.outline,t.style.outline="none",be(window,"keydown",ge))}function ge(){Vt&&(Vt.style.outline=Wt,Wt=Vt=void 0,xe(window,"keydown",ge))}function ve(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function ye(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}function be(t,e,i,n){if(e&&"object"==typeof e)for(var o in e)Pe(t,o,e[o],i);else for(var s=0,r=(e=d(e)).length;s<r;s++)Pe(t,e[s],i,n);return this}$t="onselectstart"in document?(qt=function(){be(window,"selectstart",ze)},function(){xe(window,"selectstart",ze)}):(Ht=le(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),qt=function(){var t;Ht&&(t=document.documentElement.style,Gt=t[Ht],t[Ht]="none")},function(){Ht&&(document.documentElement.style[Ht]=Gt,Gt=void 0)}),X={__proto__:null,TRANSFORM:Ut,TRANSITION:Yt,TRANSITION_END:Kt,get:Xt,getStyle:Jt,create:Qt,remove:te,empty:ee,toFront:ie,toBack:ne,hasClass:oe,addClass:se,removeClass:re,setClass:ae,getClass:he,setOpacity:ue,testProp:le,setTransform:ce,setPosition:de,getPosition:pe,get disableTextSelection(){return qt},get enableTextSelection(){return $t},disableImageDrag:_e,enableImageDrag:me,preventOutline:fe,restoreOutline:ge,getSizedParentNode:ve,getScale:ye};var Le="_leaflet_events";function xe(t,e,i,n){if(1===arguments.length)we(t),delete t[Le];else if(e&&"object"==typeof e)for(var o in e)Se(t,o,e[o],i);else if(e=d(e),2===arguments.length)we(t,(function(t){return-1!==v(e,t)}));else for(var s=0,r=e.length;s<r;s++)Se(t,e[s],i,n);return this}function we(t,e){for(var i in t[Le]){var n=i.split(/\d/)[0];e&&!e(n)||Se(t,n,null,null,i)}}var ke={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Pe(t,e,i,n){var o,s,a=e+r(i)+(n?"_"+r(n):"");t[Le]&&t[Le][a]||(s=o=function(e){return i.call(n||t,e||window.event)},!Mt.touchNative&&Mt.pointer&&0===e.indexOf("touch")?o=function(t,e,i){return"touchstart"!==e||Zt||(document.addEventListener(Tt,Bt,!0),document.addEventListener(zt,Nt,!0),document.addEventListener(At,Dt,!0),document.addEventListener(Et,Dt,!0),Zt=!0),It[e]?(i=It[e].bind(this,i),t.addEventListener(Ot[e],i,!1),i):L.Util.falseFn}(t,e,o):Mt.touch&&"dblclick"===e?o=function(t,e){t.addEventListener("dblclick",e);var i,n=0;function o(t){var o;1!==t.detail?i=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((o=Date.now())-n<=Ft?2==++i&&e(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):i=1,n=o)}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}(t,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(ke[e]||e,o,!!Mt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?t.addEventListener(ke[e],o=function(e){e=e||window.event,je(t,e)&&s(e)},!1):t.addEventListener(e,s,!1):t.attachEvent("on"+e,o),t[Le]=t[Le]||{},t[Le][a]=o)}function Se(t,e,i,n,o){var s,a;o=o||e+r(i)+(n?"_"+r(n):""),(i=t[Le]&&t[Le][o])&&(!Mt.touchNative&&Mt.pointer&&0===e.indexOf("touch")?(n=t,a=i,Ot[s=e]&&n.removeEventListener(Ot[s],a,!1)):Mt.touch&&"dblclick"===e?(n=i,(a=t).removeEventListener("dblclick",n.dblclick),a.removeEventListener("click",n.simDblclick)):"removeEventListener"in t?t.removeEventListener(ke[e]||e,i,!1):t.detachEvent("on"+e,i),t[Le][o]=null)}function Ce(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Me(t){return Pe(t,"wheel",Ce),this}function Te(t){return be(t,"mousedown touchstart dblclick contextmenu",Ce),t._leaflet_disable_click=!0,this}function ze(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ae(t){return ze(t),Ce(t),this}function Ee(t,e){if(!e)return new E(t.clientX,t.clientY);var i=ye(e),n=i.boundingClientRect;return new E((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Oe=Mt.win&&Mt.chrome?2*window.devicePixelRatio:Mt.gecko?window.devicePixelRatio:1;function Ie(t){return Mt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Oe: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 je(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}J={__proto__:null,on:be,off:xe,stopPropagation:Ce,disableScrollPropagation:Me,disableClickPropagation:Te,preventDefault:ze,stop:Ae,getMousePosition:Ee,getWheelDelta:Ie,isExternalTarget:je,addListener:be,removeListener:xe};var Ze=A.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=pe(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=S(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){t=this._startPos.add(this._offset.multiplyBy(t)),e&&t._round(),de(this._el,t),this.fire("step")},_complete:function(){C(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Be=A.extend({options:{crs:V,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(R(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Yt&&Mt.any3d&&!Mt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),be(this._proxy,Kt,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,n){return i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(R(t),i,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=e({animate:n.animate},n.zoom),n.pan=e({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,i),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Mt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Mt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2);t=(t instanceof E?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),n=this.containerPointToLatLng(o.add(t));return this.setView(n,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():N(t);var i=I(e.paddingTopLeft||e.padding||[0,0]),n=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));return(o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0?{center:t.getCenter(),zoom:o}:(e=n.subtract(i).divideBy(2),n=this.project(t.getSouthWest(),o),i=this.project(t.getNorthEast(),o),{center:this.unproject(n.add(i).divideBy(2).add(e),o),zoom:o})},fitBounds:function(t,e){if(!(t=N(t)).isValid())throw new Error("Bounds are not valid.");return t=this._getBoundsCenterZoom(t,e),this.setView(t.center,t.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){return e=e||{},(t=I(t).round()).x||t.y?(!0===e.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new Ze,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate?(se(this._mapPane,"leaflet-pan-anim"),i=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend");var i},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!Mt.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),r=this._zoom,a=(t=R(t),e=void 0===e?r:e,Math.max(s.x,s.y)),h=a*this.getZoomScale(r,e),u=o.distanceTo(n)||1,l=1.42,c=l*l;function d(t){return t=(h*h-a*a+(t?-1:1)*c*c*u*u)/(2*(t?h:a)*c*u),(t=Math.sqrt(t*t+1)-t)<1e-9?-18:Math.log(t)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function _(t){return(Math.exp(t)+Math.exp(-t))/2}var m=d(0);var f=Date.now(),g=(d(1)-m)/l,v=i.duration?1e3*i.duration:1e3*g*.8;return this._moveStart(!0,i.noMoveStart),function i(){var s=(Date.now()-f)/v,h=(1-Math.pow(1-s,1.5))*g;s<=1?(this._flyToFrame=S(i,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(function(t){return a*(_(m)*(p(t=m+l*t)/_(t))-p(m))/c}(h)/u)),r),this.getScaleZoom(a/(s=h,a*(_(m)/_(m+l*s))),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){return t=this._getBoundsCenterZoom(t,e),this.flyTo(t.center,t.zoom,e)},setMaxBounds:function(t){return(t=N(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter();t=this._limitCenter(i,this._zoom,N(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=I(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=(t=this.project(t),(i=Z([(s=this.getPixelBounds()).min.add(i),s.max.subtract(n)])).getSize());return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(s),o.x+=n.x<0?-i.x:i.x,o.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize(),n=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),s=i.divideBy(2).round(),r=n.divideBy(2).round();return(s=s.subtract(r)).x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=o(this._handleGeolocationResponse,this),n=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,n,t):navigator.geolocation.getCurrentPosition(i,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new D(t.coords.latitude,t.coords.longitude),o=n.toBounds(2*t.coords.accuracy),s=this._locateOptions,r=(s.setView&&(e=this.getBoundsZoom(o),this.setView(n,s.maxZoom?Math.min(e,s.maxZoom):e)),{latlng:n,bounds:o,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(r[i]=t.coords[i]);this.fire("locationfound",r)}},addHandler:function(t,e){return e?(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable(),this):this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),te(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(C(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)te(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){return e=Qt("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane),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 B(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=N(t),i=I(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=(t=t.getSouthEast(),i=this.getSize().subtract(i),t=Z(this.project(t,n),this.project(r,n)).getSize(),r=Mt.any3d?this.options.zoomSnap:1,i.x/t.x);i=i.y/t.y,t=e?Math.max(a,i):Math.min(a,i),n=this.getScaleZoom(t,n);return r&&(n=Math.round(n/(r/100))*(r/100),n=e?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new E(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){return new j(t=this._getTopLeftPoint(t,e),t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e,t=i.zoom(t*i.scale(e));return isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(R(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){return t=I(t).add(this.getPixelOrigin()),this.unproject(t)},latLngToLayerPoint:function(t){return this.project(R(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(N(t))},distance:function(t,e){return this.options.crs.distance(R(t),R(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){return t=this.containerPointToLayerPoint(I(t)),this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Ee(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){if(!(t=this._container=Xt(t)))throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");be(t,"scroll",this._onScroll,this),this._containerId=r(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&Mt.any3d,se(t,"leaflet-container"+(Mt.touch?" leaflet-touch":"")+(Mt.retina?" leaflet-retina":"")+(Mt.ielt9?" leaflet-oldie":"")+(Mt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),Jt(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),de(this._mapPane,new E(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(se(t.markerPane,"leaflet-zoom-hide"),se(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){de(this._mapPane,new E(0,0));var i=!this._loaded,n=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return C(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){de(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?xe:be;e((this._targets[r(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Mt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){C(this._resizeRequest),this._resizeRequest=S((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((i=this._targets[r(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(o&&!je(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n.length||a||o||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&fe(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){"click"===t.type&&((h=e({},t)).type="preclick",this._fireDOMEvent(h,h.type,n));var o=this._findEventTargets(t,i);if(n){for(var s=[],r=0;r<n.length;r++)n[r].listens(i,!0)&&s.push(n[r]);o=s.concat(o)}if(o.length){"contextmenu"===i&&ze(t);var a,h=o[0],u={originalEvent:t};for("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(a=h.getLatLng&&(!h._radius||h._radius<=10),u.containerPoint=a?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(t),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=a?h.getLatLng():this.layerPointToLatLng(u.layerPoint)),r=0;r<o.length;r++)if(o[r].fire(i,u,!0),u.originalEvent._stopped||!1===o[r].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,i))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return pe(this._mapPane)||new E(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){return i=this._getNewPixelOrigin(i,e),this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,i){return i=this._getNewPixelOrigin(i,e),Z([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2);o=new j(n.subtract(o),n.add(o));return(o=this._getBoundsOffset(o,i,e)).round().equals([0,0])?t:this.unproject(n.add(o),e)},_limitOffset:function(t,e){if(!e)return t;var i=new j((i=this.getPixelBounds()).min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,i){return i=(e=Z(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i))).min.subtract(t.min),e=e.max.subtract(t.max),new E(this._rebound(i.x,-e.x),this._rebound(i.y,-e.y))},_rebound:function(t,e){return 0<t+e?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=Mt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){re(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){return t=this._getCenterOffset(t)._trunc(),!(!0!==(e&&e.animate)&&!this.getSize().contains(t)||(this.panBy(t,e),0))},_createAnimProxy:function(){var t=this._proxy=Qt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=Ut,i=this._proxy.style[e];ce(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){te(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ce(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e);n=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(n)||(S((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,se(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&re(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ne(t){return new Re(t)}var De,Re=T.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition();t=t._controlCorners[i];return se(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(te(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=(Be.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=Qt("div",e+"control-container",this._container);function n(n,o){t[n+o]=Qt("div",e+n+" "+e+o,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)te(this._controlCorners[t]);te(this._controlContainer),delete this._controlCorners,delete this._controlContainer}}),Re.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in p(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Re.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){return t.off("add remove",this._onLayerChange,this),(t=this._getLayer(r(t)))&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){se(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?(se(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):re(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return re(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=Qt("div",t),i=this.options.collapsed,n=(e.setAttribute("aria-haspopup",!0),Te(e),Me(e),this._section=Qt("section",t+"-list")),o=(i&&(this._map.on("click",this.collapse,this),be(e,{mouseenter:function(){be(n,"click",ze),this.expand(),setTimeout((function(){xe(n,"click",ze)}))},mouseleave:this.collapse},this)),this._layersLink=Qt("a",t+"-toggle",e));o.href="#",o.title="Layers",o.setAttribute("role","button"),be(o,"click",ze),be(o,"focus",this.expand,this),i||this.expand(),this._baseLayersList=Qt("div",t+"-base",n),this._separator=Qt("div",t+"-separator",n),this._overlaysList=Qt("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ee(this._baseLayersList),ee(this._overlaysList),this._layerControlInputs=[];for(var t,e,i,n=0,o=0;o<this._layers.length;o++)i=this._layers[o],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,n+=i.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&1<n)?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(r(t.target));(t=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null)&&this._map.fire(t,e)},_createRadioElement:function(t,e){return t='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",(e=document.createElement("div")).innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),o=((n=(t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+r(this),n),this._layerControlInputs.push(e),e.layerId=r(t.layer),be(e,"click",this._onInputClick,this),document.createElement("span"))).innerHTML=" "+t.name,document.createElement("span"));return i.appendChild(o),o.appendChild(e),o.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;0<=o;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}})),Ge=Re.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=Qt("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){return(i=Qt("a",i,n)).innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Te(i),be(i,"click",Ae),be(i,"click",o,this),be(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";re(this._zoomInButton,e),re(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(se(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(se(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),He=(Be.mergeOptions({zoomControl:!0}),Be.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ge,this.addControl(this.zoomControl))})),Re.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=Qt("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=Qt("div",e,i)),t.imperial&&(this._iScale=Qt("div",e,i))},_update:function(){var t=(e=this._map).getSize().y/2,e=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i;5280<(t=3.2808399*t)?(i=this._getRoundNum(e=t/5280),this._updateScale(this._iScale,i+" mi",i/e)):(i=this._getRoundNum(t),this._updateScale(this._iScale,i+" ft",i/t))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1);return e*(10<=(t=t/e)?10:5<=t?5:3<=t?3:2<=t?2:1)}})),qe=Re.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Mt.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=Qt("div","leaflet-control-attribution"),Te(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}}),$e=(Q=(Be.mergeOptions({attributionControl:!0}),Be.addInitHook((function(){this.options.attributionControl&&(new qe).addTo(this)})),Re.Layers=Fe,Re.Zoom=Ge,Re.Scale=He,Re.Attribution=qe,Ne.layers=function(t,e,i){return new Fe(t,e,i)},Ne.zoom=function(t){return new Ge(t)},Ne.scale=function(t){return new He(t)},Ne.attribution=function(t){return new qe(t)},T.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}})),tt=(Q.addTo=function(t,e){return t.addHandler(e,this),this},{Events:z}),Mt.touch?"touchstart mousedown":"mousedown"),Ve=A.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){p(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(be(this._dragStartTarget,$e,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ve._dragging===this&&this.finishDrag(!0),xe(this._dragStartTarget,$e,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,oe(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Ve._dragging===this&&this.finishDrag():Ve._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Ve._dragging=this)._preventOutline&&fe(this._element),_e(),qt(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=ve(this._element),this._startPoint=new E(i.clientX,i.clientY),this._startPos=pe(this._element),this._parentScale=ye(e),i="mousedown"===t.type,be(document,i?"mousemove":"touchmove",this._onMove,this),be(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:!(e=new E((e=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,e.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,ze(t),this._moved||(this.fire("dragstart"),this._moved=!0,se(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),se(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition()))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),de(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){re(document.body,"leaflet-dragging"),this._lastTarget&&(re(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),xe(document,"mousemove touchmove",this._onMove,this),xe(document,"mouseup touchend touchcancel",this._onUp,this),me(),$t(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,Ve._dragging=!1}});function We(t,e){return e&&t.length?function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,o,s){var r,a,h,u=0;for(a=o+1;a<=s-1;a++)u<(h=Je(e[a],e[o],e[s],!0))&&(r=a,u=h);n<u&&(i[r]=1,t(e,i,n,o,r),t(e,i,n,r,s))}(t,n,e,0,i-1);var o,s=[];for(o=0;o<i;o++)n[o]&&s.push(t[o]);return s}(t=function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;n<s;n++)(function(t,e){var i=e.x-t.x;return i*i+(e=e.y-t.y)*e})(t[n],t[o])>e&&(i.push(t[n]),o=n);return o<s-1&&i.push(t[s-1]),i}(t,e*=e),e):t.slice()}function Ue(t,e,i){return Math.sqrt(Je(t,e,i,!0))}function Ye(t,e,i,n,o){var s,r,a,h=n?De:Xe(t,i),u=Xe(e,i);for(De=u;;){if(!(h|u))return[t,e];if(h&u)return!1;a=Xe(r=Ke(t,e,s=h||u,i,o),i),s===h?(t=r,h=a):(e=r,u=a)}}function Ke(t,e,i,n,o){var s,r,a=e.x-t.x,h=(e=e.y-t.y,n.min);n=n.max;return 8&i?(s=t.x+a*(n.y-t.y)/e,r=n.y):4&i?(s=t.x+a*(h.y-t.y)/e,r=h.y):2&i?(s=n.x,r=t.y+e*(n.x-t.x)/a):1&i&&(s=h.x,r=t.y+e*(h.x-t.x)/a),new E(s,r,o)}function Xe(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Je(t,e,i,n){var o=e.x,s=(e=e.y,i.x-o),r=i.y-e,a=s*s+r*r;return 0<a&&(1<(a=((t.x-o)*s+(t.y-e)*r)/a)?(o=i.x,e=i.y):0<a&&(o+=s*a,e+=r*a)),s=t.x-o,r=t.y-e,n?s*s+r*r:new E(o,e)}function Qe(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ti(t){return Qe(t)}function ei(t,e,i){for(var n,o,s,r,a,h,u,l=[1,4,2,8],c=0,d=t.length;c<d;c++)t[c]._code=Xe(t[c],e);for(s=0;s<4;s++){for(h=l[s],n=[],c=0,o=(d=t.length)-1;c<d;o=c++)r=t[c],a=t[o],r._code&h?a._code&h||((u=Ke(a,r,h,e,i))._code=Xe(u,e),n.push(u)):(a._code&h&&((u=Ke(a,r,h,e,i))._code=Xe(u,e),n.push(u)),n.push(r));t=n}return t}et={__proto__:null,simplify:We,pointToSegmentDistance:Ue,closestPointOnSegment:function(t,e,i){return Je(t,e,i)},clipSegment:Ye,_getEdgeIntersection:Ke,_getBitCode:Xe,_sqClosestPointOnSegment:Je,isFlat:Qe,_flat:ti};it={__proto__:null,clipPolygon:ei},nt={project:function(t){return new E(t.lng,t.lat)},unproject:function(t){return new D(t.y,t.x)},bounds:new j([-180,-90],[180,90])},ot={R:6378137,R_MINOR:6356752.314245179,bounds:new j([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=(o=Math.sqrt(1-o*o))*Math.sin(n);s=Math.tan(Math.PI/4-n/2)/Math.pow((1-s)/(1+s),o/2),n=-i*Math.log(Math.max(s,1e-10));return new E(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),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++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=u=Math.PI/2-2*Math.atan(r*e)-a;return new D(a*i,t.x*i/n)}},st={__proto__:null,LonLat:nt,Mercator:ot,SphericalMercator:H},at=e({},G,{code:"EPSG:3395",projection:ot,transformation:$(rt=.5/(Math.PI*ot.R),.5,-rt,.5)});var ii=e({},G,{code:"EPSG:4326",projection:nt,transformation:$(1/180,1,-1/180,.5)}),ni=(ht=e({},F,{projection:nt,transformation:$(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng;e=e.lat-t.lat;return Math.sqrt(i*i+e*e)},infinite:!0}),ut=(F.Earth=G,F.EPSG3395=at,F.EPSG3857=V,F.EPSG900913=W,F.EPSG4326=ii,F.Simple=ht,A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[r(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[r(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e,i=t.target;i.hasLayer(this)&&(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents&&(e=this.getEvents(),i.on(e,this),this.once("remove",(function(){i.off(e,this)}),this)),this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this}))}})),Be.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||((this._layers[e]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return r(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?g(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){t=r(t),this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var t,e=1/0,i=-1/0,n=this._getZoomSpan();for(t in this._zoomBoundLayers){var o=this._zoomBoundLayers[t].options;e=void 0===o.minZoom?e:Math.min(e,o.minZoom),i=void 0===o.maxZoom?i:Math.max(i,o.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}}),ut.extend({initialize:function(t,e){var i,n;if(p(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){return t=t in this._layers?t:this.getLayerId(t),this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:r})),oi=ni.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ni.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?((t=t in this._layers?this._layers[t]:t).removeEventParent(this),ni.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,e=new B;for(t in this._layers){var i=this._layers[t];e.extend(i.getBounds?i.getBounds():i.getLatLng())}return e}}),si=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}return i=this._createImg(i,e&&"IMG"===e.tagName?e:null),this._setIconStyles(i,t),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var i=this.options,n=I(n="number"==typeof(n=i[e+"Size"])?[n,n]:n),o=I("shadow"===e&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Mt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),ri=si.extend({options:{iconUrl:"/gfx/standards/marker-icon.png",iconRetinaUrl:"/gfx/standards/marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof ri.imagePath&&(ri.imagePath=this._detectIconPath()),(this.options.imagePath||ri.imagePath)+si.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){function e(t,e,i){return(e=e.exec(t))&&e[i]}return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=Qt("div","leaflet-default-icon-path",document.body),e=Jt(t,"background-image")||Jt(t,"backgroundImage");return document.body.removeChild(t),(e=this._stripUrl(e))?e:(t=document.querySelector('link[href$="leaflet.css"]'))?t.href.substring(0,t.href.length-11-1):""}}),ai=Q.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Ve(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),se(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&&re(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=pe(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin();(a=Z(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o))).contains(s)||(o=I((Math.max(a.max.x,s.x)-a.max.x)/(r.max.x-a.max.x)-(Math.min(a.min.x,s.x)-a.min.x)/(r.min.x-a.min.x),(Math.max(a.max.y,s.y)-a.max.y)/(r.max.y-a.max.y)-(Math.min(a.min.y,s.y)-a.min.y)/(r.min.y-a.min.y)).multiplyBy(n),i.panBy(o,{animate:!1}),this._draggable._newPos._add(o),this._draggable._startPos._add(o),de(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=S(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&&(C(this._panRequest),this._panRequest=S(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=pe(e._icon),o=e._map.layerPointToLatLng(n);i&&de(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){C(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),hi=ut.extend({options:{icon:new ri,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=R(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=R(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t,e=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=!1,o=!1;(t=((t=e.icon.createIcon(this._icon))!==this._icon&&(this._icon&&this._removeIcon(),n=!0,e.title&&(t.title=e.title),"IMG"===t.tagName&&(t.alt=e.alt||"")),se(t,i),e.keyboard&&(t.tabIndex="0",t.setAttribute("role","button")),this._icon=t,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&be(t,"focus",this._panOnFocus,this),e.icon.createShadow(this._shadow)))!==this._shadow&&(this._removeShadow(),o=!0),t&&(se(t,i),t.alt=""),this._shadow=t,e.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),t&&o&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&xe(this._icon,"focus",this._panOnFocus,this),te(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&te(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&de(this._icon,t),this._shadow&&de(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){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round(),this._setPos(t)},_initInteraction:function(){var t;this.options.interactive&&(se(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ai&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ai(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&&ue(this._icon,t),this._shadow&&ue(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t,e,i=this._map;i&&(t=(e=this.options.icon.options).iconSize?I(e.iconSize):I(0,0),e=e.iconAnchor?I(e.iconAnchor):I(0,0),i.panInside(this._latlng,{paddingTopLeft:e,paddingBottomRight:t.subtract(e)}))},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),ui=ut.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 p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),li=ui.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=R(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ui.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance();t=[t+i,e+i];this._pxBounds=new j(this._point.subtract(t),this._point.add(t))},_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()}}),ci=li.extend({initialize:function(t,i,n){if(p(this,i="number"==typeof i?e({},n,{radius:i}):i),this._latlng=R(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new B(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ui.prototype.setStyle,_project:function(){var t,e,i,n,o,s=this._latlng.lng,r=this._latlng.lat,a=this._map,h=a.options.crs;h.distance===G.distance?(n=Math.PI/180,o=this._mRadius/G.R/n,t=a.project([r+o,s]),e=a.project([r-o,s]),e=t.add(e).divideBy(2),i=a.unproject(e).lat,n=Math.acos((Math.cos(o*n)-Math.sin(r*n)*Math.sin(i*n))/(Math.cos(r*n)*Math.cos(i*n)))/n,!isNaN(n)&&0!==n||(n=o/Math.cos(Math.PI/180*r)),this._point=e.subtract(a.getPixelOrigin()),this._radius=isNaN(n)?0:e.x-a.project([i,s-n]).x,this._radiusY=e.y-t.y):(o=h.unproject(h.project(this._latlng).subtract([this._mRadius,0])),this._point=a.latLngToLayerPoint(this._latlng),this._radius=this._point.x-a.latLngToLayerPoint(o).x),this._updateBounds()}}),di=ui.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e=1/0,i=null,n=Je,o=0,s=this._parts.length;o<s;o++)for(var r=this._parts[o],a=1,h=r.length;a<h;a++){var u,l,c=n(t,u=r[a-1],l=r[a],!0);c<e&&(e=c,i=n(t,u,l))}return i&&(i.distance=Math.sqrt(e)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,r=this._rings[0],a=r.length;if(!a)return null;for(e=t=0;t<a-1;t++)e+=r[t].distanceTo(r[t+1])/2;if(0===e)return this._map.layerPointToLatLng(r[0]);for(i=t=0;t<a-1;t++)if(n=r[t],o=r[t+1],e<(i+=s=n.distanceTo(o)))return this._map.layerPointToLatLng([o.x-(s=(i-e)/s)*(o.x-n.x),o.y-s*(o.y-n.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=R(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new B,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Qe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Qe(t),n=0,o=t.length;n<o;n++)i?(e[n]=R(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new j;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=new E(t=this._clickTolerance(),t);this._rawPxBounds&&(this._pxBounds=new j([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(t,e,i){var n,o,s=t[0]instanceof D,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,i,n,o,s=this._parts,r=0,a=0,h=this._rings.length;r<h;r++)for(e=0,i=(o=this._rings[r]).length;e<i-1;e++)(n=Ye(o[e],o[e+1],t,e,!0))&&(s[a]=s[a]||[],s[a].push(n[0]),n[1]===o[e+1]&&e!==i-2||(s[a].push(n[1]),a++))},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=We(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,s,r,a,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(n=0,o=(r=(a=this._parts[i]).length)-1;n<r;o=n++)if((e||0!==n)&&Ue(t,a[o],a[n])<=h)return!0;return!1}});di._flat=ti;var pi=di.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,o,s,r,a,h,u=this._rings[0],l=u.length;if(!l)return null;for(t=s=r=a=0,e=l-1;t<l;e=t++)i=u[t],n=u[e],o=i.y*n.x-n.y*i.x,r+=(i.x+n.x)*o,a+=(i.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 e=(t=di.prototype._convertLatLngs.call(this,t)).length;return 2<=e&&t[0]instanceof D&&t[0].equals(t[e-1])&&t.pop(),t},_setLatLngs:function(t){di.prototype._setLatLngs.call(this,t),Qe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(Qe(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var t=this._renderer._bounds,e=new E(e=this.options.weight,e);t=new j(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 i,n=0,o=this._rings.length;n<o;n++)(i=ei(this._rings[n],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,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=(e=this._parts[o]).length)-1;s<h;r=s++)i=e[s],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||di.prototype._containsPoint.call(this,t,!0)}}),_i=oi.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=g(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=mi(t,s);return r?(r.feature=xi(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=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function mi(t,e){var i,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,h=[],u=e&&e.pointToLayer,l=e&&e.coordsToLatLng||gi;if(!a&&!r)return null;switch(r.type){case"Point":return fi(u,t,i=l(a),e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)i=l(a[o]),h.push(fi(u,t,i,e));return new oi(h);case"LineString":case"MultiLineString":return n=vi(a,"LineString"===r.type?0:1,l),new di(n,e);case"Polygon":case"MultiPolygon":return n=vi(a,"Polygon"===r.type?1:2,l),new pi(n,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var c=mi({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);c&&h.push(c)}return new oi(h);default:throw new Error("Invalid GeoJSON object.")}}function fi(t,e,i,n){return t?t(e,i):new hi(i,n&&n.markersInheritOptions&&n)}function gi(t){return new D(t[1],t[0],t[2])}function vi(t,e,i){for(var n,o=[],s=0,r=t.length;s<r;s++)n=e?vi(t[s],e-1,i):(i||gi)(t[s]),o.push(n);return o}function yi(t,e){return void 0!==(t=R(t)).alt?[l(t.lng,e),l(t.lat,e),l(t.alt,e)]:[l(t.lng,e),l(t.lat,e)]}function bi(t,e,i,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?bi(t[s],e-1,i,n):yi(t[s],n));return!e&&i&&o.push(o[0]),o}function Li(t,i){return t.feature?e({},t.feature,{geometry:i}):xi(i)}function xi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function wi(t,e){return new _i(t,e)}lt={toGeoJSON:function(t){return Li(this,{type:"Point",coordinates:yi(this.getLatLng(),t)})}},hi.include(lt),ci.include(lt),li.include(lt),di.include({toGeoJSON:function(t){var e=!Qe(this._latlngs);return Li(this,{type:(e?"Multi":"")+"LineString",coordinates:bi(this._latlngs,e?1:0,!1,t)})}}),pi.include({toGeoJSON:function(t){var e=!Qe(this._latlngs),i=e&&!Qe(this._latlngs[0]);t=bi(this._latlngs,i?2:e?1:0,!0,t);return Li(this,{type:(i?"Multi":"")+"Polygon",coordinates:t=e?t:[t]})}}),ni.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(i){e.push(i.toGeoJSON(t).geometry.coordinates)})),Li(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer((function(e){e.toGeoJSON&&(e=e.toGeoJSON(t),i?n.push(e.geometry):"FeatureCollection"===(e=xi(e)).type?n.push.apply(n,e.features):n.push(e))})),i?Li(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});ct=wi;var ki=ut.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=N(e),p(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(se(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){te(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&&ie(this._image),this},bringToBack:function(){return this._map&&ne(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=N(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:Qt("img");se(e,"leaflet-image-layer"),this._zoomAnimated&&se(e,"leaflet-zoom-animated"),this.options.className&&se(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom);t=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ce(this._image,t,e)},_reset:function(){var t=this._image,e=new j(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();de(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){ue(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Pi=ki.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:Qt("video");if(se(e,"leaflet-image-layer"),this._zoomAnimated&&se(e,"leaflet-zoom-animated"),this.options.className&&se(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=o(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],s=0;s<i.length;s++)n.push(i[s].src);this._url=0<i.length?n:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var r=0;r<this._url.length;r++){var a=Qt("source");a.src=this._url[r],e.appendChild(a)}}}}),Si=ki.extend({_initImage:function(){var t=this._image=this._url;se(t,"leaflet-image-layer"),this._zoomAnimated&&se(t,"leaflet-zoom-animated"),this.options.className&&se(t,this.options.className),t.onselectstart=u,t.onmousemove=u}}),Ci=ut.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0},initialize:function(t,e){p(this,t),this._source=e},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&ue(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ue(this._container,1),this.bringToFront(),this.options.interactive&&(se(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(ue(this._container,0),this._removeTimeout=setTimeout(o(te,void 0,this._container),200)):te(this._container),this.options.interactive&&(re(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(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&&ie(this._container),this},bringToBack:function(){return this._map&&ne(this._container),this},_prepareOpen:function(t){if(!(i=this._source)._map)return!1;if(i instanceof oi){var e,i=null,n=this._source._layers;for(e in n)if(n[e]._map){i=n[e];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){var t,e,i;this._map&&(e=this._map.latLngToLayerPoint(this._latlng),t=I(this.options.offset),i=this._getAnchor(),this._zoomAnimated?de(this._container,e.add(i)):t=t.add(e).add(i),e=this._containerBottom=-t.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+t.x,this._container.style.bottom=e+"px",this._container.style.left=i+"px")},_getAnchor:function(){return[0,0]}}),Mi=(Be.include({_initOverlay:function(t,e,i,n){var o=e;return o instanceof t||(o=new t(n).setContent(e)),i&&o.setLatLng(i),o}}),ut.include({_initOverlay:function(t,e,i,n){var o=i;return o instanceof t?(p(o,n),o._source=this):(o=e&&!n?e:new t(n,this)).setContent(i),o}}),Ci.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ci.prototype.openOn.call(this,t)},onAdd:function(t){Ci.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ui||this._source.on("preclick",Ce))},onRemove:function(t){Ci.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ui||this._source.off("preclick",Ce))},getEvents:function(){var t=Ci.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=Qt("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=Qt("div",t+"-content-wrapper",e);this._contentNode=Qt("div",t+"-content",i),Te(e),Me(this._contentNode),be(e,"contextmenu",Ce),this._tipContainer=Qt("div",t+"-tip-container",e),this._tip=Qt("div",t+"-tip",this._tipContainer),this.options.closeButton&&((i=this._closeButton=Qt("a",t+"-close-button",e)).setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">&#215;</span>',be(i,"click",this.close,this))},_updateLayout:function(){var t=this._contentNode,e=t.style,i=(e.width="",e.whiteSpace="nowrap",t.offsetWidth),n=(i=Math.min(i,this.options.maxWidth),i=(i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="",t.offsetHeight),this.options.maxHeight),o="leaflet-popup-scrolled";n&&n<i?(e.height=n+"px",se(t,o)):re(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);var e=this._getAnchor();de(this._container,t.add(e))},_adjustPan:function(t){var e,i,n,o,s,r,a,h;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),e=this._map,i=parseInt(Jt(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+i,h=this._containerWidth,(n=new E(this._containerLeft,-i-this._containerBottom))._add(pe(this._container)),n=e.layerPointToContainerPoint(n),s=I(this.options.autoPanPadding),o=I(this.options.autoPanPaddingTopLeft||s),s=I(this.options.autoPanPaddingBottomRight||s),r=e.getSize(),a=0,n.x+h+s.x>r.x&&(a=n.x+h-r.x+s.x),n.x-a-o.x<(h=0)&&(a=n.x-o.x),n.y+i+s.y>r.y&&(h=n.y+i-r.y+s.y),n.y-h-o.y<0&&(h=n.y-o.y),(a||h)&&e.fire("autopanstart").panBy([a,h],{animate:t&&"moveend"===t.type}))},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ti=(Be.mergeOptions({closePopupOnClick:!0}),Be.include({openPopup:function(t,e,i){return this._initOverlay(Mi,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),ut.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Mi,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Ae(t),e=t.layer||t.target,this._popup._source!==e||e instanceof ui?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ci.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ci.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ci.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ci.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Qt("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),s=(i=i.layerPointToContainerPoint(t),this.options.direction),r=n.offsetWidth,a=n.offsetHeight,h=I(this.options.offset),u=this._getAnchor();i="top"===s?(e=r/2,a):"bottom"===s?(e=r/2,0):(e="center"===s?r/2:"right"===s?0:"left"===s?r:i.x<o.x?(s="right",0):(s="left",r+2*(h.x+u.x)),a/2);t=t.subtract(I(e,i,!0)).add(h).add(u),re(n,"leaflet-tooltip-right"),re(n,"leaflet-tooltip-left"),re(n,"leaflet-tooltip-top"),re(n,"leaflet-tooltip-bottom"),se(n,"leaflet-tooltip-"+s),de(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&ue(this._container,t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),this._setPosition(t)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}})),zi=(Be.include({openTooltip:function(t,e,i){return this._initOverlay(Ti,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),ut.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ti,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){var e,i;!t&&this._tooltipHandlersAdded||(e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t)},openTooltip:function(t){return this._tooltip&&this._tooltip._prepareOpen(t)&&this._tooltip.openOn(this._map),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var e=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(t=this._map.mouseEventToContainerPoint(t.originalEvent),t=this._map.containerPointToLayerPoint(t),e=this._map.layerPointToLatLng(t)),this._tooltip.setLatLng(e)}}),si.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){t=t&&"DIV"===t.tagName?t:document.createElement("div");var e=this.options;return e.html instanceof Element?(ee(t),t.appendChild(e.html)):t.innerHTML=!1!==e.html?e.html:"",e.bgPos&&(e=I(e.bgPos),t.style.backgroundPosition=-e.x+"px "+-e.y+"px"),this._setIconStyles(t,"icon"),t},createShadow:function(){return null}}));si.Default=ri;var Ai=ut.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Mt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),te(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ie(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ne(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(){var t;return this._map&&(this._removeAllTiles(),(t=this._clampZoom(this._map.getZoom()))!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof E?t:new E(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Mt.ielt9){ue(this._container,this.options.opacity);var t,e=+new Date,i=!1,n=!1;for(t in this._tiles){var o,s=this._tiles[t];s.current&&s.loaded&&(o=Math.min(1,(e-s.loaded)/200),ue(s.el,o),o<1?i=!0:(s.active?n=!0:this._onOpaqueTile(s),s.active=!0))}n&&!this._noPrune&&this._pruneTiles(),i&&(C(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=Qt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(te(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=Qt("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,i,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)(i=this._tiles[t]).current&&!i.active&&(e=i.coords,this._retainParent(e.x,e.y,e.z,e.z-5)||this._retainChildren(e.x,e.y,e.z,e.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)te(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){i-=1;var o=((o=new E(+(t=Math.floor(t/2)),+(e=Math.floor(e/2)))).z=i,this._tileCoordsToKey(o));return(o=this._tiles[o])&&o.active?o.retain=!0:(o&&o.loaded&&(o.retain=!0),n<i&&this._retainParent(t,e,i,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=((r=new E(o,s)).z=i+1,this._tileCoordsToKey(r));(r=this._tiles[r])&&r.active?r.retain=!0:(r&&r.loaded&&(r.retain=!0),i+1<n&&this._retainChildren(o,s,i+1,n))}},_resetView:function(t){t=t&&(t.pinch||t.flyTo),this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var o=Math.round(e),s=(o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o),this.options.updateWhenZooming&&o!==this._tileZoom);n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom);e=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Mt.any3d?ce(t.el,e,n):de(t.el,e)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=(i=this._map)._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),i=(e=i.getZoomScale(e,this._tileZoom),t=i.project(t,this._tileZoom).floor(),i.getSize().divideBy(2*e));return new j(t.subtract(i),t.add(i))},_update:function(t){if(n=this._map){var e=this._clampZoom(n.getZoom());if(void 0===t&&(t=n.getCenter()),void 0!==this._tileZoom){var i,n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=(n=this.options.keepBuffer,new j(o.getBottomLeft().subtract([n,-n]),o.getTopRight().add([n,-n])));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(i in this._tiles){var h=this._tiles[i].coords;h.z===this._tileZoom&&a.contains(new E(h.x,h.y))||(this._tiles[i].current=!1)}if(1<Math.abs(e-this._tileZoom))this._setView(t,e);else{for(var u=o.min.y;u<=o.max.y;u++)for(var l=o.min.x;l<=o.max.x;l++){var c,d=new E(l,u);d.z=this._tileZoom,this._isValidTile(d)&&((c=this._tiles[this._tileCoordsToKey(d)])?c.current=!0:r.push(d))}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var p=document.createDocumentFragment();for(l=0;l<r.length;l++)this._addTile(r[l],p);this._level.el.appendChild(p)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),N(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i);i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){return t=new B((t=this._tileCoordsToNwSe(t))[0],t[1]),this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=new E(+(t=t.split(":"))[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(te(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){se(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,Mt.ielt9&&this.options.opacity<1&&ue(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&S(o(this._tileReady,this,t,null,s)),de(s,i),this._tiles[n]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(ue(i.el,0),C(this._fadeFrame),this._fadeFrame=S(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(se(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Mt.ielt9||!this._map._fadeAnimated?S(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new E(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new j(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Ei=Ai.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Mt.retina&&0<e.maxZoom&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return be(i,"load",o(this._tileOnLoad,this,e,i)),be(i,"error",o(this._tileOnError,this,e,i)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var i={r:Mt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(t=this._globalTileRange.max.y-t.y,this.options.tms&&(i.y=t),i["-y"]=t),f(this._url,e(i,this.options))},_tileOnLoad:function(t,e){Mt.ielt9?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return(t=this.options.zoomReverse?e-t:t)+this.options.zoomOffset},_getSubdomain:function(t){return t=Math.abs(t.x+t.y)%this.options.subdomains.length,this.options.subdomains[t]},_abortLoading:function(){var t,e,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=u,i.onerror=u,i.complete||(i.src=y,e=this._tiles[t].coords,te(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})))},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",y),Ai.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==y))return Ai.prototype._tileReady.call(this,t,e,i)}});function Oi(t,e){return new Ei(t,e)}var Ii=Ei.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,i){this._url=t;var n,o=e({},this.defaultWmsParams);for(n in i)n in this.options||(o[n]=i[n]);t=(i=p(this,i)).detectRetina&&Mt.retina?2:1;var s=this.getTileSize();o.width=s.x*t,o.height=s.y*t,this.wmsParams=o},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[e]=this._crs.code,Ei.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=(e=(i=Z((i=this._crs).project(e[0]),i.project(e[1]))).min,i.max);e=(1.3<=this._wmsVersion&&this._crs===ii?[e.y,e.x,i.y,i.x]:[e.x,e.y,i.x,i.y]).join(",");return(i=Ei.prototype.getTileUrl.call(this,t))+_(this.wmsParams,i,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+e},setParams:function(t,i){return e(this.wmsParams,t),i||this.redraw(),this}});Ei.WMS=Ii,Oi.wms=function(t,e){return new Ii(t,e)};var ji=ut.extend({options:{padding:.1},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&se(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e);n=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));Mt.any3d?ce(this._container,n,i):de(this._container,n)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new j(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zi=ji.extend({options:{tolerance:0},getEvents:function(){var t=ji.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ji.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");be(t,"mousemove",this._onMouseMove,this),be(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),be(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){C(this._redrawRequest),delete this._ctx,te(this._container),xe(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,e,i,n;this._map._animatingZoom&&this._bounds||(ji.prototype._update.call(this),t=this._bounds,e=this._container,i=t.getSize(),n=Mt.retina?2:1,de(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Mt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){ji.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),t=(this._layers[r(t)]=t)._order={layer:t,prev:this._drawLast,next:null},this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=(i=t._order).next,i=i.prev;e?e.prev=i:this._drawLast=i,i?i.next=e:this._drawFirst=e,delete t._order,delete this._layers[r(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){for(var e,i=t.options.dashArray.split(/[, ]+/),n=[],o=0;o<i.length;o++){if(e=Number(i[o]),isNaN(e))return;n.push(e)}t.options._dashArray=n}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||S(this._redraw,this))},_extendRedrawBounds:function(t){var e;t._pxBounds&&(e=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new j,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,e=this._redrawBounds;e?(t=e.getSize(),this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var t,e,i=this._redrawBounds;this._ctx.save(),i&&(e=i.getSize(),this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()),this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,r=t._parts,a=r.length,h=this._ctx;if(a){for(h.beginPath(),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],h[n?"lineTo":"moveTo"](s.x,s.y);e&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){var e,i,n,o;this._drawing&&!t._empty()&&(e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),1!=(o=(Math.max(Math.round(t._radiusY),1)||n)/n)&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!=o&&i.restore(),this._fillStroke(i,t))},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&(("click"===t.type||"preclick"===t.type)&&this._map._draggableMoved(e)||(i=e));this._fireEvent(!!i&&[i],t)},_onMouseMove:function(t){var e;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(e=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,e))},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(re(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(se(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e,i,n=t._order;n&&(e=n.next,i=n.prev,e&&((e.prev=i)?i.next=e:e&&(this._drawFirst=e),n.prev=this._drawLast,(this._drawLast.next=n).next=null,this._drawLast=n,this._requestRedraw(t)))},_bringToBack:function(t){var e,i,n=t._order;n&&(e=n.next,(i=n.prev)&&((i.next=e)?e.prev=i:i&&(this._drawLast=i),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)))}});function Bi(t){return Mt.canvas?new Zi(t):null}var Ni=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">')}}(),Di=(dt={_initContainer:function(){this._container=Qt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ji.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Ni("shape");se(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Ni("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;te(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Ni("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Ni("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ie(t._container)},_bringToBack:function(t){ne(t._container)}},Mt.vml?Ni:U),Ri=ji.extend({_initContainer:function(){this._container=Di("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Di("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){te(this._container),xe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(ji.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),de(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=Di("path");t.options.className&&se(e,t.options.className),t.options.interactive&&se(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){te(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path;t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Y(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ";e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ie(t._path)},_bringToBack:function(t){ne(t._path)}});function Fi(t){return Mt.svg||Mt.vml?new Ri(t):null}Mt.vml&&Ri.include(dt),Be.include({getRenderer:function(t){return t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Bi(t)||Fi(t)}});var Gi=pi.extend({initialize:function(t,e){pi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=N(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Ri.create=Di,Ri.pointsToPath=Y,_i.geometryToLayer=mi,_i.coordsToLatLng=gi,_i.coordsToLatLngs=vi,_i.latLngToCoords=yi,_i.latLngsToCoords=bi,_i.getFeature=Li,_i.asFeature=xi,Be.mergeOptions({boxZoom:!0});K=Q.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(){be(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){xe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){te(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),qt(),_e(),this._startPoint=this._map.mouseEventToContainerPoint(t),be(document,{contextmenu:Ae,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=Qt("div","leaflet-zoom-box",this._container),se(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=(t=new j(this._point,this._startPoint)).getSize();de(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(te(this._box),re(this._container,"leaflet-crosshair")),$t(),me(),xe(document,{contextmenu:Ae,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0),t=new B(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Be.addInitHook("addHandler","boxZoom",K),Be.mergeOptions({doubleClickZoom:!0}),pt=Q.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta;i=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}});var Hi=(Be.addInitHook("addHandler","doubleClickZoom",pt),Be.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),Q.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Ve(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))),se(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){re(this._map._container,"leaflet-grab"),re(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,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=N(this._map.options.maxBounds),this._offsetLimit=Z(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){var t,e;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit,t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=((o=this._draggable._newPos.x)-e+i)%t+e-i,o=(o+e+i)%t-e-i;t=Math.abs(n+i)<Math.abs(o+i)?n:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=t},_onDragEnd:function(t){var e,i,n,o,s=this._map,r=s.options,a=!r.inertia||t.noInertia||this._times.length<2;s.fire("dragend",t),a?s.fire("moveend"):(this._prunePositions(+new Date),t=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,e=r.easeLinearity,a=(t=t.multiplyBy(e/a)).distanceTo([0,0]),i=Math.min(r.inertiaMaxSpeed,a),t=t.multiplyBy(i/a),n=i/(r.inertiaDeceleration*e),(o=t.multiplyBy(-n/2).round()).x||o.y?(o=s._limitOffset(o,s.options.maxBounds),S((function(){s.panBy(o,{duration:n,easeLinearity:e,noMoveStart:!0,animate:!0})}))):s.fire("moveend"))}})),qi=(_t=(Be.addInitHook("addHandler","dragging",Hi),Be.mergeOptions({keyboard:!0,keyboardPanDelta:80}),Q.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"),be(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(),xe(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,e,i;this._focused||(i=document.body,t=document.documentElement,e=i.scrollTop||t.scrollTop,i=i.scrollLeft||t.scrollLeft,this._map._container.focus(),window.scrollTo(i,e))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var e=this._panKeys={},i=this.keyCodes,n=0,o=i.left.length;n<o;n++)e[i.left[n]]=[-1*t,0];for(n=0,o=i.right.length;n<o;n++)e[i.right[n]]=[t,0];for(n=0,o=i.down.length;n<o;n++)e[i.down[n]]=[0,t];for(n=0,o=i.up.length;n<o;n++)e[i.up[n]]=[0,-1*t]},_setZoomDelta:function(t){for(var e=this._zoomKeys={},i=this.keyCodes,n=0,o=i.zoomIn.length;n<o;n++)e[i.zoomIn[n]]=t;for(n=0,o=i.zoomOut.length;n<o;n++)e[i.zoomOut[n]]=-t},_addHooks:function(){be(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){xe(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[i],t.shiftKey&&(e=I(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ae(t)}}})),mt=(Be.addInitHook("addHandler","keyboard",_t),Be.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60}),Q.extend({addHooks:function(){be(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){xe(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ie(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date),e=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),e),Ae(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0,n=(t._stop(),this._delta/(4*this._map.options.wheelPxPerZoomLevel));n=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,i=i?Math.ceil(n/i)*i:n,n=t._limitZoom(e+(0<this._delta?i:-i))-e;this._delta=0,this._startTime=null,n&&("center"===t.options.scrollWheelZoom?t.setZoom(e+n):t.setZoomAround(this._lastMousePos,e+n))}})),ft=(Be.addInitHook("addHandler","scrollWheelZoom",mt),Be.mergeOptions({tapHold:Mt.touchNative&&Mt.safari&&Mt.mobile,tapTolerance:15}),Q.extend({addHooks:function(){be(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){xe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){var e;clearTimeout(this._holdTimeout),1===t.touches.length&&(e=t.touches[0],this._startPos=this._newPos=new E(e.clientX,e.clientY),this._holdTimeout=setTimeout(o((function(){this._cancel(),this._isTapValid()&&(be(document,"touchend",ze),be(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),600),be(document,"touchend touchcancel contextmenu",this._cancel,this),be(document,"touchmove",this._onMove,this))},_cancelClickPrevent:function t(){xe(document,"touchend",ze),xe(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),xe(document,"touchend touchcancel contextmenu",this._cancel,this),xe(document,"touchmove",this._onMove,this)},_onMove:function(t){t=t.touches[0],this._newPos=new E(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){(t=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY}))._simulated=!0,e.target.dispatchEvent(t)}})),gt=(Be.addInitHook("addHandler","tapHold",ft),Be.mergeOptions({touchZoom:Mt.touch,bounceAtZoomLimits:!0}),Q.extend({addHooks:function(){se(this._map._container,"leaflet-touch-zoom"),be(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){re(this._map._container,"leaflet-touch-zoom"),xe(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e,i,n=this._map;!t.touches||2!==t.touches.length||n._animatingZoom||this._zooming||(e=n.mouseEventToContainerPoint(t.touches[0]),i=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(e.add(i)._divideBy(2))),this._startDist=e.distanceTo(i),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),be(document,"touchmove",this._onTouchMove,this),be(document,"touchend touchcancel",this._onTouchEnd,this),ze(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&1<s)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1==s)return}else{if(i=i._add(n)._divideBy(2)._subtract(this._centerPoint),1==s&&0===i.x&&0===i.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(i),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),C(this._animRequest),n=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1}),this._animRequest=S(n,this,!0),ze(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,C(this._animRequest),xe(document,"touchmove",this._onTouchMove,this),xe(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}})),Be.addInitHook("addHandler","touchZoom",gt),Be.BoxZoom=K,Be.DoubleClickZoom=pt,Be.Drag=Hi,Be.Keyboard=_t,Be.ScrollWheelZoom=mt,Be.TapHold=ft,Be.TouchZoom=gt,t.Bounds=j,t.Browser=Mt,t.CRS=F,t.Canvas=Zi,t.Circle=ci,t.CircleMarker=li,t.Class=T,t.Control=Re,t.DivIcon=zi,t.DivOverlay=Ci,t.DomEvent=J,t.DomUtil=X,t.Draggable=Ve,t.Evented=A,t.FeatureGroup=oi,t.GeoJSON=_i,t.GridLayer=Ai,t.Handler=Q,t.Icon=si,t.ImageOverlay=ki,t.LatLng=D,t.LatLngBounds=B,t.Layer=ut,t.LayerGroup=ni,t.LineUtil=et,t.Map=Be,t.Marker=hi,t.Mixin=tt,t.Path=ui,t.Point=E,t.PolyUtil=it,t.Polygon=pi,t.Polyline=di,t.Popup=Mi,t.PosAnimation=Ze,t.Projection=st,t.Rectangle=Gi,t.Renderer=ji,t.SVG=Ri,t.SVGOverlay=Si,t.TileLayer=Ei,t.Tooltip=Ti,t.Transformation=q,t.Util=M,t.VideoOverlay=Pi,t.bind=o,t.bounds=Z,t.canvas=Bi,t.circle=function(t,e,i){return new ci(t,e,i)},t.circleMarker=function(t,e){return new li(t,e)},t.control=Ne,t.divIcon=function(t){return new zi(t)},t.extend=e,t.featureGroup=function(t,e){return new oi(t,e)},t.geoJSON=wi,t.geoJson=ct,t.gridLayer=function(t){return new Ai(t)},t.icon=function(t){return new si(t)},t.imageOverlay=function(t,e,i){return new ki(t,e,i)},t.latLng=R,t.latLngBounds=N,t.layerGroup=function(t,e){return new ni(t,e)},t.map=function(t,e){return new Be(t,e)},t.marker=function(t,e){return new hi(t,e)},t.point=I,t.polygon=function(t,e){return new pi(t,e)},t.polyline=function(t,e){return new di(t,e)},t.popup=function(t,e){return new Mi(t,e)},t.rectangle=function(t,e){return new Gi(t,e)},t.setOptions=p,t.stamp=r,t.svg=Fi,t.svgOverlay=function(t,e,i){return new Si(t,e,i)},t.tileLayer=Oi,t.tooltip=function(t,e){return new Ti(t,e)},t.transformation=$,t.version="1.8.0",t.videoOverlay=function(t,e,i){return new Pi(t,e,i)},window.L);t.noConflict=function(){return window.L=qi,this},window.L=t})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t=t||self).Leaflet=t.Leaflet||{},t.Leaflet.markercluster={}))}(this,(function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,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(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):(t.getLatLng?this._map?t.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow())):(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t})):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t})),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,o=this._nonPointGroup,s=this.options.chunkedLoading,r=this.options.chunkInterval,a=this.options.chunkProgress,h=t.length,u=0,l=!0;if(this._map){var c=(new Date).getTime(),d=L.bind((function(){var p=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();u<h;u++){if(s&&u%200==0){var _=(new Date).getTime()-p;if(r<_)break}if((i=t[u])instanceof L.LayerGroup)l&&(t=t.slice(),l=!1),this._extractNonGroupLayers(i,t),h=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var m=i.__parent.getAllChildMarkers(),f=m[0]===i?m[1]:m[0];n.removeLayer(f)}}else o.addLayer(i),e||this.fire("layeradd",{layer:i})}a&&a(u,h,(new Date).getTime()-c),u===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;u<h;u++)(i=t[u])instanceof L.LayerGroup?(l&&(t=t.slice(),l=!1),this._extractNonGroupLayers(i,t),h=t.length):i.getLatLng?this.hasLayer(i)||p.push(i):o.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,o=this._featureGroup,s=this._nonPointGroup,r=!0;if(!this._map){for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(r&&(t=t.slice(),r=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),s.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var a=t.slice(),h=n;for(e=0;e<h;e++)(i=a[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,a),h=a.length):this._unspiderfyLayer(i)}for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(r&&(t=t.slice(),r=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),o.hasLayer(i)&&(o.removeLayer(i),i.clusterShow&&i.clusterShow())):(s.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent}),this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;0<=e;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,s=this._needsClustering.slice(),r=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(s),n=s.length-1;0<=n;n--){for(i=!0,o=r.length-1;0<=o;o--)if(r[o].layer===s[n]){i=!1;break}i&&t.call(e,s[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer((function(e){t.push(e)})),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer((function(i){L.stamp(i)===t&&(e=i)})),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;0<=e;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).length-1;0<=e;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=this._map;"function"!=typeof e&&(e=function(){});var n=function(){!i.hasLayer(t)&&!i.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;0<=i;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());o<=e&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,s=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var h,u=t.__parent,l=u._markers;for(this._arraySplice(l,t);u&&(u._childCount--,u._boundsNeedUpdate=!0,!(u._zoom<a));)e&&u._childCount<=1?(h=u._markers[0]===t?u._markers[1]:u._markers[0],n[u._zoom].removeObject(u,r.project(u._cLatLng,u._zoom)),o[u._zoom].addObject(h,r.project(h.getLatLng(),u._zoom)),this._arraySplice(u.__parent._childClusters,u),u.__parent._markers.push(h),h.__parent=u.__parent,u._icon&&(s.removeLayer(u),i||s.addLayer(h))):u._iconNeedsUpdate=!0,u=u.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom;(e||n||o)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),2<t.layer.getChildCount()&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom,o=this._map;(t||i||n)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),o.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;e<=o;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,o=this._gridClusters,s=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);r<=e;e--){i=this._map.project(t.getLatLng(),e);var a=o[e].getNearObject(i);if(a)return a._addChild(t),void(t.__parent=a);if(a=s[e].getNearObject(i)){var h=a.__parent;h&&this._removeLayer(a,!1);var u=new this._markerCluster(this,e,a,t);o[e].addObject(u,this._map.project(u._cLatLng,e)),a.__parent=u;var l=t.__parent=u;for(n=e-1;n>h._zoom;n--)l=new this._markerCluster(this,n,l),o[n].addObject(l,this._map.project(a.getLatLng(),n));return h._addChild(l),void this._removeFromGridUnclustered(a,e)}s[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}))},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),o=this._featureGroup,s=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,s,(function(s){var r,a=s._latlng,h=s._markers;for(n.contains(a)||(a=null),s._isSingleParent()&&t+1===e?(o.removeLayer(s),s._recursivelyAddChildrenToMap(null,e,n)):(s.clusterHide(),s._recursivelyAddChildrenToMap(a,e,n)),i=h.length-1;0<=i;i--)r=h[i],n.contains(r._latlng)||o.removeLayer(r)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),o.eachLayer((function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()})),this._topClusterLevel._recursively(n,t,e,(function(t){t._recursivelyRestoreChildPositions(e)})),this._ignoreMove=!1,this._enqueue((function(){this._topClusterLevel._recursively(n,t,s,(function(t){o.removeLayer(t),t.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(2<e._childCount?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue((function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()}))):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,o,e+1,i);var s=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue((function(){if(1===t._childCount){var r=t._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else t._recursively(n,i,o,(function(t){t._recursivelyRemoveChildrenFromMap(n,o,e+1)}));s._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var n=this._markers.length-1;0<=n;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,o=n.getBoundsZoom(this._bounds),s=this._zoom+1,r=n.getZoom();0<i.length&&s<o;){s++;var a=[];for(e=0;e<i.length;e++)a=a.concat(i[e]._childClusters);i=a}s<o?this._group._map.setView(this._latlng,s):o<=r?this._group._map.setView(this._latlng,r+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,o=this._markers,s=this._childClusters,r=0,a=0,h=this._childCount;if(0!==h){for(this._resetBounds(),t=0;t<o.length;t++)i=o[t]._latlng,this._bounds.extend(i),r+=i.lat,a+=i.lng;for(t=0;t<s.length;t++)(e=s[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,r+=i.lat*n,a+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(r/h,a/h),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,(function(t){var i,n,o=t._markers;for(i=o.length-1;0<=i;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}),(function(t){var i,n,o=t._childClusters;for(i=o.length-1;0<=i;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,(function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),i),o._isSingleParent()&&i-1===n?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,i)):o.clusterHide(),o._addToMap()}))},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,(function(t){t.clusterShow()}))},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,(function(n){if(e!==n._zoom)for(var o=n._markers.length-1;0<=o;o--){var s=n._markers[o];i.contains(s._latlng)&&(t&&(s._backupLatlng=s.getLatLng(),s.setLatLng(t),s.clusterHide&&s.clusterHide()),n._group._featureGroup.addLayer(s))}}),(function(e){e._addToMap(t)}))},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;0<=e;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;0<=o;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,s;this._recursively(t,e-1,i-1,(function(t){for(s=t._markers.length-1;0<=s;s--)o=t._markers[s],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}),(function(t){for(s=t._childClusters.length-1;0<=s;s--)o=t._childClusters[s],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}))},_recursively:function(t,e,i,n,o){var s,r,a=this._childClusters,h=this._zoom;if(e<=h&&(n&&n(this),o&&h===i&&o(this)),h<e||h<i)for(s=a.length-1;0<=s;s--)(r=a[s])._boundsNeedUpdate&&r._recalculateBounds(),t.intersects(r._bounds)&&r._recursively(t,e,i,n,o)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,s=o[n]=o[n]||{},r=s[i]=s[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,r.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),s=this._getCoord(e.y),r=this._grid,a=r[s]=r[s]||{},h=a[o]=a[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=h.length;i<n;i++)if(h[i]===t)return h.splice(i,1),1===n&&delete a[o],!0},eachObject:function(t,e){var i,n,o,s,r,a,h=this._grid;for(i in h)for(n in r=h[i])for(o=0,s=(a=r[n]).length;o<s;o++)t.call(e,a[o])&&(o--,s--)},getNearObject:function(t){var e,i,n,o,s,r,a,h,u=this._getCoord(t.x),l=this._getCoord(t.y),c=this._objectPoint,d=this._sqCellSize,p=null;for(e=l-1;e<=l+1;e++)if(o=this._grid[e])for(i=u-1;i<=u+1;i++)if(s=o[i])for(n=0,r=s.length;n<r;n++)a=s[n],((h=this._sqDist(c[L.Util.stamp(a)],t))<d||h<=d&&null===p)&&(d=h,p=a);return p},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,o,s=0,r=null,a=[];for(i=e.length-1;0<=i;i--)n=e[i],0<(o=this.getDistant(n,t))&&(a.push(n),s<o&&(s=o,r=n));return{maxPoint:r,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i,n=!1,o=!1,s=!1,r=!1,a=null,h=null,u=null,l=null,c=null;for(e=t.length-1;0<=e;e--){var d=t[e];(!1===n||d.lat>n)&&(n=(a=d).lat),(!1===o||d.lat<o)&&(o=(h=d).lat),(!1===s||d.lng>s)&&(s=(u=d).lng),(!1===r||d.lng<r)&&(r=(l=d).lng)}return i=o!==n?(c=h,a):(c=l,u),[].concat(this.buildConvexHull([c,i],t),this.buildConvexHull([i,c],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;0<=e;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),t=(this._group._spiderfied=this)._group.options.spiderfyShapePositions?this._group.options.spiderfyShapePositions(e.length,i):e.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(e.length,i):(i.y+=10,this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,s=this._2PI/t,r=[];for(o=Math.max(o,35),r.length=t,i=0;i<t;i++)n=this._circleStartAngle+i*s,r[i]=new L.Point(e.x+o*Math.cos(n),e.y+o*Math.sin(n))._round();return r},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,o=n*this._spiralLengthStart,s=n*this._spiralFootSeparation,r=n*this._spiralLengthFactor*this._2PI,a=0,h=[];for(i=h.length=t;0<=i;i--)i<t&&(h[i]=new L.Point(e.x+o*Math.cos(a),e.y+o*Math.sin(a))._round()),o+=r/(a+=s/o+5e-4*i);return h},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,s=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=s.length-1;0<=e;e--)t=s[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:s}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,s,r=this._group,a=r._map,h=r._featureGroup,u=this._group.options.spiderLegPolylineOptions;for(r._ignoreMove=!0,i=0;i<t.length;i++)s=a.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,s],u),a.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n);this.setOpacity(.3),r._ignoreMove=!1,r.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,s,r,a,h=this,u=this._group,l=u._map,c=u._featureGroup,d=this._latlng,p=l.latLngToLayerPoint(d),_=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),f=m.opacity;for(void 0===f&&(f=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),_?(m.opacity=0,m.className=(m.className||"")+" leaflet-cluster-spider-leg"):m.opacity=f,u._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],a=l.layerPointToLatLng(e[i]),o=new L.Polyline([d,a],m),l.addLayer(o),n._spiderLeg=o,_&&(r=(s=o._path).getTotalLength()+.1,s.style.strokeDasharray=r,s.style.strokeDashoffset=r),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),c.addLayer(n),n._setPos&&n._setPos(p);for(u._forceLayout(),u._animationStart(),i=t.length-1;0<=i;i--)a=l.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),_&&((s=(o=n._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:f}));this.setOpacity(.3),u._ignoreMove=!1,setTimeout((function(){u._animationEnd(),u.fire("spiderfied",{cluster:h,markers:t})}),200)},_animationUnspiderfy:function(t){var e,i,n,o,s,r,a=this,h=this._group,u=h._map,l=h._featureGroup,c=t?u._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):u.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--)(e=d[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,r=!0,e._setPos&&(e._setPos(c),r=!1),e.clusterHide&&(e.clusterHide(),r=!1),r&&l.removeLayer(e),p&&(s=(o=(n=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=s,n.setStyle({opacity:0})));h._ignoreMove=!1,setTimeout((function(){var t=0;for(i=d.length-1;0<=i;i--)(e=d[i])._spiderLeg&&t++;for(i=d.length-1;0<=i;i--)(e=d[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),1<t&&l.removeLayer(e),u.removeLayer(e._spiderLeg),delete e._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(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})})),ProjectorForm=function(t){const e=this;this.params=t||{},this.vars={typingTimer:"",doneTypingInterval:500,lowestPriceData:!1},this.loadProjector=t=>{app_shop.fn.load(t,[["#content","#content"],["#breadcrumbs","#breadcrumbs"]],(function(){projectorObj.configObj.disableBuyButtonTXT="",projectorObj.currentSizeObj="",projectorObj.start(),app_shop.fn.runAjaxFn(),app_shop.vars.projectorSlider&&app_shop.vars.projectorSlider.reset(),app_shop.vars.curr_url_projector=location.pathname,app_shop.vars.projectorElevate&&app_shop.vars.projectorElevate.reset(),app_shop.vars.bLazy&&app_shop.vars.bLazy.revalidate()}),"?set_render=content,head")},this.alert=(t,e)=>{if(0===t.find($("#alert")).length){const i=`<div id="alert" class="alert">${e}</div>`;t.prepend(i),t.addClass("--alert"),setTimeout((()=>{t.find($("#alert")).addClass("--open")}),10),setTimeout((()=>{t.find($("#alert")).remove(),t.removeClass("--alert")}),3500)}},this.alertProjector=()=>{this.alert($("#projector_form .projector_sizes__sub"),app_shop.txt.txt_74629_8),$("html, body").animate({scrollTop:$("#projector_form .projector_sizes__sub").offset().top-60-$("header").height()},"fast")},this.dropdownMultiVersionsGenerate=t=>{t.querySelectorAll(".f-dropdown-item").forEach((t=>{const e=t.hasAttribute("data-gfx")?`<span class="gfx_wrapper">${t.getAttribute("data-gfx").split("|next|").map((e=>`<img src="${e}" class="gfx" alt="${t.textContent}" />`)).join("")}</span>`:"",i=`<span class="name_wrapper"><span class="name">${t.textContent}</span><small class="conflict_txt">${app_shop.txt.txt_74629_conflict}</small></span>`;t.innerHTML=e+i}))},this.dropdownMultiVersionsClick=t=>{t.querySelectorAll(".f-dropdown-li").forEach((i=>{i.addEventListener("click",(function(i){i.preventDefault();const n=this.querySelector(".f-dropdown-item"),o=t.querySelectorAll(".f-dropdown-item"),s=n.getAttribute("data-index"),r=n.querySelector(".name").innerHTML,a=t.querySelector("select"),h=t.querySelector("button.f-dropdown-toggle"),u=h.querySelector(".f-dropdown-button"),l=n.getAttribute("data-product"),c=n.getAttribute("data-link"),d=n.closest("#multi_versions").querySelectorAll(".projector_multiversions__item.--conflict");if(!n.classList.contains("--selected")){if(o.forEach((t=>t.classList.remove("--selected"))),n.classList.add("--selected"),a.selectedIndex=s,u.innerHTML=r,h.setAttribute("data-indexcurrent",n.getAttribute("data-index")),t.classList.remove("--open"),!this.classList.contains("--dependent")&&d.length<2)return e.loadProjector(c),!1;const i=`&multiversions[selected]=${[...document.querySelectorAll(".projector_multiversions .f-dropdown-item.--selected")].map((t=>t.getAttribute("data-values_id"))).join(",")}&multiversions[last_selected]=${n.getAttribute("data-values_id")}`;$.ajax({url:`/ajax/projector.php?product=${l}&get=multiversions${i}`,type:"get",dataType:"json",success:function(t){t.multiversions.forEach((t=>{const e=document.querySelector(`.projector_multiversions__item[data-id="${t.id}"]`);e&&e.classList.remove("--conflict"),Object.values(t.items).forEach((t=>{const i=document.querySelector('.projector_multiversions__item .f-dropdown-item[data-values_id="'+t.values_id+'"]');i&&(i.parentNode.classList.remove("--dependent"),i.setAttribute("data-product",t.products[0].product_id),i.setAttribute("data-link",t.products[0].url),t.disabled&&(i.classList.contains("--selected")&&e.classList.add("--conflict"),i.parentNode.classList.add("--dependent")))}))}))},error:function(){}})}return!1}))}))},this.initMultiVersions=()=>{app_shop.fn.projectorMultiVersionsSelect=new SelectToDropdown({selector:".projector_multiversions__select:not(.f-dropdown)",generateDropdownCallback:!!this.dropdownMultiVersionsGenerate&&this.dropdownMultiVersionsGenerate,clickDropdownCallback:!!this.dropdownMultiVersionsClick&&this.dropdownMultiVersionsClick,disableMobileView:!0})},this.dropdownVersionsGenerate=t=>{t.querySelectorAll(".f-dropdown-item").forEach((t=>{const e=t.hasAttribute("data-gfx")?`<span class="gfx_wrapper">\n          ${t.hasAttribute("data-gfx_second")?`<picture>\n              <source srcset="${t.getAttribute("data-gfx")}" type="image/webp"/>\n              <img src="${t.getAttribute("data-gfx_second")}" class="gfx" alt="${t.textContent}" />\n            </picture>`:`<img src="${t.getAttribute("data-gfx")}" class="gfx" alt="${t.textContent}" />`}\n        </span>`:"",i=`<span class="name">${t.textContent}</span>`,n=t.closest(".f-dropdown-li").classList.contains("--disabled")?`<span class="soldout">${app_shop.txt.txt_sold_out}</span>`:"";t.innerHTML=e+i+n}))},this.dropdownVersionsAfterClick=t=>{const e=t.querySelector(".f-dropdown-item").getAttribute("data-link");window.location.href=e},this.initVersions=()=>{app_shop.fn.projectorVersionsSelect=new SelectToDropdown({selector:".projector_versions__select:not(.f-dropdown)",generateDropdownCallback:!!this.dropdownVersionsGenerate&&this.dropdownVersionsGenerate,afterClickDropdownCallback:!!this.dropdownVersionsAfterClick&&this.dropdownVersionsAfterClick,disableMobileView:!0})},this.sizeSelected=()=>{const t=document.getElementById("projector_size_hidden");return!(!t||""===t.value)},this.setSizes=t=>{const e=document.getElementById("projector_size_hidden");document.getElementById("projector_number");e&&e.setAttribute("value",t),projectorObj.setCurrentSizeObj(t),projectorObj.start(),$("#projector_sizes_cont .projector_sizes__sub").removeClass("--alert"),$("#projector_sizes_cont #alert").remove()},this.dropdownSizesGenerate=t=>{t.querySelectorAll(".f-dropdown-item").forEach((t=>{const e=!!t.hasAttribute("data-count")&&t.getAttribute("data-count");let i="";e&&"-1"!==e&&(i="0"===e&&""!==app_shop.txt.txt_sold_out?`<span class="count">${app_shop.txt.txt_sold_out}</span>`:"1"==e?`<span class="count">${e} ${product_data.unit}</span>`:`<span class="count">${e} ${product_data.unit_plural}</span>`);const n=`<span class="name">${t.textContent}</span>`;t.innerHTML=n+i})),t.querySelectorAll("option[label]").forEach((t=>{t.textContent=t.getAttribute("label")}))},this.dropdownSizesAfterClick=t=>{const e=t.querySelector(".f-dropdown-item"),i=e.getAttribute("data-value");this.setSizes(i),this.setOmnibusPrice(e.getAttribute("data-omnibus"))},this.selectSize=t=>{const e=t.getAttribute("data-type");$("#projector_sizes_cont .projector_sizes__item").removeClass("--selected"),t.classList.add("--selected"),this.setSizes(e),this.setOmnibusPrice(t.getAttribute("data-omnibus"))},this.initSizes=()=>{app_shop.fn.projectorSizesSelect=new SelectToDropdown({selector:".projector_sizes__select:not(.f-dropdown)",generateDropdownCallback:!!this.dropdownSizesGenerate&&this.dropdownSizesGenerate,afterClickDropdownCallback:!!this.dropdownSizesAfterClick&&this.dropdownSizesAfterClick});const t=document.querySelectorAll("#projector_sizes_cont .projector_sizes__item");t.forEach((t=>{t.addEventListener("click",(function(t){t.preventDefault(),e.selectSize(this)}))})),1===t.length?this.selectSize(t[0]):document.querySelector("#projector_sizes_cont .projector_sizes__item.--selected")?this.selectSize(document.querySelector("#projector_sizes_cont .projector_sizes__item.--selected")):document.querySelector('#projector_sizes_cont .f-dropdown-item.--selected:not([data-index="0"])')&&document.querySelector('#projector_sizes_cont .f-dropdown-item.--selected:not([data-index="0"])').click(),product_data.sizes&&(product_data.sizes.uniw||product_data.sizes.onesize)&&$("#projector_sizes_cont").hide()},this.dropdownNumberGenerate=t=>{const e=t.querySelector(".f-dropdown-toggle");e.classList.add("--disabled"),t.classList.add("--disabled"),e.addEventListener("click",(function(){return!!app_shop.fn.checkProjectorData()}))},this.dropdownNumberAfterClick=t=>{const e=t.querySelector(".f-dropdown-item"),i=e.closest(".projector_buy"),n=document.getElementById("projector_number");e.hasAttribute("data-more")?(i.classList.add("--more"),i.querySelector(".projector_buy__more_input").focus(),i.querySelector(".projector_buy__more_input").setAttribute("data-prev",i.querySelector(".projector_buy__more_input").value),i.querySelector(".projector_buy__more_input").value=""):(i.classList.remove("--more"),n.value=e.getAttribute("data-value"),projectorObj.start())},this.iOS=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,this.updateNumberInSelect=()=>{const t=document.getElementById("projector_number");if(!t)return;const{value:e}=t;document.querySelectorAll(".projector_buy__number.f-dropdown .f-dropdown-item").forEach((t=>{t.classList.remove("--selected"),+t.getAttribute("data-value")==+e&&t.classList.add("--selected")}));if(document.querySelector(".projector_buy__number.f-dropdown .f-dropdown-item.--selected"))return;const i=document.querySelector(".projector_buy__number.f-dropdown .f-dropdown-item[data-more]");i&&i.classList.add("--selected")},this.initNumber=()=>{app_shop.fn.projectorBuySelect=new SelectToDropdown({disableMobileView:!!this.iOS(),selector:".projector_buy__number:not(.f-dropdown)",generateDropdownCallback:!!this.dropdownNumberGenerate&&this.dropdownNumberGenerate,afterClickDropdownCallback:!!this.dropdownNumberAfterClick&&this.dropdownNumberAfterClick});const t=document.querySelector(".projector_buy .projector_buy__more_input");t&&(t.addEventListener("keyup",(function(){clearTimeout(e.vars.typingTimer),e.vars.typingTimer=setTimeout((()=>{""!==this.value&&(this.setAttribute("data-prev",this.value),e.updateNumberInSelect(),projectorObj.start())}),e.vars.doneTypingInterval)})),t.addEventListener("blur",(function(){""===this.value&&(this.value=this.getAttribute("data-prev"))})))},this.countDownInit=()=>{const t=product_data.base_price.promotiontilldate||product_data.base_price.discounttilldate||product_data.base_price.distinguishedtilldate||product_data.base_price.specialtilldate,e=product_data.base_price.promotiontillhour||product_data.base_price.discounttillhour||product_data.base_price.distinguishedtillhour||product_data.base_price.specialtillhour;if(t&&!$("#CDT").size()){$("#projector_prices_wrapper").after('<div id="CDT" class="product_section CDT-uniw"></div>');const i=e?new Date(`${t}T${e}`):new Date(`${t}T23:59:59`);app_shop.vars.countDown=new CountdownTimer($("#CDT"),i),app_shop.vars.countDown.countDown()}},this.initEvents=()=>{$("#projector_button_points_basket:not(.--span)").on("click",(function(){if(!app_shop.fn.checkProjectorData())return!1;const t=projectorObj.currentSizeObj.type;if(t){if(parseInt(product_data.sizes[t].price.points,10)*parseInt($("#projector_number").val(),10)>client_points)return Alertek.show_alert(projectorObj.txt.za_malo_punktow),!1}return!0})),$("#projector_button_basket").on("click",(function(){return!!app_shop.fn.checkProjectorData()})),$("#projector_form").on("submit",(function(){return!!app_shop.fn.checkProjectorData()&&(!(parseFloat($("#projector_number").val())>projectorObj.currentSizeObj.amount&&-1!==projectorObj.currentSizeObj.amount&&2!==$("#projector_mode_hidden").val()&&!$("#projector_form[data-collection]").length)||(Alertek.Start(Projector_txt_maksymalnie+""+projectorObj.currentSizeObj.amount+" "+projectorObj.currentSizeObj.unit),projectorObj.start(),!1))})),$("#projector_tell_availability .projector_tell_availability__link").on("click",(function(){return app_shop.fn.tellAvailabilityModal=new Modal({element:document.getElementById("tell_availability_dialog"),classList:"--tell-availability"}),!1})),$("#projector_tell_availability .validate").on("input",(function(){clearTimeout(app_shop.formControl.timeHandle);const t=$(this);app_shop.formControl.timeHandle=setTimeout((function(){app_shop.formControl.validate(t)}),500)})),$("#projector_tell_availability button").on("click",(function(){if(app_shop.formControl.checkValidateFields($("#tell_availability_dialog"))){let t=$("#projector_bundle_zone").find("input").serialize();t=t?`&${t}`:"",$.getJSON(`/ajax/projector.php?action=set_product_observed${t}`,{product:$("#projector_product_hidden").val(),size:$("#projector_size_hidden").val(),email:$('#tell_availability_dialog [name="email"]').val(),mode:2,phone:$('#tell_availability_dialog [name="phone"]').val()},(function(t){let e="";if("error"===t.status)switch(t.errdesc){case"mail":e=txt_62619_nieprawidlowy_email;break;case"limit":e=txt_62619_przekroczono_liczbe;break;default:e=txt_62619_podczas_dodawania}else e=txt_62619_produkt_dodany,app_shop.fn.tellAvailabilityModal.closeModal();Alertek.show_alert(e)}))}return!1})),$("#projector_form a.projector_chart__link").on("click",(function(t){return t.stopPropagation(),Modal({element:$("#component_projector_sizes_cms_not"),classList:"--sizes-chart --medium"}),!1})),$("#projector_form a.projector_shipping__info").on("click",(function(){return!!app_shop.fn.checkProjectorData()&&(document.querySelector(".projector_shipping")&&document.querySelector(".projector_shipping").classList.add("--loading"),e.shippingInfo.init(),!1)})),$('#projector_rebateNumber input[name="multipack_radio"]').on("change",(function(){if(!app_shop.fn.checkProjectorData())return!1;if(void 0===projectorObj.currentSizeObj.price||void 0===projectorObj.currentSizeObj.price.rebateNumber)return!1;const t=$(this).parents(".projector_multipack__item").data("value"),e=parseFloat(projectorObj.currentSizeObj.price.rebateNumber.nextleft,10),i=parseFloat(projectorObj.currentSizeObj.price.rebateNumber.nextthreshold,10),n=i-e!=0?+t-(i-e):t;$('.projector_buy__number .f-dropdown-item[data-value="'+n+'"]').length?$('.projector_buy__number .f-dropdown-item[data-value="'+n+'"]').parent().click():($(".projector_buy__number .f-dropdown-li:last-child").click(),$(".projector_buy__more_input").val(n).blur(),projectorObj.start())}))},this.pointsTip=()=>{const t=document.getElementById("projector_button_points_basket"),e=document.getElementById("projector_points_recive_points");if(t){const e=document.createElement("span");e.classList.add("show_tip","css_tip","css_tip_small"),e.innerHTML='<i class="icon-question"/>',app_shop.vars.logged?e.title=txt_toltip_2a.replace("[xxx]",client_points):e.title=txt_toltip_2,t.insertAdjacentElement("afterend",e)}if(e){const t=document.createElement("span");t.classList.add("show_tip","css_tip","css_tip_small"),t.innerHTML='<i class="icon-question"/>',app_shop.vars.logged?t.title=txt_toltip_3a:t.title=txt_toltip_3,e.insertAdjacentElement("afterend",t)}simple_tooltip("span.show_tip","n59581_tooltip")},this.setOmnibusPrice=t=>{const e=document.querySelector(".projector_prices__lowest_price.omnibus_price");if(!e)return;const i=e.querySelector(".omnibus_price__value");i&&(t&&""!==t?(i.textContent=t,e.classList.remove("--hide")):e.classList.add("--hide"))},this.elementInViewport=t=>{if(!t)return!1;const e=t.getBoundingClientRect(),{top:i,left:n,right:o,bottom:s}=e,{innerWidth:r,innerHeight:a}=window,{clientWidth:h,clientHeight:u}=document.documentElement;return i>=0&&n>=0&&o<=(r||h)&&s<=(a||u)},this.scrollToElement=(t,e,i)=>{if(!t)return;if(this.elementInViewport(t))return;const n=t.getBoundingClientRect(),o=document.querySelector(".--fixed-header header"),s=o?o.offsetHeight:0,{top:r}=n,a=r+window.pageYOffset-60-s-(e||0),h=a.toFixed(),u=function(){window.pageYOffset.toFixed()===h&&(window.removeEventListener("scroll",u),"function"==typeof i&&i())};window.addEventListener("scroll",u),u(),window.scrollTo({top:a,behavior:"smooth"})},this.subscriptionInitEvents=()=>{document.querySelectorAll('#projector_form input[name="subscription"]').forEach((t=>{t.addEventListener("change",(t=>{const{target:e}=t;document.getElementById("projector_form").setAttribute("data-subscription",!("1"!==e.value)),this.subscriptionMinimumQuantity(),this.subscriptionCalculatePrice(),this.subscriptionChangeButtonName(),projectorObj.start();const i=document.querySelector(".projector_details__wrapper");i&&this.scrollToElement(i,0,(()=>{app_shop.vars.view<3&&document.documentElement.classList.add("scroll")}))}))}));const t=document.querySelectorAll(".projector_subscription__item");t.forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const i=e.target.closest(".projector_subscription__item");if(i.classList.contains("--selected"))return!1;t.forEach((t=>t.classList.remove("--selected"))),i.classList.add("--selected");const n=document.getElementById("projector_subscription_days_hidden");n&&(n.value=i.getAttribute("data-days"));const o=document.querySelector(".projector_purchase__yousave");if(o&&i.hasAttribute("data-rebate-type")){document.querySelector(".projector_purchase__yousave_value").textContent=i.getAttribute("data-rebate-value-formatted"),o.classList.add("--active")}else o.classList.remove("--active");return this.subscriptionCalculatePrice(),this.subscriptionChangePeriod(),!1}))}))},this.subscriptionChangePeriod=()=>{const t=document.querySelector(".projector_prices__period_value");if(!t)return;const e=document.querySelector(".projector_subscription__item.--selected");if(!e)return;const i=+e.getAttribute("data-days");t.textContent=app_shop.fn.changeLiteral(i,["dni","dzień","dni"],!1)},this.subscriptionChangeButtonName=()=>{const t=document.getElementById("projector_form").getAttribute("data-subscription"),e=document.getElementById("projector_button_basket");e&&(e.textContent="true"===t||"only"===t?e.getAttribute("data-subscription-name"):e.getAttribute("data-normal-name"))},this.subscriptionCalculatePrice=()=>{const t=document.getElementById("projector_form").getAttribute("data-subscription"),e=document.querySelectorAll("[data-subscription-max]"),i=document.querySelector(".projector_subscription__item.--selected");e.forEach((e=>{const n={max:e.getAttribute("data-subscription-max"),maxNet:e.getAttribute("data-subscription-max-net"),save:e.getAttribute("data-subscription-save"),before:e.getAttribute("data-subscription-before"),rebateValue:"true"!==t&&"only"!==t||!i.getAttribute("data-rebate-value")?0:i.getAttribute("data-rebate-value"),rebateType:i.getAttribute("data-rebate-type")},o=calculateSubscriptionPrice(n);if(o&&(e.textContent=o[app_shop.vars.priceType].formatted,e.parentNode.firstElementChild===e)){const t=document.querySelector(".projector_prices__percent_value");t&&(t.textContent=o.percent)}}))},this.subscriptionMinimumQuantity=()=>{const t=document.getElementById("projector_number");if(!t)return;const e=document.getElementById("projector_form").getAttribute("data-subscription");if("true"===e||"only"===e){const e=t.getAttribute("data-minimum-quantity-subscription")||t.getAttribute("data-minimum-quantity")||t.getAttribute("data-sellby");return t.value=e,this.updateNumberInSelect(),void(product_data.order_quantity_range.minimum_quantity_subscription=e)}delete product_data?.order_quantity_range?.minimum_quantity_subscription;const i=t.getAttribute("data-minimum-quantity")||t.getAttribute("data-sellby");t.value=i,this.updateNumberInSelect()},this.subscription=()=>{document.getElementById("projector_form").getAttribute("data-subscription")&&(this.subscriptionMinimumQuantity(),this.subscriptionInitEvents(),this.subscriptionCalculatePrice())},this.init=()=>{this.initNumber(),this.initMultiVersions(),this.initVersions(),this.initSizes(),this.initEvents(),this.countDownInit(),this.pointsTip(),this.subscription();const t={endStartFunction:projectorEndStartCallback,formatPrice:projectorFormatPrice,onDisableAlert:!1,endInitFunction:projectorEndInitFunctionCallback,contact_link:app_shop.vars.contact_link,getShippingTimeFunction:app_shop.graphql.getShippingTime,productParamsFunction:app_shop.graphql.projectorShippingInput,hoursBeforeOrderBy:3};projectorObj.projectorInit(t),this.shippingInfo=new ShippingInfo({getCouriersFunction:app_shop.graphql.getCouriersForModal,productParamsFunction:app_shop.graphql.projectorShippingInput,afterShowModal:()=>{document.querySelector(".projector_shipping")&&document.querySelector(".projector_shipping").classList.remove("--loading")}})}},app_shop.txt.productStocks1="Wybierz miasto, które cię interesuje",app_shop.txt.productStocks2="- wszystkie miasta -",app_shop.txt.productStocks3="Adres",app_shop.txt.productStocks4="Telefon",app_shop.txt.productStocks5="E-mail",app_shop.txt.productStocks6="Godziny otwarcia",app_shop.txt.productStocks7="Poniedziałek",app_shop.txt.productStocks8="Wtorek",app_shop.txt.productStocks9="Środa",app_shop.txt.productStocks10="Czwartek",app_shop.txt.productStocks11="Piątek",app_shop.txt.productStocks12="Sobota",app_shop.txt.productStocks13="Niedziela",app_shop.txt.productStocks14="Nieczynne",app_shop.txt.productStocks15="24h",app_shop.txt.productStocks16="Aby sprawdzić dostępność wybierz rozmiar",app_shop.txt.productStocks17="Produkt w wybranym rozmiarze nie jest dostępny w sklepie stacjonarnym, sprawdź inny rozmiar.",app_shop.txt.productStocksDays=[app_shop.txt.productStocks7,app_shop.txt.productStocks8,app_shop.txt.productStocks9,app_shop.txt.productStocks10,app_shop.txt.productStocks11,app_shop.txt.productStocks12,app_shop.txt.productStocks13],ProductStocks=function(t){const e=this;this.params=t||{},this.productId=document.getElementById("projector_product_hidden").value,this.queryGraphQL={query:`query {\n      sizeAvailability(productId: ${this.productId}) {\n        id\n        name\n        productSizeAvailableInStocks {\n          quantity\n          unit {\n            singular\n            plural\n          }\n          productAvailableStatus {\n            description\n            icon\n          }\n          stockInfo {\n            name\n            street\n            city\n            zipcode\n            country\n            description\n            cleardescription\n            contact {\n              phone {\n                text\n                link\n              }\n              mail {\n                text\n                link\n              }\n              gg {\n                text\n                link\n              }\n            }\n            openingHours {\n              monday {\n                  open\n                  allDay\n                  from\n                  till\n                }\n                tuesday {\n                  open\n                  allDay\n                  from\n                  till\n                },\n                wednesday {\n                  open\n                  allDay\n                  from\n                  till\n                },\n                thursday {\n                  open\n                  allDay\n                  from\n                  till\n                },\n                friday {\n                  open\n                  allDay\n                  from\n                  till\n                },\n                saturday {\n                  open\n                  allDay\n                  from\n                  till\n                },\n                sunday {\n                  open\n                  allDay\n                  from\n                  till\n                }\n            }\n            longitude\n            latitude\n          }\n        }\n      }\n    }`},this.fetchData=async()=>{const t=document.getElementById("product_stocks");if(t.classList.add("load-content"),sessionStorage.getItem(`product_stocks_${this.productId}`))return t.classList.remove("load-content"),JSON.parse(sessionStorage.getItem(`product_stocks_${this.productId}`));try{const e=await fetch("/graphql/v1/",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(this.queryGraphQL)}),i=await e.json();return sessionStorage.setItem(`product_stocks_${this.productId}`,JSON.stringify(i)),t.classList.remove("load-content"),i}catch(t){return window.location.href=document.querySelector(this.stockLinkSelector).getAttribute("href"),!1}},this.prepareStocks=()=>{const t=document.getElementById("projector_size_hidden").value,e=document.querySelector(".product_stocks__size.active"),i=document.querySelector(".product_stocks__block.--stocks");if(this.initEventsAfterDialog(),""!==t||e)if(""!==t){document.querySelector(`.product_stocks__size[data-type="${t}"]`).click()}else e.click();else i.classList.remove("--skeleton"),i.innerHTML=this.prepareMessage()},this.prepareMessage=()=>`<div class="menu_messages_message">\n    <div class="menu_messages_message_sub">\n      <p>${app_shop.txt.productStocks16}</p>\n    </div>\n  </div>`,this.prepareHtml=t=>{const e=document.querySelector(".product_stocks__block.--stocks");if(t){const i=t.productSizeAvailableInStocks,n=[...new Set(i.map((t=>t.stockInfo.city)))];if(e.innerHTML=`\n        ${n.length>1?`<div class="product_stocks__wrapper --cities">\n        <select class="product_stocks__cities --small">\n          <option class="product_stocks__city --all" value="all">${app_shop.txt.productStocks2}</option>\n          ${[...n].map((t=>`\n            <option class="product_stocks__city" value="${t}">${t}</option>\n          `)).join("")}\n        </select>\n      </div>`:""}\n      <div class="product_stocks__wrapper --stocks">\n        ${[...t.productSizeAvailableInStocks].map(((e,i)=>`\n          <div class="product_stocks__stock stock${1===t.productSizeAvailableInStocks.length?" --active":""}" data-city="${e.stockInfo.city}">\n            <div class="stock__headline">\n              <div class="stock__name">\n                <strong>${e.stockInfo.name}</strong>\n                <span>${e.stockInfo.city}</span>\n              </div>\n              <div class="stock__availabilty">\n                <img class="stock__availabilty_icon" src="${e.productAvailableStatus.icon}" />\n                <span class="stock__availabilty_desc">${e.productAvailableStatus.description}<span class="stock__availabilty_count">${-1===e.quantity?"∞":e.quantity}${1===e.quantity?` ${e.unit.singular}`:` ${e.unit.plural}`}</span></span>\n              </div>\n            </div>\n            <div class="stock__info">\n              <div class="stock__wrapper --address">\n                <strong class="stock__label">${app_shop.txt.productStocks3}</strong>\n                <div class="stock__address">\n                  <span class="stock__data --street">${e.stockInfo.street}</span>\n                  <span class="stock__data --zipcode --city">\n                    <span class="stock__zipcode">${e.stockInfo.zipcode}</span>\n                    <span class="stock__city">${e.stockInfo.city}</span>\n                  </span>\n                  <span class="stock__data --country">${e.stockInfo.country}</span>\n                </div>\n                ${""!==e.stockInfo.contact.phone.text||""!==e.stockInfo.contact.mail.text?`\n                  <div class="stock__contact">\n                    ${""!==e.stockInfo.contact.phone.text?`\n                      <span class="stock__data --phone">\n                        <span class="stock__data_label">${app_shop.txt.productStocks4}</span>\n                        <a class="stock__data_value --link" href="${e.stockInfo.contact.phone.link}">${e.stockInfo.contact.phone.text}</a>\n                      </span>\n                    `:""}\n                    ${""!==e.stockInfo.contact.mail.text?`\n                      <span class="stock__data --mail">\n                        <span class="stock__data_label">${app_shop.txt.productStocks5}</span>\n                        <a class="stock__data_value --link" href="${e.stockInfo.contact.mail.link}">${e.stockInfo.contact.mail.text}</a>\n                      </span>\n                    `:""}\n                  </div>\n                `:""}\n              </div>\n              <div class="stock__wrapper --opening">\n                <strong class="stock__label">${app_shop.txt.productStocks6}</strong>\n                <div class="stock__opening">\n                  ${Object.keys(e.stockInfo.openingHours).map(((t,i)=>`\n                    <span class="stock__data --${t}">\n                      <span class="stock__data_label">${app_shop.txt.productStocksDays[i]}</span>\n                      <strong class="stock__data_value">${e.stockInfo.openingHours[t].open?e.stockInfo.openingHours[t].allDay?app_shop.txt.productStocks15:`${e.stockInfo.openingHours[t].from} - ${e.stockInfo.openingHours[t].till}`:app_shop.txt.productStocks14}</strong>\n                    </span>\n                  `)).join("")}\n                </div>\n              </div>\n              ${""!==e.stockInfo.latitude&&""!==e.stockInfo.longitude?`<div class="stock__wrapper --map">\n                <div id="map${i}" class="stock__map" data-lat="${e.stockInfo.latitude}" data-long="${e.stockInfo.longitude}"></div>\n              </div>`:""}\n            </div>\n          </div>\n        `)).join("")}\n      </div>\n      `,e.classList.remove("--skeleton"),n.length>1&&this.dropdown(),1===t.productSizeAvailableInStocks.length&&document.querySelector(".product_stocks__stock.--active .stock__map:empty")){const t=document.querySelector(".product_stocks__stock.--active .stock__map:empty");this.leaflet(t.getAttribute("data-lat"),t.getAttribute("data-long"),t.getAttribute("id"))}this.initEventsAfterFetch()}else""!==app_shop.txt.productStocks17&&(e.innerHTML=`<div class="menu_messages_warning">\n      <div class="menu_messages_message_sub">\n        <p>${app_shop.txt.productStocks17}</p>\n      </div>\n    </div>`)},this.dropdown=()=>{this.selectCities=new SelectToDropdown({selector:".product_stocks__cities",afterClickDropdownCallback:t=>{const e=t.querySelector(".f-dropdown-item").getAttribute("data-value"),i=document.querySelectorAll(".product_stocks__stock"),n=document.querySelectorAll(`.product_stocks__stock:not([data-city="${e}"])`);i.forEach((t=>{t.classList.remove("--hide")})),"all"!==e&&n.forEach((t=>{t.classList.add("--hide")}))}})},this.leaflet=(t,e,i)=>{const n=document.querySelector(".stock.--active .stock__name strong").textContent,o=document.querySelector(".stock.--active .stock__data.--street").textContent,s=`${document.querySelector(".stock.--active .stock__zipcode").textContent} ${document.querySelector(".stock.--active .stock__city").textContent}`,r=L.map(i).setView([t,e],13);L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(r),L.marker([t,e]).addTo(r).bindPopup(`<span class="dymekFirmName">${n}</span><span class="dymekAddress">${o}</span><span class="dymekCityName">${s}</span>`).openPopup()},this.initEvents=()=>{document.querySelector(this.stockLinkSelector).addEventListener("click",(function(t){return t.preventDefault(),t.stopPropagation(),Modal({element:$("#product_stocks"),classList:"--stocks --medium",afterShow:e.prepareStocks}),!1}))},this.initEventsAfterDialog=()=>{document.querySelectorAll(".product_stocks__size").forEach((t=>{t.addEventListener("click",(async function(t){if(t.preventDefault(),this.getAttribute("data-disabled"))return!1;const i=document.querySelectorAll(".product_stocks__size"),n=this.getAttribute("data-type");return i.forEach((t=>{t.classList.remove("active")})),this.classList.add("active"),await e.fetchData(app_shop.vars.currentProductId).then((t=>{1===t.data.sizeAvailability.length&&""===t.data.sizeAvailability[0].id?e.prepareHtml(t.data.sizeAvailability[0]):e.prepareHtml(t.data.sizeAvailability.filter((t=>t.id===n))[0])})),!1}))}))},this.initEventsAfterFetch=()=>{document.querySelectorAll(".product_stocks__stock .stock__headline").forEach((t=>{t.addEventListener("click",(async function(i){i.preventDefault();const n=t.closest(".product_stocks__stock:not(:only-child)");if(n){n.classList.toggle("--active");const t=n.getAttribute("data-city");if(document.querySelectorAll(`.product_stocks__stock:not([data-city="${t}"])`).forEach((t=>{t.classList.remove("--active")})),n.classList.contains("--active")&&n.querySelector(".stock__map:empty")){const t=n.querySelector(".stock__map:empty");e.leaflet(t.getAttribute("data-lat"),t.getAttribute("data-long"),t.getAttribute("id"))}}return!1}))}))},this.init=()=>{const{stockLinkSelector:t,queryGraphQL:e}=this.params;this.stockLinkSelector=t||".benefits__item.--stock",e&&(this.queryGraphQL=e),this.initEvents()}};