UNPKG

@senx/discovery-plugin-marauder

Version:

Discovery plugin - Marauder's map

5 lines 261 kB
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function r(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,s){function o(t){try{h(n.next(t))}catch(t){s(t)}}function a(t){try{h(n["throw"](t))}catch(t){s(t)}}function h(t){t.done?e(t.value):r(t.value).then(o,a)}h((n=n.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(i){return h([t,i])}}function h(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(e=0)),e)try{if(n=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;r=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){e.label=a[1];break}if(a[0]===6&&e.label<s[1]){e.label=s[1];s=a;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(a);break}if(s[2])e.ops.pop();e.trys.pop();continue}a=i.call(t,e)}catch(t){a=[6,t];r=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-54266c9e.system.js","./p-0e226de5.system.js","./p-bd1c239e.system.js","./p-7abe607e.system.js","./p-df61f0da.system.js","./p-37b7b786.system.js","./p-9f9942e4.system.js"],(function(t){"use strict";var i,e,n,r,s,o,a,h,f,u,l,c,d,v;return{setters:[function(t){i=t.r;e=t.c;n=t.h;r=t.g},function(t){s=t.L;o=t.d},function(t){a=t.c;h=t.P;f=t.G;u=t.U;l=t.L},function(){},function(t){c=t.a},function(t){d=t.C},function(t){v=t.M}],execute:function(){var p={};p.toRGBA8=function(t){var i=t.width,e=t.height;if(t.tabs.acTL==null)return[p.toRGBA8.decodeImage(t.data,i,e,t).buffer];var n=[];if(t.frames[0].data==null)t.frames[0].data=t.data;var r=i*e*4,s=new Uint8Array(r),o=new Uint8Array(r),a=new Uint8Array(r);for(var h=0;h<t.frames.length;h++){var f=t.frames[h];var u=f.rect.x,l=f.rect.y,c=f.rect.width,d=f.rect.height;var v=p.toRGBA8.decodeImage(f.data,c,d,t);if(h!=0)for(var m=0;m<r;m++)a[m]=s[m];if(f.blend==0)p._copyTile(v,c,d,s,i,e,u,l,0);else if(f.blend==1)p._copyTile(v,c,d,s,i,e,u,l,1);n.push(s.buffer.slice(0));if(f.dispose==0);else if(f.dispose==1)p._copyTile(o,c,d,s,i,e,u,l,0);else if(f.dispose==2)for(var m=0;m<r;m++)s[m]=a[m]}return n};p.toRGBA8.decodeImage=function(t,i,e,n){var r=i*e,s=p.decode._getBPP(n);var o=Math.ceil(i*s/8);var a=new Uint8Array(r*4),h=new Uint32Array(a.buffer);var f=n.ctype,u=n.depth;var l=p._bin.readUshort;if(f==6){var c=r<<2;if(u==8)for(var d=0;d<c;d+=4){a[d]=t[d];a[d+1]=t[d+1];a[d+2]=t[d+2];a[d+3]=t[d+3]}if(u==16)for(var d=0;d<c;d++){a[d]=t[d<<1]}}else if(f==2){var v=n.tabs["tRNS"];if(v==null){if(u==8)for(var d=0;d<r;d++){var m=d*3;h[d]=255<<24|t[m+2]<<16|t[m+1]<<8|t[m]}if(u==16)for(var d=0;d<r;d++){var m=d*6;h[d]=255<<24|t[m+4]<<16|t[m+2]<<8|t[m]}}else{var g=v[0],w=v[1],b=v[2];if(u==8)for(var d=0;d<r;d++){var x=d<<2,m=d*3;h[d]=255<<24|t[m+2]<<16|t[m+1]<<8|t[m];if(t[m]==g&&t[m+1]==w&&t[m+2]==b)a[x+3]=0}if(u==16)for(var d=0;d<r;d++){var x=d<<2,m=d*6;h[d]=255<<24|t[m+4]<<16|t[m+2]<<8|t[m];if(l(t,m)==g&&l(t,m+2)==w&&l(t,m+4)==b)a[x+3]=0}}}else if(f==3){var y=n.tabs["PLTE"],_=n.tabs["tRNS"],k=_?_.length:0;if(u==1)for(var M=0;M<e;M++){var A=M*o,U=M*i;for(var d=0;d<i;d++){var x=U+d<<2,S=t[A+(d>>3)]>>7-((d&7)<<0)&1,z=3*S;a[x]=y[z];a[x+1]=y[z+1];a[x+2]=y[z+2];a[x+3]=S<k?_[S]:255}}if(u==2)for(var M=0;M<e;M++){var A=M*o,U=M*i;for(var d=0;d<i;d++){var x=U+d<<2,S=t[A+(d>>2)]>>6-((d&3)<<1)&3,z=3*S;a[x]=y[z];a[x+1]=y[z+1];a[x+2]=y[z+2];a[x+3]=S<k?_[S]:255}}if(u==4)for(var M=0;M<e;M++){var A=M*o,U=M*i;for(var d=0;d<i;d++){var x=U+d<<2,S=t[A+(d>>1)]>>4-((d&1)<<2)&15,z=3*S;a[x]=y[z];a[x+1]=y[z+1];a[x+2]=y[z+2];a[x+3]=S<k?_[S]:255}}if(u==8)for(var d=0;d<r;d++){var x=d<<2,S=t[d],z=3*S;a[x]=y[z];a[x+1]=y[z+1];a[x+2]=y[z+2];a[x+3]=S<k?_[S]:255}}else if(f==4){if(u==8)for(var d=0;d<r;d++){var x=d<<2,T=d<<1,L=t[T];a[x]=L;a[x+1]=L;a[x+2]=L;a[x+3]=t[T+1]}if(u==16)for(var d=0;d<r;d++){var x=d<<2,T=d<<2,L=t[T];a[x]=L;a[x+1]=L;a[x+2]=L;a[x+3]=t[T+2]}}else if(f==0){var g=n.tabs["tRNS"]?n.tabs["tRNS"]:-1;for(var M=0;M<e;M++){var P=M*o,E=M*i;if(u==1)for(var N=0;N<i;N++){var L=255*(t[P+(N>>>3)]>>>7-(N&7)&1),O=L==g*255?0:255;h[E+N]=O<<24|L<<16|L<<8|L}else if(u==2)for(var N=0;N<i;N++){var L=85*(t[P+(N>>>2)]>>>6-((N&3)<<1)&3),O=L==g*85?0:255;h[E+N]=O<<24|L<<16|L<<8|L}else if(u==4)for(var N=0;N<i;N++){var L=17*(t[P+(N>>>1)]>>>4-((N&1)<<2)&15),O=L==g*17?0:255;h[E+N]=O<<24|L<<16|L<<8|L}else if(u==8)for(var N=0;N<i;N++){var L=t[P+N],O=L==g?0:255;h[E+N]=O<<24|L<<16|L<<8|L}else if(u==16)for(var N=0;N<i;N++){var L=t[P+(N<<1)],O=l(t,P+(N<<d))==g?0:255;h[E+N]=O<<24|L<<16|L<<8|L}}}return a};p.decode=function(t){var i=new Uint8Array(t),e=8,n=p._bin,r=n.readUshort,s=n.readUint;var o={tabs:{},frames:[]};var a=new Uint8Array(i.length),h=0;var f,u=0;var l=[137,80,78,71,13,10,26,10];for(var c=0;c<8;c++)if(i[c]!=l[c])throw"The input is not a PNG file!";while(e<i.length){var d=n.readUint(i,e);e+=4;var v=n.readASCII(i,e,4);e+=4;if(v=="IHDR"){p.decode._IHDR(i,e,o)}else if(v=="CgBI"){o.tabs[v]=i.slice(e,e+4)}else if(v=="IDAT"){for(var c=0;c<d;c++)a[h+c]=i[e+c];h+=d}else if(v=="acTL"){o.tabs[v]={num_frames:s(i,e),num_plays:s(i,e+4)};f=new Uint8Array(i.length)}else if(v=="fcTL"){if(u!=0){var m=o.frames[o.frames.length-1];m.data=p.decode._decompress(o,f.slice(0,u),m.rect.width,m.rect.height);u=0}var g={x:s(i,e+12),y:s(i,e+16),width:s(i,e+4),height:s(i,e+8)};var w=r(i,e+22);w=r(i,e+20)/(w==0?100:w);var b={rect:g,delay:Math.round(w*1e3),dispose:i[e+24],blend:i[e+25]};o.frames.push(b)}else if(v=="fdAT"){for(var c=0;c<d-4;c++)f[u+c]=i[e+c+4];u+=d-4}else if(v=="pHYs"){o.tabs[v]=[n.readUint(i,e),n.readUint(i,e+4),i[e+8]]}else if(v=="cHRM"){o.tabs[v]=[];for(var c=0;c<8;c++)o.tabs[v].push(n.readUint(i,e+c*4))}else if(v=="tEXt"||v=="zTXt"){if(o.tabs[v]==null)o.tabs[v]={};var x=n.nextZero(i,e);var y=n.readASCII(i,e,x-e);var _,k=e+d-x-1;if(v=="tEXt")_=n.readASCII(i,x+1,k);else{var M=p.decode._inflate(i.slice(x+2,x+2+k));_=n.readUTF8(M,0,M.length)}o.tabs[v][y]=_}else if(v=="iTXt"){if(o.tabs[v]==null)o.tabs[v]={};var x=0,A=e;x=n.nextZero(i,A);var y=n.readASCII(i,A,x-A);A=x+1;var U=i[A];A+=2;x=n.nextZero(i,A);n.readASCII(i,A,x-A);A=x+1;x=n.nextZero(i,A);n.readUTF8(i,A,x-A);A=x+1;var _,k=d-(A-e);if(U==0)_=n.readUTF8(i,A,k);else{var M=p.decode._inflate(i.slice(A,A+k));_=n.readUTF8(M,0,M.length)}o.tabs[v][y]=_}else if(v=="PLTE"){o.tabs[v]=n.readBytes(i,e,d)}else if(v=="hIST"){var S=o.tabs["PLTE"].length/3;o.tabs[v]=[];for(var c=0;c<S;c++)o.tabs[v].push(r(i,e+c*2))}else if(v=="tRNS"){if(o.ctype==3)o.tabs[v]=n.readBytes(i,e,d);else if(o.ctype==0)o.tabs[v]=r(i,e);else if(o.ctype==2)o.tabs[v]=[r(i,e),r(i,e+2),r(i,e+4)]}else if(v=="gAMA")o.tabs[v]=n.readUint(i,e)/1e5;else if(v=="sRGB")o.tabs[v]=i[e];else if(v=="bKGD"){if(o.ctype==0||o.ctype==4)o.tabs[v]=[r(i,e)];else if(o.ctype==2||o.ctype==6)o.tabs[v]=[r(i,e),r(i,e+2),r(i,e+4)];else if(o.ctype==3)o.tabs[v]=i[e]}else if(v=="IEND"){break}e+=d;n.readUint(i,e);e+=4}if(u!=0){var m=o.frames[o.frames.length-1];m.data=p.decode._decompress(o,f.slice(0,u),m.rect.width,m.rect.height);u=0}o.data=p.decode._decompress(o,a,o.width,o.height);delete o.compress;delete o.interlace;delete o.filter;return o};p.decode._decompress=function(t,i,e,n){var r=p.decode._getBPP(t),s=Math.ceil(e*r/8),o=new Uint8Array((s+1+t.interlace)*n);if(t.tabs["CgBI"])i=p.inflateRaw(i,o);else i=p.decode._inflate(i,o);if(t.interlace==0)i=p.decode._filterZero(i,t,0,e,n);else if(t.interlace==1)i=p.decode._readInterlace(i,t);return i};p.decode._inflate=function(t,i){var e=p["inflateRaw"](new Uint8Array(t.buffer,2,t.length-6),i);return e};p.inflateRaw=function(){var t={};t.H={};t.H.N=function(i,e){var n=Uint8Array,r=0,s=0,o=0,a=0,h=0,f=0,u=0,l=0,c=0,d,v;if(i[0]==3&&i[1]==0)return e?e:new n(0);var p=t.H,m=p.b,g=p.e,w=p.R,b=p.n,x=p.A,y=p.Z,_=p.m,k=e==null;if(k)e=new n(i.length>>>2<<6);while(r==0){r=m(i,c,1);s=m(i,c+1,2);c+=3;if(s==0){if((c&7)!=0)c+=8-(c&7);var M=(c>>>3)+4,A=i[M-4]|i[M-3]<<8;if(k)e=t.H.W(e,l+A);e.set(new n(i.buffer,i.byteOffset+M,A),l);c=M+A<<3;l+=A;continue}if(k)e=t.H.W(e,l+(1<<17));if(s==1){d=_.J;v=_.h;f=(1<<9)-1;u=(1<<5)-1}if(s==2){o=g(i,c,5)+257;a=g(i,c+5,5)+1;h=g(i,c+10,4)+4;c+=14;var U=1;for(var S=0;S<38;S+=2){_.Q[S]=0;_.Q[S+1]=0}for(var S=0;S<h;S++){var z=g(i,c+S*3,3);_.Q[(_.X[S]<<1)+1]=z;if(z>U)U=z}c+=3*h;b(_.Q,U);x(_.Q,U,_.u);d=_.w;v=_.d;c=w(_.u,(1<<U)-1,o+a,i,c,_.v);var T=p.V(_.v,0,o,_.C);f=(1<<T)-1;var L=p.V(_.v,o,a,_.D);u=(1<<L)-1;b(_.C,T);x(_.C,T,d);b(_.D,L);x(_.D,L,v)}while(!0){var P=d[y(i,c)&f];c+=P&15;var E=P>>>4;if(E>>>8==0){e[l++]=E}else if(E==256){break}else{var N=l+E-254;if(E>264){var O=_.q[E-257];N=l+(O>>>3)+g(i,c,O&7);c+=O&7}var I=v[y(i,c)&u];c+=I&15;var C=I>>>4,B=_.c[C],D=(B>>>4)+m(i,c,B&15);c+=B&15;while(l<N){e[l]=e[l++-D];e[l]=e[l++-D];e[l]=e[l++-D];e[l]=e[l++-D]}l=N}}}return e.length==l?e:e.slice(0,l)};t.H.W=function(t,i){var e=t.length;if(i<=e)return t;var n=new Uint8Array(e<<1);n.set(t,0);return n};t.H.R=function(i,e,n,r,s,o){var a=t.H.e,h=t.H.Z,f=0;while(f<n){var u=i[h(r,s)&e];s+=u&15;var l=u>>>4;if(l<=15){o[f]=l;f++}else{var c=0,d=0;if(l==16){d=3+a(r,s,2);s+=2;c=o[f-1]}else if(l==17){d=3+a(r,s,3);s+=3}else if(l==18){d=11+a(r,s,7);s+=7}var v=f+d;while(f<v){o[f]=c;f++}}}return s};t.H.V=function(t,i,e,n){var r=0,s=0,o=n.length>>>1;while(s<e){var a=t[s+i];n[s<<1]=0;n[(s<<1)+1]=a;if(a>r)r=a;s++}while(s<o){n[s<<1]=0;n[(s<<1)+1]=0;s++}return r};t.H.n=function(i,e){var n=t.H.m,r=i.length,s,o,a,h,f,u=n.j;for(var h=0;h<=e;h++)u[h]=0;for(h=1;h<r;h+=2)u[i[h]]++;var l=n.K;s=0;u[0]=0;for(o=1;o<=e;o++){s=s+u[o-1]<<1;l[o]=s}for(a=0;a<r;a+=2){f=i[a+1];if(f!=0){i[a]=l[f];l[f]++}}};t.H.A=function(i,e,n){var r=i.length,s=t.H.m,o=s.r;for(var a=0;a<r;a+=2)if(i[a+1]!=0){var h=a>>1,f=i[a+1],u=h<<4|f,l=e-f,c=i[a]<<l,d=c+(1<<l);while(c!=d){var v=o[c]>>>15-e;n[v]=u;c++}}};t.H.l=function(i,e){var n=t.H.m.r,r=15-e;for(var s=0;s<i.length;s+=2){var o=i[s]<<e-i[s+1];i[s]=n[o]>>>r}};t.H.M=function(t,i,e){e=e<<(i&7);var n=i>>>3;t[n]|=e;t[n+1]|=e>>>8};t.H.I=function(t,i,e){e=e<<(i&7);var n=i>>>3;t[n]|=e;t[n+1]|=e>>>8;t[n+2]|=e>>>16};t.H.e=function(t,i,e){return(t[i>>>3]|t[(i>>>3)+1]<<8)>>>(i&7)&(1<<e)-1};t.H.b=function(t,i,e){return(t[i>>>3]|t[(i>>>3)+1]<<8|t[(i>>>3)+2]<<16)>>>(i&7)&(1<<e)-1};t.H.Z=function(t,i){return(t[i>>>3]|t[(i>>>3)+1]<<8|t[(i>>>3)+2]<<16)>>>(i&7)};t.H.i=function(t,i){return(t[i>>>3]|t[(i>>>3)+1]<<8|t[(i>>>3)+2]<<16|t[(i>>>3)+3]<<24)>>>(i&7)};t.H.m=function(){var t=Uint16Array,i=Uint32Array;return{K:new t(16),j:new t(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new t(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new i(32),J:new t(512),_:[],h:new t(32),$:[],w:new t(32768),C:[],v:[],d:new t(32768),D:[],u:new t(512),Q:[],r:new t(1<<15),s:new i(286),Y:new i(30),a:new i(19),t:new i(15e3),k:new t(1<<16),g:new t(1<<15)}}();(function(){var i=t.H.m,e=1<<15;for(var n=0;n<e;n++){var r=n;r=(r&2863311530)>>>1|(r&1431655765)<<1;r=(r&3435973836)>>>2|(r&858993459)<<2;r=(r&4042322160)>>>4|(r&252645135)<<4;r=(r&4278255360)>>>8|(r&16711935)<<8;i.r[n]=(r>>>16|r<<16)>>>17}function s(t,i,e){while(i--!=0)t.push(0,e)}for(var n=0;n<32;n++){i.q[n]=i.S[n]<<3|i.T[n];i.c[n]=i.p[n]<<4|i.z[n]}s(i._,144,8);s(i._,255-143,9);s(i._,279-255,7);s(i._,287-279,8);t.H.n(i._,9);t.H.A(i._,9,i.J);t.H.l(i._,9);s(i.$,32,5);t.H.n(i.$,5);t.H.A(i.$,5,i.h);t.H.l(i.$,5);s(i.Q,19,0);s(i.C,286,0);s(i.D,30,0);s(i.v,320,0)})();return t.H.N}();p.decode._readInterlace=function(t,i){var e=i.width,n=i.height;var r=p.decode._getBPP(i),s=r>>3,o=Math.ceil(e*r/8);var a=new Uint8Array(n*o);var h=0;var f=[0,0,4,0,2,0,1];var u=[0,4,0,2,0,1,0];var l=[8,8,8,4,4,2,2];var c=[8,8,4,4,2,2,1];var d=0;while(d<7){var v=l[d],m=c[d];var g=0,w=0;var b=f[d];while(b<n){b+=v;w++}var x=u[d];while(x<e){x+=m;g++}var y=Math.ceil(g*r/8);p.decode._filterZero(t,i,h,g,w);var _=0,k=f[d];while(k<n){var M=u[d];var A=h+_*y<<3;while(M<e){if(r==1){var U=t[A>>3];U=U>>7-(A&7)&1;a[k*o+(M>>3)]|=U<<7-((M&7)<<0)}if(r==2){var U=t[A>>3];U=U>>6-(A&7)&3;a[k*o+(M>>2)]|=U<<6-((M&3)<<1)}if(r==4){var U=t[A>>3];U=U>>4-(A&7)&15;a[k*o+(M>>1)]|=U<<4-((M&1)<<2)}if(r>=8){var S=k*o+M*s;for(var z=0;z<s;z++)a[S+z]=t[(A>>3)+z]}A+=r;M+=m}_++;k+=v}if(g*w!=0)h+=w*(1+y);d=d+1}return a};p.decode._getBPP=function(t){var i=[1,null,3,1,2,null,4][t.ctype];return i*t.depth};p.decode._filterZero=function(t,i,e,n,r){var s=p.decode._getBPP(i),o=Math.ceil(n*s/8),a=p.decode._paeth;s=Math.ceil(s/8);var h=0,f=1,u=t[e],l=0;if(u>1)t[e]=[0,0,1][u-2];if(u==3)for(l=s;l<o;l++)t[l+1]=t[l+1]+(t[l+1-s]>>>1)&255;for(var c=0;c<r;c++){h=e+c*o;f=h+c+1;u=t[f-1];l=0;if(u==0)for(;l<o;l++)t[h+l]=t[f+l];else if(u==1){for(;l<s;l++)t[h+l]=t[f+l];for(;l<o;l++)t[h+l]=t[f+l]+t[h+l-s]}else if(u==2){for(;l<o;l++)t[h+l]=t[f+l]+t[h+l-o]}else if(u==3){for(;l<s;l++)t[h+l]=t[f+l]+(t[h+l-o]>>>1);for(;l<o;l++)t[h+l]=t[f+l]+(t[h+l-o]+t[h+l-s]>>>1)}else{for(;l<s;l++)t[h+l]=t[f+l]+a(0,t[h+l-o],0);for(;l<o;l++)t[h+l]=t[f+l]+a(t[h+l-s],t[h+l-o],t[h+l-s-o])}}return t};p.decode._paeth=function(t,i,e){var n=t+i-e,r=n-t,s=n-i,o=n-e;if(r*r<=s*s&&r*r<=o*o)return t;else if(s*s<=o*o)return i;return e};p.decode._IHDR=function(t,i,e){var n=p._bin;e.width=n.readUint(t,i);i+=4;e.height=n.readUint(t,i);i+=4;e.depth=t[i];i++;e.ctype=t[i];i++;e.compress=t[i];i++;e.filter=t[i];i++;e.interlace=t[i];i++};p._bin={nextZero:function(t,i){while(t[i]!=0)i++;return i},readUshort:function(t,i){return t[i]<<8|t[i+1]},writeUshort:function(t,i,e){t[i]=e>>8&255;t[i+1]=e&255},readUint:function(t,i){return t[i]*(256*256*256)+(t[i+1]<<16|t[i+2]<<8|t[i+3])},writeUint:function(t,i,e){t[i]=e>>24&255;t[i+1]=e>>16&255;t[i+2]=e>>8&255;t[i+3]=e&255},readASCII:function(t,i,e){var n="";for(var r=0;r<e;r++)n+=String.fromCharCode(t[i+r]);return n},writeASCII:function(t,i,e){for(var n=0;n<e.length;n++)t[i+n]=e.charCodeAt(n)},readBytes:function(t,i,e){var n=[];for(var r=0;r<e;r++)n.push(t[i+r]);return n},pad:function(t){return t.length<2?"0"+t:t},readUTF8:function(t,i,e){var n="",r;for(var s=0;s<e;s++)n+="%"+p._bin.pad(t[i+s].toString(16));try{r=decodeURIComponent(n)}catch(n){return p._bin.readASCII(t,i,e)}return r}};p._copyTile=function(t,i,e,n,r,s,o,a,h){var f=Math.min(i,r),u=Math.min(e,s);var l=0,c=0;for(var d=0;d<u;d++)for(var v=0;v<f;v++){if(o>=0&&a>=0){l=d*i+v<<2;c=(a+d)*r+o+v<<2}else{l=(-a+d)*i-o+v<<2;c=d*r+v<<2}if(h==0){n[c]=t[l];n[c+1]=t[l+1];n[c+2]=t[l+2];n[c+3]=t[l+3]}else if(h==1){var p=t[l+3]*(1/255),m=t[l]*p,g=t[l+1]*p,w=t[l+2]*p;var b=n[c+3]*(1/255),x=n[c]*b,y=n[c+1]*b,_=n[c+2]*b;var k=1-p,M=p+b*k,A=M==0?0:1/M;n[c+3]=255*M;n[c+0]=(m+x*k)*A;n[c+1]=(g+y*k)*A;n[c+2]=(w+_*k)*A}else if(h==2){var p=t[l+3],m=t[l],g=t[l+1],w=t[l+2];var b=n[c+3],x=n[c],y=n[c+1],_=n[c+2];if(p==b&&m==x&&g==y&&w==_){n[c]=0;n[c+1]=0;n[c+2]=0;n[c+3]=0}else{n[c]=m;n[c+1]=g;n[c+2]=w;n[c+3]=p}}else if(h==3){var p=t[l+3],m=t[l],g=t[l+1],w=t[l+2];var b=n[c+3],x=n[c],y=n[c+1],_=n[c+2];if(p==b&&m==x&&g==y&&w==_)continue;if(p<220&&b>20)return false}}return true};p.encode=function(t,i,e,n,r,s,o){if(n==null)n=0;if(o==null)o=false;var a=p.encode.compress(t,i,e,n,[false,false,false,0,o]);p.encode.compressPNG(a,-1);return p.encode._main(a,i,e,r,s)};p.encodeLL=function(t,i,e,n,r,s,o,a){var h={ctype:0+(n==1?0:2)+(r==0?0:4),depth:s,frames:[]};var f=(n+r)*s,u=f*i;for(var l=0;l<t.length;l++)h.frames.push({rect:{x:0,y:0,width:i,height:e},img:new Uint8Array(t[l]),blend:0,dispose:1,bpp:Math.ceil(f/8),bpl:Math.ceil(u/8)});p.encode.compressPNG(h,0,true);var c=p.encode._main(h,i,e,o,a);return c};p.encode._main=function(t,i,e,n,r){if(r==null)r={};var s=p.crc.crc,o=p._bin.writeUint,a=p._bin.writeUshort,h=p._bin.writeASCII;var f=8,u=t.frames.length>1,l=false;var c=8+(16+5+4)+(u?20:0);if(r["sRGB"]!=null)c+=8+1+4;if(r["pHYs"]!=null)c+=8+9+4;if(t.ctype==3){var d=t.plte.length;for(var v=0;v<d;v++)if(t.plte[v]>>>24!=255)l=true;c+=8+d*3+4+(l?8+d*1+4:0)}for(var m=0;m<t.frames.length;m++){var g=t.frames[m];if(u)c+=38;c+=g.cimg.length+12;if(m!=0)c+=4}c+=12;var w=new Uint8Array(c);var b=[137,80,78,71,13,10,26,10];for(var v=0;v<8;v++)w[v]=b[v];o(w,f,13);f+=4;h(w,f,"IHDR");f+=4;o(w,f,i);f+=4;o(w,f,e);f+=4;w[f]=t.depth;f++;w[f]=t.ctype;f++;w[f]=0;f++;w[f]=0;f++;w[f]=0;f++;o(w,f,s(w,f-17,17));f+=4;if(r["sRGB"]!=null){o(w,f,1);f+=4;h(w,f,"sRGB");f+=4;w[f]=r["sRGB"];f++;o(w,f,s(w,f-5,5));f+=4}if(r["pHYs"]!=null){o(w,f,9);f+=4;h(w,f,"pHYs");f+=4;o(w,f,r["pHYs"][0]);f+=4;o(w,f,r["pHYs"][1]);f+=4;w[f]=r["pHYs"][2];f++;o(w,f,s(w,f-13,13));f+=4}if(u){o(w,f,8);f+=4;h(w,f,"acTL");f+=4;o(w,f,t.frames.length);f+=4;o(w,f,r["loop"]!=null?r["loop"]:0);f+=4;o(w,f,s(w,f-12,12));f+=4}if(t.ctype==3){var d=t.plte.length;o(w,f,d*3);f+=4;h(w,f,"PLTE");f+=4;for(var v=0;v<d;v++){var x=v*3,y=t.plte[v],_=y&255,k=y>>>8&255,M=y>>>16&255;w[f+x+0]=_;w[f+x+1]=k;w[f+x+2]=M}f+=d*3;o(w,f,s(w,f-d*3-4,d*3+4));f+=4;if(l){o(w,f,d);f+=4;h(w,f,"tRNS");f+=4;for(var v=0;v<d;v++)w[f+v]=t.plte[v]>>>24&255;f+=d;o(w,f,s(w,f-d-4,d+4));f+=4}}var A=0;for(var m=0;m<t.frames.length;m++){var g=t.frames[m];if(u){o(w,f,26);f+=4;h(w,f,"fcTL");f+=4;o(w,f,A++);f+=4;o(w,f,g.rect.width);f+=4;o(w,f,g.rect.height);f+=4;o(w,f,g.rect.x);f+=4;o(w,f,g.rect.y);f+=4;a(w,f,n[m]);f+=2;a(w,f,1e3);f+=2;w[f]=g.dispose;f++;w[f]=g.blend;f++;o(w,f,s(w,f-30,30));f+=4}var U=g.cimg,d=U.length;o(w,f,d+(m==0?0:4));f+=4;var S=f;h(w,f,m==0?"IDAT":"fdAT");f+=4;if(m!=0){o(w,f,A++);f+=4}w.set(U,f);f+=d;o(w,f,s(w,S,f-S));f+=4}o(w,f,0);f+=4;h(w,f,"IEND");f+=4;o(w,f,s(w,f-4,4));f+=4;return w.buffer};p.encode.compressPNG=function(t,i,e){for(var n=0;n<t.frames.length;n++){var r=t.frames[n],s=r.rect.height;var o=new Uint8Array(s*r.bpl+s);r.cimg=p.encode._filterZero(r.img,s,r.bpp,r.bpl,o,i,e)}};p.encode.compress=function(t,i,e,n,r){var s=r[0],o=r[1],a=r[2],h=r[3],f=r[4];var u=6,l=8,c=255;for(var d=0;d<t.length;d++){var v=new Uint8Array(t[d]),m=v.length;for(var g=0;g<m;g+=4)c&=v[g+3]}var w=c!=255;var b=p.encode.framize(t,i,e,s,o,a);var x={},y=[],_=[];if(n!=0){var k=[];for(var g=0;g<b.length;g++)k.push(b[g].img.buffer);var M=p.encode.concatRGBA(k),A=p.quantize(M,n);console.log(A);var U=0,S=new Uint8Array(A.abuf);for(var g=0;g<b.length;g++){var z=b[g].img,T=z.length;_.push(new Uint8Array(A.inds.buffer,U>>2,T>>2));for(var d=0;d<T;d+=4){z[d]=S[U+d];z[d+1]=S[U+d+1];z[d+2]=S[U+d+2];z[d+3]=S[U+d+3]}U+=T}for(var g=0;g<A.plte.length;g++)y.push(A.plte[g].est.rgba)}else{for(var d=0;d<b.length;d++){var L=b[d],P=new Uint32Array(L.img.buffer),E=L.rect.width,m=P.length;var N=new Uint8Array(m);_.push(N);for(var g=0;g<m;g++){var O=P[g];if(g!=0&&O==P[g-1])N[g]=N[g-1];else if(g>E&&O==P[g-E])N[g]=N[g-E];else{var I=x[O];if(I==null){x[O]=I=y.length;y.push(O);if(y.length>=300)break}N[g]=I}}}}var C=y.length;if(C<=256&&f==false){if(C<=2)l=1;else if(C<=4)l=2;else if(C<=16)l=4;else l=8;l=Math.max(l,h)}for(var d=0;d<b.length;d++){var L=b[d],E=L.rect.width,B=L.rect.height;var D=L.img;var j=4*E,R=4;if(C<=256&&f==false){j=Math.ceil(l*E/8);var F=new Uint8Array(j*B);var Z=_[d];for(var H=0;H<B;H++){var g=H*j,V=H*E;if(l==8)for(var W=0;W<E;W++)F[g+W]=Z[V+W];else if(l==4)for(var W=0;W<E;W++)F[g+(W>>1)]|=Z[V+W]<<4-(W&1)*4;else if(l==2)for(var W=0;W<E;W++)F[g+(W>>2)]|=Z[V+W]<<6-(W&3)*2;else if(l==1)for(var W=0;W<E;W++)F[g+(W>>3)]|=Z[V+W]<<7-(W&7)*1}D=F;u=3;R=1}else if(w==false&&b.length==1){var F=new Uint8Array(E*B*3),G=E*B;for(var g=0;g<G;g++){var z=g*3,q=g*4;F[z]=D[q];F[z+1]=D[q+1];F[z+2]=D[q+2]}D=F;u=2;R=3;j=3*E}L.img=D;L.bpl=j;L.bpp=R}return{ctype:u,depth:l,plte:y,frames:b}};p.encode.framize=function(t,i,e,n,r,s){var o=[];for(var a=0;a<t.length;a++){var h=new Uint8Array(t[a]),f=new Uint32Array(h.buffer);var u;var l=0,c=0,d=i,v=e,m=n?1:0;if(a!=0){var g=s||n||a==1||o[a-2].dispose!=0?1:2,w=0,b=1e9;for(var x=0;x<g;x++){var y=new Uint8Array(t[a-1-x]),_=new Uint32Array(t[a-1-x]);var k=i,M=e,A=-1,U=-1;for(var S=0;S<e;S++)for(var z=0;z<i;z++){var T=S*i+z;if(f[T]!=_[T]){if(z<k)k=z;if(z>A)A=z;if(S<M)M=S;if(S>U)U=S}}if(A==-1)k=M=A=U=0;if(r){if((k&1)==1)k--;if((M&1)==1)M--}var L=(A-k+1)*(U-M+1);if(L<b){b=L;w=x;l=k;c=M;d=A-k+1;v=U-M+1}}var y=new Uint8Array(t[a-1-w]);if(w==1)o[a-1].dispose=2;u=new Uint8Array(d*v*4);p._copyTile(y,i,e,u,d,v,-l,-c,0);m=p._copyTile(h,i,e,u,d,v,-l,-c,3)?1:0;if(m==1)p.encode._prepareDiff(h,i,e,u,{x:l,y:c,width:d,height:v});else p._copyTile(h,i,e,u,d,v,-l,-c,0)}else u=h.slice(0);o.push({rect:{x:l,y:c,width:d,height:v},img:u,blend:m,dispose:0})}if(n)for(var a=0;a<o.length;a++){var P=o[a];if(P.blend==1)continue;var E=P.rect,N=o[a-1].rect;var O=Math.min(E.x,N.x),I=Math.min(E.y,N.y);var C=Math.max(E.x+E.width,N.x+N.width),B=Math.max(E.y+E.height,N.y+N.height);var D={x:O,y:I,width:C-O,height:B-I};o[a-1].dispose=1;if(a-1!=0)p.encode._updateFrame(t,i,e,o,a-1,D,r);p.encode._updateFrame(t,i,e,o,a,D,r)}if(t.length!=1)for(var T=0;T<o.length;T++){var P=o[T]}return o};p.encode._updateFrame=function(t,i,e,n,r,s,o){var a=Uint8Array,h=Uint32Array;var f=new a(t[r-1]),u=new h(t[r-1]),l=r+1<t.length?new a(t[r+1]):null;var c=new a(t[r]),d=new h(c.buffer);var v=i,m=e,g=-1,w=-1;for(var b=0;b<s.height;b++)for(var x=0;x<s.width;x++){var y=s.x+x,_=s.y+b;var k=_*i+y,M=d[k];if(M==0||n[r-1].dispose==0&&u[k]==M&&(l==null||l[k*4+3]!=0));else{if(y<v)v=y;if(y>g)g=y;if(_<m)m=_;if(_>w)w=_}}if(g==-1)v=m=g=w=0;if(o){if((v&1)==1)v--;if((m&1)==1)m--}s={x:v,y:m,width:g-v+1,height:w-m+1};var A=n[r];A.rect=s;A.blend=1;A.img=new Uint8Array(s.width*s.height*4);if(n[r-1].dispose==0){p._copyTile(f,i,e,A.img,s.width,s.height,-s.x,-s.y,0);p.encode._prepareDiff(c,i,e,A.img,s)}else p._copyTile(c,i,e,A.img,s.width,s.height,-s.x,-s.y,0)};p.encode._prepareDiff=function(t,i,e,n,r){p._copyTile(t,i,e,n,r.width,r.height,-r.x,-r.y,2)};p.encode._filterZero=function(t,i,e,n,r,s,o){var a=[],h=[0,1,2,3,4];if(s!=-1)h=[s];else if(i*n>5e5||e==1)h=[0];var f;if(o)f={level:0};var u=r.length>1e7&&UZIP!=null?UZIP:pako;for(var l=0;l<h.length;l++){for(var c=0;c<i;c++)p.encode._filterLine(r,t,c,n,e,h[l]);a.push(u["deflate"](r,f))}var d,v=1e9;for(var l=0;l<a.length;l++)if(a[l].length<v){d=l;v=a[l].length}return a[d]};p.encode._filterLine=function(t,i,e,n,r,s){var o=e*n,a=o+e,h=p.decode._paeth;t[a]=s;a++;if(s==0){if(n<500)for(var f=0;f<n;f++)t[a+f]=i[o+f];else t.set(new Uint8Array(i.buffer,o,n),a)}else if(s==1){for(var f=0;f<r;f++)t[a+f]=i[o+f];for(var f=r;f<n;f++)t[a+f]=i[o+f]-i[o+f-r]+256&255}else if(e==0){for(var f=0;f<r;f++)t[a+f]=i[o+f];if(s==2)for(var f=r;f<n;f++)t[a+f]=i[o+f];if(s==3)for(var f=r;f<n;f++)t[a+f]=i[o+f]-(i[o+f-r]>>1)+256&255;if(s==4)for(var f=r;f<n;f++)t[a+f]=i[o+f]-h(i[o+f-r],0,0)+256&255}else{if(s==2){for(var f=0;f<n;f++)t[a+f]=i[o+f]+256-i[o+f-n]&255}if(s==3){for(var f=0;f<r;f++)t[a+f]=i[o+f]+256-(i[o+f-n]>>1)&255;for(var f=r;f<n;f++)t[a+f]=i[o+f]+256-(i[o+f-n]+i[o+f-r]>>1)&255}if(s==4){for(var f=0;f<r;f++)t[a+f]=i[o+f]+256-h(0,i[o+f-n],0)&255;for(var f=r;f<n;f++)t[a+f]=i[o+f]+256-h(i[o+f-r],i[o+f-n],i[o+f-r-n])&255}}};p.crc={table:function(){var t=new Uint32Array(256);for(var i=0;i<256;i++){var e=i;for(var n=0;n<8;n++){if(e&1)e=3988292384^e>>>1;else e=e>>>1}t[i]=e}return t}(),update:function(t,i,e,n){for(var r=0;r<n;r++)t=p.crc.table[(t^i[e+r])&255]^t>>>8;return t},crc:function(t,i,e){return p.crc.update(4294967295,t,i,e)^4294967295}};p.quantize=function(t,i){var e=new Uint8Array(t),n=e.slice(0),r=new Uint32Array(n.buffer);var s=p.quantize.getKDtree(n,i);var o=s[0],a=s[1];var h=p.quantize.planeDst;var f=e,u=r,l=f.length;var c=new Uint8Array(e.length>>2),d;if(e.length<2e7)for(var v=0;v<l;v+=4){var m=f[v]*(1/255),g=f[v+1]*(1/255),w=f[v+2]*(1/255),b=f[v+3]*(1/255);d=p.quantize.getNearest(o,m,g,w,b);c[v>>2]=d.ind;u[v>>2]=d.est.rgba}else for(var v=0;v<l;v+=4){var m=f[v]*(1/255),g=f[v+1]*(1/255),w=f[v+2]*(1/255),b=f[v+3]*(1/255);d=o;while(d.left)d=h(d.est,m,g,w,b)<=0?d.left:d.right;c[v>>2]=d.ind;u[v>>2]=d.est.rgba}return{abuf:n.buffer,inds:c,plte:a}};p.quantize.getKDtree=function(t,i,e){if(e==null)e=1e-4;var n=new Uint32Array(t.buffer);var r={i0:0,i1:t.length,bst:null,est:null,tdst:0,left:null,right:null};r.bst=p.quantize.stats(t,r.i0,r.i1);r.est=p.quantize.estats(r.bst);var s=[r];while(s.length<i){var o=0,a=0;for(var h=0;h<s.length;h++)if(s[h].est.L>o){o=s[h].est.L;a=h}if(o<e)break;var f=s[a];var u=p.quantize.splitPixels(t,n,f.i0,f.i1,f.est.e,f.est.eMq255);var l=f.i0>=u||f.i1<=u;if(l){f.est.L=0;continue}var c={i0:f.i0,i1:u,bst:null,est:null,tdst:0,left:null,right:null};c.bst=p.quantize.stats(t,c.i0,c.i1);c.est=p.quantize.estats(c.bst);var d={i0:u,i1:f.i1,bst:null,est:null,tdst:0,left:null,right:null};d.bst={R:[],m:[],N:f.bst.N-c.bst.N};for(var h=0;h<16;h++)d.bst.R[h]=f.bst.R[h]-c.bst.R[h];for(var h=0;h<4;h++)d.bst.m[h]=f.bst.m[h]-c.bst.m[h];d.est=p.quantize.estats(d.bst);f.left=c;f.right=d;s[a]=c;s.push(d)}s.sort((function(t,i){return i.bst.N-t.bst.N}));for(var h=0;h<s.length;h++)s[h].ind=h;return[r,s]};p.quantize.getNearest=function(t,i,e,n,r){if(t.left==null){t.tdst=p.quantize.dist(t.est.q,i,e,n,r);return t}var s=p.quantize.planeDst(t.est,i,e,n,r);var o=t.left,a=t.right;if(s>0){o=t.right;a=t.left}var h=p.quantize.getNearest(o,i,e,n,r);if(h.tdst<=s*s)return h;var f=p.quantize.getNearest(a,i,e,n,r);return f.tdst<h.tdst?f:h};p.quantize.planeDst=function(t,i,e,n,r){var s=t.e;return s[0]*i+s[1]*e+s[2]*n+s[3]*r-t.eMq};p.quantize.dist=function(t,i,e,n,r){var s=i-t[0],o=e-t[1],a=n-t[2],h=r-t[3];return s*s+o*o+a*a+h*h};p.quantize.splitPixels=function(t,i,e,n,r,s){var o=p.quantize.vecDot;n-=4;while(e<n){while(o(t,e,r)<=s)e+=4;while(o(t,n,r)>s)n-=4;if(e>=n)break;var a=i[e>>2];i[e>>2]=i[n>>2];i[n>>2]=a;e+=4;n-=4}while(o(t,e,r)>s)e-=4;return e+4};p.quantize.vecDot=function(t,i,e){return t[i]*e[0]+t[i+1]*e[1]+t[i+2]*e[2]+t[i+3]*e[3]};p.quantize.stats=function(t,i,e){var n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var r=[0,0,0,0];var s=e-i>>2;for(var o=i;o<e;o+=4){var a=t[o]*(1/255),h=t[o+1]*(1/255),f=t[o+2]*(1/255),u=t[o+3]*(1/255);r[0]+=a;r[1]+=h;r[2]+=f;r[3]+=u;n[0]+=a*a;n[1]+=a*h;n[2]+=a*f;n[3]+=a*u;n[5]+=h*h;n[6]+=h*f;n[7]+=h*u;n[10]+=f*f;n[11]+=f*u;n[15]+=u*u}n[4]=n[1];n[8]=n[2];n[9]=n[6];n[12]=n[3];n[13]=n[7];n[14]=n[11];return{R:n,m:r,N:s}};p.quantize.estats=function(t){var i=t.R,e=t.m,n=t.N;var r=e[0],s=e[1],o=e[2],a=e[3],h=n==0?0:1/n;var f=[i[0]-r*r*h,i[1]-r*s*h,i[2]-r*o*h,i[3]-r*a*h,i[4]-s*r*h,i[5]-s*s*h,i[6]-s*o*h,i[7]-s*a*h,i[8]-o*r*h,i[9]-o*s*h,i[10]-o*o*h,i[11]-o*a*h,i[12]-a*r*h,i[13]-a*s*h,i[14]-a*o*h,i[15]-a*a*h];var u=f,l=p.M4;var c=[Math.random(),Math.random(),Math.random(),Math.random()],d=0,v=0;if(n!=0)for(var m=0;m<16;m++){c=l.multVec(u,c);v=Math.sqrt(l.dot(c,c));c=l.sml(1/v,c);if(m!=0&&Math.abs(v-d)<1e-9)break;d=v}var g=[r*h,s*h,o*h,a*h];var w=l.dot(l.sml(255,g),c);return{Cov:f,q:g,e:c,L:d,eMq255:w,eMq:l.dot(c,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0])<<0)>>>0}};p.M4={multVec:function(t,i){return[t[0]*i[0]+t[1]*i[1]+t[2]*i[2]+t[3]*i[3],t[4]*i[0]+t[5]*i[1]+t[6]*i[2]+t[7]*i[3],t[8]*i[0]+t[9]*i[1]+t[10]*i[2]+t[11]*i[3],t[12]*i[0]+t[13]*i[1]+t[14]*i[2]+t[15]*i[3]]},dot:function(t,i){return t[0]*i[0]+t[1]*i[1]+t[2]*i[2]+t[3]*i[3]},sml:function(t,i){return[t*i[0],t*i[1],t*i[2],t*i[3]]}};p.encode.concatRGBA=function(t){var i=0;for(var e=0;e<t.length;e++)i+=t[e].byteLength;var n=new Uint8Array(i),r=0;for(var e=0;e<t.length;e++){var s=new Uint8Array(t[e]),o=s.length;for(var a=0;a<o;a+=4){var h=s[a],f=s[a+1],u=s[a+2],l=s[a+3];if(l==0)h=f=u=0;n[r+a]=h;n[r+a+1]=f;n[r+a+2]=u;n[r+a+3]=l}r+=o}return n.buffer};var m={exports:{}};var g={exports:{}}; /* @preserve * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade */(function(t,i){(function(t,e){e(i)})(a,(function(t){var i="1.7.1";function e(t){var i,e,n,r;for(e=1,n=arguments.length;e<n;e++){r=arguments[e];for(i in r){t[i]=r[i]}}return t}var n=Object.create||function(){function t(){}return function(i){t.prototype=i;return new t}}();function r(t,i){var e=Array.prototype.slice;if(t.bind){return t.bind.apply(t,e.call(arguments,1))}var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}var s=0;function o(t){t._leaflet_id=t._leaflet_id||++s;return t._leaflet_id}function a(t,i,e){var n,r,s,o;o=function(){n=false;if(r){s.apply(e,r);r=false}};s=function(){if(n){r=arguments}else{t.apply(e,arguments);setTimeout(o,i);n=true}};return s}function h(t,i,e){var n=i[1],r=i[0],s=n-r;return t===n&&e?t:((t-r)%s+s)%s+r}function f(){return false}function u(t,i){var e=Math.pow(10,i===undefined?6:i);return Math.round(t*e)/e}function l(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function c(t){return l(t).split(/\s+/)}function d(t,i){if(!Object.prototype.hasOwnProperty.call(t,"options")){t.options=t.options?n(t.options):{}}for(var e in i){t.options[e]=i[e]}return t.options}function v(t,i,e){var n=[];for(var r in t){n.push(encodeURIComponent(e?r.toUpperCase():r)+"="+encodeURIComponent(t[r]))}return(!i||i.indexOf("?")===-1?"?":"&")+n.join("&")}var p=/\{ *([\w_-]+) *\}/g;function m(t,i){return t.replace(p,(function(t,e){var n=i[e];if(n===undefined){throw new Error("No value provided for variable "+t)}else if(typeof n==="function"){n=n(i)}return n}))}var g=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function w(t,i){for(var e=0;e<t.length;e++){if(t[e]===i){return e}}return-1}var b="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var y=0;function _(t){var i=+new Date,e=Math.max(0,16-(i-y));y=i+e;return window.setTimeout(t,e)}var k=window.requestAnimationFrame||x("RequestAnimationFrame")||_;var M=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function A(t,i,e){if(e&&k===_){t.call(i)}else{return k.call(window,r(t,i))}}function U(t){if(t){M.call(window,t)}}var S={extend:e,create:n,bind:r,lastId:s,stamp:o,throttle:a,wrapNum:h,falseFn:f,formatNum:u,trim:l,splitWords:c,setOptions:d,getParamString:v,template:m,isArray:g,indexOf:w,emptyImageUrl:b,requestFn:k,cancelFn:M,requestAnimFrame:A,cancelAnimFrame:U};function z(){}z.extend=function(t){var i=function(){if(this.initialize){this.initialize.apply(this,arguments)}this.callInitHooks()};var r=i.__super__=this.prototype;var s=n(r);s.constructor=i;i.prototype=s;for(var o in this){if(Object.prototype.hasOwnProperty.call(this,o)&&o!=="prototype"&&o!=="__super__"){i[o]=this[o]}}if(t.statics){e(i,t.statics);delete t.statics}if(t.includes){T(t.includes);e.apply(null,[s].concat(t.includes));delete t.includes}if(s.options){t.options=e(n(s.options),t.options)}e(s,t);s._initHooks=[];s.callInitHooks=function(){if(this._initHooksCalled){return}if(r.callInitHooks){r.callInitHooks.call(this)}this._initHooksCalled=true;for(var t=0,i=s._initHooks.length;t<i;t++){s._initHooks[t].call(this)}};return i};z.include=function(t){e(this.prototype,t);return this};z.mergeOptions=function(t){e(this.prototype.options,t);return this};z.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1);var e=typeof t==="function"?t:function(){this[t].apply(this,i)};this.prototype._initHooks=this.prototype._initHooks||[];this.prototype._initHooks.push(e);return this};function T(t){if(typeof L==="undefined"||!L||!L.Mixin){return}t=g(t)?t:[t];for(var i=0;i<t.length;i++){if(t[i]===L.Mixin.Events){console.warn("Deprecated include of L.Mixin.Events: "+"this property will be removed in future releases, "+"please inherit from L.Evented instead.",(new Error).stack)}}}var P={on:function(t,i,e){if(typeof t==="object"){for(var n in t){this._on(n,t[n],i)}}else{t=c(t);for(var r=0,s=t.length;r<s;r++){this._on(t[r],i,e)}}return this},off:function(t,i,e){if(!t){delete this._events}else if(typeof t==="object"){for(var n in t){this._off(n,t[n],i)}}else{t=c(t);for(var r=0,s=t.length;r<s;r++){this._off(t[r],i,e)}}return this},_on:function(t,i,e){this._events=this._events||{};var n=this._events[t];if(!n){n=[];this._events[t]=n}if(e===this){e=undefined}var r={fn:i,ctx:e},s=n;for(var o=0,a=s.length;o<a;o++){if(s[o].fn===i&&s[o].ctx===e){return}}s.push(r)},_off:function(t,i,e){var n,r,s;if(!this._events){return}n=this._events[t];if(!n){return}if(!i){for(r=0,s=n.length;r<s;r++){n[r].fn=f}delete this._events[t];return}if(e===this){e=undefined}if(n){for(r=0,s=n.length;r<s;r++){var o=n[r];if(o.ctx!==e){continue}if(o.fn===i){o.fn=f;if(this._firingCount){this._events[t]=n=n.slice()}n.splice(r,1);return}}}},fire:function(t,i,n){if(!this.listens(t,n)){return this}var r=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 o=0,a=s.length;o<a;o++){var h=s[o];h.fn.call(h.ctx||this,r)}this._firingCount--}}if(n){this._propagateEvent(r)}return this},listens:function(t,i){var e=this._events&&this._events[t];if(e&&e.length){return true}if(i){for(var n in this._eventParents){if(this._eventParents[n].listens(t,i)){return true}}}return false},once:function(t,i,e){if(typeof t==="object"){for(var n in t){this.once(n,t[n],i)}return this}var s=r((function(){this.off(t,i,e).off(t,s,e)}),this);return this.on(t,i,e).on(t,s,e)},addEventParent:function(t){this._eventParents=this._eventParents||{};this._eventParents[o(t)]=t;return this},removeEventParent:function(t){if(this._eventParents){delete this._eventParents[o(t)]}return this},_propagateEvent:function(t){for(var i in this._eventParents){this._eventParents[i].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),true)}}};P.addEventListener=P.on;P.removeEventListener=P.clearAllEventListeners=P.off;P.addOneTimeEventListener=P.once;P.fireEvent=P.fire;P.hasEventListeners=P.listens;var E=z.extend(P);function N(t,i,e){this.x=e?Math.round(t):t;this.y=e?Math.round(i):i}var O=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};N.prototype={clone:function(){return new N(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){this.x+=t.x;this.y+=t.y;return this},subtract:function(t){return this.clone()._subtract(I(t))},_subtract:function(t){this.x-=t.x;this.y-=t.y;return this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){this.x/=t;this.y/=t;return this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){this.x*=t;this.y*=t;return this},scaleBy:function(t){return new N(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new N(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},floor:function(){return this.clone()._floor()},_floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){return this.clone()._ceil()},_ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},trunc:function(){return this.clone()._trunc()},_trunc:function(){this.x=O(this.x);this.y=O(this.y);return this},distanceTo:function(t){t=I(t);var i=t.x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){t=I(t);return t.x===this.x&&t.y===this.y},contains:function(t){t=I(t);return Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}};function I(t,i,e){if(t instanceof N){return t}if(g(t)){return new N(t[0],t[1])}if(t===undefined||t===null){return t}if(typeof t==="object"&&"x"in t&&"y"in t){return new N(t.x,t.y)}return new N(t,i,e)}function C(t,i){if(!t){return}var e=i?[t,i]:t;for(var n=0,r=e.length;n<r;n++){this.extend(e[n])}}C.prototype={extend:function(t){t=I(t);if(!this.min&&!this.max){this.min=t.clone();this.max=t.clone()}else{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)}return this},getCenter:function(t){return new N((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new N(this.min.x,this.max.y)},getTopRight:function(){return new N(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,e;if(typeof t[0]==="number"||t instanceof N){t=I(t)}else{t=B(t)}if(t instanceof C){i=t.min;e=t.max}else{i=e=t}return i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,r=t.max,s=r.x>=i.x&&n.x<=e.x,o=r.y>=i.y&&n.y<=e.y;return s&&o},overlaps:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,r=t.max,s=r.x>i.x&&n.x<e.x,o=r.y>i.y&&n.y<e.y;return s&&o},isValid:function(){return!!(this.min&&this.max)}};function B(t,i){if(!t||t instanceof C){return t}return new C(t,i)}function D(t,i){if(!t){return}var e=i?[t,i]:t;for(var n=0,r=e.length;n<r;n++){this.extend(e[n])}}D.prototype={extend:function(t){var i=this._southWest,e=this._northEast,n,r;if(t instanceof R){n=t;r=t}else if(t instanceof D){n=t._southWest;r=t._northEast;if(!n||!r){return this}}else{return t?this.extend(F(t)||j(t)):this}if(!i&&!e){this._southWest=new R(n.lat,n.lng);this._northEast=new R(r.lat,r.lng)}else{i.lat=Math.min(n.lat,i.lat);i.lng=Math.min(n.lng,i.lng);e.lat=Math.max(r.lat,e.lat);e.lng=Math.max(r.lng,e.lng)}return this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,r=Math.abs(i.lng-e.lng)*t;return new D(new R(i.lat-n,i.lng-r),new R(e.lat+n,e.lng+r))},getCenter:function(){return new R((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new R(this.getNorth(),this.getWest())},getSouthEast:function(){return new R(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){if(typeof t[0]==="number"||t instanceof R||"lat"in t){t=F(t)}else{t=j(t)}var i=this._southWest,e=this._northEast,n,r;if(t instanceof D){n=t.getSouthWest();r=t.getNorthEast()}else{n=r=t}return n.lat>=i.lat&&r.lat<=e.lat&&n.lng>=i.lng&&r.lng<=e.lng},intersects:function(t){t=j(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),s=r.lat>=i.lat&&n.lat<=e.lat,o=r.lng>=i.lng&&n.lng<=e.lng;return s&&o},overlaps:function(t){t=j(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),s=r.lat>i.lat&&n.lat<e.lat,o=r.lng>i.lng&&n.lng<e.lng;return s&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){if(!t){return false}t=j(t);return this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i)},isValid:function(){return!!(this._southWest&&this._northEast)}};function j(t,i){if(t instanceof D){return t}return new D(t,i)}function R(t,i,e){if(isNaN(t)||isNaN(i)){throw new Error("Invalid LatLng object: ("+t+", "+i+")")}this.lat=+t;this.lng=+i;if(e!==undefined){this.alt=+e}}R.prototype={equals:function(t,i){if(!t){return false}t=F(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=(i===undefined?1e-9:i)},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,F(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return j([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new R(this.lat,this.lng,this.alt)}};function F(t,i,e){if(t instanceof R){return t}if(g(t)&&typeof t[0]!=="object"){if(t.length===3){return new R(t[0],t[1],t[2])}if(t.length===2){return new R(t[0],t[1])}return null}if(t===undefined||t===null){return t}if(typeof t==="object"&&"lat"in t){return new R(t.lat,"lng"in t?t.lng:t.lon,t.alt)}if(i===undefined){return null}return new R(t,i,e)}var Z={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite){return null}var i=this.projection.bounds,e=this.scale(t),n=this.transformation.transform(i.min,e),r=this.transformation.transform(i.max,e);return new C(n,r)},infinite:false,wrapLatLng:function(t){var i=this.wrapLng?h(t.lng,this.wrapLng,true):t.lng,e=this.wrapLat?h(t.lat,this.wrapLat,true):t.lat,n=t.alt;return new R(e,i,n)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,r=i.lng-e.lng;if(n===0&&r===0){return t}var s=t.getSouthWest(),o=t.getNorthEast(),a=new R(s.lat-n,s.lng-r),h=new R(o.lat-n,o.lng-r);return new D(a,h)}};var H=e({},Z,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,r=i.lat*e,s=Math.sin((i.lat-t.lat)*e/2),o=Math.sin((i.lng-t.lng)*e/2),a=s*s+Math.cos(n)*Math.cos(r)*o*o,h=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*h}});var V=6378137;var W={R:V,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),r=Math.sin(n*i);return new N(this.R*t.lng*i,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(t){var i=180/Math.PI;return new R((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:function(){var t=V*Math.PI;return new C([-t,-t],[t,t])}()};function G(t,i,e,n){if(g(t)){this._a=t[0];this._b=t[1];this._c=t[2];this._d=t[3];return}this._a=t;this._b=i;this._c=e;this._d=n}G.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){i=i||1;t.x=i*(this._a*t.x+this._b);t.y=i*(this._c*t.y+this._d);return t},untransform:function(t,i){i=i||1;return new N((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};function q(t,i,e,n){return new G(t,i,e,n)}var J=e({},H,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return q(t,.5,-t,.5)}()});var K=e({},J,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Y(t,i){var e="",n,r,s,o,a,h;for(n=0,s=t.length;n<s;n++){a=t[n];for(r=0,o=a.length;r<o;r++){h=a[r];e+=(r?"L":"M")+h.x+" "+h.y}e+=i?Tt?"z":"x":""}return e||"M0 0"}var Q=document.documentElement.style;var $="ActiveXObject"in window;var tt=$&&!document.addEventListener;var it="msLaunchUri"in navigator&&!("documentMode"in document);var et=Pt("webkit");var nt=Pt("android");var rt=Pt("android 2")||Pt("android 3");var st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10);var ot=nt&&Pt("Google")&&st<537&&!("AudioNode"in window);var at=!!window.opera;var ht=!it&&Pt("chrome");var ft=Pt("gecko")&&!et&&!at&&!$;var ut=!ht&&Pt("safari");var lt=Pt("phantom");var ct="OTransition"in Q;var dt=navigator.platform.indexOf("Win")===0;var vt=$&&"transition"in Q;var pt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt;var mt="MozPerspective"in Q;var gt=!window.L_DISABLE_3D&&(vt||pt||mt)&&!ct&&!lt;var wt=typeof orientation!=="undefined"||Pt("mobile");var bt=wt&&et;var xt=wt&&pt;var yt=!window.PointerEvent&&window.MSPointerEvent;var _t=!!(window.PointerEvent||yt);var kt=!window.L_NO_TOUCH&&(_t||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);var Mt=wt&&at;var At=wt&&ft;var Ut=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;var St=function(){var t=false;try{var i=Object.defineProperty({},"passive",{get:function(){t=true}});window.addEventListener("testPassiveEventSupport",f,i);window.removeEventListener("testPassiveEventSupport",f,i)}catch(t){}return t}();var zt=function(){return!!document.createElement("canvas").getContext}();var Tt=!!(document.createElementNS&&X("svg").createSVGRect);var Lt=!Tt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;i.style.behavior="url(#default#VML)";return i&&typeof i.adj==="object"}catch(t){return false}}();function Pt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Et={ie:$,ielt9:tt,edge:it,webkit:et,android:nt,android23:rt,androidStock:ot,opera:at,chrome:ht,gecko:ft,safari:ut,phantom:lt,opera12:ct,win:dt,ie3d:vt,webkit3d:pt,gecko3d:mt,any3d:gt,mobile:wt,mobileWebkit:bt,mobileWebkit3d:xt,msPointer:yt,pointer:_t,touch:kt,mobileOpera:Mt,mobileGecko:At,retina:Ut,passiveEvents:St,canvas:zt,svg:Tt,vml:Lt};var Nt=yt?"MSPointerDown":"pointerdown";var Ot=yt?"MSPointerMove":"pointermove";var It=yt?"MSPointerUp":"pointerup";var Ct=yt?"MSPointerCancel":"pointercancel";var Bt={};var Dt=false;function jt(t,i,e,n){if(i==="touchstart"){Ft(t,e,n)}else if(i==="touchmove"){Gt(t,e,n)}else if(i==="touchend"){qt(t,e,n)}return this}function Rt(t,i,e){var n=t["_leaflet_"+i+e];if(i==="touchstart"){t.removeEventListener(Nt,n,false)}else if(i==="touchmove"){t.removeEventListener(Ot,n,false)}else if(i==="touchend"){t.removeEventListener(It,n,false);t.removeEventListener(Ct,n,false)}return this}function Ft(t,i,e){var n=r((function(t){if(t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH){Hi(t)}Wt(t,i)}));t["_leaflet_touchstart"+e]=n;t.addEventListener(Nt,n,false);if(!Dt){document.addEventListener(Nt,Zt,true);document.addEventListener(Ot,Ht,true);document.addEventListener(It,Vt,true);document.addEventListener(Ct,Vt,true);Dt=true}}function Zt(t){Bt[t.pointerId]=t}function Ht(t){if(Bt[t.pointerId]){Bt[t.pointerId]=t}}function Vt(t){delete Bt[t.pointerId]}function Wt(t,i){t.touches=[];for(var e in Bt){t.touches.push(Bt[e])}t.changedTouches=[t];i(t)}function Gt(t,i,e){var n=function(t){if(t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&t.buttons===0){return}Wt(t,i)};t["_leaflet_touchmove"+e]=n;t.addEventListener(Ot,n,false)}function qt(t,i,e){var n=function(t){Wt(t,i)};t["_leaflet_touchend"+e]=n;t.addEventListener(It,n,false);t.addEventListener(Ct,n,false)}var Jt=yt?"MSPointerDown":_t?"pointerdown":"touchstart";var Kt=yt?"MSPointerUp":_t?"pointerup":"touchend";var Xt="_leaflet_";function Yt(t,i,e){var n,r,s=false,o=250;function a(t){if(_t){if(!t.isPrimary){return}if(t.pointerType==="mouse"){return}}else if(t.touches.length>1){return}var i=Date.now(),e=i-(n||i);r=t.touches?t.touches[0]:t;s=e>0&&e<=o;n=i}function h(t){if(s&&!r.cancelBubble){if(_t){if(t.pointerType==="mouse"){return}var e={},o,a;for(a in r){o=r[a];e[a]=o&&o.bind?o.bind(r):o}r=e}r.type="dblclick";r.button=0;i(r);n=null}}t[Xt+Jt+e]=a;t[Xt+Kt+e]=h;t[Xt+"dblclick"+e]=i;t.addEventListener(Jt,a,St?{passive:false}:false);t.addEventListener(Kt,h,St?{passive:false}:false);t.addEventListener("dblclick",i,false);return this}function Qt(t,i){var e=t[Xt+Jt+i],n=t[Xt+Kt+i],r=t[Xt+"dblclick"+i];t.removeEventListener(Jt,e,St?{passive:false}:false);t.removeEventListener(Kt,n,St?{passive:false}:false);t.removeEventListener("dblclick",r,false);return this}var $t=mi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);var ti=mi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);var ii=ti==="webkitTransition"||ti==="OTransition"?ti+"End":"transitionend";function ei(t){return typeof t==="string"?document.getElementById(t):t}function ni(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||e==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return e==="auto"?null:e}function ri(t,i,e){var n=document.createElement(t);n.className=i||"";if(e){e.appendChild(n)}return n}function si(t){var i=t.parentNode;if(i){i.removeChild(t)}}function oi(t){while(t.firstChild){t.removeChild(t.firstChild)}}function ai(t){var i=t.parentNode;if(i&&i.lastChild!==t){i.appendChild(t)}}function hi(t){var i=t.parentNode;if(i&&i.firstChild!==t){i.insertBefore(t,i.firstChild)}}function fi(t,i){if(t.classList!==undefined){return t.classList.contains(i)}var e=di(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function ui(t,i){if(t.classList!==undefined){var e=c(i);for(var n=0,r=e.length;n<r;n++){t.classList.add(e[n])}}else if(!fi(t,i)){var s=di(t);ci(t,(s?s+" ":"")+i)}}function li(t,i){if(t.classList!==undefined){t.classList.remove(i)}else{ci(t,l((" "+di(t)+" ").replace(" "+i+" "," ")))}}function ci(t,i){if(t.className.baseVal===undefined){t.className=i}else{t.className.baseVal=i}}function di(t){if(t.correspondingElement){t=t.correspondingElement}return t.className.baseVal===undefined?t.className:t.className.baseVal}function vi(t,i){if("opacity"in t.style){t.style.opacity=i}else if("filter"in t.style){pi(t,i)}}function pi(t,i){var e=false,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(i===1){return}}i=Math.round(i*100);if(e){e.Enabled=i!==100;e.Opacity=i}else{t.style.filter+=" progid:"+n+"(opacity="+i+")"}}function mi(t){var i=document.documentElement.style;for(var e=0;e<t.length;e++){if(t[e]in i){return t[e]}}return false}function gi(t,i,e){var n=i||new N(0,0);t.style[$t]=(vt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function wi(t,i){t._leaflet_pos=i;if(gt){gi(t,i)}else{t.style