// OpenLayers 3. See http://openlayers.org/ // License: https://raw.githubusercontent.com/openlayers/ol3/master/LICENSE.md // Version: v3.18.2 ;(function (root, factory) { if (typeof exports === "object") { module.exports = factory(); } else if (typeof define === "function" && define.amd) { define([], factory); } else { root.ol = factory(); } }(this, function () { var OPENLAYERS = {}; var k,aa=this; function ba(){var a=aa.setImmediate,b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ca(a,b,c){return a.call.apply(a.bind,arguments)}function da(a,b,c){if(!a)throw Error();if(2c*b?c+b:c}function va(a,b,c){return a+c*(b-a)};function wa(a){return function(b){if(b)return[ma(b[0],a[0],a[2]),ma(b[1],a[1],a[3])]}}function xa(a){return a};function ya(a,b,c){this.center=a;this.resolution=b;this.rotation=c};var za="function"===typeof Object.assign?Object.assign:function(a,b){if(!a||!a)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),d=1,e=arguments.length;db?1:ac)for(c=1;c>>0,d,e=0;ee)return 1;if(e>d)return-1}return 0};function ub(a,b){a[0]+=b[0];a[1]+=b[1];return a}function vb(a,b){var c=a[0],d=a[1],e=b[0],f=b[1],g=e[0],e=e[1],h=f[0],f=f[1],l=h-g,m=f-e,c=0===l&&0===m?0:(l*(c-g)+m*(d-e))/(l*l+m*m||0);0>=c||(1<=c?(g=h,e=f):(g+=c*l,e+=c*m));return[g,e]}function wb(a,b,c){a=ta(a+180,360)-180;var d=Math.abs(3600*a);return Math.floor(d/3600)+"\u00b0 "+sb(Math.floor(d/60%60))+"\u2032 "+sb(d%60,c||0)+"\u2033 "+b.charAt(0>a?1:0)} function xb(a,b,c){return a?b.replace("{x}",a[0].toFixed(c)).replace("{y}",a[1].toFixed(c)):""}function yb(a,b){for(var c=!0,d=a.length-1;0<=d;--d)if(a[d]!=b[d]){c=!1;break}return c}function zb(a,b){var c=Math.cos(b),d=Math.sin(b),e=a[1]*c+a[0]*d;a[0]=a[0]*c-a[1]*d;a[1]=e;return a}function Ab(a,b){var c=a[0]-b[0],d=a[1]-b[1];return c*c+d*d}function Bb(a,b){return Ab(a,vb(a,b))}function Cb(a,b){return xb(a,"{x}, {y}",b)};function Db(a){for(var b=Eb(),c=0,d=a.length;cd&&(h|=4);ge&&(h|=2);0===h&&(h=1);return h}function Eb(){return[Infinity,Infinity,-Infinity,-Infinity]}function Qb(a,b,c,d,e){return e?(e[0]=a,e[1]=b,e[2]=c,e[3]=d,e):[a,b,c,d]}function Rb(a,b){var c=a[0],d=a[1];return Qb(c,d,c,d,b)}function Sb(a,b,c,d,e){e=Qb(Infinity,Infinity,-Infinity,-Infinity,e);return Tb(e,a,b,c,d)} function Ub(a,b){return a[0]==b[0]&&a[2]==b[2]&&a[1]==b[1]&&a[3]==b[3]}function Vb(a,b){b[0]a[2]&&(a[2]=b[2]);b[1]a[3]&&(a[3]=b[3]);return a}function Fb(a,b){b[0]a[2]&&(a[2]=b[0]);b[1]a[3]&&(a[3]=b[1])}function Tb(a,b,c,d,e){for(;cb[0]?a[0]:b[0],c[1]=a[1]>b[1]?a[1]:b[1],c[2]=a[2]=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function dc(a){return a[2]a||0!==this.l&&a<=this.l)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var c=this.Lc(a);if(c.la().lengthe&&(e=f);f=h;g=l}return e}function $c(a,b,c,d,e){var f,g;f=0;for(g=c.length;fh){for(;bt&&(m=n,t=z)}t>e&&(l[(m-b)/d]=1,q+dA&&uaA)&&(0>Ma&&MMa)||(u[g++]= z,u[g++]=G,y=z,E=G);z=J;G=X}}u[g++]=z;u[g++]=G}}h.push(g);b=n}return g};function jd(a,b){Sc.call(this);this.c=this.j=-1;this.sa(a,b)}w(jd,Sc);k=jd.prototype;k.clone=function(){var a=new jd(null);kd(a,this.ka,this.B.slice());return a};k.vb=function(a,b,c,d){if(df!=n>f&&e<(m-h)*(f-l)/(n-l)+h&&(g=!g);h=m;l=n}return g}function nd(a,b,c,d,e,f){if(0===c.length||!md(a,b,c[0],d,e,f))return!1;var g;b=1;for(g=c.length;bp&&(m=(m+n)/2,nd(a,b,c,d,m,q)&&(v=m,p=u));m=n}isNaN(v)&&(v=e[f]);return g?(g.push(v,q),g):[v,q]};function pd(a,b,c,d,e,f){for(var g=[a[b],a[b+1]],h=[],l;b+d=e[0]&&f[2]<=e[2]||f[1]>=e[1]&&f[3]<=e[3]?!0:pd(a,b,c,d,function(a,b){var c=!1,d=Ob(e,a),f=Ob(e,b);if(1===d||1===f)c=!0;else{var p=e[0],q=e[1],t=e[2],v=e[3],u=b[0],y=b[1],E=(y-a[1])/(u-a[0]);f&2&&!(d&2)&&(c=u-(y-v)/E,c=c>=p&&c<=t);c||!(f&4)||d&4||(c=y-(u-t)*E,c=c>=q&&c<=v);c||!(f&8)||d&8||(c=u-(y-q)/E,c=c>=p&&c<=t);c||!(f&16)||d&16||(c=y-(u-p)*E,c=c>=q&&c<=v)}return c}):!1} function rd(a,b,c,d,e){var f=c[0];if(!(qd(a,b,f,d,e)||md(a,b,f,d,e[0],e[1])||md(a,b,f,d,e[0],e[3])||md(a,b,f,d,e[2],e[1])||md(a,b,f,d,e[2],e[3])))return!1;if(1===c.length)return!0;b=1;for(f=c.length;ba||this.c.length<=a)return null;var b=new jd(null);kd(b,this.ka,this.B.slice(0===a?0:this.c[a-1],this.c[a]));return b};k.Vd=function(){var a=this.ka,b=this.B,c=this.c,d=[],e=0,f,g;f=0;for(g=c.length;f=this.i&&b<=this.a){a=this.l||0;var c,d;if(this.f){d=cb(this.f,b,1);a+=d;if(d==this.f.length-1)return a;c=this.f[d];d=c/this.f[d+1]}else c=this.a,d=this.s;a+=Math.log(c/b)/Math.log(d)}return a}; k.af=function(a,b,c){a instanceof Sc||(la(Array.isArray(a),24),la(!dc(a),25),a=yd(a));var d=c||{};c=void 0!==d.padding?d.padding:[0,0,0,0];var e=void 0!==d.constrainResolution?d.constrainResolution:!0,f=void 0!==d.nearest?d.nearest:!1,g;void 0!==d.minResolution?g=d.minResolution:void 0!==d.maxZoom?g=this.constrainResolution(this.a,d.maxZoom-this.l,0):g=0;var h=a.la(),l=this.Ma(),d=Math.cos(-l),l=Math.sin(-l),m=Infinity,n=Infinity,p=-Infinity,q=-Infinity;a=a.ua();for(var t=0,v=h.length;ta?Nd(2*a):1-Nd(2*(a-.5))};function Sd(a){var b=a.source,c=a.start?a.start:Date.now(),d=b[0],e=b[1],f=void 0!==a.duration?a.duration:1E3,g=a.easing?a.easing:Nd;return function(a,b){if(b.time=b.ca&&a.fa<=b.ia&&a.ia>=b.fa};function Zd(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]+2*b;c[1]=a[1]+2*b;return c}function $d(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]*b+.5|0;c[1]=a[1]*b+.5|0;return c}function ae(a,b){if(Array.isArray(a))return a;void 0===b?b=[a,a]:b[0]=b[1]=a;return b};function be(a,b,c,d){return void 0!==d?(d[0]=a,d[1]=b,d[2]=c,d):[a,b,c]}function ce(a){var b=a[0],c=Array(b),d=1<>=1;return c.join("")};function de(a){this.minZoom=void 0!==a.minZoom?a.minZoom:0;this.b=a.resolutions;la(lb(this.b,function(a,b){return b-a}),17);this.maxZoom=this.b.length-1;this.g=void 0!==a.origin?a.origin:null;this.f=null;void 0!==a.origins&&(this.f=a.origins,la(this.f.length==this.b.length,20));var b=a.extent;void 0===b||this.g||this.f||(this.g=bc(b));la(!this.g&&this.f||this.g&&!this.f,18);this.c=null;void 0!==a.tileSizes&&(this.c=a.tileSizes,la(this.c.length==this.b.length,19));this.i=void 0!==a.tileSize?a.tileSize: this.c?null:256;la(!this.i&&this.c||this.i&&!this.c,22);this.s=void 0!==b?b:null;this.a=null;this.l=[0,0];void 0!==a.sizes?this.a=a.sizes.map(function(a){return new Vd(Math.min(0,a[0]),Math.max(a[0]-1,-1),Math.min(0,a[1]),Math.max(a[1]-1,-1))},this):b&&ee(this,b)}var fe=[0,0,0];k=de.prototype;k.wg=function(a,b,c){a=ge(this,a,b);for(var d=a.ca,e=a.ea;d<=e;++d)for(var f=a.fa,g=a.ia;f<=g;++f)c([b,d,f])}; function he(a,b,c,d,e){e=a.Ea(b,e);for(b=b[0]-1;b>=a.minZoom;){if(c.call(null,b,ge(a,e,b,d)))return!0;--b}return!1}k.C=function(){return this.s};k.Gg=function(){return this.maxZoom};k.Hg=function(){return this.minZoom};k.Ka=function(a){return this.g?this.g:this.f[a]};k.$=function(a){return this.b[a]};k.Hh=function(){return this.b};function ie(a,b,c,d){return b[0]b?1:0};function He(a,b,c){return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};var Ie;a:{var Je=aa.navigator;if(Je){var Ke=Je.userAgent;if(Ke){Ie=Ke;break a}}Ie=""}function Le(a){return-1!=Ie.indexOf(a)};var Me=Le("Opera"),Ne=Le("Trident")||Le("MSIE"),Oe=Le("Edge"),Pe=Le("Gecko")&&!(-1!=Ie.toLowerCase().indexOf("webkit")&&!Le("Edge"))&&!(Le("Trident")||Le("MSIE"))&&!Le("Edge"),Qe=-1!=Ie.toLowerCase().indexOf("webkit")&&!Le("Edge"),Re; a:{var Se="",Te=function(){var a=Ie;if(Pe)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Oe)return/Edge\/([\d\.]+)/.exec(a);if(Ne)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Qe)return/WebKit\/(\S+)/.exec(a);if(Me)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Te&&(Se=Te?Te[1]:"");if(Ne){var Ue,Ve=aa.document;Ue=Ve?Ve.documentMode:void 0;if(null!=Ue&&Ue>parseFloat(Se)){Re=String(Ue);break a}}Re=Se}var We={};function Xe(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Ye(a,b){a[0]=b[0];a[1]=b[1];a[4]=b[2];a[5]=b[3];a[12]=b[4];a[13]=b[5];return a};var Ze=Xe();function $e(a,b){var c=document.createElement("CANVAS");a&&(c.width=a);b&&(c.height=b);return c.getContext("2d")} var af=function(){var a;return function(){if(void 0===a){var b=document.createElement("P"),c,d={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.appendChild(b);for(var e in d)e in b.style&&(b.style[e]="translate(1px,1px)",c=ja.getComputedStyle(b).getPropertyValue(d[e]));document.body.removeChild(b);a=c&&"none"!==c}return a}}(),bf=function(){var a;return function(){if(void 0===a){var b=document.createElement("P"), c,d={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.appendChild(b);for(var e in d)e in b.style&&(b.style[e]="translate3d(1px,1px,1px)",c=ja.getComputedStyle(b).getPropertyValue(d[e]));document.body.removeChild(b);a=c&&"none"!==c}return a}}(); function cf(a,b){var c=a.style;c.WebkitTransform=b;c.MozTransform=b;c.b=b;c.msTransform=b;c.transform=b;if((c=Ne)&&!(c=We["9.0"])){for(var c=0,d=Fe(String(Re)).split("."),e=Fe("9.0").split("."),f=Math.max(d.length,e.length),g=0;0==c&&gc;++c)e[c]=d[c].toFixed(6);cf(a,"matrix3d("+e.join(",")+")")}else if(af()){d=Array(6);for(c=0;6>c;++c)d[c]=b[c].toFixed(6);cf(a,"matrix("+d.join(",")+")")}else a.style.left=Math.round(b[4])+"px",a.style.top=Math.round(b[5])+"px"}function ef(a,b){var c=b.parentNode;c&&c.replaceChild(a,b)} function ff(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function gf(a){for(;a.lastChild;)a.removeChild(a.lastChild)};function hf(a,b,c){Pa.call(this,a);this.map=b;this.frameState=void 0!==c?c:null}w(hf,Pa);function jf(a){Xa.call(this);this.element=a.element?a.element:null;this.a=this.R=null;this.s=[];this.render=a.render?a.render:ha;a.target&&this.c(a.target)}w(jf,Xa);jf.prototype.ma=function(){ff(this.element);Xa.prototype.ma.call(this)};jf.prototype.i=function(){return this.a}; jf.prototype.setMap=function(a){this.a&&ff(this.element);for(var b=0,c=this.s.length;bMa.ea)if(Yd(A,new Vd(ta(J.ca,ua),ta(J.ea,ua),J.fa,J.ia))||J.ea-J.ca+1>ua&&Yd(A,Ma)){p=!0;break a}}}p=!1}else p=!0}}else p=!1;p?(l in v&&delete v[l],t[l]=h):v[l]=h}b=[t,v];c=b[0];b=b[1];for(var M in this.o)M in c?(this.l[M]||(this.o[M].style.display="",this.l[M]=!0),delete c[M]):M in b?(this.l[M]&&(this.o[M].style.display="none",delete this.l[M]),delete b[M]):(ff(this.o[M]),delete this.o[M],delete this.l[M]);for(M in c)d=document.createElement("LI"),d.innerHTML=c[M].a,this.O.appendChild(d), this.o[M]=d,this.l[M]=!0;for(M in b)d=document.createElement("LI"),d.innerHTML=b[M].a,d.style.display="none",this.O.appendChild(d),this.o[M]=d;M=!Ca(this.l)||!Ca(a.logos);this.D!=M&&(this.element.style.display=M?"":"none",this.D=M);M&&Ca(this.l)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only");var oa;a=a.logos;M=this.T;for(oa in M)oa in a||(ff(M[oa]),delete M[oa]);for(var Wb in a)b=a[Wb],b instanceof HTMLElement&&(this.v.appendChild(b),M[Wb]=b),Wb in M||(oa= new Image,oa.src=Wb,""===b?c=oa:(c=document.createElement("a"),c.href=b,c.appendChild(oa)),this.v.appendChild(c),M[Wb]=c);this.v.style.display=Ca(a)?"none":""}else this.D&&(this.element.style.display="none",this.D=!1)}k=kf.prototype;k.Wl=function(a){a.preventDefault();mf(this)};function mf(a){a.element.classList.toggle("ol-collapsed");a.f?ef(a.A,a.H):ef(a.H,a.A);a.f=!a.f}k.Vl=function(){return this.j}; k.Yl=function(a){this.j!==a&&(this.j=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.f&&mf(this))};k.Xl=function(a){this.j&&this.f!==a&&mf(this)};k.Ul=function(){return this.f};function nf(a){a=a?a:{};this.f=void 0!==a.className?a.className:"ol-full-screen";var b=void 0!==a.label?a.label:"\u2922";this.j="string"===typeof b?document.createTextNode(b):b;b=void 0!==a.labelActive?a.labelActive:"\u00d7";this.o="string"===typeof b?document.createTextNode(b):b;var c=a.tipLabel?a.tipLabel:"Toggle full-screen",b=document.createElement("button");b.className=this.f+"-"+of();b.setAttribute("type","button");b.title=c;b.appendChild(this.j);B(b,"click",this.H,this);c=document.createElement("div"); c.className=this.f+" ol-unselectable ol-control "+(pf()?"":"ol-unsupported");c.appendChild(b);jf.call(this,{element:c,target:a.target});this.A=void 0!==a.keys?a.keys:!1;this.l=a.source}w(nf,jf); nf.prototype.H=function(a){a.preventDefault();pf()&&(a=this.a)&&(of()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(a=this.l?"string"===typeof this.l?document.getElementById(this.l):this.l:a.xc(),this.A?a.mozRequestFullScreenWithKeys?a.mozRequestFullScreenWithKeys():a.webkitRequestFullscreen?a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT): qf(a):qf(a)))};nf.prototype.v=function(){var a=this.element.firstElementChild,b=this.a;of()?(a.className=this.f+"-true",ef(this.o,this.j)):(a.className=this.f+"-false",ef(this.j,this.o));b&&b.Wc()};nf.prototype.setMap=function(a){jf.prototype.setMap.call(this,a);a&&this.s.push(B(ja.document,rf(),this.v,this))}; function pf(){var a=document.body;return!!(a.webkitRequestFullscreen||a.mozRequestFullScreen&&document.mozFullScreenEnabled||a.msRequestFullscreen&&document.msFullscreenEnabled||a.requestFullscreen&&document.fullscreenEnabled)}function of(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)} function qf(a){a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()}var rf=function(){var a;return function(){if(!a){var b=document.body;b.webkitRequestFullscreen?a="webkitfullscreenchange":b.mozRequestFullScreen?a="mozfullscreenchange":b.msRequestFullscreen?a="MSFullscreenChange":b.requestFullscreen&&(a="fullscreenchange")}return a}}();function sf(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-rotate",c=void 0!==a.label?a.label:"\u21e7";this.f=null;"string"===typeof c?(this.f=document.createElement("span"),this.f.className="ol-compass",this.f.textContent=c):(this.f=c,this.f.classList.add("ol-compass"));var d=a.tipLabel?a.tipLabel:"Reset rotation",c=document.createElement("button");c.className=b+"-reset";c.setAttribute("type","button");c.title=d;c.appendChild(this.f);B(c,"click",sf.prototype.A,this);d=document.createElement("div"); d.className=b+" ol-unselectable ol-control";d.appendChild(c);b=a.render?a.render:uf;this.j=a.resetNorth?a.resetNorth:void 0;jf.call(this,{element:d,render:b,target:a.target});this.o=void 0!==a.duration?a.duration:250;this.l=void 0!==a.autoHide?a.autoHide:!0;this.v=void 0;this.l&&this.element.classList.add("ol-hidden")}w(sf,jf); sf.prototype.A=function(a){a.preventDefault();if(void 0!==this.j)this.j();else{a=this.a;var b=a.aa();if(b){var c=b.Ma();void 0!==c&&(0Math.PI&&(c-=2*Math.PI),a.$a(Td({rotation:c,duration:this.o,easing:Md}))),b.ge(0))}}}; function uf(a){if(a=a.frameState){a=a.viewState.rotation;if(a!=this.v){var b="rotate("+a+"rad)";if(this.l){var c=this.element.classList.contains("ol-hidden");c||0!==a?c&&0!==a&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.f.style.msTransform=b;this.f.style.webkitTransform=b;this.f.style.transform=b}this.v=a}};function vf(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-zoom",c=void 0!==a.delta?a.delta:1,d=void 0!==a.zoomInLabel?a.zoomInLabel:"+",e=void 0!==a.zoomOutLabel?a.zoomOutLabel:"\u2212",f=void 0!==a.zoomInTipLabel?a.zoomInTipLabel:"Zoom in",g=void 0!==a.zoomOutTipLabel?a.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=b+"-in";h.setAttribute("type","button");h.title=f;h.appendChild("string"===typeof d?document.createTextNode(d):d);B(h,"click",vf.prototype.l.bind(this, c));d=document.createElement("button");d.className=b+"-out";d.setAttribute("type","button");d.title=g;d.appendChild("string"===typeof e?document.createTextNode(e):e);B(d,"click",vf.prototype.l.bind(this,-c));c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(h);c.appendChild(d);jf.call(this,{element:c,target:a.target});this.f=void 0!==a.duration?a.duration:250}w(vf,jf); vf.prototype.l=function(a,b){b.preventDefault();var c=this.a,d=c.aa();if(d){var e=d.$();e&&(0=Math.abs(d-h[0])&&25>=l)return!0}return!1}function Zf(a){var b=$f(a,a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}k=Xf.prototype; k.ml=function(a){if(!Yf(this,a)){if((1).toString()in this.a){var b=Zf(a);ag(this.b,bg,b,a);delete this.a[(1).toString()]}b=Zf(a);this.a[(1).toString()]=a;ag(this.b,cg,b,a)}};k.nl=function(a){if(!Yf(this,a)){var b=Zf(a);ag(this.b,dg,b,a)}};k.ql=function(a){if(!Yf(this,a)){var b=this.a[(1).toString()];b&&b.button===a.button&&(b=Zf(a),ag(this.b,eg,b,a),delete this.a[(1).toString()])}};k.pl=function(a){if(!Yf(this,a)){var b=Zf(a);fg(this.b,b,a)}}; k.ol=function(a){if(!Yf(this,a)){var b=Zf(a);gg(this.b,b,a)}};function hg(a){Wf.call(this,a,{MSPointerDown:this.vl,MSPointerMove:this.wl,MSPointerUp:this.zl,MSPointerOut:this.xl,MSPointerOver:this.yl,MSPointerCancel:this.ul,MSGotPointerCapture:this.sl,MSLostPointerCapture:this.tl});this.a=a.g;this.g=["","unavailable","touch","pen","mouse"]}w(hg,Wf);function ig(a,b){var c=b;"number"===typeof b.pointerType&&(c=$f(b,b),c.pointerType=a.g[b.pointerType]);return c}k=hg.prototype;k.vl=function(a){this.a[a.pointerId.toString()]=a;var b=ig(this,a);ag(this.b,cg,b,a)}; k.wl=function(a){var b=ig(this,a);ag(this.b,dg,b,a)};k.zl=function(a){var b=ig(this,a);ag(this.b,eg,b,a);delete this.a[a.pointerId.toString()]};k.xl=function(a){var b=ig(this,a);gg(this.b,b,a)};k.yl=function(a){var b=ig(this,a);fg(this.b,b,a)};k.ul=function(a){var b=ig(this,a);ag(this.b,bg,b,a);delete this.a[a.pointerId.toString()]};k.tl=function(a){this.b.b(new jg("lostpointercapture",a,a))};k.sl=function(a){this.b.b(new jg("gotpointercapture",a,a))};function kg(a){Wf.call(this,a,{pointerdown:this.io,pointermove:this.jo,pointerup:this.mo,pointerout:this.ko,pointerover:this.lo,pointercancel:this.ho,gotpointercapture:this.Dk,lostpointercapture:this.ll})}w(kg,Wf);k=kg.prototype;k.io=function(a){lg(this.b,a)};k.jo=function(a){lg(this.b,a)};k.mo=function(a){lg(this.b,a)};k.ko=function(a){lg(this.b,a)};k.lo=function(a){lg(this.b,a)};k.ho=function(a){lg(this.b,a)};k.ll=function(a){lg(this.b,a)};k.Dk=function(a){lg(this.b,a)};function jg(a,b,c){Pa.call(this,a);this.b=b;a=c?c:{};this.buttons=mg(a);this.pressure=ng(a,this.buttons);this.bubbles="bubbles"in a?a.bubbles:!1;this.cancelable="cancelable"in a?a.cancelable:!1;this.view="view"in a?a.view:null;this.detail="detail"in a?a.detail:null;this.screenX="screenX"in a?a.screenX:0;this.screenY="screenY"in a?a.screenY:0;this.clientX="clientX"in a?a.clientX:0;this.clientY="clientY"in a?a.clientY:0;this.button="button"in a?a.button:0;this.relatedTarget="relatedTarget"in a?a.relatedTarget: null;this.pointerId="pointerId"in a?a.pointerId:0;this.width="width"in a?a.width:0;this.height="height"in a?a.height:0;this.pointerType="pointerType"in a?a.pointerType:"";this.isPrimary="isPrimary"in a?a.isPrimary:!1;b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})}w(jg,Pa);function mg(a){if(a.buttons||og)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a} function ng(a,b){var c=0;a.pressure?c=a.pressure:c=b?.5:0;return c}var og=!1;try{og=1===(new MouseEvent("click",{buttons:1})).buttons}catch(a){};function pg(a,b){Wf.call(this,a,{touchstart:this.pp,touchmove:this.op,touchend:this.np,touchcancel:this.mp});this.a=a.g;this.l=b;this.g=void 0;this.i=0;this.f=void 0}w(pg,Wf);k=pg.prototype;k.$h=function(){this.i=0;this.f=void 0}; function qg(a,b,c){b=$f(b,c);b.pointerId=c.identifier+2;b.bubbles=!0;b.cancelable=!0;b.detail=a.i;b.button=0;b.buttons=1;b.width=c.webkitRadiusX||c.radiusX||0;b.height=c.webkitRadiusY||c.radiusY||0;b.pressure=c.webkitForce||c.force||.5;b.isPrimary=a.g===c.identifier;b.pointerType="touch";b.clientX=c.clientX;b.clientY=c.clientY;b.screenX=c.screenX;b.screenY=c.screenY;return b} function rg(a,b,c){function d(){b.preventDefault()}var e=Array.prototype.slice.call(b.changedTouches),f=e.length,g,h;for(g=0;g=b.length){var e=[],f,g,h;for(f=0;f=a.minResolution&&bn[2])l=[q+p*Math.ceil((n[0]-q)/p),a[1]]}n=b.layerStatesArray;for(p=n.length-1;0<=p;--p){var t=n[p],q=t.layer;if(Xg(t,m)&&e.call(f,q)&&(t=oh(this,q),q.ga()&&(h=t.ta(q.ga().D?l:a,b,g,d)),h))return h}}; k.oh=function(a,b,c,d,e,f){var g,h=b.viewState.resolution,l=b.layerStatesArray,m;for(m=l.length-1;0<=m;--m){g=l[m];var n=g.layer;if(Xg(g,h)&&e.call(f,n)&&(g=oh(this,n).Ac(a,b,c,d)))return g}};k.ph=function(a,b,c,d){return void 0!==this.ta(a,b,nc,this,c,d)};function oh(a,b){var c=x(b).toString();if(c in a.g)return a.g[c];var d=a.Ve(b);a.g[c]=d;a.s[c]=B(d,"change",a.Mk,a);return d}k.Mk=function(){this.i.render()};k.Be=ha; k.Qo=function(a,b){for(var c in this.g)if(!(b&&c in b.layerStates)){var d=c,e=this.g[d];delete this.g[d];Ea(this.s[d]);delete this.s[d];Oa(e)}};function ph(a,b){for(var c in a.g)if(!(c in b.layerStates)){b.postRenderFunctions.push(a.Qo.bind(a));break}}function jb(a,b){return a.zIndex-b.zIndex};function qh(a,b){Sa.call(this);this.oa=a;this.state=b;this.a=null;this.key=""}w(qh,Sa);function rh(a){a.b("change")}qh.prototype.Ya=function(){return this.key+"/"+this.oa};qh.prototype.i=function(){return this.oa};qh.prototype.V=function(){return this.state};function sh(a,b){this.o=a;this.f=b;this.b=[];this.g=[];this.a={}}sh.prototype.clear=function(){this.b.length=0;this.g.length=0;Aa(this.a)};function th(a){var b=a.b,c=a.g,d=b[0];1==b.length?(b.length=0,c.length=0):(b[0]=b.pop(),c[0]=c.pop(),uh(a,0));b=a.f(d);delete a.a[b];return d}sh.prototype.c=function(a){la(!(this.f(a)in this.a),31);var b=this.o(a);return Infinity!=b?(this.b.push(a),this.g.push(b),this.a[this.f(a)]=!0,vh(this,0,this.b.length-1),!0):!1}; function uh(a,b){for(var c=a.b,d=a.g,e=c.length,f=c[b],g=d[b],h=b;b>1;){var l=2*b+1,m=2*b+2,l=mb;){var g=c-1>>1;if(a[g]>f)d[c]=d[g],a[c]=a[g],c=g;else break}d[c]=e;a[c]=f}function wh(a){var b=a.o,c=a.b,d=a.g,e=0,f=c.length,g,h,l;for(h=0;h>1)-1;0<=b;b--)uh(a,b)};function xh(a,b){sh.call(this,function(b){return a.apply(null,b)},function(a){return a[0].Ya()});this.s=b;this.l=0;this.i={}}w(xh,sh);xh.prototype.c=function(a){var b=sh.prototype.c.call(this,a);b&&B(a[0],"change",this.j,this);return b};xh.prototype.j=function(a){a=a.target;var b=a.V();if(2===b||3===b||4===b||5===b)Ka(a,"change",this.j,this),a=a.Ya(),a in this.i&&(delete this.i[a],--this.l),this.s()}; function yh(a,b,c){for(var d=0,e,f;a.lc.b.length)c=!1;else{var d=Date.now()-c.i,e=c.b.length-3;if(c.b[e+2]d;)f-=3;var d=c.b[e+2]-c.b[f+2],g=c.b[e]-c.b[f],e=c.b[e+1]-c.b[f+1];c.c=Math.atan2(e,g);c.a=Math.sqrt(g*g+e*e)/d;c=c.a>c.g}}c?(c=this.a,c=(c.g-c.a)/c.f,e=this.a.c,f=a.bb(),this.o=Ah(this.a,f),b.$a(this.o),f=b.Ga(f),b=b.Na([f[0]-c*Math.cos(e),f[1]-c*Math.sin(e)]),b=a.Od(b),a.ob(b)):b.render(); Kd(a,-1);return!1}this.c=null;return!0}function Uh(a){if(0this.D&&(this.a=!0));this.o=c;a=a.map;c=a.a.getBoundingClientRect();d=Sh(this.j);d[0]-=c.left;d[1]-=c.top;this.c=a.Na(d);this.a&&(c=a.aa(),d=c.Ma(),a.render(),Ch(a,c,d+b,this.c))} function ti(a){if(2>this.j.length){a=a.map;var b=a.aa();Kd(b,-1);if(this.a){var c=b.Ma(),d=this.c,e=this.A,c=b.constrainRotation(c,0);Ch(a,b,c,d,e)}return!1}return!0}function ri(a){return 2<=this.j.length?(a=a.map,this.c=null,this.o=void 0,this.a=!1,this.s=0,this.H||Kd(a.aa(),1),a.render(),!0):!1}qi.prototype.Ec=oc;function ui(a){Qh.call(this,{handleDownEvent:vi,handleDragEvent:wi,handleUpEvent:xi});a=a?a:{};this.c=null;this.s=void 0!==a.duration?a.duration:400;this.a=void 0;this.o=1}w(ui,Qh);function wi(a){var b=1,c=this.j[0],d=this.j[1],e=c.clientX-d.clientX,c=c.clientY-d.clientY,e=Math.sqrt(e*e+c*c);void 0!==this.a&&(b=this.a/e);this.a=e;1!=b&&(this.o=b);a=a.map;var e=a.aa(),c=e.$(),d=a.a.getBoundingClientRect(),f=Sh(this.j);f[0]-=d.left;f[1]-=d.top;this.c=a.Na(f);a.render();Eh(a,e,c*b,this.c)} function xi(a){if(2>this.j.length){a=a.map;var b=a.aa();Kd(b,-1);var c=b.$(),d=this.c,e=this.s,c=b.constrainResolution(c,0,this.o-1);Eh(a,b,c,d,e);return!1}return!0}function vi(a){return 2<=this.j.length?(a=a.map,this.c=null,this.a=void 0,this.o=1,this.H||Kd(a.aa(),1),a.render(),!0):!1}ui.prototype.Ec=oc;function yi(a){a=a?a:{};var b=new re,c=new zh(-.005,.05,100);(void 0!==a.altShiftDragRotate?a.altShiftDragRotate:1)&&b.push(new Xh);(void 0!==a.doubleClickZoom?a.doubleClickZoom:1)&&b.push(new Fh({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.dragPan?a.dragPan:1)&&b.push(new Th({kinetic:c}));(void 0!==a.pinchRotate?a.pinchRotate:1)&&b.push(new qi);(void 0!==a.pinchZoom?a.pinchZoom:1)&&b.push(new ui({duration:a.zoomDuration}));if(void 0!==a.keyboard?a.keyboard:1)b.push(new ki),b.push(new mi({delta:a.zoomDelta, duration:a.zoomDuration}));(void 0!==a.mouseWheelZoom?a.mouseWheelZoom:1)&&b.push(new oi({duration:a.zoomDuration}));(void 0!==a.shiftDragZoom?a.shiftDragZoom:1)&&b.push(new ji({duration:a.zoomDuration}));return b};function zi(a){var b=a||{};a=za({},b);delete a.layers;b=b.layers;Qg.call(this,a);this.f=[];this.a={};B(this,Za("layers"),this.Ok,this);b?Array.isArray(b)?b=new re(b.slice()):la(b instanceof re,43):b=new re;this.lh(b)}w(zi,Qg);k=zi.prototype;k.ae=function(){this.Bb()&&this.u()}; k.Ok=function(){this.f.forEach(Ea);this.f.length=0;var a=this.Rc();this.f.push(B(a,ue,this.Nk,this),B(a,ve,this.Pk,this));for(var b in this.a)this.a[b].forEach(Ea);Aa(this.a);var a=a.a,c,d;b=0;for(c=a.length;be;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.b[0];c=a.b[1];var e=a.b[2],f=a.b[3],g;g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g= c+(b^e&(f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>> 20);g=e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295| g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295| g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295| g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^ b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295; f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+ (g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295; c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.b[0]=a.b[0]+b&4294967295;a.b[1]=a.b[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.b[2]=a.b[2]+e&4294967295;a.b[3]=a.b[3]+f&4294967295} function Xi(a,b){var c;void 0===c&&(c=b.length);for(var d=c-a.a,e=a.c,f=a.g,g=0;gc.g?c.a:2*c.a)-c.g);b[0]=128;for(var d=1;dd;++d)for(var f=0;32>f;f+=8)b[e++]=c.b[d]>>>f&255;if(8192>=b.length)c=String.fromCharCode.apply(null, b);else for(c="",d=0;da.ea&&(a.ea=d.ea),d.faa.ia&&(a.ia=d.ia)):a[b][c]=d:(a[b]={},a[b][c]=d)}function Bj(a,b,c){return[b*(Math.round(a[0]/b)+c[0]%2/2),b*(Math.round(a[1]/b)+c[1]%2/2)]} function Cj(a,b,c,d,e,f,g,h,l,m){var n=x(b).toString();n in a.wantedTiles||(a.wantedTiles[n]={});var p=a.wantedTiles[n];a=a.tileQueue;var q=c.minZoom,t,v,u,y,E,z;for(z=g;z>=q;--z)for(v=ge(c,f,z,v),u=c.$(z),y=v.ca;y<=v.ea;++y)for(E=v.fa;E<=v.ia;++E)g-z<=h?(t=b.dc(z,y,E,d,e),0==t.V()&&(p[t.Ya()]=!0,t.Ya()in a.a||a.c([t,n,le(c,t.oa),u])),void 0!==l&&l.call(m,t)):b.Xf(z,y,E,e)};function Dj(a){tj.call(this,a);this.O=ah()}w(Dj,tj);function Ej(a,b,c){var d=b.pixelRatio,e=b.size[0]*d,f=b.size[1]*d,g=b.viewState.rotation,h=bc(c),l=ac(c),m=$b(c);c=Zb(c);fh(b.coordinateToPixelTransform,h);fh(b.coordinateToPixelTransform,l);fh(b.coordinateToPixelTransform,m);fh(b.coordinateToPixelTransform,c);a.save();Oi(a,-g,e/2,f/2);a.beginPath();a.moveTo(h[0]*d,h[1]*d);a.lineTo(l[0]*d,l[1]*d);a.lineTo(m[0]*d,m[1]*d);a.lineTo(c[0]*d,c[1]*d);a.clip();Oi(a,g,e/2,f/2)} Dj.prototype.i=function(a,b,c){Fj(this,"precompose",c,a,void 0);var d=this.f?this.f.a():null;if(d){var e=b.extent,f=void 0!==e;f&&Ej(c,a,e);var e=this.s,g=c.globalAlpha;c.globalAlpha=b.opacity;c.drawImage(d,0,0,+d.width,+d.height,Math.round(e[4]),Math.round(e[5]),Math.round(d.width*e[0]),Math.round(d.height*e[3]));c.globalAlpha=g;f&&c.restore()}Gj(this,c,a)}; function Fj(a,b,c,d,e){var f=a.a;if(Ta(f,b)){var g=d.size[0]*d.pixelRatio,h=d.size[1]*d.pixelRatio,l=d.viewState.rotation;Oi(c,-l,g/2,h/2);a=void 0!==e?e:Hj(a,d,0);f.b(new Sg(b,new gj(c,d.pixelRatio,d.extent,a,d.viewState.rotation),d,c,null));Oi(c,l,g/2,h/2)}}function Gj(a,b,c,d){Fj(a,"postcompose",b,c,d)}function Hj(a,b,c){var d=b.viewState,e=b.pixelRatio,f=e/d.resolution;return jh(a.O,e*b.size[0]/2,e*b.size[1]/2,f,-f,-d.rotation,-d.center[0]+c,-d.center[1])};function Ij(){};var Jj=["Polygon","LineString","Image","Text"];function Kj(a,b,c,d){this.pa=a;this.T=b;this.overlaps=d;this.f=null;this.c=0;this.resolution=c;this.Ba=this.Aa=null;this.a=[];this.coordinates=[];this.Va=ah();this.b=[];this.W=[];this.ha=ah();this.cb=ah()}w(Kj,fj); function Lj(a,b,c,d,e,f){var g=a.coordinates.length,h=a.bf(),l=[b[c],b[c+1]],m=[NaN,NaN],n=!0,p,q,t;for(p=c+e;pa&&(b.fill(),J=0);X>a&&(b.stroke(),X=0);J||X||b.beginPath();++n;break;case 2:q=A[1];t=m[q];A=m[q+1];z=m[q+2]-t;q=m[q+3]-A;q=Math.sqrt(z*z+q*q); b.moveTo(t+q,A);b.arc(t,A,q,0,2*Math.PI,!0);++n;break;case 3:b.closePath();++n;break;case 4:q=A[1];t=A[2];Ma=A[3];ua=A[4]*c;M=A[5]*c;var Wb=A[6],Ib=A[7],Jb=A[8],Yb=A[9];oa=A[10];z=A[11];G=A[12];var hc=A[13],Pb=A[14];for(oa&&(z+=e);qMa.width?Ma.width-Jb:Pb,Pd=Wb+Yb>Ma.height?Ma.height-Yb: Wb;b.drawImage(Ma,Jb,Yb,tf,Pd,A,oa,tf*c,Pd*c);1!=Ib&&(b.globalAlpha=Od);if(1!=G||0!==z)kh(eh(u,v)),b.transform.apply(b,u)}++n;break;case 5:q=A[1];t=A[2];M=A[3];Wb=A[4]*c;Ib=A[5]*c;z=A[6];G=A[7]*c;Ma=A[8];ua=A[9];for((oa=A[10])&&(z+=e);qthis.c&&(this.c=this.g.lineWidth,this.f=null)}; function Uj(a,b,c,d){Kj.call(this,a,b,c,d);this.g={sg:void 0,fd:void 0,ad:void 0,bd:null,cd:void 0,dd:void 0,ed:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}w(Uj,Kj); function Vj(a,b,c,d,e){var f=a.g,g=void 0!==f.fillStyle,f=void 0!=f.strokeStyle,h=d.length;if(!g&&!f)return d[h-1];var l=[1];a.a.push(l);a.b.push(l);for(l=0;lthis.c&&(this.c=c.lineWidth,this.f=null)):(c.strokeStyle=void 0,c.lineCap=void 0,c.lineDash=null,c.lineJoin=void 0,c.lineWidth=void 0,c.miterLimit=void 0)}; function Wj(a){var b=a.g,c=b.fillStyle,d=b.strokeStyle,e=b.lineCap,f=b.lineDash,g=b.lineJoin,h=b.lineWidth,l=b.miterLimit;void 0!==c&&b.sg!=c&&(a.a.push([9,c]),b.sg=b.fillStyle);void 0===d||b.fd==d&&b.ad==e&&b.bd==f&&b.cd==g&&b.dd==h&&b.ed==l||(a.a.push([10,d,h,e,g,l,f]),b.fd=d,b.ad=e,b.bd=f,b.cd=g,b.dd=h,b.ed=l)}function Xj(a,b,c,d){Kj.call(this,a,b,c,d);this.O=this.D=this.H=null;this.j="";this.s=this.o=0;this.v=void 0;this.A=this.U=0;this.l=this.i=this.g=null}w(Xj,Kj); function Yj(a,b,c,d,e){if(""!==a.j&&a.l&&(a.g||a.i)){if(a.g){var f=a.g,g=a.H;if(!g||g.fillStyle!=f.fillStyle){var h=[9,f.fillStyle];a.a.push(h);a.b.push(h);g?g.fillStyle=f.fillStyle:a.H={fillStyle:f.fillStyle}}}a.i&&(f=a.i,g=a.D,g&&g.lineCap==f.lineCap&&g.lineDash==f.lineDash&&g.lineJoin==f.lineJoin&&g.lineWidth==f.lineWidth&&g.miterLimit==f.miterLimit&&g.strokeStyle==f.strokeStyle||(h=[10,f.strokeStyle,f.lineWidth,f.lineCap,f.lineJoin,f.miterLimit,f.lineDash,!1],a.a.push(h),a.b.push(h),g?(g.lineCap= f.lineCap,g.lineDash=f.lineDash,g.lineJoin=f.lineJoin,g.lineWidth=f.lineWidth,g.miterLimit=f.miterLimit,g.strokeStyle=f.strokeStyle):a.D={lineCap:f.lineCap,lineDash:f.lineDash,lineJoin:f.lineJoin,lineWidth:f.lineWidth,miterLimit:f.miterLimit,strokeStyle:f.strokeStyle}));f=a.l;g=a.O;g&&g.font==f.font&&g.textAlign==f.textAlign&&g.textBaseline==f.textBaseline||(h=[11,f.font,f.textAlign,f.textBaseline],a.a.push(h),a.b.push(h),g?(g.font=f.font,g.textAlign=f.textAlign,g.textBaseline=f.textBaseline):a.O= {font:f.font,textAlign:f.textAlign,textBaseline:f.textBaseline});Mj(a,e);f=a.coordinates.length;b=Lj(a,b,0,c,d,!1);b=[5,f,b,a.j,a.o,a.s,a.U,a.A,!!a.g,!!a.i,a.v];a.a.push(b);a.b.push(b);Pj(a,e)}} Xj.prototype.$b=function(a){if(a){var b=a.b;b?(b=b.b,b=Ee(b?b:Li),this.g?this.g.fillStyle=b:this.g={fillStyle:b}):this.g=null;var c=a.l;if(c){var b=c.b,d=c.f,e=c.g,f=c.c,g=c.a,c=c.i,d=void 0!==d?d:"round",e=e?e.slice():Mi,f=void 0!==f?f:"round",g=void 0!==g?g:1,c=void 0!==c?c:10,b=Ce(b?b:Ni);if(this.i){var h=this.i;h.lineCap=d;h.lineDash=e;h.lineJoin=f;h.lineWidth=g;h.miterLimit=c;h.strokeStyle=b}else this.i={lineCap:d,lineDash:e,lineJoin:f,lineWidth:g,miterLimit:c,strokeStyle:b}}else this.i=null; var l=a.g,b=a.f,d=a.c,e=a.s,g=a.i,c=a.a,f=a.Ja(),h=a.j,m=a.o;a=void 0!==l?l:"10px sans-serif";h=void 0!==h?h:"center";m=void 0!==m?m:"middle";this.l?(l=this.l,l.font=a,l.textAlign=h,l.textBaseline=m):this.l={font:a,textAlign:h,textBaseline:m};this.j=void 0!==f?f:"";this.o=void 0!==b?b:0;this.s=void 0!==d?d:0;this.v=void 0!==e?e:!1;this.U=void 0!==g?g:0;this.A=void 0!==c?c:1}else this.j=""};function Zj(a,b,c,d,e){this.s=a;this.f=b;this.j=d;this.o=c;this.c=e;this.a={};this.i=$e(1,1);this.l=ah()} w(Zj,Ij);function ak(a){for(var b in a.a){var c=a.a[b],d;for(d in c)c[d].ie()}}Zj.prototype.ta=function(a,b,c,d,e){var f=jh(this.l,.5,.5,1/b,-1/b,-c,-a[0],-a[1]),g=this.i;g.clearRect(0,0,1,1);var h;void 0!==this.c&&(h=Eb(),Fb(h,a),Gb(h,b*this.c,h));return bk(this,g,f,c,d,function(a){if(0Ib&&(Ib=Yb,m=Jb)}if(0===Ib){g=null;break a}Ib=g[m];g[m]=g[l];g[l]=Ib;for(m=l+1;mthis.b/2){var b=[[a.source[0][0],a.source[0][1]],[a.source[1][0],a.source[1][1]],[a.source[2][0],a.source[2][1]]];b[0][0]-n>this.b/2&&(b[0][0]-=this.b);b[1][0]-n>this.b/2&&(b[1][0]-=this.b);b[2][0]-n>this.b/2&&(b[2][0]-=this.b);Math.max(b[0][0],b[1][0],b[2][0])-Math.min(b[0][0],b[1][0],b[2][0])p,v=!1;if(0a.s),v)){Math.abs(b[0]-d[0])<=Math.abs(b[1]-d[1])?(t=[(c[0]+d[0])/2,(c[1]+d[1])/2],q=a.a(t),n=[(e[0]+b[0])/2,(e[1]+b[1])/2],p=a.a(n),qk(a,b,c,t,n,f,g,q,p,m-1),qk(a,n,t,d,e,p,q,h,l,m-1)):(t=[(b[0]+c[0])/2,(b[1]+c[1])/2],q=a.a(t),n=[(d[0]+e[0])/2,(d[1]+e[1])/2],p=a.a(n),qk(a,b,t,n,e,f,q,p,l,m-1),qk(a,t,c,d,n,q,g,h,p,m-1));return}if(t){if(!a.o)return;a.j=!0}a.f.push({source:[f,h,l],target:[b,d,e]});a.f.push({source:[f,g,h],target:[b,c,d]})}} function rk(a){var b=Eb();a.f.forEach(function(a){a=a.source;Fb(b,a[0]);Fb(b,a[1]);Fb(b,a[2])});return b};function sk(a,b,c,d,e,f){this.v=b;this.s=a.C();var g=b.C(),h=g?jc(c,g):c,g=mk(a,b,gc(h),d);this.j=new pk(a,b,h,this.s,.5*g);this.c=d;this.g=c;a=rk(this.j);this.o=(this.qb=f(a,g,e))?this.qb.f:1;this.zd=this.i=null;e=2;f=[];this.qb&&(e=0,f=this.qb.l);rj.call(this,c,d,this.o,e,f)}w(sk,rj);sk.prototype.ma=function(){1==this.state&&(Ea(this.zd),this.zd=null);rj.prototype.ma.call(this)};sk.prototype.a=function(){return this.i}; sk.prototype.yd=function(){var a=this.qb.V();2==a&&(this.i=ok(ec(this.g)/this.c,fc(this.g)/this.c,this.o,this.qb.$(),0,this.c,this.g,this.j,[{extent:this.qb.C(),image:this.qb.a()}],0));this.state=a;sj(this)};sk.prototype.load=function(){if(0==this.state){this.state=1;sj(this);var a=this.qb.V();2==a||3==a?this.yd():(this.zd=B(this.qb,"change",function(){var a=this.qb.V();if(2==a||3==a)Ea(this.zd),this.zd=null,this.yd()},this),this.qb.load())}};function tk(a){Tg.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.H=void 0!==a.resolutions?a.resolutions:null;this.a=null;this.pa=0}w(tk,Tg);function uk(a,b){a.H&&(b=a.H[cb(a.H,b,0)]);return b} tk.prototype.A=function(a,b,c,d){var e=this.f;if(e&&d&&!Lc(e,d)){if(this.a){if(this.pa==this.g&&Lc(this.a.v,d)&&this.a.$()==b&&this.a.f==c&&Ub(this.a.C(),a))return this.a;Oa(this.a);this.a=null}this.a=new sk(e,d,a,b,c,function(a,b,c){return this.Kc(a,b,c,e)}.bind(this));this.pa=this.g;return this.a}e&&(d=e);return this.Kc(a,b,c,d)};tk.prototype.o=function(a){a=a.target;switch(a.V()){case 1:this.b(new vk(wk,a));break;case 2:this.b(new vk(xk,a));break;case 3:this.b(new vk(yk,a))}}; function zk(a,b){a.a().src=b}function vk(a,b){Pa.call(this,a);this.image=b}w(vk,Pa);var wk="imageloadstart",xk="imageloadend",yk="imageloaderror";function Ak(a){tk.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions,state:a.state});this.ha=a.canvasFunction;this.T=null;this.W=0;this.na=void 0!==a.ratio?a.ratio:1.5}w(Ak,tk);Ak.prototype.Kc=function(a,b,c,d){b=uk(this,b);var e=this.T;if(e&&this.W==this.g&&e.$()==b&&e.f==c&&Nb(e.C(),a))return e;a=a.slice();lc(a,this.na);(d=this.ha(a,b,c,[ec(a)/b*c,fc(a)/b*c],d))&&(e=new hk(a,b,c,this.l,d));this.T=e;this.W=this.g;return e};function Bk(a){this.c=a.source;this.Ia=ah();this.i=$e();this.j=[0,0];this.za=void 0==a.renderBuffer?100:a.renderBuffer;this.v=null;Ak.call(this,{attributions:a.attributions,canvasFunction:this.zj.bind(this),logo:a.logo,projection:a.projection,ratio:a.ratio,resolutions:a.resolutions,state:this.c.V()});this.R=null;this.s=void 0;this.uh(a.style);B(this.c,"change",this.$m,this)}w(Bk,Ak);k=Bk.prototype; k.zj=function(a,b,c,d,e){var f=new Zj(.5*b/c,a,b,this.c.W,this.za);this.c.Nc(a,b,e);var g=!1;this.c.xb(a,function(a){var d;if(!(d=g)){var e;(d=a.hc())?e=d.call(a,b):this.s&&(e=this.s(a,b));if(e){var n,p=!1;Array.isArray(e)||(e=[e]);d=0;for(n=e.length;dl[2];)++z,n=m*z,n=Hj(this,a,n),p.Sa(u,e,n,g,f),h-=m;n=Hj(this,a,0)}Oi(u,g,b/2,E/2);u!=c&&(Fj(this,"render",u,a,n),c.drawImage(u.canvas,-t,-v),u.translate(-t,-v));u.globalAlpha=y}q&&c.restore();Gj(this,c,a,n)}; Gk.prototype.ta=function(a,b,c,d){if(this.j){var e=this.a,f={};return this.j.ta(a,b.viewState.resolution,b.viewState.rotation,{},function(a){var b=x(a).toString();if(!(b in f))return f[b]=!0,c.call(d,a,e)})}};Gk.prototype.D=function(){vj(this)}; Gk.prototype.l=function(a){function b(a){var b,d=a.hc();d?b=d.call(a,m):(d=c.i)&&(b=d(a,m));if(b){if(b){d=!1;if(Array.isArray(b))for(var e=0,f=b.length;eA&&this.target.insertBefore(u.target,this.target.childNodes[0]|| null)}else{if(!a.viewHints[0]&&!a.viewHints[1]){G=ge(u.c,q,u.g[0],E);A=[];z=void 0;for(z in u.a)X=u.a[z],ua=X.oa,Wd(G,ua[1],ua[2])||A.push(X);G=0;for(ua=A.length;G=m;){t=this.g[e];c=this.s[e];p=x(c).toString();if(void 0===h[p]&&c.Y()&&(void 0===n||kc(n,c.Y().C()))&&(f.clear(f.COLOR_BUFFER_BIT|f.DEPTH_BUFFER_BIT),f.drawElements(4,b-t,d,t*a),b=l(c))){h=b;break a}b=t;e--}h=void 0}else f.clear(f.COLOR_BUFFER_BIT|f.DEPTH_BUFFER_BIT),tl(this,f,a,h,this.l,this.i),h=(h=l(null))?h:void 0;t=h}f.disableVertexAttribArray(q.f);f.disableVertexAttribArray(q.b);f.disableVertexAttribArray(q.c);f.disableVertexAttribArray(q.a);f.disableVertexAttribArray(q.g); return t};function tl(a,b,c,d,e,f){var g=c.g?5125:5123;c=c.g?4:2;if(Ca(d)){var h;a=0;d=e.length;for(h=0;aa[0]||a[0]>e[0]||0>a[1]||a[1]>e[1])&&(this.j|| (this.j=$e(1,1)),this.j.clearRect(0,0,1,1),this.j.drawImage(this.c.a(),a[0],a[1],1,1,0,0,1,1),e=this.j.getImageData(0,0,1,1).data,0d?b[0]=d-c:0>e&&(b[0]=Math.abs(e)+ c),0>f?b[1]=f-c:0>g&&(b[1]=Math.abs(g)+c),0===b[0]&&0===b[1])||(c=a.aa().bb(),d=a.Ga(c),b=[d[0]+b[0],d[1]+b[1]],this.i&&(this.i.source=c,a.$a(Sd(this.i))),a.aa().ob(a.Na(b)))}}};k.Xk=function(){bm(this)};k.ci=function(a){this.set("element",a)};k.setMap=function(a){this.set("map",a)};k.ii=function(a){this.set("offset",a)};k.tf=function(a){this.set("position",a)};function cm(a,b){var c=a.getBoundingClientRect(),d=c.left+ja.pageXOffset,c=c.top+ja.pageYOffset;return[d,c,d+b[0],c+b[1]]} k.li=function(a){this.set("positioning",a)};function dm(a,b){a.a.visible!==b&&(a.f.style.display=b?"":"none",a.a.visible=b)} function bm(a){var b=a.fe(),c=a.dh();if(void 0!==b&&b.f&&void 0!==c){var c=b.Ga(c),d=b.kb(),b=a.f.style,e=a.Ig(),f=a.Jg(),g=e[0],e=e[1];if("bottom-right"==f||"center-right"==f||"top-right"==f)""!==a.a.de&&(a.a.de=b.left=""),g=Math.round(d[0]-c[0]-g)+"px",a.a.Ce!=g&&(a.a.Ce=b.right=g);else{""!==a.a.Ce&&(a.a.Ce=b.right="");if("bottom-center"==f||"center-center"==f||"top-center"==f)g-=a.f.offsetWidth/2;g=Math.round(c[0]+g)+"px";a.a.de!=g&&(a.a.de=b.left=g)}if("bottom-left"==f||"bottom-center"==f||"bottom-right"== f)""!==a.a.Ee&&(a.a.Ee=b.top=""),c=Math.round(d[1]-c[1]-e)+"px",a.a.Ld!=c&&(a.a.Ld=b.bottom=c);else{""!==a.a.Ld&&(a.a.Ld=b.bottom="");if("center-left"==f||"center-center"==f||"center-right"==f)e-=a.f.offsetHeight/2;c=Math.round(c[1]+e)+"px";a.a.Ee!=c&&(a.a.Ee=b.top=c)}dm(a,!0)}else dm(a,!1)};function em(a){a=a?a:{};this.l=void 0!==a.collapsed?a.collapsed:!0;this.j=void 0!==a.collapsible?a.collapsible:!0;this.j||(this.l=!1);var b=void 0!==a.className?a.className:"ol-overviewmap",c=void 0!==a.tipLabel?a.tipLabel:"Overview map",d=void 0!==a.collapseLabel?a.collapseLabel:"\u00ab";"string"===typeof d?(this.o=document.createElement("span"),this.o.textContent=d):this.o=d;d=void 0!==a.label?a.label:"\u00bb";"string"===typeof d?(this.v=document.createElement("span"),this.v.textContent=d):this.v= d;var e=this.j&&!this.l?this.o:this.v,d=document.createElement("button");d.setAttribute("type","button");d.title=c;d.appendChild(e);B(d,"click",this.bm,this);c=document.createElement("DIV");c.className="ol-overviewmap-map";var f=this.f=new I({controls:new re,interactions:new re,target:c,view:a.view});a.layers&&a.layers.forEach(function(a){f.jg(a)},this);e=document.createElement("DIV");e.className="ol-overviewmap-box";e.style.boxSizing="border-box";this.A=new am({position:[0,0],positioning:"bottom-left", element:e});this.f.kg(this.A);e=document.createElement("div");e.className=b+" ol-unselectable ol-control"+(this.l&&this.j?" ol-collapsed":"")+(this.j?"":" ol-uncollapsible");e.appendChild(c);e.appendChild(d);jf.call(this,{element:e,render:a.render?a.render:fm,target:a.target})}w(em,jf);k=em.prototype; k.setMap=function(a){var b=this.a;a!==b&&(b&&(b=b.aa())&&Ka(b,Za(Ed),this.be,this),jf.prototype.setMap.call(this,a),a&&(this.s.push(B(a,"propertychange",this.Rk,this)),0===this.f.ah().gc()&&this.f.gi(a.wc()),a=a.aa()))&&(B(a,Za(Ed),this.be,this),Jd(a)&&(this.f.Wc(),gm(this)))};k.Rk=function(a){"view"===a.key&&((a=a.oldValue)&&Ka(a,Za(Ed),this.be,this),a=this.a.aa(),B(a,Za(Ed),this.be,this))};k.be=function(){this.f.aa().ge(this.a.aa().Ma())}; function fm(){var a=this.a,b=this.f;if(a.f&&b.f){var c=a.kb(),a=a.aa().Ic(c),d=b.kb(),c=b.aa().Ic(d),e=b.Ga(bc(a)),f=b.Ga($b(a)),b=Math.abs(e[0]-f[0]),e=Math.abs(e[1]-f[1]),f=d[0],d=d[1];b<.1*f||e<.1*d||b>.75*f||e>.75*d?gm(this):Nb(c,a)||(a=this.f,c=this.a.aa(),a.aa().ob(c.bb()))}hm(this)}function gm(a){var b=a.a;a=a.f;var c=b.kb(),b=b.aa().Ic(c),c=a.kb();a=a.aa();lc(b,1/(.1*Math.pow(2,Math.log(7.5)/Math.LN2/2)));a.af(b,c)} function hm(a){var b=a.a,c=a.f;if(b.f&&c.f){var d=b.kb(),e=b.aa(),f=c.aa(),c=e.Ma(),b=a.A,g=a.A.Sd(),h=e.Ic(d),d=f.$(),e=Zb(h),f=ac(h),l;if(a=a.a.aa().bb())l=[e[0]-a[0],e[1]-a[1]],zb(l,c),ub(l,a);b.tf(l);g&&(g.style.width=Math.abs((e[0]-f[0])/d)+"px",g.style.height=Math.abs((f[1]-e[1])/d)+"px")}}k.bm=function(a){a.preventDefault();im(this)}; function im(a){a.element.classList.toggle("ol-collapsed");a.l?ef(a.o,a.v):ef(a.v,a.o);a.l=!a.l;var b=a.f;a.l||b.f||(b.Wc(),gm(a),Ja(b,"postrender",function(){hm(this)},a))}k.am=function(){return this.j};k.dm=function(a){this.j!==a&&(this.j=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.l&&im(this))};k.cm=function(a){this.j&&this.l!==a&&im(this)};k.$l=function(){return this.l};k.lk=function(){return this.f};function jm(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-scale-line";this.j=document.createElement("DIV");this.j.className=b+"-inner";this.f=document.createElement("DIV");this.f.className=b+" ol-unselectable";this.f.appendChild(this.j);this.v=null;this.o=void 0!==a.minWidth?a.minWidth:64;this.l=!1;this.H=void 0;this.A="";jf.call(this,{element:this.f,render:a.render?a.render:km,target:a.target});B(this,Za(lm),this.O,this);this.D(a.units||mm)}w(jm,jf);var nm=[1,2,5];jm.prototype.Ab=function(){return this.get(lm)}; function km(a){(a=a.frameState)?this.v=a.viewState:this.v=null;om(this)}jm.prototype.O=function(){om(this)};jm.prototype.D=function(a){this.set(lm,a)}; function om(a){var b=a.v;if(b){var c=b.projection,d=c.cc(),b=c.getPointResolution(b.resolution,b.center)*d,d=a.o*b,c="",e=a.Ab();e==pm?(c=rc.degrees,b/=c,dd?(c="in",b/=.0254):1609.344>d?(c="ft",b/=.3048):(c="mi",b/=1609.344):e==rm?(b/=1852,c="nm"):e==mm?1>d?(c="mm",b*=1E3):1E3>d?c="m":(c="km",b/=1E3):e==sm?.9144>d?(c="in",b*=39.37):1609.344>d?(c="ft",b/=.30480061):(c="mi",b/=1609.3472):la(!1,33);for(var e=3*Math.floor(Math.log(a.o* b)/Math.log(10)),f;;){f=nm[(e%3+3)%3]*Math.pow(10,Math.floor(e/3));d=Math.round(f/b);if(isNaN(d)){a.f.style.display="none";a.l=!1;return}if(d>=a.o)break;++e}b=f+" "+c;a.A!=b&&(a.j.innerHTML=b,a.A=b);a.H!=d&&(a.j.style.width=d+"px",a.H=d);a.l||(a.f.style.display="",a.l=!0)}else a.l&&(a.f.style.display="none",a.l=!1)}var lm="units",pm="degrees",qm="imperial",rm="nautical",mm="metric",sm="us";function tm(a){a=a?a:{};this.f=void 0;this.l=um;this.v=[];this.H=this.o=0;this.T=null;this.ha=!1;this.W=void 0!==a.duration?a.duration:200;var b=void 0!==a.className?a.className:"ol-zoomslider",c=document.createElement("button");c.setAttribute("type","button");c.className=b+"-thumb ol-unselectable";var d=document.createElement("div");d.className=b+" ol-unselectable ol-control";d.appendChild(c);this.j=new wg(d);B(this.j,cg,this.Fk,this);B(this.j,dg,this.Lg,this);B(this.j,eg,this.Mg,this);B(d,"click", this.Ek,this);B(c,"click",Qa);jf.call(this,{element:d,render:a.render?a.render:vm})}w(tm,jf);tm.prototype.ma=function(){Oa(this.j);jf.prototype.ma.call(this)};var um=0;k=tm.prototype;k.setMap=function(a){jf.prototype.setMap.call(this,a);a&&a.render()}; function vm(a){if(a.frameState){if(!this.ha){var b=this.element,c=b.offsetWidth,d=b.offsetHeight,e=b.firstElementChild,f=ja.getComputedStyle(e),b=e.offsetWidth+parseFloat(f.marginRight)+parseFloat(f.marginLeft),e=e.offsetHeight+parseFloat(f.marginTop)+parseFloat(f.marginBottom);this.T=[b,e];c>d?(this.l=1,this.H=c-b):(this.l=um,this.o=d-e);this.ha=!0}a=a.frameState.viewState.resolution;a!==this.f&&(this.f=a,wm(this,a))}} k.Ek=function(a){var b=this.a,c=b.aa(),d=c.$();b.$a(Ud({resolution:d,duration:this.W,easing:Md}));a=xm(this,ma(1===this.l?(a.offsetX-this.T[0]/2)/this.H:(a.offsetY-this.T[1]/2)/this.o,0,1));c.Zb(c.constrainResolution(a))}; k.Fk=function(a){if(!this.A&&a.b.target===this.element.firstElementChild&&(Kd(this.a.aa(),1),this.D=a.clientX,this.O=a.clientY,this.A=!0,0===this.v.length)){a=this.Lg;var b=this.Mg;this.v.push(B(document,"mousemove",a,this),B(document,"touchmove",a,this),B(document,dg,a,this),B(document,"mouseup",b,this),B(document,"touchend",b,this),B(document,eg,b,this))}}; k.Lg=function(a){if(this.A){var b=this.element.firstElementChild;this.f=xm(this,ma(1===this.l?(a.clientX-this.D+parseInt(b.style.left,10))/this.H:(a.clientY-this.O+parseInt(b.style.top,10))/this.o,0,1));this.a.aa().Zb(this.f);wm(this,this.f);this.D=a.clientX;this.O=a.clientY}};k.Mg=function(){if(this.A){var a=this.a,b=a.aa();Kd(b,-1);a.$a(Ud({resolution:this.f,duration:this.W,easing:Md}));a=b.constrainResolution(this.f);b.Zb(a);this.A=!1;this.O=this.D=void 0;this.v.forEach(Ea);this.v.length=0}}; function wm(a,b){var c;c=1-Id(a.a.aa())(b);var d=a.element.firstElementChild;1==a.l?d.style.left=a.H*c+"px":d.style.top=a.o*c+"px"}function xm(a,b){return Hd(a.a.aa())(1-b)};function ym(a){a=a?a:{};this.f=a.extent?a.extent:null;var b=void 0!==a.className?a.className:"ol-zoom-extent",c=void 0!==a.label?a.label:"E",d=void 0!==a.tipLabel?a.tipLabel:"Fit to extent",e=document.createElement("button");e.setAttribute("type","button");e.title=d;e.appendChild("string"===typeof c?document.createTextNode(c):c);B(e,"click",this.l,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(e);jf.call(this,{element:c,target:a.target})}w(ym,jf); ym.prototype.l=function(a){a.preventDefault();var b=this.a;a=b.aa();var c=this.f?this.f:a.j.C(),b=b.kb();a.af(c,b)};function zm(a){Xa.call(this);a=a?a:{};this.a=null;B(this,Za("tracking"),this.Dl,this);this.qf(void 0!==a.tracking?a.tracking:!1)}w(zm,Xa);k=zm.prototype;k.ma=function(){this.qf(!1);Xa.prototype.ma.call(this)}; k.$n=function(a){if(null!==a.alpha){var b=sa(a.alpha);this.set("alpha",b);"boolean"===typeof a.absolute&&a.absolute?this.set("heading",b):"number"===typeof a.webkitCompassHeading&&-1!=a.webkitCompassAccuracy&&this.set("heading",sa(a.webkitCompassHeading))}null!==a.beta&&this.set("beta",sa(a.beta));null!==a.gamma&&this.set("gamma",sa(a.gamma));this.u()};k.Lj=function(){return this.get("alpha")};k.Oj=function(){return this.get("beta")};k.Vj=function(){return this.get("gamma")};k.Cl=function(){return this.get("heading")}; k.Xg=function(){return this.get("tracking")};k.Dl=function(){if(Nf){var a=this.Xg();a&&!this.a?this.a=B(ja,"deviceorientation",this.$n,this):a||null===this.a||(Ea(this.a),this.a=null)}};k.qf=function(a){this.set("tracking",a)};function Am(a){Xa.call(this);this.i=void 0;this.a="geometry";this.c=null;this.l=void 0;this.f=null;B(this,Za(this.a),this.$d,this);void 0!==a&&(a instanceof Qc||!a?this.Xa(a):this.G(a))}w(Am,Xa);k=Am.prototype;k.clone=function(){var a=new Am(this.N());a.Cc(this.a);var b=this.Y();b&&a.Xa(b.clone());(b=this.c)&&a.rf(b);return a};k.Y=function(){return this.get(this.a)};k.Oa=function(){return this.i};k.Xj=function(){return this.a};k.El=function(){return this.c};k.hc=function(){return this.l};k.Fl=function(){this.u()}; k.$d=function(){this.f&&(Ea(this.f),this.f=null);var a=this.Y();a&&(this.f=B(a,"change",this.Fl,this));this.u()};k.Xa=function(a){this.set(this.a,a)};k.rf=function(a){this.l=(this.c=a)?Bm(a):void 0;this.u()};k.Xb=function(a){this.i=a;this.u()};k.Cc=function(a){Ka(this,Za(this.a),this.$d,this);this.a=a;B(this,Za(this.a),this.$d,this);this.$d()};function Bm(a){if("function"!==typeof a){var b;Array.isArray(a)?b=a:(la(a instanceof Zi,41),b=[a]);a=function(){return b}}return a};var Cm=document.implementation.createDocument("","",null);function Dm(a,b){return Cm.createElementNS(a,b)}function Em(a,b){return Fm(a,b,[]).join("")}function Fm(a,b,c){if(a.nodeType==Node.CDATA_SECTION_NODE||a.nodeType==Node.TEXT_NODE)b?c.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(a.nodeValue);else for(a=a.firstChild;a;a=a.nextSibling)Fm(a,b,c);return c}function Gm(a){return a instanceof Document}function Hm(a){return a instanceof Node} function Im(a){return(new DOMParser).parseFromString(a,"application/xml")}function Jm(a,b){return function(c,d){var e=a.call(b,c,d);void 0!==e&&eb(d[d.length-1],e)}}function Km(a,b){return function(c,d){var e=a.call(void 0!==b?b:this,c,d);void 0!==e&&d[d.length-1].push(e)}}function Lm(a,b){return function(c,d){var e=a.call(void 0!==b?b:this,c,d);void 0!==e&&(d[d.length-1]=e)}} function Mm(a){return function(b,c){var d=a.call(this,b,c);if(void 0!==d){var e=c[c.length-1],f=b.localName,g;f in e?g=e[f]:g=e[f]=[];g.push(d)}}}function K(a,b){return function(c,d){var e=a.call(this,c,d);void 0!==e&&(d[d.length-1][void 0!==b?b:c.localName]=e)}}function L(a,b){return function(c,d,e){a.call(void 0!==b?b:this,c,d,e);e[e.length-1].node.appendChild(c)}} function Nm(a){var b,c;return function(d,e,f){if(!b){b={};var g={};g[d.localName]=a;b[d.namespaceURI]=g;c=Om(d.localName)}Pm(b,c,e,f)}}function Om(a,b){return function(c,d,e){c=d[d.length-1].node;d=a;void 0===d&&(d=e);e=b;void 0===b&&(e=c.namespaceURI);return Dm(e,d)}}var Qm=Om();function Rm(a,b){for(var c=b.length,d=Array(c),e=0;eh.status){var a=b.X(),e;"json"==a||"text"==a?e=h.responseText:"xml"==a?(e=h.responseXML)||(e=Im(h.responseText)):"arraybuffer"==a&&(e=h.response);e?c.call(this,b.Fa(e,{featureProjection:g}),b.Ra(e)):d.call(this)}else d.call(this)}.bind(this);h.send()}} function Vm(a,b){return Um(a,b,function(a,b){this.uf(b);this.di(a)},function(){this.state=3;rh(this)})}function Wm(a,b){return Um(a,b,function(a){this.Hc(a)},ha)};function Xm(){this.defaultDataProjection=null}function Ym(a,b,c){var d;c&&(d={dataProjection:c.dataProjection?c.dataProjection:a.Ra(b),featureProjection:c.featureProjection});return Zm(a,d)}function Zm(a,b){var c;b&&(c={featureProjection:b.featureProjection,dataProjection:b.dataProjection?b.dataProjection:a.defaultDataProjection,rightHanded:b.rightHanded},b.decimals&&(c.decimals=b.decimals));return c} function $m(a,b,c){var d=c?vc(c.featureProjection):null,e=c?vc(c.dataProjection):null,f;d&&e&&!Lc(d,e)?a instanceof Qc?f=(b?a.clone():a).lb(b?d:e,b?e:d):f=Pc(b?a.slice():a,b?d:e,b?e:d):f=a;if(b&&c&&c.decimals){var g=Math.pow(10,c.decimals);a=function(a){for(var b=0,c=a.length;b>1),h=+ab(g[e],c),0>h?l=e+1:(m=e,n=!h);e=n?l:~l;0>e?(c=(c-g[-e-2])/(g[-e-1]-g[-e-2]),b+=(-e-2)*d,g=va(a[b],a[b+d],c),h=va(a[b+1],a[b+d+1],c)):(g=a[b+e*d],h=a[b+e*d+1])}return f?(f[0]= g,f[1]=h,f):[g,h]}function dn(a,b,c,d,e,f){if(c==b)return null;if(e>1,ea||this.c.length<=a)return null;var b=new P(null);b.ba(this.ka,this.B.slice(0===a?0:this.c[a-1],this.c[a]));return b}; k.ld=function(){var a=this.B,b=this.c,c=this.ka,d=[],e=0,f,g;f=0;for(g=b.length;fa||b<=a)return null;b=new C(null);b.ba(this.ka,this.B.slice(a*this.a,(a+1)*this.a));return b};k.he=function(){var a=this.B,b=this.ka,c=this.a,d=[],e,f;e=0;for(f=a.length;ea||this.c.length<=a)return null;var b;0===a?b=0:(b=this.c[a-1],b=b[b.length-1]);a=this.c[a].slice();var c=a[a.length-1];if(0!==b){var d,e;d=0;for(e=a.length;da||0!==this.l&&ad;++d){var e=parseInt(c[d],10).toString(16);c[d]=1==e.length?"0"+e:e}Mn(a,c.join(""))} function bq(a,b,c){a={node:a};var d=b.X(),e,f;"GeometryCollection"==d?(e=b.df(),f=cq):"MultiPoint"==d?(e=b.he(),f=dq):"MultiLineString"==d?(e=b.ld(),f=eq):"MultiPolygon"==d?(e=b.Wd(),f=fq):la(!1,39);Tm(a,gq,f,e,c)}function hq(a,b,c){Tm({node:a},iq,jq,[b],c)} function kq(a,b,c){var d={node:a};b.Oa()&&a.setAttribute("id",b.Oa());a=b.N();var e=b.hc();e&&(e=e.call(b,0))&&(e=Array.isArray(e)?e[0]:e,this.l&&(a.Style=e),(e=e.Ja())&&(a.name=e.Ja()));e=lq[c[c.length-1].node.namespaceURI];a=Rm(a,e);Tm(d,mq,Qm,a,c,e);a=c[0];(b=b.Y())&&(b=$m(b,!0,a));Tm(d,mq,cq,[b],c)}function nq(a,b,c){var d=b.la();a={node:a};a.layout=b.ka;a.stride=b.ua();Tm(a,oq,pq,[d],c)}function qq(a,b,c){b=b.Vd();var d=b.shift();a={node:a};Tm(a,rq,sq,b,c);Tm(a,rq,tq,[d],c)} function uq(a,b){Nn(a,Math.round(b*b*1E6)/1E6)} var vq=N(hp,["Document","Placemark"]),yq=N(hp,{Document:L(function(a,b,c){Tm({node:a},wq,xq,b,c,void 0,this)}),Placemark:L(kq)}),wq=N(hp,{Placemark:L(kq)}),zq={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},Aq=N(hp,["href"],N(gp,["x","y","w","h"])),Bq=N(hp,{href:L(Mn)},N(gp,{x:L(Nn),y:L(Nn),w:L(Nn),h:L(Nn)})),Cq=N(hp,["scale","heading","Icon", "hotSpot"]),Eq=N(hp,{Icon:L(function(a,b,c){a={node:a};var d=Aq[c[c.length-1].node.namespaceURI],e=Rm(b,d);Tm(a,Bq,Qm,e,c,d);d=Aq[gp[0]];e=Rm(b,d);Tm(a,Bq,Dq,e,c,d)}),heading:L(Nn),hotSpot:L(function(a,b){a.setAttribute("x",b.x);a.setAttribute("y",b.y);a.setAttribute("xunits",b.Zf);a.setAttribute("yunits",b.$f)}),scale:L(uq)}),Fq=N(hp,["color","scale"]),Gq=N(hp,{color:L(aq),scale:L(uq)}),Hq=N(hp,["color","width"]),Iq=N(hp,{color:L(aq),width:L(Nn)}),iq=N(hp,{LinearRing:L(nq)}),gq=N(hp,{LineString:L(nq), Point:L(nq),Polygon:L(qq),GeometryCollection:L(bq)}),lq=N(hp,"name open visibility address phoneNumber description styleUrl Style".split(" ")),mq=N(hp,{MultiGeometry:L(bq),LineString:L(nq),LinearRing:L(nq),Point:L(nq),Polygon:L(qq),Style:L(function(a,b,c){a={node:a};var d={},e=b.c,f=b.f,g=b.a;b=b.Ja();g instanceof Qo&&(d.IconStyle=g);b&&(d.LabelStyle=b);f&&(d.LineStyle=f);e&&(d.PolyStyle=e);b=Jq[c[c.length-1].node.namespaceURI];d=Rm(d,b);Tm(a,Kq,Qm,d,c,b)}),address:L(Mn),description:L(Mn),name:L(Mn), open:L(Ln),phoneNumber:L(Mn),styleUrl:L(Mn),visibility:L(Ln)}),oq=N(hp,{coordinates:L(function(a,b,c){c=c[c.length-1];var d=c.layout;c=c.stride;var e;"XY"==d||"XYM"==d?e=2:"XYZ"==d||"XYZM"==d?e=3:la(!1,34);var f,g=b.length,h="";if(0>1,v=-7;f=d?f-1:0;var u=d?-1:1,y=a[b+f];f+=u;d=y&(1<<-v)-1;y>>=-v;for(v+=p;0>=-v;for(v+=e;0>1,y=23===f?Math.pow(2,-24)-Math.pow(2,-77):0;p=e?0:p-1;var E=e?1:-1,z=0>b||0===b&&0>1/b?1:0;b=Math.abs(b);isNaN(b)||Infinity===b?(b=isNaN(b)?1:0,e=v):(e=Math.floor(Math.log(b)/Math.LN2),1>b*(q=Math.pow(2,-e))&&(e--,q*=2),b=1<=e+u?b+y/q:b+y*Math.pow(2,1-u),2<=b*q&&(e++,q/=2),e+u>=v?(b=0,e=v):1<=e+u?(b=(b*q-1)*Math.pow(2,f),e+=u):(b=b*Math.pow(2,u-1)*Math.pow(2,f),e=0));for(;8<=f;a[d+p]=b&255,p+=E,b/=256,f-=8);e=e<f)if(g)if(56320>f){d.push(239,191,189);g=f;continue}else f=g-55296<<10|f-56320|65536,g=null;else{56319< f||e+1===b?d.push(239,191,189):g=f;continue}else g&&(d.push(239,191,189),g=null);128>f?d.push(f):2048>f?d.push(f>>6|192,f&63|128):65536>f?d.push(f>>12|224,f>>6&63|128,f&63|128):d.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}return d}b.ja=f;var h=a("ieee754"),l,m,n;l={Xh:function(a){return(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},Yf:function(a,b){this[b]=a;this[b+1]=a>>>8;this[b+2]=a>>>16;this[b+3]=a>>>24},Ph:function(a){return(this[a]|this[a+1]<<8|this[a+2]<<16)+(this[a+3]<<24)}, Mf:function(a){return h.read(this,a,!0,23,4)},Gf:function(a){return h.read(this,a,!0,52,8)},Ai:function(a,b){return h.write(this,a,b,!0,23,4)},xi:function(a,b){return h.write(this,a,b,!0,52,8)},toString:function(a,b,d){var e=a="";d=Math.min(this.length,d||this.length);for(b=b||0;b=f?(a+=decodeURIComponent(e)+String.fromCharCode(f),e=""):e+="%"+f.toString(16)}return a+=decodeURIComponent(e)},write:function(a,b){for(var d=a===m?n:g(a),e=0;ee)return a;e=d[b.da++];a+=34359738368*(e&127);if(128>e)return a;e=d[b.da++];a+=4398046511104*(e& 127);if(128>e)return a;e=d[b.da++];a+=562949953421312*(e&127);if(128>e)return a;e=d[b.da++];a+=72057594037927936*(e&127);if(128>e)return a;e=d[b.da++];if(128>e)return a+0x7fffffffffffffff*(e&127);throw Error("Expected varint not more than 10 bytes");}b.ja=g;var l=f.xp||a("./buffer");g.f=0;g.g=1;g.b=2;g.a=5;var m=Math.pow(2,63);g.prototype={Kf:function(a,b,d){for(d=d||this.length;this.da>3,b,this);this.da===f&&this.lp(e)}return b},yo:function(){var a=this.Gb.Mf(this.da); this.da+=4;return a},uo:function(){var a=this.Gb.Gf(this.da);this.da+=8;return a},Da:function(){var a=this.Gb,b,d;d=a[this.da++];b=d&127;if(128>d)return b;d=a[this.da++];b|=(d&127)<<7;if(128>d)return b;d=a[this.da++];b|=(d&127)<<14;if(128>d)return b;d=a[this.da++];b|=(d&127)<<21;return 128>d?b:h(b,this)},Jo:function(){var a=this.da,b=this.Da();if(be?f<<7*e:f*Math.pow(2,7*e));return-b- 1},wd:function(){var a=this.Da();return 1===a%2?(a+1)/-2:a/2},so:function(){return!!this.Da()},Pf:function(){var a=this.Da()+this.da,b=this.Gb.toString("utf8",this.da,a);this.da=a;return b},lp:function(a){a&=7;if(a===g.f)for(;127>=3),e--,1===d||2===d)f+=a.wd(),g+=a.wd(),1===d&&(u&&v.push(u),u=[]),u.push(new h(f,g));else if(7===d)u&&u.push(u[0].clone());else throw Error("unknown command "+d);u&&v.push(u);return v};f.prototype.bbox=function(){var a=this.qc;a.da=this.Oe;for(var b=a.Da()+a.da,d=1,e=0,f=0,g=0,h=Infinity,u=-Infinity,y=Infinity,E=-Infinity;a.da< b;)if(e||(e=a.Da(),d=e&7,e>>=3),e--,1===d||2===d)f+=a.wd(),g+=a.wd(),fu&&(u=f),gE&&(E=g);else if(7!==d)throw Error("unknown command "+d);return[h,y,u,E]}},{"point-geometry":1}],5:[function(a,b){function f(a,b){this.version=1;this.name=null;this.extent=4096;this.length=0;this.qc=a;this.Hd=[];this.Jd=[];this.Gd=[];a.Kf(g,this,b);this.length=this.Gd.length}function g(a,b,d){15===a?b.version=d.Da():1===a?b.name=d.Pf():5===a?b.extent=d.Da():2===a?b.Gd.push(d.da):3===a?b.Hd.push(d.Pf()): 4===a&&b.Jd.push(h(d))}function h(a){for(var b=null,d=a.Da()+a.da;a.da>3,b=1===b?a.Pf():2===b?a.yo():3===b?a.uo():4===b?a.Jo():5===b?a.Da():6===b?a.wd():7===b?a.so():null;return b}var l=a("./vectortilefeature.js");b.ja=f;f.prototype.feature=function(a){if(0>a||a>=this.Gd.length)throw Error("feature index out of bounds");this.qc.da=this.Gd[a];a=this.qc.Da()+this.qc.da;return new l(this.qc,a,this.extent,this.Hd,this.Jd)}},{"./vectortilefeature.js":4}]},{},[2])(2)});Oq=b.ja})();function Rq(a,b,c,d){this.g=a;this.b=b;this.c=c;this.f=d}k=Rq.prototype;k.get=function(a){return this.f[a]};k.Hb=function(){return this.c};k.C=function(){this.a||(this.a="Point"===this.g?Rb(this.b):Sb(this.b,0,this.b.length,2));return this.a};k.Qb=function(){return this.b};k.la=Rq.prototype.Qb;k.Y=function(){return this};k.Im=function(){return this.f};k.md=Rq.prototype.Y;k.ua=function(){return 2};k.hc=ha;k.X=function(){return this.g};function Sq(a){this.defaultDataProjection=null;a=a?a:{};this.defaultDataProjection=new sc({code:"",units:"tile-pixels"});this.b=a.featureClass?a.featureClass:Rq;this.g=a.geometryName?a.geometryName:"geometry";this.a=a.layerName?a.layerName:"layer";this.f=a.layers?a.layers:null}w(Sq,Xm);Sq.prototype.X=function(){return"arraybuffer"}; Sq.prototype.Fa=function(a,b){var c=this.f,d=new Nq(a),d=new Oq.aj(d),e=[],f=this.b,g,h,l;for(l in d.layers)if(!c||-1!=c.indexOf(l)){g=d.layers[l];for(var m=0,n=g.length;me?~(e<<1):e<<1;c="";d=0;for(e=a.length;d>=5;h+=String.fromCharCode(f+63);c+=h}return c} function Tr(a,b){var c=b?b:1E5,d=[],e=0,f=0,g,h;g=0;for(h=a.length;gl?(d.push(e),f=e=0):f+=5}e=0;for(f=d.length;e>1):g>>1;e=0;for(f=d.length;e=b||"."==b||"-"==b){c.type=4;var d,b=a.b,e=!1,f=!1;do{if("."==d)e=!0;else if("e"==d||"E"==d)f=!0;d=a.a.charAt(++a.b)}while("0"<=d&&"9">=d||"."==d&&(void 0===e||!e)||!f&&("e"==d||"E"==d)||f&&("-"==d||"+"==d));a=parseFloat(a.a.substring(b,a.b--));c.value=a}else if("a"<=b&&"z">=b||"A"<=b&&"Z">=b){c.type=1;b=a.b;do d=a.a.charAt(++a.b);while("a"<=d&&"z">= d||"A"<=d&&"Z">=d);a=a.a.substring(b,a.b--).toUpperCase();c.value=a}else{if(" "==b||"\t"==b||"\r"==b||"\n"==b)return ys(a);if(""===b)c.type=6;else throw Error("Unexpected character: "+b);}return c}function ws(a){this.a=a}k=ws.prototype;k.match=function(a){if(a=this.b.type==a)this.b=ys(this.a);return a}; function zs(a){var b=a.b;if(a.match(1)){var c=b.value;if("GEOMETRYCOLLECTION"==c){a:{if(a.match(2)){b=[];do b.push(zs(a));while(a.match(5));if(a.match(3)){a=b;break a}}else if(As(a)){a=[];break a}throw Error(Bs(a));}return new qn(a)}var d=Cs[c],b=Ds[c];if(!d||!b)throw Error("Invalid geometry type: "+c);a=d.call(a);return new b(a)}throw Error(Bs(a));}k.Df=function(){if(this.match(2)){var a=Es(this);if(this.match(3))return a}else if(As(this))return null;throw Error(Bs(this));}; k.Cf=function(){if(this.match(2)){var a=Fs(this);if(this.match(3))return a}else if(As(this))return[];throw Error(Bs(this));};k.Ef=function(){if(this.match(2)){var a=Gs(this);if(this.match(3))return a}else if(As(this))return[];throw Error(Bs(this));};k.eo=function(){if(this.match(2)){var a;if(2==this.b.type)for(a=[this.Df()];this.match(5);)a.push(this.Df());else a=Fs(this);if(this.match(3))return a}else if(As(this))return[];throw Error(Bs(this));}; k.co=function(){if(this.match(2)){var a=Gs(this);if(this.match(3))return a}else if(As(this))return[];throw Error(Bs(this));};k.fo=function(){if(this.match(2)){for(var a=[this.Ef()];this.match(5);)a.push(this.Ef());if(this.match(3))return a}else if(As(this))return[];throw Error(Bs(this));};function Es(a){for(var b=[],c=0;2>c;++c){var d=a.b;if(a.match(4))b.push(d.value);else break}if(2==b.length)return b;throw Error(Bs(a));}function Fs(a){for(var b=[Es(a)];a.match(5);)b.push(Es(a));return b} function Gs(a){for(var b=[a.Cf()];a.match(5);)b.push(a.Cf());return b}function As(a){var b=1==a.b.type&&"EMPTY"==a.b.value;b&&(a.b=ys(a.a));return b}function Bs(a){return"Unexpected `"+a.b.value+"` at position "+a.b.position+" in `"+a.a.a+"`"}var Ds={POINT:C,LINESTRING:P,POLYGON:D,MULTIPOINT:R,MULTILINESTRING:Q,MULTIPOLYGON:S},Cs={POINT:ws.prototype.Df,LINESTRING:ws.prototype.Cf,POLYGON:ws.prototype.Ef,MULTIPOINT:ws.prototype.eo,MULTILINESTRING:ws.prototype.co,MULTIPOLYGON:ws.prototype.fo};function Hs(){this.version=void 0}w(Hs,xr);Hs.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};Hs.prototype.b=function(a){this.version=a.getAttribute("version").trim();return(a=O({version:this.version},Is,a,[]))?a:null};function Js(a,b){return O({},Ks,a,b)}function Ls(a,b){return O({},Ms,a,b)}function Ns(a,b){var c=Js(a,b);if(c){var d=[Kn(a.getAttribute("width")),Kn(a.getAttribute("height"))];c.size=d;return c}} function Os(a,b){return O([],Ps,a,b)} var Qs=[null,"http://www.opengis.net/wms"],Is=N(Qs,{Service:K(function(a,b){return O({},Rs,a,b)}),Capability:K(function(a,b){return O({},Ss,a,b)})}),Ss=N(Qs,{Request:K(function(a,b){return O({},Ts,a,b)}),Exception:K(function(a,b){return O([],Us,a,b)}),Layer:K(function(a,b){return O({},Vs,a,b)})}),Rs=N(Qs,{Name:K(T),Title:K(T),Abstract:K(T),KeywordList:K(Os),OnlineResource:K(wr),ContactInformation:K(function(a,b){return O({},Ws,a,b)}),Fees:K(T),AccessConstraints:K(T),LayerLimit:K(Jn),MaxWidth:K(Jn), MaxHeight:K(Jn)}),Ws=N(Qs,{ContactPersonPrimary:K(function(a,b){return O({},Xs,a,b)}),ContactPosition:K(T),ContactAddress:K(function(a,b){return O({},Ys,a,b)}),ContactVoiceTelephone:K(T),ContactFacsimileTelephone:K(T),ContactElectronicMailAddress:K(T)}),Xs=N(Qs,{ContactPerson:K(T),ContactOrganization:K(T)}),Ys=N(Qs,{AddressType:K(T),Address:K(T),City:K(T),StateOrProvince:K(T),PostCode:K(T),Country:K(T)}),Us=N(Qs,{Format:Km(T)}),Vs=N(Qs,{Name:K(T),Title:K(T),Abstract:K(T),KeywordList:K(Os),CRS:Mm(T), EX_GeographicBoundingBox:K(function(a,b){var c=O({},Zs,a,b);if(c){var d=c.westBoundLongitude,e=c.southBoundLatitude,f=c.eastBoundLongitude,c=c.northBoundLatitude;return void 0===d||void 0===e||void 0===f||void 0===c?void 0:[d,e,f,c]}}),BoundingBox:Mm(function(a){var b=[In(a.getAttribute("minx")),In(a.getAttribute("miny")),In(a.getAttribute("maxx")),In(a.getAttribute("maxy"))],c=[In(a.getAttribute("resx")),In(a.getAttribute("resy"))];return{crs:a.getAttribute("CRS"),extent:b,res:c}}),Dimension:Mm(function(a){return{name:a.getAttribute("name"), units:a.getAttribute("units"),unitSymbol:a.getAttribute("unitSymbol"),"default":a.getAttribute("default"),multipleValues:Fn(a.getAttribute("multipleValues")),nearestValue:Fn(a.getAttribute("nearestValue")),current:Fn(a.getAttribute("current")),values:T(a)}}),Attribution:K(function(a,b){return O({},$s,a,b)}),AuthorityURL:Mm(function(a,b){var c=Js(a,b);if(c)return c.name=a.getAttribute("name"),c}),Identifier:Mm(T),MetadataURL:Mm(function(a,b){var c=Js(a,b);if(c)return c.type=a.getAttribute("type"), c}),DataURL:Mm(Js),FeatureListURL:Mm(Js),Style:Mm(function(a,b){return O({},at,a,b)}),MinScaleDenominator:K(Hn),MaxScaleDenominator:K(Hn),Layer:Mm(function(a,b){var c=b[b.length-1],d=O({},Vs,a,b);if(d){var e=Fn(a.getAttribute("queryable"));void 0===e&&(e=c.queryable);d.queryable=void 0!==e?e:!1;e=Kn(a.getAttribute("cascaded"));void 0===e&&(e=c.cascaded);d.cascaded=e;e=Fn(a.getAttribute("opaque"));void 0===e&&(e=c.opaque);d.opaque=void 0!==e?e:!1;e=Fn(a.getAttribute("noSubsets"));void 0===e&&(e=c.noSubsets); d.noSubsets=void 0!==e?e:!1;(e=In(a.getAttribute("fixedWidth")))||(e=c.fixedWidth);d.fixedWidth=e;(e=In(a.getAttribute("fixedHeight")))||(e=c.fixedHeight);d.fixedHeight=e;["Style","CRS","AuthorityURL"].forEach(function(a){a in c&&(d[a]=(d[a]||[]).concat(c[a]))});"EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" ").forEach(function(a){a in d||(d[a]=c[a])});return d}})}),$s=N(Qs,{Title:K(T),OnlineResource:K(wr),LogoURL:K(Ns)}),Zs=N(Qs,{westBoundLongitude:K(Hn), eastBoundLongitude:K(Hn),southBoundLatitude:K(Hn),northBoundLatitude:K(Hn)}),Ts=N(Qs,{GetCapabilities:K(Ls),GetMap:K(Ls),GetFeatureInfo:K(Ls)}),Ms=N(Qs,{Format:Mm(T),DCPType:Mm(function(a,b){return O({},bt,a,b)})}),bt=N(Qs,{HTTP:K(function(a,b){return O({},ct,a,b)})}),ct=N(Qs,{Get:K(Js),Post:K(Js)}),at=N(Qs,{Name:K(T),Title:K(T),Abstract:K(T),LegendURL:Mm(Ns),StyleSheetURL:K(Js),StyleURL:K(Js)}),Ks=N(Qs,{Format:K(T),OnlineResource:K(wr)}),Ps=N(Qs,{Keyword:Km(T)});function dt(a){a=a?a:{};this.g="http://mapserver.gis.umn.edu/mapserver";this.b=new Yn;this.c=a.layers?a.layers:null;zn.call(this)}w(dt,zn); dt.prototype.nc=function(a,b){var c={};b&&za(c,Ym(this,a,b));var d=[c];a.setAttribute("namespaceURI",this.g);var e=a.localName,c=[];if(0!==a.childNodes.length){if("msGMLOutput"==e)for(var f=0,g=a.childNodes.length;f=b[0]||a[1]<=b[1]&&a[3]>=b[1]?!0:Xb(a,this.jb,this)):!1}; k.em=function(a){var b=this.a,c=this.B[b]-this.B[0],d=a.slice();d[b]=d[0]+c;for(c=1;cf[2])&&(c=h*Math.ceil((f[0]-c)/h),d=[d[0]+c, d[1],d[2]+c,d[3]]);c=this.s[0];f=this.s[1];h=-1;m=Math.pow(this.Ba*g,2);p=[];q=[];g=0;for(l=zt.length;gd;){if(600v-t/2?-1:1);f(a,b,Math.max(d,Math.floor(b-v*y/t+u)),Math.min(e,Math.floor(b+(t-v)*y/t+u)),q)}t=a[b];v=d;y=e;g(a,d,b);for(0q(a[v],t);)v++; for(;0b?1:0}b.ja=f},{}],2:[function(a,b){function f(a,b){if(!(this instanceof f))return new f(a,b);this.Re=Math.max(4,a||9);this.gg=Math.max(2,Math.ceil(.4*this.Re));b&&this.ij(b);this.clear()}function g(a,b){h(a,0,a.children.length,b,a)}function h(a,b,d,e,f){f||(f=u(null));f.ca=Infinity;f.fa=Infinity;f.ea=-Infinity;f.ia=-Infinity;for(var g;b< d;b++)g=a.children[b],l(f,a.Wa?e(g):g);return f}function l(a,b){a.ca=Math.min(a.ca,b.ca);a.fa=Math.min(a.fa,b.fa);a.ea=Math.max(a.ea,b.ea);a.ia=Math.max(a.ia,b.ia)}function m(a,b){return a.ca-b.ca}function n(a,b){return a.fa-b.fa}function p(a){return(a.ea-a.ca)*(a.ia-a.fa)}function q(a){return a.ea-a.ca+(a.ia-a.fa)}function t(a,b){return a.ca<=b.ca&&a.fa<=b.fa&&b.ea<=a.ea&&b.ia<=a.ia}function v(a,b){return b.ca<=a.ea&&b.fa<=a.ia&&b.ea>=a.ca&&b.ia>=a.fa}function u(a){return{children:a,height:1,Wa:!0, ca:Infinity,fa:Infinity,ea:-Infinity,ia:-Infinity}}function y(a,b,d,e,f){for(var g=[b,d],h;g.length;)d=g.pop(),b=g.pop(),d-b<=e||(h=b+Math.ceil((d-b)/e/2)*e,E(a,h,b,d,f),g.push(b,h,h,d))}b.ja=f;var E=a("quickselect");f.prototype={all:function(){return this.bg(this.data,[])},search:function(a){var b=this.data,d=[],e=this.nb;if(!v(a,b))return d;for(var f=[],g,h,l,m;b;){g=0;for(h=b.children.length;gthis.Re)this.oj(e,b),b--;else break;this.cj(d, e,b)},oj:function(a,b){var d=a[b],e=d.children.length,f=this.gg;this.dj(d,f,e);e=this.ej(d,f,e);e=u(d.children.splice(e,d.children.length-e));e.height=d.height;e.Wa=d.Wa;g(d,this.nb);g(e,this.nb);b?a[b-1].children.push(e):this.ig(d,e)},ig:function(a,b){this.data=u([a,b]);this.data.height=a.height+1;this.data.Wa=!1;g(this.data,this.nb)},ej:function(a,b,d){var e,f,g,l,m,n,q;m=n=Infinity;for(e=b;e<=d-b;e++)f=h(a,0,e,this.nb),g=h(a,e,d,this.nb),l=Math.max(0,Math.min(f.ea,g.ea)-Math.max(f.ca,g.ca))*Math.max(0, Math.min(f.ia,g.ia)-Math.max(f.fa,g.fa)),f=p(f)+p(g),l=b;n--)p=a.children[n],l(g,a.Wa?e(p):p),m+=q(g);return m},cj:function(a,b,d){for(;0<=d;d--)l(b[d],a)}, gj:function(a){for(var b=a.length-1,d;0<=b;b--)0===a[b].children.length?0a.Ia:a.c===hu&&(d=a.a[0].length>a.Ia,e=[a.a[0][0],a.a[0][a.a[0].length-2]]);if(d)for(var d=b.map,f=0,g=e.length;fa.Ha,a.D(f,d);else if(a.c===hu){f=a.a[0];f.push(c.slice());if(e=f.length>a.Ha)a.s=f[0];a.D(a.a,d)}qu(a);e&&a.jd()}k.No=function(){var a=this.o.Y(),b,c;this.c===ju?(b=this.a,b.splice(-2,1),this.D(b,a)):this.c===hu&&(b=this.a[0],b.splice(-2,1),c=this.A.Y(),c.sa(b),this.D(this.a,a));0===b.length&&(this.s=null);qu(this)}; k.jd=function(){var a=ru(this),b=this.a,c=a.Y();this.c===ju?(b.pop(),this.D(b,c)):this.c===hu&&(b[0].pop(),b[0].push(b[0][0]),this.D(b,c));"MultiPoint"===this.W?a.Xa(new R([b])):"MultiLineString"===this.W?a.Xa(new Q([b])):"MultiPolygon"===this.W&&a.Xa(new S([b]));this.b(new bu("drawend",a));this.sb&&this.sb.push(a);this.Mb&&this.Mb.ub(a)};function ru(a){a.s=null;var b=a.o;b&&(a.o=null,a.O=null,a.A=null,a.na.ga().clear(!0));return b} k.mm=function(a){var b=a.Y();this.o=a;this.a=b.Z();a=this.a[this.a.length-1];this.s=a.slice();this.a.push(a.slice());qu(this);this.b(new bu("drawstart",this.o))};k.Ec=oc;function qu(a){var b=[];a.o&&b.push(a.o);a.A&&b.push(a.A);a.O&&b.push(a.O);a=a.na.ga();a.clear(!0);a.Hc(b)}k.vi=function(){var a=this.v,b=this.f();a&&b||ru(this);this.na.setMap(b?a:null)}; function gu(a){var b;"Point"===a||"MultiPoint"===a?b=iu:"LineString"===a||"MultiLineString"===a?b=ju:"Polygon"===a||"MultiPolygon"===a?b=hu:"Circle"===a&&(b=ou);return b}var iu="Point",ju="LineString",hu="Polygon",ou="Circle";function su(a,b,c){Pa.call(this,a);this.features=b;this.mapBrowserEvent=c}w(su,Pa); function tu(a){Qh.call(this,{handleDownEvent:uu,handleDragEvent:vu,handleEvent:wu,handleUpEvent:xu});this.tb=a.condition?a.condition:Ph;this.Ia=function(a){return Lh(a)&&Kh(a)};this.sb=a.deleteCondition?a.deleteCondition:this.Ia;this.Ha=this.c=null;this.na=[0,0];this.D=this.T=!1;this.a=new Pt;this.O=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.s=this.za=!1;this.o=[];this.R=new F({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.style?a.style:yu(),updateWhileAnimating:!0,updateWhileInteracting:!0}); this.pa={Point:this.tm,LineString:this.hh,LinearRing:this.hh,Polygon:this.um,MultiPoint:this.rm,MultiLineString:this.qm,MultiPolygon:this.sm,GeometryCollection:this.pm};this.A=a.features;this.A.forEach(this.wf,this);B(this.A,ue,this.nm,this);B(this.A,ve,this.om,this);this.W=null}w(tu,Qh);k=tu.prototype;k.wf=function(a){var b=a.Y();b&&b.X()in this.pa&&this.pa[b.X()].call(this,a,b);(b=this.v)&&zu(this,this.na,b);B(a,"change",this.gh,this)}; function Au(a,b){a.D||(a.D=!0,a.b(new su("modifystart",a.A,b)))}function Bu(a,b){Cu(a,b);a.c&&0===a.A.gc()&&(a.R.ga().pb(a.c),a.c=null);Ka(b,"change",a.gh,a)}function Cu(a,b){var c=a.a,d=[];c.forEach(function(a){b===a.feature&&d.push(a)});for(var e=d.length-1;0<=e;--e)c.remove(d[e])}k.setMap=function(a){this.R.setMap(a);Qh.prototype.setMap.call(this,a)};k.nm=function(a){this.wf(a.element)};k.gh=function(a){this.s||(a=a.target,Bu(this,a),this.wf(a))};k.om=function(a){Bu(this,a.element)}; k.tm=function(a,b){var c=b.Z(),c={feature:a,geometry:b,qa:[c,c]};this.a.Ca(b.C(),c)};k.rm=function(a,b){var c=b.Z(),d,e,f;e=0;for(f=c.length;ec?g[1]:g[0]);Du(a,h);c={};c[x(g)]=!0;b=1;for(l=f.length;bl&&(l=0);c=n.geometry;e=f=c.Z();d=!1;switch(c.X()){case "MultiLineString":2c&&(a.index+=e)})}function yu(){var a=dj();return function(){return a.Point}};function Gu(a,b,c,d){Pa.call(this,a);this.selected=b;this.deselected=c;this.mapBrowserEvent=d}w(Gu,Pa); function Hu(a){Bh.call(this,{handleEvent:Iu});a=a?a:{};this.H=a.condition?a.condition:Kh;this.A=a.addCondition?a.addCondition:oc;this.D=a.removeCondition?a.removeCondition:oc;this.O=a.toggleCondition?a.toggleCondition:Mh;this.o=a.multi?a.multi:!1;this.j=a.filter?a.filter:nc;this.c=new F({source:new U({useSpatialIndex:!1,features:a.features,wrapX:a.wrapX}),style:a.style?a.style:Ju(),updateWhileAnimating:!0,updateWhileInteracting:!0});if(a.layers)if("function"===typeof a.layers)a=a.layers;else{var b= a.layers;a=function(a){return bb(b,a)}}else a=nc;this.s=a;this.a={};a=this.c.ga().c;B(a,ue,this.vm,this);B(a,ve,this.ym,this)}w(Hu,Bh);k=Hu.prototype;k.wm=function(){return this.c.ga().c};k.xm=function(a){la(a instanceof Am,42);a=x(a);return this.a[a]}; function Iu(a){if(!this.H(a))return!0;var b=this.A(a),c=this.D(a),d=this.O(a),e=!b&&!c&&!d,f=a.map,g=this.c.ga().c,h=[],l=[];if(e)Aa(this.a),f.Rd(a.pixel,function(a,b){if(this.j(a,b)){l.push(a);var c=x(a);this.a[c]=b;return!this.o}},this,this.s),0d?g[1]:g[0],c=b.Ga(l)}else this.T&&(l=vb(e,g),c=b.Ga(l),Math.sqrt(Ab(d,c))<=this.c&&(f=!0,this.na&&(e=b.Ga(g[0]),h=b.Ga(g[1]),e=Ab(c,e),d=Ab(c,h),h=Math.sqrt(Math.min(e, d)),h=h<=this.c)))&&(l=e>d?g[1]:g[0],c=b.Ga(l));f&&(c=[Math.round(c[0]),Math.round(c[1])])}b=l;f&&(a.coordinate=b.slice(0,2),a.pixel=c);return Rh.call(this,a)}function Mu(){var a=Ba(this.A);a.length&&(a.forEach(this.ui,this),this.A={});return!1}function Nu(a,b){return Bb(this.R,a.qa)-Bb(this.R,b.qa)};function Ou(a,b,c){Pa.call(this,a);this.features=b;this.coordinate=c}w(Ou,Pa);function Pu(a){Qh.call(this,{handleDownEvent:Qu,handleDragEvent:Ru,handleMoveEvent:Su,handleUpEvent:Tu});this.s=void 0;this.a=null;this.c=void 0!==a.features?a.features:null;if(a.layers)if("function"===typeof a.layers)a=a.layers;else{var b=a.layers;a=function(a){return bb(b,a)}}else a=nc;this.A=a;this.o=null}w(Pu,Qh); function Qu(a){this.o=Uu(this,a.pixel,a.map);return!this.a&&this.o?(this.a=a.coordinate,Su.call(this,a),this.b(new Ou("translatestart",this.c,a.coordinate)),!0):!1}function Tu(a){return this.a?(this.a=null,Su.call(this,a),this.b(new Ou("translateend",this.c,a.coordinate)),!0):!1} function Ru(a){if(this.a){a=a.coordinate;var b=a[0]-this.a[0],c=a[1]-this.a[1];if(this.c)this.c.forEach(function(a){var d=a.Y();d.Qc(b,c);a.Xa(d)});else if(this.o){var d=this.o.Y();d.Qc(b,c);this.o.Xa(d)}this.a=a;this.b(new Ou("translating",this.c,a))}}function Su(a){var b=a.map.xc();Uu(this,a.pixel,a.map)?(this.s=b.style.cursor,b.style.cursor=this.a?"-webkit-grabbing":"-webkit-grab",b.style.cursor=this.a?"grabbing":"grab"):(b.style.cursor=void 0!==this.s?this.s:"",this.s=void 0)} function Uu(a,b,c){var d=null;b=c.Rd(b,function(a){return a},a,a.A);a.c&&bb(a.c.a,b)&&(d=b);return d};function V(a){a=a?a:{};var b=za({},a);delete b.gradient;delete b.radius;delete b.blur;delete b.shadow;delete b.weight;F.call(this,b);this.f=null;this.ha=void 0!==a.shadow?a.shadow:250;this.W=void 0;this.c=null;B(this,Za("gradient"),this.Ik,this);this.fi(a.gradient?a.gradient:Vu);this.ai(void 0!==a.blur?a.blur:15);this.nh(void 0!==a.radius?a.radius:8);B(this,Za("blur"),this.kf,this);B(this,Za("radius"),this.kf,this);this.kf();var c=a.weight?a.weight:"weight",d;"string"===typeof c?d=function(a){return a.get(c)}: d=c;this.l(function(a){a=d(a);a=void 0!==a?ma(a,0,1):1;var b=255*a|0,c=this.c[b];c||(c=[new Zi({image:new Qo({opacity:a,src:this.W})})],this.c[b]=c);return c}.bind(this));this.set("renderOrder",null);B(this,"render",this.Zk,this)}w(V,F);var Vu=["#00f","#0ff","#0f0","#ff0","#f00"];k=V.prototype;k.xg=function(){return this.get("blur")};k.Eg=function(){return this.get("gradient")};k.mh=function(){return this.get("radius")}; k.Ik=function(){for(var a=this.Eg(),b=$e(1,256),c=b.createLinearGradient(0,0,1,256),d=1/(a.length-1),e=0,f=a.length;e=d)this.state=4;else if(this.A=new pk(a,c,f,e,d*(void 0!==m?m:.5)),0===this.A.f.length)this.state=4;else if(this.s=b.ec(d),c=rk(this.A),e&&(a.a?(c[1]=ma(c[1], e[1],e[3]),c[3]=ma(c[3],e[1],e[3])):c=jc(c,e)),cc(c)){a=ge(b,c,this.s);for(b=a.ca;b<=a.ea;b++)for(c=a.fa;c<=a.ia;c++)(m=l(this.s,b,c,g))&&this.g.push(m);0===this.g.length&&(this.state=4)}else this.state=4}w(Xu,qh);Xu.prototype.ma=function(){1==this.state&&(this.Vc.forEach(Ea),this.Vc=null);qh.prototype.ma.call(this)};Xu.prototype.ab=function(a){if(void 0!==a){var b=x(a);if(b in this.c)return this.c[b];a=Ca(this.c)?this.l:this.l.cloneNode(!1);return this.c[b]=a}return this.l}; Xu.prototype.yd=function(){var a=[];this.g.forEach(function(b){b&&2==b.V()&&a.push({extent:this.o.Ea(b.oa),image:b.ab()})},this);this.g.length=0;if(0===a.length)this.state=3;else{var b=this.U[0],c=this.v.Qa(b),d="number"===typeof c?c:c[0],c="number"===typeof c?c:c[1],b=this.v.$(b),e=this.o.$(this.s),f=this.v.Ea(this.U);this.l=ok(d,c,this.D,e,this.o.C(),b,f,this.A,a,this.H,this.O);this.state=2}rh(this)}; Xu.prototype.load=function(){if(0==this.state){this.state=1;rh(this);var a=0;this.Vc=[];this.g.forEach(function(b){var c=b.V();if(0==c||1==c){a++;var d;d=B(b,"change",function(){var c=b.V();if(2==c||3==c||4==c)Ea(d),a--,0===a&&(this.Vc.forEach(Ea),this.Vc=null,this.yd())},this);this.Vc.push(d)}},this);this.g.forEach(function(a){0==a.V()&&a.load()});0===a&&ja.setTimeout(this.yd.bind(this),0)}};function Yu(a,b){var c=/\{z\}/g,d=/\{x\}/g,e=/\{y\}/g,f=/\{-y\}/g;return function(g){if(g)return a.replace(c,g[0].toString()).replace(d,g[1].toString()).replace(e,function(){return(-g[2]-1).toString()}).replace(f,function(){var a=b.a?b.a[g[0]]:null;la(a,55);return(a.ia-a.fa+1+g[2]).toString()})}}function Zu(a,b){for(var c=a.length,d=Array(c),e=0;ea.c}cv.prototype.Jc=function(a){for(var b,c;dv(this);){b=this.a.Fc;c=b.oa[0].toString();var d;if(d=c in a)b=b.oa,d=Wd(a[c],b[1],b[2]);if(d)break;else Oa(this.pop())}};function ev(a){Tg.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state,wrapX:a.wrapX});this.ha=void 0!==a.opaque?a.opaque:!1;this.na=void 0!==a.tilePixelRatio?a.tilePixelRatio:1;this.tileGrid=void 0!==a.tileGrid?a.tileGrid:null;this.a=new cv(a.cacheSize);this.j=[0,0];this.fc=""}w(ev,Tg);k=ev.prototype;k.xh=function(){return dv(this.a)};k.Jc=function(a,b){var c=this.od(a);c&&c.Jc(b)}; function uj(a,b,c,d,e){b=a.od(b);if(!b)return!1;for(var f=!0,g,h,l=d.ca;l<=d.ea;++l)for(var m=d.fa;m<=d.ia;++m)g=a.Ib(c,l,m),h=!1,b.b.hasOwnProperty(g)&&(g=b.get(g),(h=2===g.V())&&(h=!1!==e(g))),h||(f=!1);return f}k.Ud=function(){return 0};function fv(a,b){a.fc!==b&&(a.fc=b,a.u())}k.Ib=function(a,b,c){return a+"/"+b+"/"+c};k.gf=function(){return this.ha};k.Pa=function(){return this.tileGrid};k.fb=function(a){return this.tileGrid?this.tileGrid:me(a)}; k.od=function(a){var b=this.f;return b&&!Lc(b,a)?null:this.a};k.zb=function(){return this.na};k.jf=function(a,b,c){c=this.fb(c);b=this.zb(b);a=ae(c.Qa(a),this.j);return 1==b?a:$d(a,b,this.j)};function gv(a,b,c){var d=void 0!==c?c:a.f;c=a.fb(d);if(a.D&&d.g){var e=b;b=e[0];a=le(c,e);d=ne(d);Lb(d,a)?b=e:(e=ec(d),a[0]+=e*Math.ceil((d[0]-a[0])/e),b=c.pd(a,b))}e=b[0];d=b[1];a=b[2];if(c.minZoom>e||e>c.maxZoom)c=!1;else{var f=c.C();c=(c=f?ge(c,f,e):c.a?c.a[e]:null)?Wd(c,d,a):!0}return c?b:null} k.va=function(){this.a.clear();this.u()};k.Xf=ha;function hv(a,b){Pa.call(this,a);this.tile=b}w(hv,Pa);function iv(a){ev.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio,wrapX:a.wrapX});this.tileLoadFunction=a.tileLoadFunction;this.tileUrlFunction=this.vc?this.vc.bind(this):av;this.urls=null;a.urls?this.Ua(a.urls):a.url&&this.Za(a.url);a.tileUrlFunction&&this.Ta(a.tileUrlFunction)}w(iv,ev);k=iv.prototype;k.gb=function(){return this.tileLoadFunction}; k.hb=function(){return this.tileUrlFunction};k.ib=function(){return this.urls};k.yh=function(a){a=a.target;switch(a.V()){case 1:this.b(new hv("tileloadstart",a));break;case 2:this.b(new hv("tileloadend",a));break;case 3:this.b(new hv("tileloaderror",a))}};k.mb=function(a){this.a.clear();this.tileLoadFunction=a;this.u()};k.Ta=function(a,b){this.tileUrlFunction=a;"undefined"!==typeof b?fv(this,b):this.u()}; k.Za=function(a){var b=this.urls=bv(a);this.Ta(this.vc?this.vc.bind(this):Zu(b,this.tileGrid),a)};k.Ua=function(a){this.urls=a;var b=a.join("\n");this.Ta(this.vc?this.vc.bind(this):Zu(a,this.tileGrid),b)};k.Xf=function(a,b,c){a=this.Ib(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function W(a){iv.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:jv,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:a.wrapX});this.crossOrigin=void 0!==a.crossOrigin?a.crossOrigin:null;this.tileClass=void 0!==a.tileClass?a.tileClass:Dt;this.i={};this.s={};this.pa=a.reprojectionErrorThreshold; this.H=!1}w(W,iv);k=W.prototype;k.xh=function(){if(dv(this.a))return!0;for(var a in this.i)if(dv(this.i[a]))return!0;return!1};k.Jc=function(a,b){var c=this.od(a);this.a.Jc(this.a==c?b:{});for(var d in this.i){var e=this.i[d];e.Jc(e==c?b:{})}};k.Ud=function(a){return this.f&&a&&!Lc(this.f,a)?0:this.ef()};k.ef=function(){return 0};k.gf=function(a){return this.f&&a&&!Lc(this.f,a)?!1:iv.prototype.gf.call(this,a)}; k.fb=function(a){var b=this.f;return!this.tileGrid||b&&!Lc(b,a)?(b=x(a).toString(),b in this.s||(this.s[b]=me(a)),this.s[b]):this.tileGrid};k.od=function(a){var b=this.f;if(!b||Lc(b,a))return this.a;a=x(a).toString();a in this.i||(this.i[a]=new cv);return this.i[a]};function kv(a,b,c,d,e,f,g){b=[b,c,d];e=(c=gv(a,b,f))?a.tileUrlFunction(c,e,f):void 0;e=new a.tileClass(b,void 0!==e?0:4,void 0!==e?e:"",a.crossOrigin,a.tileLoadFunction);e.key=g;B(e,"change",a.yh,a);return e} k.dc=function(a,b,c,d,e){if(this.f&&e&&!Lc(this.f,e)){var f=this.od(e);c=[a,b,c];var g;a=this.Ib.apply(this,c);f.b.hasOwnProperty(a)&&(g=f.get(a));b=this.fc;if(g&&g.key==b)return g;var h=this.f,l=this.fb(h),m=this.fb(e),n=gv(this,c,e);d=new Xu(h,l,e,m,c,n,this.zb(d),this.ef(),function(a,b,c,d){return lv(this,a,b,c,d,h)}.bind(this),this.pa,this.H);d.key=b;g?(d.a=g,f.replace(a,d)):f.set(a,d);return d}return lv(this,a,b,c,d,e)}; function lv(a,b,c,d,e,f){var g,h=a.Ib(b,c,d),l=a.fc;if(a.a.b.hasOwnProperty(h)){if(g=a.a.get(h),g.key!=l){var m=g;g.a&&g.a.key==l?(g=g.a,2==m.V()&&(g.a=m)):(g=kv(a,b,c,d,e,f,l),2==m.V()?g.a=m:m.a&&2==m.a.V()&&(g.a=m.a,m.a=null));g.a&&(g.a.a=null);a.a.replace(h,g)}}else g=kv(a,b,c,d,e,f,l),a.a.set(h,g);return g}k.Db=function(a){if(this.H!=a){this.H=a;for(var b in this.i)this.i[b].clear();this.u()}};k.Eb=function(a,b){var c=vc(a);c&&(c=x(c).toString(),c in this.s||(this.s[c]=b))}; function jv(a,b){a.ab().src=b};function mv(a){W.call(this,{cacheSize:a.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:vc("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.o=void 0!==a.culture?a.culture:"en-us";this.c=void 0!==a.maxZoom?a.maxZoom:-1;Wu("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+a.imagerySet+"?uriScheme=https&include=ImageryProviders&key="+a.key,this.v.bind(this),void 0,"jsonp")} w(mv,W);var nv=new qe({html:'Terms of Use'}); mv.prototype.v=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)Vg(this,"error");else{var b=a.brandLogoUri;-1==b.indexOf("https")&&(b=b.replace("http","https"));var c=a.resourceSets[0].resources[0],d=-1==this.c?c.zoomMax:this.c;a=ne(this.f);var e=pe({extent:a,minZoom:c.zoomMin,maxZoom:d,tileSize:c.imageWidth==c.imageHeight?c.imageWidth:[c.imageWidth,c.imageHeight]});this.tileGrid= e;var f=this.o;this.tileUrlFunction=$u(c.imageUrlSubdomains.map(function(a){var b=[0,0,0],d=c.imageUrl.replace("{subdomain}",a).replace("{culture}",f);return function(a){if(a)return be(a[0],a[1],-a[2]-1,b),d.replace("{quadkey}",ce(b))}}));if(c.imageryProviders){var g=yc(vc("EPSG:4326"),this.f);a=c.imageryProviders.map(function(a){var b=a.attribution,c={};a.coverageAreas.forEach(function(a){var b=a.zoomMin,f=Math.min(a.zoomMax,d);a=a.bbox;a=mc([a[1],a[0],a[3],a[2]],g);var h,l;for(h=b;h<=f;++h)l=h.toString(), b=ge(e,a,h),l in c?c[l].push(b):c[l]=[b]});return new qe({html:b,tileRanges:c})});a.push(nv);this.ra(a)}this.O=b;Vg(this,"ready")}};function ov(a){a=a||{};var b=void 0!==a.projection?a.projection:"EPSG:3857",c=void 0!==a.tileGrid?a.tileGrid:pe({extent:ne(b),maxZoom:a.maxZoom,minZoom:a.minZoom,tileSize:a.tileSize});W.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:a.opaque,projection:b,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:c,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls, wrapX:void 0!==a.wrapX?a.wrapX:!0})}w(ov,W);function pv(a){this.v=a.account;this.A=a.map||"";this.c=a.config||{};this.o={};ov.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,maxZoom:void 0!==a.maxZoom?a.maxZoom:18,minZoom:a.minZoom,projection:a.projection,state:"loading",wrapX:a.wrapX});qv(this)}w(pv,ov);k=pv.prototype;k.Qj=function(){return this.c};k.rp=function(a){za(this.c,a);qv(this)};k.Xo=function(a){this.c=a||{};qv(this)}; function qv(a){var b=JSON.stringify(a.c);if(a.o[b])rv(a,a.o[b]);else{var c="https://"+a.v+".cartodb.com/api/v1/map";a.A&&(c+="/named/"+a.A);var d=new XMLHttpRequest;d.addEventListener("load",a.Kk.bind(a,b));d.addEventListener("error",a.Jk.bind(a));d.open("POST",c);d.setRequestHeader("Content-type","application/json");d.send(JSON.stringify(a.c))}} k.Kk=function(a,b){var c=b.target;if(!c.status||200<=c.status&&300>c.status){var d;try{d=JSON.parse(c.responseText)}catch(e){Vg(this,"error");return}rv(this,d);this.o[a]=d;Vg(this,"ready")}else Vg(this,"error")};k.Jk=function(){Vg(this,"error")};function rv(a,b){a.Za("https://"+b.cdn_url.https+"/"+a.v+"/api/v1/map/"+b.layergroupid+"/{z}/{x}/{y}.png")};function Y(a){U.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,wrapX:a.wrapX});this.H=void 0;this.pa=void 0!==a.distance?a.distance:20;this.A=[];this.za=a.geometryFunction||function(a){a=a.Y();la(a instanceof C,10);return a};this.v=a.source;this.v.I("change",Y.prototype.Ia,this)}w(Y,U);Y.prototype.sb=function(){return this.v};Y.prototype.Nc=function(a,b,c){this.v.Nc(a,b,c);b!==this.H&&(this.clear(),this.H=b,sv(this),this.Hc(this.A))}; Y.prototype.tb=function(a){this.pa=a;this.Ia()};Y.prototype.Ia=function(){this.clear();sv(this);this.Hc(this.A);this.u()};function sv(a){if(void 0!==a.H){a.A.length=0;for(var b=Eb(),c=a.pa*a.H,d=a.v.me(),e={},f=0,g=d.length;fm*l?h*g/(m*p):l*g/(n*p),SETVIEWCENTERX:f[0],SETVIEWCENTERY:f[1]};za(e,this.j);d=uv(d,e);d=new Ct(a,b,c,this.l,d,this.W,this.c);B(d,"change",this.o,this)}else d=null;this.i=d;this.R=this.g;return d};k.Sm=function(){return this.c};k.Vm=function(a){za(this.j,a);this.u()};k.Um=function(a){this.i=null;this.c=a;this.u()};function xv(a){var b=a.imageExtent,c=void 0!==a.crossOrigin?a.crossOrigin:null,d=void 0!==a.imageLoadFunction?a.imageLoadFunction:zk;tk.call(this,{attributions:a.attributions,logo:a.logo,projection:vc(a.projection)});this.c=new Ct(b,void 0,1,this.l,a.url,c,d);this.i=a.imageSize?a.imageSize:null;B(this.c,"change",this.o,this)}w(xv,tk);xv.prototype.Kc=function(a){return kc(a,this.c.C())?this.c:null}; xv.prototype.o=function(a){if(2==this.c.V()){var b=this.c.C(),c=this.c.a(),d,e;this.i?(d=this.i[0],e=this.i[1]):(d=c.width,e=c.height);b=Math.ceil(ec(b)/(fc(b)/e));if(b!=d){var b=$e(b,e),f=b.canvas;b.drawImage(c,0,0,d,e,0,0,f.width,f.height);this.c.g=f}}tk.prototype.o.call(this,a)};function yv(a){a=a||{};tk.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.na=void 0!==a.crossOrigin?a.crossOrigin:null;this.j=a.url;this.R=void 0!==a.imageLoadFunction?a.imageLoadFunction:zk;this.i=a.params||{};this.v=!0;zv(this);this.ha=a.serverType;this.za=void 0!==a.hidpi?a.hidpi:!0;this.c=null;this.T=[0,0];this.W=0;this.s=void 0!==a.ratio?a.ratio:1.5}w(yv,tk);var Av=[101,101];k=yv.prototype; k.an=function(a,b,c,d){if(void 0!==this.j){var e=ic(a,b,0,Av),f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.i.LAYERS};za(f,this.i,d);d=Math.floor((e[3]-a[1])/b);f[this.v?"I":"X"]=Math.floor((a[0]-e[0])/b);f[this.v?"J":"Y"]=d;return Bv(this,e,Av,1,vc(c),f)}};k.cn=function(){return this.i}; k.Kc=function(a,b,c,d){if(void 0===this.j)return null;b=uk(this,b);1==c||this.za&&void 0!==this.ha||(c=1);a=a.slice();var e=(a[0]+a[2])/2,f=(a[1]+a[3])/2,g=b/c,h=ec(a)/g,g=fc(a)/g,l=this.c;if(l&&this.W==this.g&&l.$()==b&&l.f==c&&Nb(l.C(),a))return l;if(1!=this.s){var l=this.s*ec(a)/2,m=this.s*fc(a)/2;a[0]=e-l;a[1]=f-m;a[2]=e+l;a[3]=f+m}e={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};za(e,this.i);this.T[0]=Math.ceil(h*this.s);this.T[1]=Math.ceil(g*this.s);d=Bv(this, a,this.T,c,d,e);this.c=new Ct(a,b,c,this.l,d,this.na,this.R);this.W=this.g;B(this.c,"change",this.o,this);return this.c};k.bn=function(){return this.R}; function Bv(a,b,c,d,e,f){la(void 0!==a.j,9);f[a.v?"CRS":"SRS"]=e.eb;"STYLES"in a.i||(f.STYLES="");if(1!=d)switch(a.ha){case "geoserver":d=90*d+.5|0;f.FORMAT_OPTIONS="FORMAT_OPTIONS"in f?f.FORMAT_OPTIONS+(";dpi:"+d):"dpi:"+d;break;case "mapserver":f.MAP_RESOLUTION=90*d;break;case "carmentaserver":case "qgis":f.DPI=90*d;break;default:la(!1,8)}f.WIDTH=c[0];f.HEIGHT=c[1];c=e.b;var g;a.v&&"ne"==c.substr(0,2)?g=[b[1],b[0],b[3],b[2]]:g=b;f.BBOX=g.join(",");return uv(a.j,f)}k.dn=function(){return this.j}; k.en=function(a){this.c=null;this.R=a;this.u()};k.fn=function(a){a!=this.j&&(this.j=a,this.c=null,this.u())};k.gn=function(a){za(this.i,a);zv(this);this.c=null;this.u()};function zv(a){a.v=0<=tb(a.i.VERSION||"1.3.0")};function Cv(a){a=a||{};var b;void 0!==a.attributions?b=a.attributions:b=[Dv];ov.call(this,{attributions:b,cacheSize:a.cacheSize,crossOrigin:void 0!==a.crossOrigin?a.crossOrigin:"anonymous",opaque:void 0!==a.opaque?a.opaque:!0,maxZoom:void 0!==a.maxZoom?a.maxZoom:19,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:a.wrapX})}w(Cv,ov);var Dv=new qe({html:'© OpenStreetMap contributors.'});(function(){var a={},b={ja:a};(function(c){if("object"===typeof a&&"undefined"!==typeof b)b.ja=c();else{var d;"undefined"!==typeof window?d=window:"undefined"!==typeof global?d=global:"undefined"!==typeof self?d=self:d=this;d.Op=c()}})(function(){return function d(a,b,g){function h(m,p){if(!b[m]){if(!a[m]){var q="function"==typeof require&&require;if(!p&&q)return q(m,!0);if(l)return l(m,!0);q=Error("Cannot find module '"+m+"'");throw q.code="MODULE_NOT_FOUND",q;}q=b[m]={ja:{}};a[m][0].call(q.ja,function(b){var d= a[m][1][b];return h(d?d:b)},q,q.ja,d,a,b,g)}return b[m].ja}for(var l="function"==typeof require&&require,m=0;mthis.kj;)this.$c.shift().pg(null,null)};l.prototype.eg=function(){if(0===this.Id&&0Stamen Design, under CC BY 3.0.'}),Dv];function Qv(a){a=a||{};W.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.c=a.params||{};this.o=Eb()}w(Qv,W);Qv.prototype.v=function(){return this.c};Qv.prototype.zb=function(a){return a}; Qv.prototype.vc=function(a,b,c){var d=this.tileGrid;d||(d=this.fb(c));if(!(d.b.length<=a[0])){var e=d.Ea(a,this.o),f=ae(d.Qa(a[0]),this.j);1!=b&&(f=$d(f,b,this.j));d={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};za(d,this.c);var g=this.urls;g?(c=c.eb.split(":").pop(),d.SIZE=f[0]+","+f[1],d.BBOX=e.join(","),d.BBOXSR=c,d.IMAGESR=c,d.DPI=Math.round(d.DPI?d.DPI*b:90*b),a=1==g.length?g[0]:g[ta((a[1]<a.status){var b;try{b=JSON.parse(a.responseText)}catch(c){this.ke();return}this.vh(b)}else this.ke()};k.hn=function(){this.ke()};k.xk=function(){return this.c}; k.vh=function(a){var b=vc("EPSG:4326"),c=this.f,d;if(void 0!==a.bounds){var e=yc(b,c);d=mc(a.bounds,e)}var f=a.minzoom||0,e=a.maxzoom||22;this.tileGrid=c=pe({extent:ne(c),maxZoom:e,minZoom:f});this.tileUrlFunction=Zu(a.tiles,c);if(void 0!==a.attribution&&!this.l){b=void 0!==d?d:b.C();d={};for(var g;f<=e;++f)g=f.toString(),d[g]=[ge(c,b,f)];this.ra([new qe({html:a.attribution,tileRanges:d})])}this.c=a;Vg(this,"ready")};k.ke=function(){Vg(this,"error")};function Uv(a){ev.call(this,{projection:vc("EPSG:3857"),state:"loading"});this.s=void 0!==a.preemptive?a.preemptive:!0;this.o=av;this.i=void 0;this.c=a.jsonp||!1;if(a.url)if(this.c)Wu(a.url,this.Af.bind(this),this.le.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.nn.bind(this));b.addEventListener("error",this.mn.bind(this));b.open("GET",a.url);b.send()}else a.tileJSON?this.Af(a.tileJSON):la(!1,51)}w(Uv,ev);k=Uv.prototype; k.nn=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){var b;try{b=JSON.parse(a.responseText)}catch(c){this.le();return}this.Af(b)}else this.le()};k.mn=function(){this.le()};k.uk=function(){return this.i};k.Fj=function(a,b,c,d,e){this.tileGrid?(b=this.tileGrid.Yd(a,b),Vv(this.dc(b[0],b[1],b[2],1,this.f),a,c,d,e)):!0===e?Af(function(){c.call(d,null)}):c.call(d,null)};k.le=function(){Vg(this,"error")}; k.Af=function(a){var b=vc("EPSG:4326"),c=this.f,d;if(void 0!==a.bounds){var e=yc(b,c);d=mc(a.bounds,e)}var f=a.minzoom||0,e=a.maxzoom||22;this.tileGrid=c=pe({extent:ne(c),maxZoom:e,minZoom:f});this.i=a.template;var g=a.grids;if(g){this.o=Zu(g,c);if(void 0!==a.attribution){b=void 0!==d?d:b.C();for(d={};f<=e;++f)g=f.toString(),d[g]=[ge(c,b,f)];this.ra([new qe({html:a.attribution,tileRanges:d})])}Vg(this,"ready")}else Vg(this,"error")}; k.dc=function(a,b,c,d,e){var f=this.Ib(a,b,c);if(this.a.b.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];b=gv(this,a,e);d=this.o(b,d,e);d=new Wv(a,void 0!==d?0:4,void 0!==d?d:"",this.tileGrid.Ea(a),this.s,this.c);this.a.set(f,d);return d};k.Xf=function(a,b,c){a=this.Ib(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function Wv(a,b,c,d,e,f){qh.call(this,a,b);this.s=c;this.g=d;this.U=e;this.c=this.o=this.l=null;this.v=f}w(Wv,qh);k=Wv.prototype;k.ab=function(){return null}; k.getData=function(a){if(!this.l||!this.o)return null;var b=this.l[Math.floor((1-(a[1]-this.g[1])/(this.g[3]-this.g[1]))*this.l.length)];if("string"!==typeof b)return null;b=b.charCodeAt(Math.floor((a[0]-this.g[0])/(this.g[2]-this.g[0])*b.length));93<=b&&b--;35<=b&&b--;b-=32;a=null;b in this.o&&(b=this.o[b],this.c&&b in this.c?a=this.c[b]:a=b);return a}; function Vv(a,b,c,d,e){0==a.state&&!0===e?(Ja(a,"change",function(){c.call(d,this.getData(b))},a),Xv(a)):!0===e?Af(function(){c.call(d,this.getData(b))},a):c.call(d,a.getData(b))}k.Ya=function(){return this.s};k.Zd=function(){this.state=3;rh(this)};k.wh=function(a){this.l=a.grid;this.o=a.keys;this.c=a.data;this.state=4;rh(this)}; function Xv(a){if(0==a.state)if(a.state=1,a.v)Wu(a.s,a.wh.bind(a),a.Zd.bind(a));else{var b=new XMLHttpRequest;b.addEventListener("load",a.ln.bind(a));b.addEventListener("error",a.kn.bind(a));b.open("GET",a.s);b.send()}}k.ln=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){var b;try{b=JSON.parse(a.responseText)}catch(c){this.Zd();return}this.wh(b)}else this.Zd()};k.kn=function(){this.Zd()};k.load=function(){this.U&&Xv(this)};function Yv(a){a=a||{};var b=a.params||{};W.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:!("TRANSPARENT"in b?b.TRANSPARENT:1),projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.v=void 0!==a.gutter?a.gutter:0;this.c=b;this.o=!0;this.A=a.serverType;this.T=void 0!==a.hidpi?a.hidpi:!0;this.R=""; Zv(this);this.W=Eb();$v(this);fv(this,aw(this))}w(Yv,W);k=Yv.prototype; k.pn=function(a,b,c,d){c=vc(c);var e=this.tileGrid;e||(e=this.fb(c));b=e.Yd(a,b);if(!(e.b.length<=b[0])){var f=e.$(b[0]),g=e.Ea(b,this.W),e=ae(e.Qa(b[0]),this.j),h=this.v;0!==h&&(e=Zd(e,h,this.j),g=Gb(g,f*h,g));h={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.c.LAYERS};za(h,this.c,d);d=Math.floor((g[3]-a[1])/f);h[this.o?"I":"X"]=Math.floor((a[0]-g[0])/f);h[this.o?"J":"Y"]=d;return bw(this,b,e,g,1,c,h)}};k.ef=function(){return this.v}; k.Ib=function(a,b,c){return this.R+W.prototype.Ib.call(this,a,b,c)};k.qn=function(){return this.c}; function bw(a,b,c,d,e,f,g){var h=a.urls;if(h){g.WIDTH=c[0];g.HEIGHT=c[1];g[a.o?"CRS":"SRS"]=f.eb;"STYLES"in a.c||(g.STYLES="");if(1!=e)switch(a.A){case "geoserver":c=90*e+.5|0;g.FORMAT_OPTIONS="FORMAT_OPTIONS"in g?g.FORMAT_OPTIONS+(";dpi:"+c):"dpi:"+c;break;case "mapserver":g.MAP_RESOLUTION=90*e;break;case "carmentaserver":case "qgis":g.DPI=90*e;break;default:la(!1,52)}f=f.b;a.o&&"ne"==f.substr(0,2)&&(a=d[0],d[0]=d[1],d[1]=a,a=d[2],d[2]=d[3],d[3]=a);g.BBOX=d.join(",");return uv(1==h.length?h[0]:h[ta((b[1]<< b[0])+b[2],h.length)],g)}}k.zb=function(a){return this.T&&void 0!==this.A?a:1};function Zv(a){var b=0,c=[];if(a.urls){var d,e;d=0;for(e=a.urls.length;df||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),f+=f;break;case "truncated":for(;c>f||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),c>>=1,d>>=1;break;default:la(!1,53)}e.push([1,1]);e.reverse();for(var f=[1],g=[0],d=1,c=e.length;dthis.g||c+this.b>this.g)return null;d=mw(this,!1,a,b,c,d,f);if(!d)return null;a=mw(this,!0,a,b,c,void 0!==e?e:ha,f);return{offsetX:d.offsetX,offsetY:d.offsetY,image:d.image,Qg:a.image}}; function mw(a,b,c,d,e,f,g){var h=b?a.i:a.c,l,m,n;m=0;for(n=h.length;m=b+this.b&&f.height>=c+this.b)return h={offsetX:f.x+this.b,offsetY:f.y+this.b,image:this.c},this.f[a]=h,d.call(e,this.g,f.x+this.b,f.y+this.b),a=g,b+=this.b,d=c+this.b,f.width-b>f.height-d?(c={x:f.x+b,y:f.y,width:f.width-b,height:f.height},b={x:f.x,y:f.y+d,width:b,height:f.height-d},nw(this,a,c,b)):(c={x:f.x+b,y:f.y,width:f.width-b,height:d},b={x:f.x,y:f.y+d,width:f.width,height:f.height-d},nw(this, a,c,b)),h;return null};function nw(a,b,c,d){b=[b,1];0e&&(e=0);f=c.TileMatrixSetLink[e].TileMatrixSet; var g=c.Format[0];"format"in b&&(g=b.format);e=kb(c.Style,function(a){return"style"in b?a.Title==b.style:a.isDefault});0>e&&(e=0);e=c.Style[e].Identifier;var h={};"Dimension"in c&&c.Dimension.forEach(function(a){var b=a.Identifier,c=a.Default;void 0===c&&(c=a.Value[0]);h[b]=c});var l=gb(a.Contents.TileMatrixSet,function(a){return a.Identifier==f}),m;m="projection"in b?vc(b.projection):vc(l.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var n=c.WGS84BoundingBox,p,q;void 0!==n&& (q=vc("EPSG:4326").C(),q=n[0]==q[0]&&n[2]==q[2],p=Pc(n,"EPSG:4326",m),(n=m.C())&&(Nb(n,p)||(p=void 0)));var l=gw(l,p),t=[];p=b.requestEncoding;p=void 0!==p?p:"";if("OperationsMetadata"in a&&"GetTile"in a.OperationsMetadata)for(var n=a.OperationsMetadata.GetTile.DCP.HTTP.Get,v=0,u=n.length;v