// ol.3.16.0.js // OpenLayers 3. See http://openlayers.org/ // License: https://raw.githubusercontent.com/openlayers/ol3/master/LICENSE.md // Version: v3.16.0 (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 l,aa=this;function t(a,c,d){a=a.split(".");d=d||aa;a[0]in d||!d.execScript||d.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)a.length||void 0===c?d[e]?d=d[e]:d=d[e]={}:d[e]=c}function ba(a){a.Ub=function(){return a.Og?a.Og:a.Og=new a}} function ca(a){var c=typeof a;if("object"==c)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return c;var d=Object.prototype.toString.call(a);if("[object Window]"==d)return"object";if("[object Array]"==d||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==d||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; else if("function"==c&&"undefined"==typeof a.call)return"object";return c}function da(a){var c=ca(a);return"array"==c||"object"==c&&"number"==typeof a.length}function ea(a){return"string"==typeof a}function fa(a){return"number"==typeof a}function ga(a){return"function"==ca(a)}function ha(a){var c=typeof a;return"object"==c&&null!=a||"function"==c}function w(a){return a[ia]||(a[ia]=++ja)}var ia="closure_uid_"+(1E9*Math.random()>>>0),ja=0;function ka(a,c,d){return a.call.apply(a.bind,arguments)} function la(a,c,d){if(!a)throw Error();if(2")&&(a=a.replace(ya,">"));-1!=a.indexOf('"')&&(a=a.replace(za,"""));-1!=a.indexOf("'")&&(a=a.replace(Aa,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(Ba,"�"));return a}var wa=/&/g,xa=//g,za=/"/g,Aa=/'/g,Ba=/\x00/g,va=/[\x00&<>"']/; function Ca(a,c){return ac?1:0};function Da(a,c,d){return Math.min(Math.max(a,c),d)}var Ea=function(){var a;"cosh"in Math?a=Math.cosh:a=function(a){a=Math.exp(a);return(a+1/a)/2};return a}();function Fa(a,c,d,e,f,g){var h=f-d,k=g-e;if(0!==h||0!==k){var m=((a-d)*h+(c-e)*k)/(h*h+k*k);1d*c?d+c:d}function La(a,c,d){return a+d*(c-a)};function Ma(a){return function(c){if(c)return[Da(c[0],a[0],a[2]),Da(c[1],a[1],a[3])]}}function Na(a){return a};function Oa(a,c,d){this.center=a;this.resolution=c;this.rotation=d};var Pa="function"===typeof Object.assign?Object.assign:function(a,c){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(a),e=1,f=arguments.length;ec?1:ad)for(d=1;d>>0,e,f=0;fg?1:.5))+f,0),void 0!==d&&(e=Math.min(e,d)),c/Math.pow(a,e)}};function Gb(a){if(void 0!==a)return 0}function Hb(a,c){if(void 0!==a)return a+c}function Ib(a){var c=2*Math.PI/a;return function(a,e){if(void 0!==a)return a=Math.floor((a+e)/c+.5)*c}}function Jb(){var a=Ha(5);return function(c,d){if(void 0!==c)return Math.abs(c+d)<=a?0:c+d}};function Kb(a,c){var d=void 0!==c?a.toFixed(c):""+a,e=d.indexOf("."),e=-1===e?d.length:e;return 2f)return 1;if(f>e)return-1}return 0};function Mb(a,c){a[0]+=c[0];a[1]+=c[1];return a}function Nb(a,c){var d=a[0],e=a[1],f=c[0],g=c[1],h=f[0],f=f[1],k=g[0],g=g[1],m=k-h,n=g-f,d=0===m&&0===n?0:(m*(d-h)+n*(e-f))/(m*m+n*n||0);0>=d||(1<=d?(h=k,f=g):(h+=d*m,f+=d*n));return[h,f]}function Ob(a,c,d){a=Ja(a+180,360)-180;var e=Math.abs(3600*a);return Math.floor(e/3600)+"\u00b0 "+Kb(Math.floor(e/60%60))+"\u2032 "+Kb(e%60,d||0)+"\u2033 "+c.charAt(0>a?1:0)} function Pb(a,c,d){return a?c.replace("{x}",a[0].toFixed(d)).replace("{y}",a[1].toFixed(d)):""}function Qb(a,c){for(var d=!0,e=a.length-1;0<=e;--e)if(a[e]!=c[e]){d=!1;break}return d}function Rb(a,c){var d=Math.cos(c),e=Math.sin(c),f=a[1]*d+a[0]*e;a[0]=a[0]*d-a[1]*e;a[1]=f;return a}function Sb(a,c){var d=a[0]-c[0],e=a[1]-c[1];return d*d+e*e}function Tb(a,c){return Sb(a,Nb(a,c))}function Ub(a,c){return Pb(a,"{x}, {y}",c)};function Vb(a){for(var c=Wb(),d=0,e=a.length;de&&(k=k|4);hf&&(k|=2);0===k&&(k=1);return k}function Wb(){return[Infinity,Infinity,-Infinity,-Infinity]}function ec(a,c,d,e,f){return f?(f[0]=a,f[1]=c,f[2]=d,f[3]=e,f):[a,c,d,e]}function fc(a,c){var d=a[0],e=a[1];return ec(d,e,d,e,c)}function gc(a,c,d,e,f){f=ec(Infinity,Infinity,-Infinity,-Infinity,f);return hc(f,a,c,d,e)} function ic(a,c){return a[0]==c[0]&&a[2]==c[2]&&a[1]==c[1]&&a[3]==c[3]}function jc(a,c){c[0]a[2]&&(a[2]=c[2]);c[1]a[3]&&(a[3]=c[3]);return a}function Xb(a,c){c[0]a[2]&&(a[2]=c[0]);c[1]a[3]&&(a[3]=c[1])}function hc(a,c,d,e,f){for(;dc[0]?a[0]:c[0],d[1]=a[1]>c[1]?a[1]:c[1],d[2]=a[2]=c[0]&&a[1]<=c[3]&&a[3]>=c[1]}function qc(a){return a[2]a||0!==this.o&&a<=this.o)return this;var c=a.toString();if(this.l.hasOwnProperty(c))return this.l[c];var d=this.Ic(a);if(d.ga().lengthf&&(f=g);g=k;h=m}return f}function Ad(a,c,d,e,f){var g,h;g=0;for(h=d.length;gk){for(;cu&&(n=p,u=B)}u>f&&(m[(n-c)/e]=1,r+eL&&WaL)&&(0>R&&JR)|| (x[h++]=B,x[h++]=A,z=B,E=A);B=G;A=O}}x[h++]=B;x[h++]=A}}k.push(h);c=p}return h};function Kd(a,c){sd.call(this);this.i=this.j=-1;this.ma(a,c)}y(Kd,sd);l=Kd.prototype;l.clone=function(){var a=new Kd(null);Ld(a,this.f,this.A.slice());return a};l.rb=function(a,c,d,e){if(e<$b(this.O(),a,c))return e;this.i!=this.g&&(this.j=Math.sqrt(zd(this.A,0,this.A.length,this.a,0)),this.i=this.g);return Bd(this.A,0,this.A.length,this.a,this.j,!0,a,c,d,e)};l.hm=function(){return wd(this.A,0,this.A.length,this.a)};l.Z=function(){return Gd(this.A,0,this.A.length,this.a)}; l.Ic=function(a){var c=[];c.length=Id(this.A,0,this.A.length,this.a,a,c,0);a=new Kd(null);Ld(a,"XY",c);return a};l.X=function(){return"LinearRing"};l.ma=function(a,c){a?(vd(this,c,a,1),this.A||(this.A=[]),this.A.length=Ed(this.A,0,a,this.a),this.u()):Ld(this,"XY",null)};function Ld(a,c,d){ud(a,c,d);a.u()};function D(a,c){sd.call(this);this.ma(a,c)}y(D,sd);l=D.prototype;l.clone=function(){var a=new D(null);a.ba(this.f,this.A.slice());return a};l.rb=function(a,c,d,e){var f=this.A;a=Ga(a,c,f[0],f[1]);if(ag!=p>g&&f<(n-k)*(g-m)/(p-m)+k&&(h=!h);k=n;m=p}return h}function Od(a,c,d,e,f,g){if(0===d.length||!Nd(a,c,d[0],e,f,g))return!1;var h;c=1;for(h=d.length;cq&&(n=(n+p)/2,Od(a,c,d,e,n,r)&&(v=n,q=x));n=p}isNaN(v)&&(v=f[g]);return h?(h.push(v,r),h):[v,r]};function Qd(a,c,d,e,f,g){for(var h=[a[c],a[c+1]],k=[],m;c+e=f[0]&&g[2]<=f[2]||g[1]>=f[1]&&g[3]<=f[3]?!0:Qd(a,c,d,e,function(a,c){var d=!1,e=dc(f,a),g=dc(f,c);if(1===e||1===g)d=!0;else{var q=f[0],r=f[1],u=f[2],v=f[3],x=c[0],z=c[1],E=(z-a[1])/(x-a[0]);g&2&&!(e&2)&&(d=x-(z-v)/E,d=d>=q&&d<=u);d||!(g&4)||e&4||(d=z-(x-u)*E,d=d>=r&&d<=v);d||!(g&8)||e&8||(d=x-(z-r)/E,d=d>=q&&d<=u);d||!(g&16)||e&16||(d=z-(x-q)*E,d=d>=r&&d<=v)}return d}):!1} function Sd(a,c,d,e,f){var g=d[0];if(!(Rd(a,c,g,e,f)||Nd(a,c,g,e,f[0],f[1])||Nd(a,c,g,e,f[0],f[3])||Nd(a,c,g,e,f[2],f[1])||Nd(a,c,g,e,f[2],f[3])))return!1;if(1===d.length)return!0;c=1;for(g=d.length;ca||this.i.length<=a)return null;var c=new Kd(null);Ld(c,this.f,this.A.slice(0===a?0:this.i[a-1],this.i[a]));return c};l.Pd=function(){var a=this.f,c=this.A,d=this.i,e=[],f=0,g,h;g=0;for(h=d.length;gthis.o)}return void 0!==a?this.c+a:a}; l.Ze=function(a,c,d){a instanceof sd||(a=Zd(a));var e=d||{};d=void 0!==e.padding?e.padding:[0,0,0,0];var f=void 0!==e.constrainResolution?e.constrainResolution:!0,g=void 0!==e.nearest?e.nearest:!1,h;void 0!==e.minResolution?h=e.minResolution:void 0!==e.maxZoom?h=this.constrainResolution(this.a,e.maxZoom-this.c,0):h=0;var k=a.ga(),m=this.Ka(),e=Math.cos(-m),m=Math.sin(-m),n=Infinity,p=Infinity,q=-Infinity,r=-Infinity;a=a.ua();for(var u=0,v=k.length;ua?ke(2*a):1-ke(2*(a-.5))};function ne(a){var c=a.source,d=a.start?a.start:Date.now(),e=c[0],f=c[1],g=void 0!==a.duration?a.duration:1E3,h=a.easing?a.easing:ke;return function(a,c){if(c.time=c.b&&a.g<=c.f&&a.f>=c.g};function ue(a){this.a=a.html;this.b=a.tileRanges?a.tileRanges:null}ue.prototype.g=function(){return this.a};function ve(a,c,d){gb.call(this,a,d);this.element=c}y(ve,gb);function we(a){pb.call(this);this.a=a?a:[];xe(this)}y(we,pb);l=we.prototype;l.clear=function(){for(;0=arguments.length?Array.prototype.slice.call(a,c):Array.prototype.slice.call(a,c,d)};var Ce=/^#(?:[0-9a-f]{3}){1,2}$/i,De=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,Ee=/^(?:rgba)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|1|0\.\d{0,10})\)$/i;function Fe(a){return Array.isArray(a)?a:Ge(a)}function He(a){if("string"!==typeof a){var c=a[0];c!=(c|0)&&(c=c+.5|0);var d=a[1];d!=(d|0)&&(d=d+.5|0);var e=a[2];e!=(e|0)&&(e=e+.5|0);a="rgba("+c+","+d+","+e+","+(void 0===a[3]?1:a[3])+")"}return a} var Ge=function(){var a={},c=0;return function(d){var e;if(a.hasOwnProperty(d))e=a[d];else{if(1024<=c){e=0;for(var f in a)0===(e++&3)&&(delete a[f],--c)}var g,h;Ce.exec(d)?(h=3==d.length-1?1:2,e=parseInt(d.substr(1+0*h,h),16),f=parseInt(d.substr(1+1*h,h),16),g=parseInt(d.substr(1+2*h,h),16),1==h&&(e=(e<<4)+e,f=(f<<4)+f,g=(g<<4)+g),e=[e,f,g,1]):(h=Ee.exec(d))?(e=Number(h[1]),f=Number(h[2]),g=Number(h[3]),h=Number(h[4]),e=[e,f,g,h],e=Ie(e,e)):(h=De.exec(d))?(e=Number(h[1]),f=Number(h[2]),g=Number(h[3]), e=[e,f,g,1],e=Ie(e,e)):e=void 0;a[d]=e;++c}return e}}();function Ie(a,c){var d=c||[];d[0]=Da(a[0]+.5|0,0,255);d[1]=Da(a[1]+.5|0,0,255);d[2]=Da(a[2]+.5|0,0,255);d[3]=Da(a[3],0,1);return d};function Je(a){return"string"===typeof a||a instanceof CanvasPattern||a instanceof CanvasGradient?a:He(a)};var Ke;a:{var Le=aa.navigator;if(Le){var Me=Le.userAgent;if(Me){Ke=Me;break a}}Ke=""}function Ne(a){return-1!=Ke.indexOf(a)};function Oe(a,c){for(var d in a)c.call(void 0,a[d],d,a)}var Pe="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Qe(a,c){for(var d,e,f=1;fparseFloat(Ye)){Xe=String(af);break a}}Xe=Ye}var bf={}; function cf(a){var c;if(!(c=bf[a])){c=0;for(var d=sa(String(Xe)).split("."),e=sa(String(a)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g");g=g.join("")}g=f.createElement(g);h&&(ea(h)?g.className=h:"array"==ca(h)?g.className=h.join(" "):nf(g,h));2=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1}; l.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};l.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};l.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this}; l.scale=function(a,c){var d=fa(c)?c:a;this.left*=a;this.right*=a;this.top*=d;this.bottom*=d;return this};function yf(a,c){var d=lf(a);return d.defaultView&&d.defaultView.getComputedStyle&&(d=d.defaultView.getComputedStyle(a,null))?d[c]||d.getPropertyValue(c)||"":""}function zf(a){var c;try{c=a.getBoundingClientRect()}catch(d){return{left:0,top:0,right:0,bottom:0}}Se&&a.ownerDocument.body&&(a=a.ownerDocument,c.left-=a.documentElement.clientLeft+a.body.clientLeft,c.top-=a.documentElement.clientTop+a.body.clientTop);return c} function Af(a){var c=Bf;if("none"!=(yf(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))return c(a);var d=a.style,e=d.display,f=d.visibility,g=d.position;d.visibility="hidden";d.position="absolute";d.display="inline";a=c(a);d.display=e;d.position=g;d.visibility=f;return a}function Bf(a){var c=a.offsetWidth,d=a.offsetHeight,e=Ve&&!c&&!d;return(void 0===c||e)&&a.getBoundingClientRect?(a=zf(a),new hf(a.right-a.left,a.bottom-a.top)):new hf(c,d)} function Cf(a,c){a.style.display=c?"":"none"}function Df(a,c,d,e){if(/^\d+px?$/.test(c))return parseInt(c,10);var f=a.style[d],g=a.runtimeStyle[d];a.runtimeStyle[d]=a.currentStyle[d];a.style[d]=c;c=a.style[e];a.style[d]=f;a.runtimeStyle[d]=g;return c}function Ef(a,c){var d=a.currentStyle?a.currentStyle[c]:null;return d?Df(a,d,"left","pixelLeft"):0} function Ff(a,c){if(Se){var d=Ef(a,c+"Left"),e=Ef(a,c+"Right"),f=Ef(a,c+"Top"),g=Ef(a,c+"Bottom");return new xf(f,e,g,d)}d=yf(a,c+"Left");e=yf(a,c+"Right");f=yf(a,c+"Top");g=yf(a,c+"Bottom");return new xf(parseFloat(f),parseFloat(e),parseFloat(g),parseFloat(d))}var Gf={thin:2,medium:4,thick:6};function Hf(a,c){if("none"==(a.currentStyle?a.currentStyle[c+"Style"]:null))return 0;var d=a.currentStyle?a.currentStyle[c+"Width"]:null;return d in Gf?Gf[d]:Df(a,d,"left","pixelLeft")};function If(a,c,d){gb.call(this,a);this.map=c;this.frameState=void 0!==d?d:null}y(If,gb);function Jf(a){pb.call(this);this.element=a.element?a.element:null;this.a=this.S=null;this.s=[];this.render=a.render?a.render:pa;a.target&&this.c(a.target)}y(Jf,pb);Jf.prototype.fa=function(){uf(this.element);Jf.ia.fa.call(this)};Jf.prototype.i=function(){return this.a}; Jf.prototype.setMap=function(a){this.a&&uf(this.element);for(var c=0,d=this.s.length;c>=1;return d.join("")};function Of(a){Kf.call(this);this.c=void 0!==a?a:2048}y(Of,Kf);function Pf(a){return a.rc()>a.c}Of.prototype.Gc=function(a){for(var c,d;Pf(this)&&!(c=this.b.kc,d=c.ja[0].toString(),d in a&&a[d].contains(c.ja));)fb(this.pop())};function Qf(a,c){jb.call(this);this.ja=a;this.state=c;this.a=null;this.key=""}y(Qf,jb);function Rf(a){a.b("change")}Qf.prototype.gb=function(){return w(this).toString()};Qf.prototype.i=function(){return this.ja};Qf.prototype.V=function(){return this.state};function Sf(a,c,d){void 0===d&&(d=[0,0]);d[0]=a[0]+2*c;d[1]=a[1]+2*c;return d}function Tf(a,c,d){void 0===d&&(d=[0,0]);d[0]=a[0]*c+.5|0;d[1]=a[1]*c+.5|0;return d}function Uf(a,c){if(Array.isArray(a))return a;void 0===c?c=[a,a]:(c[0]=a,c[1]=a);return c};function Vf(a){pb.call(this);this.f=Ic(a.projection);this.l=Wf(a.attributions);this.R=a.logo;this.wa=void 0!==a.state?a.state:"ready";this.N=void 0!==a.wrapX?a.wrapX:!1}y(Vf,pb);function Wf(a){if("string"===typeof a)return[new ue({html:a})];if(a instanceof ue)return[a];if(Array.isArray(a)){for(var c=a.length,d=Array(c),e=0;e=a.minZoom;){if(d.call(null,c,bg(a,f,c,e)))return!0;--c}return!1}l=Yf.prototype;l.O=function(){return this.s};l.Dg=function(){return this.maxZoom};l.Eg=function(){return this.minZoom};l.Fa=function(a){return this.g?this.g:this.c[a]};l.$=function(a){return this.b[a]};l.Fh=function(){return this.b}; function cg(a,c,d,e){return c[0]f||f>d.maxZoom)d=!1;else{var g=d.O();d=(d=g?bg(d,g,f):d.a?d.a[f]:null)?re(d,e,a):!0}return d?c:null}l.pa=function(){this.a.clear();this.u()};l.Uf=pa; function pg(a,c){gb.call(this,a);this.tile=c}y(pg,gb);function qg(a){a=a?a:{};this.M=document.createElement("UL");this.v=document.createElement("LI");this.M.appendChild(this.v);Cf(this.v,!1);this.f=void 0!==a.collapsed?a.collapsed:!0;this.o=void 0!==a.collapsible?a.collapsible:!0;this.o||(this.f=!1);var c=void 0!==a.className?a.className:"ol-attribution",d=void 0!==a.tipLabel?a.tipLabel:"Attributions",e=void 0!==a.collapseLabel?a.collapseLabel:"\u00bb";this.N="string"===typeof e?pf("SPAN",{},e):e;e=void 0!==a.label?a.label:"i";this.R="string"===typeof e? pf("SPAN",{},e):e;d=pf("BUTTON",{type:"button",title:d},this.o&&!this.f?this.N:this.R);C(d,"click",this.Vl,this);c=pf("DIV",c+" ol-unselectable ol-control"+(this.f&&this.o?" ol-collapsed":"")+(this.o?"":" ol-uncollapsible"),this.M,d);Jf.call(this,{element:c,render:a.render?a.render:rg,target:a.target});this.B=!0;this.j={};this.l={};this.T={}}y(qg,Jf); function rg(a){if(a=a.frameState){var c,d,e,f,g,h,k,m,n,p,q,r=a.layerStatesArray,u=Pa({},a.attributions),v={},x=a.viewState.projection;d=0;for(c=r.length;dR.a)if(te(L,new qe(Ja(G.b,Wa),Ja(G.a,Wa),G.g,G.f))||G.a-G.b+1>Wa&&te(L,R)){q=!0;break a}}q=!1}else q=!0}}else q=!1;q?(m in v&&delete v[m],u[m]=k):v[m]=k}c=[u,v];d=c[0];c=c[1];for(var J in this.j)J in d?(this.l[J]||(Cf(this.j[J],!0),this.l[J]=!0),delete d[J]):J in c?(this.l[J]&&(Cf(this.j[J],!1),delete this.l[J]),delete c[J]):(uf(this.j[J]),delete this.j[J],delete this.l[J]);for(J in d)e=document.createElement("LI"),e.innerHTML=d[J].a,this.M.appendChild(e),this.j[J]= e,this.l[J]=!0;for(J in c)e=document.createElement("LI"),e.innerHTML=c[J].a,Cf(e,!1),this.M.appendChild(e),this.j[J]=e;J=!Sa(this.l)||!Sa(a.logos);this.B!=J&&(Cf(this.element,J),this.B=J);J&&Sa(this.l)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only");var ua;a=a.logos;J=this.T;for(ua in J)ua in a||(uf(J[ua]),delete J[ua]);for(var Ta in a)d=a[Ta],d instanceof HTMLElement&&(this.v.appendChild(d),J[Ta]=d),Ta in J||(ua=new Image,ua.src=Ta,""===d?d=ua:(d=pf("A",{href:d}), d.appendChild(ua)),this.v.appendChild(d),J[Ta]=d);Cf(this.v,!Sa(a))}else this.B&&(Cf(this.element,!1),this.B=!1)}l=qg.prototype;l.Vl=function(a){a.preventDefault();sg(this)};function sg(a){a.element.classList.toggle("ol-collapsed");a.f?vf(a.N,a.R):vf(a.R,a.N);a.f=!a.f}l.Ul=function(){return this.o};l.Xl=function(a){this.o!==a&&(this.o=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.f&&sg(this))};l.Wl=function(a){this.o&&this.f!==a&&sg(this)};l.Tl=function(){return this.f};function tg(a){a=a?a:{};var c=void 0!==a.className?a.className:"ol-rotate",d=void 0!==a.label?a.label:"\u21e7";this.f=null;"string"===typeof d?this.f=pf("SPAN","ol-compass",d):(this.f=d,this.f.classList.add("ol-compass"));d=pf("BUTTON",{"class":c+"-reset",type:"button",title:a.tipLabel?a.tipLabel:"Reset rotation"},this.f);C(d,"click",tg.prototype.B,this);c=pf("DIV",c+" ol-unselectable ol-control",d);d=a.render?a.render:ug;this.o=a.resetNorth?a.resetNorth:void 0;Jf.call(this,{element:c,render:d,target:a.target}); this.j=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")}y(tg,Jf);tg.prototype.B=function(a){a.preventDefault();if(void 0!==this.o)this.o();else{a=this.a;var c=a.aa();if(c){var d=c.Ka();void 0!==d&&(0Math.PI&&(d-=2*Math.PI),a.Va(oe({rotation:d,duration:this.j,easing:je}))),c.de(0))}}}; function ug(a){if(a=a.frameState){a=a.viewState.rotation;if(a!=this.v){var c="rotate("+a+"rad)";if(this.l){var d=this.element.classList.contains("ol-hidden");d||0!==a?d&&0!==a&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.f.style.msTransform=c;this.f.style.webkitTransform=c;this.f.style.transform=c}this.v=a}};function vg(a){a=a?a:{};var c=void 0!==a.className?a.className:"ol-zoom",d=void 0!==a.delta?a.delta:1,e=void 0!==a.zoomOutLabel?a.zoomOutLabel:"\u2212",f=void 0!==a.zoomOutTipLabel?a.zoomOutTipLabel:"Zoom out",g=pf("BUTTON",{"class":c+"-in",type:"button",title:void 0!==a.zoomInTipLabel?a.zoomInTipLabel:"Zoom in"},void 0!==a.zoomInLabel?a.zoomInLabel:"+");C(g,"click",vg.prototype.l.bind(this,d));e=pf("BUTTON",{"class":c+"-out",type:"button",title:f},e);C(e,"click",vg.prototype.l.bind(this,-d));c=pf("DIV", c+" ol-unselectable ol-control",g,e);Jf.call(this,{element:c,target:a.target});this.f=void 0!==a.duration?a.duration:250}y(vg,Jf);vg.prototype.l=function(a,c){c.preventDefault();var d=this.a,e=d.aa();if(e){var f=e.$();f&&(0d;++d)e[d]=c[d].toFixed(6);Pg(a,"matrix3d("+e.join(",")+")")}else if(Ng()){var e=[c[0],c[1],c[4],c[5],c[12],c[13]],f=Array(6);for(d=0;6>d;++d)f[d]=e[d].toFixed(6);Pg(a,"matrix("+f.join(",")+")")}else a.style.left=Math.round(c[12])+"px",a.style.top=Math.round(c[13])+"px"};var Rg=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Sg(a,c){var d,e,f=Rg.length;for(e=0;e=Math.abs(e-k[0])&&25>=m)return!0}return!1}function mh(a){var c=nh(a,a),d=c.preventDefault;c.preventDefault=function(){a.preventDefault();d()};c.pointerId=1;c.isPrimary=!0;c.pointerType="mouse";return c}l=kh.prototype; l.nl=function(a){if(!lh(this,a)){if((1).toString()in this.a){var c=mh(a);oh(this.b,ph,c,a);delete this.a[(1).toString()]}c=mh(a);this.a[(1).toString()]=a;oh(this.b,qh,c,a)}};l.ol=function(a){if(!lh(this,a)){var c=mh(a);oh(this.b,rh,c,a)}};l.rl=function(a){if(!lh(this,a)){var c=this.a[(1).toString()];c&&c.button===a.button&&(c=mh(a),oh(this.b,sh,c,a),delete this.a[(1).toString()])}};l.ql=function(a){if(!lh(this,a)){var c=mh(a);th(this.b,c,a)}}; l.pl=function(a){if(!lh(this,a)){var c=mh(a);uh(this.b,c,a)}};function vh(a){jh.call(this,a,{MSPointerDown:this.wl,MSPointerMove:this.xl,MSPointerUp:this.Al,MSPointerOut:this.yl,MSPointerOver:this.zl,MSPointerCancel:this.vl,MSGotPointerCapture:this.tl,MSLostPointerCapture:this.ul});this.a=a.g;this.g=["","unavailable","touch","pen","mouse"]}y(vh,jh);function wh(a,c){var d=c;fa(c.pointerType)&&(d=nh(c,c),d.pointerType=a.g[c.pointerType]);return d}l=vh.prototype;l.wl=function(a){this.a[a.pointerId.toString()]=a;var c=wh(this,a);oh(this.b,qh,c,a)}; l.xl=function(a){var c=wh(this,a);oh(this.b,rh,c,a)};l.Al=function(a){var c=wh(this,a);oh(this.b,sh,c,a);delete this.a[a.pointerId.toString()]};l.yl=function(a){var c=wh(this,a);uh(this.b,c,a)};l.zl=function(a){var c=wh(this,a);th(this.b,c,a)};l.vl=function(a){var c=wh(this,a);oh(this.b,ph,c,a);delete this.a[a.pointerId.toString()]};l.ul=function(a){this.b.b(new Ig("lostpointercapture",a,a))};l.tl=function(a){this.b.b(new Ig("gotpointercapture",a,a))};function xh(a){jh.call(this,a,{pointerdown:this.eo,pointermove:this.fo,pointerup:this.jo,pointerout:this.ho,pointerover:this.io,pointercancel:this.co,gotpointercapture:this.Ck,lostpointercapture:this.ml})}y(xh,jh);l=xh.prototype;l.eo=function(a){yh(this.b,a)};l.fo=function(a){yh(this.b,a)};l.jo=function(a){yh(this.b,a)};l.ho=function(a){yh(this.b,a)};l.io=function(a){yh(this.b,a)};l.co=function(a){yh(this.b,a)};l.ml=function(a){yh(this.b,a)};l.Ck=function(a){yh(this.b,a)};function zh(a,c){jh.call(this,a,{touchstart:this.mp,touchmove:this.lp,touchend:this.kp,touchcancel:this.jp});this.a=a.g;this.l=c;this.g=void 0;this.i=0;this.f=void 0}y(zh,jh);l=zh.prototype;l.Yh=function(){this.i=0;this.f=void 0}; function Ah(a,c,d){c=nh(c,d);c.pointerId=d.identifier+2;c.bubbles=!0;c.cancelable=!0;c.detail=a.i;c.button=0;c.buttons=1;c.width=d.webkitRadiusX||d.radiusX||0;c.height=d.webkitRadiusY||d.radiusY||0;c.pressure=d.webkitForce||d.force||.5;c.isPrimary=a.g===d.identifier;c.pointerType="touch";c.clientX=d.clientX;c.clientY=d.clientY;c.screenX=d.screenX;c.screenY=d.screenY;return c} function Bh(a,c,d){function e(){c.preventDefault()}var f=Array.prototype.slice.call(c.changedTouches),g=f.length,h,k;for(h=0;h=c.length){var f=[],g,h,k;for(g=0;g=a.minResolution&&ca.a&&(a.a=e.a),e.ga.f&&(a.f=e.f)):a[c][d]=e:(a[c]={},a[c][d]=e)}function ri(a,c,d){return[c*(Math.round(a[0]/c)+d[0]%2/2),c*(Math.round(a[1]/c)+d[1]%2/2)]} function si(a,c,d,e,f,g,h,k,m,n){var p=w(c).toString();p in a.wantedTiles||(a.wantedTiles[p]={});var q=a.wantedTiles[p];a=a.tileQueue;var r=d.minZoom,u,v,x,z,E,B;for(B=h;B>=r;--B)for(v=bg(d,g,B,v),x=d.$(B),z=v.b;z<=v.a;++z)for(E=v.g;E<=v.f;++E)h-B<=k?(u=c.Wb(B,z,E,e,f),0==u.V()&&(q[u.ja.toString()]=!0,u.gb()in a.g||a.f([u,p,fg(d,u.ja),x])),void 0!==m&&m.call(n,u)):c.Uf(B,z,E,f)};function ti(a){this.v=a.opacity;this.U=a.rotateWithView;this.j=a.rotation;this.i=a.scale;this.M=a.snapToPixel}l=ti.prototype;l.le=function(){return this.v};l.Rd=function(){return this.U};l.me=function(){return this.j};l.ne=function(){return this.i};l.Sd=function(){return this.M};l.oe=function(a){this.v=a};l.pe=function(a){this.j=a};l.qe=function(a){this.i=a};function ui(a){a=a||{};this.c=void 0!==a.anchor?a.anchor:[.5,.5];this.f=null;this.a=void 0!==a.anchorOrigin?a.anchorOrigin:"top-left";this.o=void 0!==a.anchorXUnits?a.anchorXUnits:"fraction";this.s=void 0!==a.anchorYUnits?a.anchorYUnits:"fraction";var c=void 0!==a.crossOrigin?a.crossOrigin:null,d=void 0!==a.img?a.img:null,e=void 0!==a.imgSize?a.imgSize:null,f=a.src;void 0!==f&&0!==f.length||!d||(f=d.src||w(d).toString());var g=void 0!==a.src?0:2,h=void 0!==a.color?Fe(a.color):null,k=vi.Ub(),m=k.get(f, c,h);m||(m=new wi(d,f,e,c,g,h),k.set(f,c,h,m));this.b=m;this.N=void 0!==a.offset?a.offset:[0,0];this.g=void 0!==a.offsetOrigin?a.offsetOrigin:"top-left";this.l=null;this.B=void 0!==a.size?a.size:null;ti.call(this,{opacity:void 0!==a.opacity?a.opacity:1,rotation:void 0!==a.rotation?a.rotation:0,scale:void 0!==a.scale?a.scale:1,snapToPixel:void 0!==a.snapToPixel?a.snapToPixel:!0,rotateWithView:void 0!==a.rotateWithView?a.rotateWithView:!1})}y(ui,ti);l=ui.prototype; l.Tb=function(){if(this.f)return this.f;var a=this.c,c=this.Bb();if("fraction"==this.o||"fraction"==this.s){if(!c)return null;a=this.c.slice();"fraction"==this.o&&(a[0]*=c[0]);"fraction"==this.s&&(a[1]*=c[1])}if("top-left"!=this.a){if(!c)return null;a===this.c&&(a=this.c.slice());if("top-right"==this.a||"bottom-right"==this.a)a[0]=-a[0]+c[0];if("bottom-left"==this.a||"bottom-right"==this.a)a[1]=-a[1]+c[1]}return this.f=a};l.ec=function(){var a=this.b;return a.c?a.c:a.a};l.fd=function(){return this.b.g}; l.od=function(){return this.b.f};l.ke=function(){var a=this.b;if(!a.o)if(a.s){var c=a.g[0],d=a.g[1],e=Mg(c,d);e.fillRect(0,0,c,d);a.o=e.canvas}else a.o=a.a;return a.o};l.Fa=function(){if(this.l)return this.l;var a=this.N;if("top-left"!=this.g){var c=this.Bb(),d=this.b.g;if(!c||!d)return null;a=a.slice();if("top-right"==this.g||"bottom-right"==this.g)a[0]=d[0]-c[0]-a[0];if("bottom-left"==this.g||"bottom-right"==this.g)a[1]=d[1]-c[1]-a[1]}return this.l=a};l.yn=function(){return this.b.j}; l.Bb=function(){return this.B?this.B:this.b.g};l.kf=function(a,c){return C(this.b,"change",a,c)};l.load=function(){this.b.load()};l.Tf=function(a,c){cb(this.b,"change",a,c)};function wi(a,c,d,e,f,g){jb.call(this);this.o=null;this.a=a?a:new Image;null!==e&&(this.a.crossOrigin=e);this.c=g?document.createElement("CANVAS"):null;this.l=g;this.i=null;this.f=f;this.g=d;this.j=c;this.s=!1;2==this.f&&xi(this)}y(wi,jb); function xi(a){var c=Mg(1,1);try{c.drawImage(a.a,0,0),c.getImageData(0,0,1,1)}catch(d){a.s=!0}}wi.prototype.v=function(){this.f=3;this.i.forEach(Xa);this.i=null;this.b("change")}; wi.prototype.U=function(){this.f=2;this.g&&(this.a.width=this.g[0],this.a.height=this.g[1]);this.g=[this.a.width,this.a.height];this.i.forEach(Xa);this.i=null;xi(this);if(!this.s&&null!==this.l){this.c.width=this.a.width;this.c.height=this.a.height;var a=this.c.getContext("2d");a.drawImage(this.a,0,0);for(var c=a.getImageData(0,0,this.a.width,this.a.height),d=c.data,e=this.l[0]/255,f=this.l[1]/255,g=this.l[2]/255,h=0,k=d.length;hp[2])m=[r+q*Math.ceil((p[0]-r)/q),a[1]]}p=c.layerStatesArray;for(q=p.length-1;0<=q;--q){var u=p[q],r=u.layer;if(ei(u,n)&&f.call(g,r)&&(u=Bi(this,r),r.da()&&(k=u.oa(r.da().N?m:a,c,h,e)),k))return k}}; l.mh=function(a,c,d,e,f,g){var h,k=c.viewState.resolution,m=c.layerStatesArray,n;for(n=m.length-1;0<=n;--n){h=m[n];var p=h.layer;if(ei(h,k)&&f.call(g,p)&&(h=Bi(this,p).xc(a,c,d,e)))return h}};l.nh=function(a,c,d,e){return void 0!==this.oa(a,c,Ac,this,d,e)};function Bi(a,c){var d=w(c).toString();if(d in a.g)return a.g[d];var e=a.Te(c);a.g[d]=e;a.s[d]=C(e,"change",a.Nk,a);return e}l.Nk=function(){this.i.render()};l.xe=pa; l.No=function(a,c){for(var d in this.g)if(!(c&&d in c.layerStates)){var e=d,f=this.g[e];delete this.g[e];Xa(this.s[e]);delete this.s[e];fb(f)}};function Ci(a,c){for(var d in a.g)if(!(d in c.layerStates)){c.postRenderFunctions.push(a.No.bind(a));break}}function Cb(a,c){return a.zIndex-c.zIndex};function Di(a,c){this.j=a;this.l=c;this.b=[];this.a=[];this.g={}}Di.prototype.clear=function(){this.b.length=0;this.a.length=0;Qa(this.g)};function Ei(a){var c=a.b,d=a.a,e=c[0];1==c.length?(c.length=0,d.length=0):(c[0]=c.pop(),d[0]=d.pop(),Fi(a,0));c=a.l(e);delete a.g[c];return e}Di.prototype.f=function(a){var c=this.j(a);return Infinity!=c?(this.b.push(a),this.a.push(c),this.g[this.l(a)]=!0,Gi(this,0,this.b.length-1),!0):!1};Di.prototype.rc=function(){return this.b.length}; Di.prototype.Sa=function(){return 0===this.b.length};function Fi(a,c){for(var d=a.b,e=a.a,f=d.length,g=d[c],h=e[c],k=c;c>1;){var m=2*c+1,n=2*c+2,m=nc;){var h=d-1>>1;if(a[h]>g)e[d]=e[h],a[d]=a[h],d=h;else break}e[d]=f;a[d]=g} function Hi(a){var c=a.j,d=a.b,e=a.a,f=0,g=d.length,h,k,m;for(k=0;k>1)-1;0<=c;c--)Fi(a,c)};function Ii(a,c){Di.call(this,function(c){return a.apply(null,c)},function(a){return a[0].gb()});this.s=c;this.i=0;this.c={}}y(Ii,Di);Ii.prototype.f=function(a){var c=Ii.ia.f.call(this,a);c&&C(a[0],"change",this.o,this);return c};Ii.prototype.o=function(a){a=a.target;var c=a.V();if(2===c||3===c||4===c||5===c)cb(a,"change",this.o,this),a=a.gb(),a in this.c&&(delete this.c[a],--this.i),this.s()}; function Ji(a,c,d){for(var e=0,f,g;a.id.b.length)d=!1;else{var e=Date.now()-d.i,f=d.b.length-3;if(d.b[f+2]e;)g-=3;var e=d.b[f+2]-d.b[g+2],h=d.b[f]-d.b[g],f=d.b[f+1]-d.b[g+1];d.c=Math.atan2(f,h);d.a=Math.sqrt(h*h+f*f)/e;d=d.a>d.g}}d&&(d=this.a,d=(d.g-d.a)/d.f,f=this.a.c,g=c.bb(),this.j=Li(this.a,g),a.Va(this.j),g=a.Da(g),d=a.Ma([g[0]-d*Math.cos(f),g[1]-d*Math.sin(f)]),d=c.Kd(d),c.jb(d));he(c,-1);a.render(); return!1}this.c=null;return!0}function ej(a){if(0this.N&&(this.a=!0));this.j=d;a=a.map;d=a.a.getBoundingClientRect();e=cj(this.o);e[0]-=d.left;e[1]-=d.top;this.c=a.Ma(e);this.a&&(d=a.aa(),e=d.Ka(),a.render(),Ni(a,d,e+c,this.c))} function Ej(a){if(2>this.o.length){a=a.map;var c=a.aa();he(c,-1);if(this.a){var d=c.Ka(),e=this.c,f=this.B,d=c.constrainRotation(d,0);Ni(a,c,d,e,f)}return!1}return!0}function Cj(a){return 2<=this.o.length?(a=a.map,this.c=null,this.j=void 0,this.a=!1,this.s=0,this.M||he(a.aa(),1),a.render(),!0):!1}Bj.prototype.Bc=Bc;function Fj(a){aj.call(this,{handleDownEvent:Gj,handleDragEvent:Hj,handleUpEvent:Ij});a=a?a:{};this.c=null;this.s=void 0!==a.duration?a.duration:400;this.a=void 0;this.j=1}y(Fj,aj);function Hj(a){var c=1,d=this.o[0],e=this.o[1],f=d.clientX-e.clientX,d=d.clientY-e.clientY,f=Math.sqrt(f*f+d*d);void 0!==this.a&&(c=this.a/f);this.a=f;1!=c&&(this.j=c);a=a.map;var f=a.aa(),d=f.$(),e=a.a.getBoundingClientRect(),g=cj(this.o);g[0]-=e.left;g[1]-=e.top;this.c=a.Ma(g);a.render();Pi(a,f,d*c,this.c)} function Ij(a){if(2>this.o.length){a=a.map;var c=a.aa();he(c,-1);var d=c.$(),e=this.c,f=this.s,d=c.constrainResolution(d,0,this.j-1);Pi(a,c,d,e,f);return!1}return!0}function Gj(a){return 2<=this.o.length?(a=a.map,this.c=null,this.a=void 0,this.j=1,this.M||he(a.aa(),1),a.render(),!0):!1}Fj.prototype.Bc=Bc;function Jj(a){a=a?a:{};var c=new we,d=new Ki(-.005,.05,100);(void 0!==a.altShiftDragRotate?a.altShiftDragRotate:1)&&c.push(new hj);(void 0!==a.doubleClickZoom?a.doubleClickZoom:1)&&c.push(new Qi({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.dragPan?a.dragPan:1)&&c.push(new dj({kinetic:d}));(void 0!==a.pinchRotate?a.pinchRotate:1)&&c.push(new Bj);(void 0!==a.pinchZoom?a.pinchZoom:1)&&c.push(new Fj({duration:a.zoomDuration}));if(void 0!==a.keyboard?a.keyboard:1)c.push(new vj),c.push(new xj({delta:a.zoomDelta, duration:a.zoomDuration}));(void 0!==a.mouseWheelZoom?a.mouseWheelZoom:1)&&c.push(new zj({duration:a.zoomDuration}));(void 0!==a.shiftDragZoom?a.shiftDragZoom:1)&&c.push(new uj({duration:a.zoomDuration}));return c};function Kj(a){var c=a||{};a=Pa({},c);delete a.layers;c=c.layers;$h.call(this,a);this.f=[];this.a={};C(this,rb("layers"),this.Pk,this);c?Array.isArray(c)&&(c=new we(c.slice())):c=new we;this.jh(c)}y(Kj,$h);l=Kj.prototype;l.Xd=function(){this.wb()&&this.u()}; l.Pk=function(){this.f.forEach(Xa);this.f.length=0;var a=this.Oc();this.f.push(C(a,"add",this.Ok,this),C(a,"remove",this.Qk,this));for(var c in this.a)this.a[c].forEach(Xa);Qa(this.a);var a=a.a,d,e;c=0;for(d=a.length;cf;++f)e[f]=c.charCodeAt(d++)|c.charCodeAt(d++)<<8|c.charCodeAt(d++)<<16|c.charCodeAt(d++)<<24;else for(f=0;16>f;++f)e[f]=c[d++]|c[d++]<<8|c[d++]<<16|c[d++]<<24;c=a.b[0];d=a.b[1];var f=a.b[2],g=a.b[3],h=0,h=c+(g^d&(f^g))+e[0]+3614090360&4294967295;c=d+(h<<7&4294967295|h>>>25);h=g+(f^c&(d^f))+e[1]+3905402710&4294967295;g=c+(h<<12&4294967295|h>>>20);h=f+(d^g&(c^d))+e[2]+606105819&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(c^f&(g^ c))+e[3]+3250441966&4294967295;d=f+(h<<22&4294967295|h>>>10);h=c+(g^d&(f^g))+e[4]+4118548399&4294967295;c=d+(h<<7&4294967295|h>>>25);h=g+(f^c&(d^f))+e[5]+1200080426&4294967295;g=c+(h<<12&4294967295|h>>>20);h=f+(d^g&(c^d))+e[6]+2821735955&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(c^f&(g^c))+e[7]+4249261313&4294967295;d=f+(h<<22&4294967295|h>>>10);h=c+(g^d&(f^g))+e[8]+1770035416&4294967295;c=d+(h<<7&4294967295|h>>>25);h=g+(f^c&(d^f))+e[9]+2336552879&4294967295;g=c+(h<<12&4294967295|h>>>20);h=f+ (d^g&(c^d))+e[10]+4294925233&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(c^f&(g^c))+e[11]+2304563134&4294967295;d=f+(h<<22&4294967295|h>>>10);h=c+(g^d&(f^g))+e[12]+1804603682&4294967295;c=d+(h<<7&4294967295|h>>>25);h=g+(f^c&(d^f))+e[13]+4254626195&4294967295;g=c+(h<<12&4294967295|h>>>20);h=f+(d^g&(c^d))+e[14]+2792965006&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(c^f&(g^c))+e[15]+1236535329&4294967295;d=f+(h<<22&4294967295|h>>>10);h=c+(f^g&(d^f))+e[1]+4129170786&4294967295;c=d+(h<<5&4294967295| h>>>27);h=g+(d^f&(c^d))+e[6]+3225465664&4294967295;g=c+(h<<9&4294967295|h>>>23);h=f+(c^d&(g^c))+e[11]+643717713&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^c&(f^g))+e[0]+3921069994&4294967295;d=f+(h<<20&4294967295|h>>>12);h=c+(f^g&(d^f))+e[5]+3593408605&4294967295;c=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(c^d))+e[10]+38016083&4294967295;g=c+(h<<9&4294967295|h>>>23);h=f+(c^d&(g^c))+e[15]+3634488961&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^c&(f^g))+e[4]+3889429448&4294967295;d=f+(h<<20&4294967295| h>>>12);h=c+(f^g&(d^f))+e[9]+568446438&4294967295;c=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(c^d))+e[14]+3275163606&4294967295;g=c+(h<<9&4294967295|h>>>23);h=f+(c^d&(g^c))+e[3]+4107603335&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^c&(f^g))+e[8]+1163531501&4294967295;d=f+(h<<20&4294967295|h>>>12);h=c+(f^g&(d^f))+e[13]+2850285829&4294967295;c=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(c^d))+e[2]+4243563512&4294967295;g=c+(h<<9&4294967295|h>>>23);h=f+(c^d&(g^c))+e[7]+1735328473&4294967295;f=g+(h<<14&4294967295| h>>>18);h=d+(g^c&(f^g))+e[12]+2368359562&4294967295;d=f+(h<<20&4294967295|h>>>12);h=c+(d^f^g)+e[5]+4294588738&4294967295;c=d+(h<<4&4294967295|h>>>28);h=g+(c^d^f)+e[8]+2272392833&4294967295;g=c+(h<<11&4294967295|h>>>21);h=f+(g^c^d)+e[11]+1839030562&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^c)+e[14]+4259657740&4294967295;d=f+(h<<23&4294967295|h>>>9);h=c+(d^f^g)+e[1]+2763975236&4294967295;c=d+(h<<4&4294967295|h>>>28);h=g+(c^d^f)+e[4]+1272893353&4294967295;g=c+(h<<11&4294967295|h>>>21);h=f+(g^ c^d)+e[7]+4139469664&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^c)+e[10]+3200236656&4294967295;d=f+(h<<23&4294967295|h>>>9);h=c+(d^f^g)+e[13]+681279174&4294967295;c=d+(h<<4&4294967295|h>>>28);h=g+(c^d^f)+e[0]+3936430074&4294967295;g=c+(h<<11&4294967295|h>>>21);h=f+(g^c^d)+e[3]+3572445317&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^c)+e[6]+76029189&4294967295;d=f+(h<<23&4294967295|h>>>9);h=c+(d^f^g)+e[9]+3654602809&4294967295;c=d+(h<<4&4294967295|h>>>28);h=g+(c^d^f)+e[12]+3873151461&4294967295; g=c+(h<<11&4294967295|h>>>21);h=f+(g^c^d)+e[15]+530742520&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^c)+e[2]+3299628645&4294967295;d=f+(h<<23&4294967295|h>>>9);h=c+(f^(d|~g))+e[0]+4096336452&4294967295;c=d+(h<<6&4294967295|h>>>26);h=g+(d^(c|~f))+e[7]+1126891415&4294967295;g=c+(h<<10&4294967295|h>>>22);h=f+(c^(g|~d))+e[14]+2878612391&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~c))+e[5]+4237533241&4294967295;d=f+(h<<21&4294967295|h>>>11);h=c+(f^(d|~g))+e[12]+1700485571&4294967295;c=d+ (h<<6&4294967295|h>>>26);h=g+(d^(c|~f))+e[3]+2399980690&4294967295;g=c+(h<<10&4294967295|h>>>22);h=f+(c^(g|~d))+e[10]+4293915773&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~c))+e[1]+2240044497&4294967295;d=f+(h<<21&4294967295|h>>>11);h=c+(f^(d|~g))+e[8]+1873313359&4294967295;c=d+(h<<6&4294967295|h>>>26);h=g+(d^(c|~f))+e[15]+4264355552&4294967295;g=c+(h<<10&4294967295|h>>>22);h=f+(c^(g|~d))+e[6]+2734768916&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~c))+e[13]+1309151649&4294967295; d=f+(h<<21&4294967295|h>>>11);h=c+(f^(d|~g))+e[4]+4149444226&4294967295;c=d+(h<<6&4294967295|h>>>26);h=g+(d^(c|~f))+e[11]+3174756917&4294967295;g=c+(h<<10&4294967295|h>>>22);h=f+(c^(g|~d))+e[2]+718787259&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~c))+e[9]+3951481745&4294967295;a.b[0]=a.b[0]+c&4294967295;a.b[1]=a.b[1]+(f+(h<<21&4294967295|h>>>11))&4294967295;a.b[2]=a.b[2]+f&4294967295;a.b[3]=a.b[3]+g&4294967295} function fk(a,c){var d;void 0===d&&(d=c.length);for(var e=d-a.a,f=a.c,g=a.g,h=0;hd.g?d.a:2*d.a)-d.g);c[0]=128;for(var e=1;ee;++e)for(var g=0;32>g;g+=8)c[f++]=d.b[e]>>>g&255;if(8192>=c.length)d=String.fromCharCode.apply(null, c);else for(d="",e=0;eG.width?G.width-ua:Ka,Pc=J+Ta>G.height?G.height-Ta:J;c.drawImage(G,ua,Ta,xc,Pc,A,R,xc*d,Pc*d);1!=O&&(c.globalAlpha=Ia);if(1!=B||0!==E)nd(v,a),c.transform(a[0], a[1],a[4],a[5],a[12],a[13])}++p;break;case 5:r=A[1];u=A[2];L=A[3];Wa=A[4]*d;J=A[5]*d;E=A[6];B=A[7]*d;G=A[8];for(O=A[9];rthis.c&&(this.c=this.g.lineWidth,this.f=null)}; function Qk(a,c,d){Gk.call(this,a,c,d);this.g={qg:void 0,ad:void 0,Wc:void 0,Xc:null,Yc:void 0,Zc:void 0,$c:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}y(Qk,Gk); function Rk(a,c,d,e,f){var g=a.g,h=[1];a.a.push(h);a.b.push(h);var k,h=0;for(k=e.length;hthis.c&&(this.c=d.lineWidth,this.f=null)):(d.strokeStyle=void 0,d.lineCap=void 0,d.lineDash=null,d.lineJoin=void 0,d.lineWidth=void 0,d.miterLimit=void 0)}; function Sk(a){var c=a.g,d=c.fillStyle,e=c.strokeStyle,f=c.lineCap,g=c.lineDash,h=c.lineJoin,k=c.lineWidth,m=c.miterLimit;void 0!==d&&c.qg!=d&&(a.a.push([9,d]),c.qg=c.fillStyle);void 0===e||c.ad==e&&c.Wc==f&&c.Xc==g&&c.Yc==h&&c.Zc==k&&c.$c==m||(a.a.push([10,e,k,f,h,m,g]),c.ad=e,c.Wc=f,c.Xc=g,c.Yc=h,c.Zc=k,c.$c=m)}function Tk(a,c,d){Gk.call(this,a,c,d);this.N=this.M=this.B=null;this.o="";this.U=this.v=this.s=this.j=0;this.l=this.i=this.g=null}y(Tk,Gk); function Uk(a,c,d,e,f){if(""!==a.o&&a.l&&(a.g||a.i)){if(a.g){var g=a.g,h=a.B;if(!h||h.fillStyle!=g.fillStyle){var k=[9,g.fillStyle];a.a.push(k);a.b.push(k);h?h.fillStyle=g.fillStyle:a.B={fillStyle:g.fillStyle}}}a.i&&(g=a.i,h=a.M,h&&h.lineCap==g.lineCap&&h.lineDash==g.lineDash&&h.lineJoin==g.lineJoin&&h.lineWidth==g.lineWidth&&h.miterLimit==g.miterLimit&&h.strokeStyle==g.strokeStyle||(k=[10,g.strokeStyle,g.lineWidth,g.lineCap,g.lineJoin,g.miterLimit,g.lineDash,!1],a.a.push(k),a.b.push(k),h?(h.lineCap= g.lineCap,h.lineDash=g.lineDash,h.lineJoin=g.lineJoin,h.lineWidth=g.lineWidth,h.miterLimit=g.miterLimit,h.strokeStyle=g.strokeStyle):a.M={lineCap:g.lineCap,lineDash:g.lineDash,lineJoin:g.lineJoin,lineWidth:g.lineWidth,miterLimit:g.miterLimit,strokeStyle:g.strokeStyle}));g=a.l;h=a.N;h&&h.font==g.font&&h.textAlign==g.textAlign&&h.textBaseline==g.textBaseline||(k=[11,g.font,g.textAlign,g.textBaseline],a.a.push(k),a.b.push(k),h?(h.font=g.font,h.textAlign=g.textAlign,h.textBaseline=g.textBaseline):a.N= {font:g.font,textAlign:g.textAlign,textBaseline:g.textBaseline});Ik(a,f);g=a.coordinates.length;c=Hk(a,c,0,d,e,!1);c=[5,g,c,a.o,a.j,a.s,a.v,a.U,!!a.g,!!a.i];a.a.push(c);a.b.push(c);Lk(a,f)}} Tk.prototype.Rb=function(a){if(a){var c=a.b;c?(c=c.b,c=Je(c?c:Wj),this.g?this.g.fillStyle=c:this.g={fillStyle:c}):this.g=null;var d=a.l;if(d){var c=d.b,e=d.f,f=d.g,g=d.c,h=d.a,d=d.i,e=void 0!==e?e:"round",f=f?f.slice():Xj,g=void 0!==g?g:"round",h=void 0!==h?h:1,d=void 0!==d?d:10,c=He(c?c:Yj);if(this.i){var k=this.i;k.lineCap=e;k.lineDash=f;k.lineJoin=g;k.lineWidth=h;k.miterLimit=d;k.strokeStyle=c}else this.i={lineCap:e,lineDash:f,lineJoin:g,lineWidth:h,miterLimit:d,strokeStyle:c}}else this.i=null; var m=a.g,c=a.f,e=a.c,f=a.i,h=a.a,d=a.Ea(),g=a.o,k=a.j;a=void 0!==m?m:"10px sans-serif";g=void 0!==g?g:"center";k=void 0!==k?k:"middle";this.l?(m=this.l,m.font=a,m.textAlign=g,m.textBaseline=k):this.l={font:a,textAlign:g,textBaseline:k};this.o=void 0!==d?d:"";this.j=void 0!==c?c:0;this.s=void 0!==e?e:0;this.v=void 0!==f?f:0;this.U=void 0!==h?h:1}else this.o=""};function Vk(a,c,d,e){this.o=a;this.g=c;this.l=d;this.f=e;this.a={};this.c=Mg(1,1);this.i=hd()} function Wk(a){for(var c in a.a){var d=a.a[c],e;for(e in d)d[e].fe()}}Vk.prototype.oa=function(a,c,d,e,f){var g=this.i;hi(g,.5,.5,1/c,-1/c,-d,-a[0],-a[1]);var h=this.c;h.clearRect(0,0,1,1);var k;void 0!==this.f&&(k=Wb(),Xb(k,a),Yb(k,c*this.f,k));return Xk(this,h,g,d,e,function(a){if(0kb&&(kb=Ia,n=Ka)}if(0===kb){h=null;break a}kb=h[n];h[n]=h[m];h[m]=kb;for(n=m+1;nthis.b/2){var c=[[a.source[0][0],a.source[0][1]],[a.source[1][0],a.source[1][1]],[a.source[2][0],a.source[2][1]]];c[0][0]-p>this.b/2&&(c[0][0]-=this.b);c[1][0]-p>this.b/2&&(c[1][0]-=this.b);c[2][0]-p>this.b/2&&(c[2][0]-=this.b);Math.max(c[0][0],c[1][0],c[2][0])-Math.min(c[0][0],c[1][0],c[2][0])q,u=!1;if(0a.s),u)){Math.abs(c[0]-e[0])<=Math.abs(c[1]-e[1])?(r=[(d[0]+e[0])/2,(d[1]+e[1])/2],p=a.a(r),q=[(f[0]+c[0])/2,(f[1]+c[1])/2],u=a.a(q),nl(a,c,d,r,q,g,h,p,u,n-1),nl(a,q,r,e,f,u,p,k,m,n-1)):(r=[(c[0]+d[0])/2,(c[1]+d[1])/2],p=a.a(r),q=[(e[0]+f[0])/2,(e[1]+f[1])/2],u=a.a(q),nl(a,c,r,q,f,g,p,u,m,n-1),nl(a,r,d,e,q,p,h,k,u,n-1));return}if(r){if(!a.j)return;a.o=!0}a.f.push({source:[g,k,m],target:[c,e,f]});a.f.push({source:[g,h,k],target:[c,d,e]})}} function pl(a){var c=Wb();a.f.forEach(function(a){a=a.source;Xb(c,a[0]);Xb(c,a[1]);Xb(c,a[2])});return c};function ql(a,c,d,e,f,g){this.v=c;this.s=a.O();var h=c.O(),k=h?vc(d,h):d,h=jl(a,c,tc(k),e);this.o=new ml(a,c,k,this.s,.5*h);this.c=e;this.g=d;a=pl(this.o);this.j=(this.nb=g(a,h,f))?this.nb.f:1;this.vd=this.i=null;f=2;g=[];this.nb&&(f=0,g=this.nb.l);fi.call(this,d,e,this.j,f,g)}y(ql,fi);ql.prototype.fa=function(){1==this.state&&(Xa(this.vd),this.vd=null);ql.ia.fa.call(this)};ql.prototype.a=function(){return this.i}; ql.prototype.ud=function(){var a=this.nb.V();2==a&&(this.i=ll(rc(this.g)/this.c,sc(this.g)/this.c,this.j,this.nb.$(),0,this.c,this.g,this.o,[{extent:this.nb.O(),image:this.nb.a()}],0));this.state=a;gi(this)};ql.prototype.load=function(){if(0==this.state){this.state=1;gi(this);var a=this.nb.V();2==a||3==a?this.ud():(this.vd=C(this.nb,"change",function(){var a=this.nb.V();if(2==a||3==a)Xa(this.vd),this.vd=null,this.ud()},this),this.nb.load())}};function rl(a){Vf.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.M=void 0!==a.resolutions?a.resolutions:null;this.a=null;this.na=0}y(rl,Vf);function sl(a,c){if(a.M){var d=vb(a.M,c,0);c=a.M[d]}return c} rl.prototype.B=function(a,c,d,e){var f=this.f;if(f&&e&&!Zc(f,e)){if(this.a){if(this.na==this.g&&Zc(this.a.v,e)&&this.a.$()==c&&this.a.f==d&&ic(this.a.O(),a))return this.a;fb(this.a);this.a=null}this.a=new ql(f,e,a,c,d,function(a,c,d){return this.Hc(a,c,d,f)}.bind(this));this.na=this.g;return this.a}f&&(e=f);return this.Hc(a,c,d,e)};rl.prototype.o=function(a){a=a.target;switch(a.V()){case 1:this.b(new tl(ul,a));break;case 2:this.b(new tl(vl,a));break;case 3:this.b(new tl(wl,a))}}; function xl(a,c){a.a().src=c}function tl(a,c){gb.call(this,a);this.image=c}y(tl,gb);var ul="imageloadstart",vl="imageloadend",wl="imageloaderror";function yl(a){rl.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions,state:a.state});this.ea=a.canvasFunction;this.T=null;this.Y=0;this.ta=void 0!==a.ratio?a.ratio:1.5}y(yl,rl);yl.prototype.Hc=function(a,c,d,e){c=sl(this,c);var f=this.T;if(f&&this.Y==this.g&&f.$()==c&&f.f==d&&cc(f.O(),a))return f;a=a.slice();yc(a,this.ta);(e=this.ea(a,c,d,[rc(a)/c*d,sc(a)/c*d],e))&&(f=new dl(a,c,d,this.l,e));this.T=f;this.Y=this.g;return f};function zl(a){pb.call(this);this.i=void 0;this.a="geometry";this.c=null;this.l=void 0;this.f=null;C(this,rb(this.a),this.Wd,this);void 0!==a&&(a instanceof dd||!a?this.Ta(a):this.C(a))}y(zl,pb);l=zl.prototype;l.clone=function(){var a=new zl(this.L());a.zc(this.a);var c=this.W();c&&a.Ta(c.clone());(c=this.c)&&a.nf(c);return a};l.W=function(){return this.get(this.a)};l.Wa=function(){return this.i};l.Wj=function(){return this.a};l.Fl=function(){return this.c};l.$b=function(){return this.l};l.Gl=function(){this.u()}; l.Wd=function(){this.f&&(Xa(this.f),this.f=null);var a=this.W();a&&(this.f=C(a,"change",this.Gl,this));this.u()};l.Ta=function(a){this.set(this.a,a)};l.nf=function(a){this.l=(this.c=a)?Al(a):void 0;this.u()};l.hc=function(a){this.i=a;this.u()};l.zc=function(a){cb(this,rb(this.a),this.Wd,this);this.a=a;C(this,rb(this.a),this.Wd,this);this.Wd()};function Al(a){if(!ga(a)){var c;c=Array.isArray(a)?a:[a];a=function(){return c}}return a};function Bl(a,c,d,e,f){Qf.call(this,a,c);this.g=Mg();this.l=e;this.c=null;this.f={bd:!1,Pf:null,Xh:-1,Qf:-1,td:null,oi:[]};this.v=f;this.j=d}y(Bl,Qf);l=Bl.prototype;l.ab=function(){return-1==this.f.Qf?null:this.g.canvas};l.Ql=function(){return this.l};l.gb=function(){return this.j};l.load=function(){0==this.state&&(this.state=1,Rf(this),this.v(this,this.j),this.s(null,NaN,null))};l.bi=function(a){this.c=a;this.state=2;Rf(this)};l.rf=function(a){this.o=a};l.fi=function(a){this.s=a};var Cl=document.implementation.createDocument("","",null);function Dl(a,c){return Cl.createElementNS(a,c)}function El(a,c){return Fl(a,c,[]).join("")}function Fl(a,c,d){if(4==a.nodeType||3==a.nodeType)c?d.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):d.push(a.nodeValue);else for(a=a.firstChild;a;a=a.nextSibling)Fl(a,c,d);return d}function Gl(a){return a instanceof Document}function Hl(a){return a instanceof Node}function Il(a){return(new DOMParser).parseFromString(a,"application/xml")} function Jl(a,c){return function(d,e){var f=a.call(c,d,e);void 0!==f&&xb(e[e.length-1],f)}}function Kl(a,c){return function(d,e){var f=a.call(void 0!==c?c:this,d,e);void 0!==f&&e[e.length-1].push(f)}}function Ll(a,c){return function(d,e){var f=a.call(void 0!==c?c:this,d,e);void 0!==f&&(e[e.length-1]=f)}}function Ml(a){return function(c,d){var e=a.call(this,c,d);if(void 0!==e){var f=d[d.length-1],g=c.localName,h;g in f?h=f[g]:h=f[g]=[];h.push(e)}}} function K(a,c){return function(d,e){var f=a.call(this,d,e);void 0!==f&&(e[e.length-1][void 0!==c?c:d.localName]=f)}}function M(a,c){return function(d,e,f){a.call(void 0!==c?c:this,d,e,f);f[f.length-1].node.appendChild(d)}}function Nl(a){var c,d;return function(e,f,g){if(void 0===c){c={};var h={};h[e.localName]=a;c[e.namespaceURI]=h;d=Ol(e.localName)}Pl(c,d,f,g)}}function Ol(a,c){return function(d,e,f){d=e[e.length-1].node;e=a;void 0===e&&(e=f);f=c;void 0===c&&(f=d.namespaceURI);return Dl(f,e)}} var Ql=Ol();function Rl(a,c){for(var d=c.length,e=Array(d),f=0;fk.status){var a=c.X(),f;"json"==a||"text"==a?f=k.responseText:"xml"==a?(f=k.responseXML)||(f=Il(k.responseText)):"arraybuffer"==a&&(f=k.response);f&&d.call(this,c.Ca(f,{featureProjection:h}),c.Oa(f))}else e.call(this)}.bind(this);k.send()}} function Vl(a,c){return Ul(a,c,function(a,c){this.rf(c);this.bi(a)},function(){this.state=3;Rf(this)})}function Wl(a,c){return Ul(a,c,function(a){this.Ec(a)},pa)};function Xl(){return[[-Infinity,-Infinity,Infinity,Infinity]]};var Yl,Zl,$l,am; (function(){var a={ha:{}};(function(){function c(a,d){if(!(this instanceof c))return new c(a,d);this.Pe=Math.max(4,a||9);this.dg=Math.max(2,Math.ceil(.4*this.Pe));d&&this.hj(d);this.clear()}function d(a,c){a.bbox=e(a,0,a.children.length,c)}function e(a,c,d,e){for(var g=[Infinity,Infinity,-Infinity,-Infinity],h;c=a[0]&&c[3]>=a[1]}function q(a,c,d,e,f){for(var g=[c,d],h;g.length;)d=g.pop(),c=g.pop(),d-c<=e||(h=c+Math.ceil((d-c)/e/2)*e,r(a,c,d,h,f),g.push(c,h,h,d))}function r(a,c,d,e,f){for(var g,h,k,m,n;d>c;){600h-g/2?-1:1),k=Math.max(c,Math.floor(e-h*m/g+n)),h=Math.min(d,Math.floor(e+(g-h)*m/g+n)),r(a,k,h,e,f));g=a[e];h=c;m=d;u(a,c,e);for(0f(a[h],g);)h++;for(;0this.Pe)this.nj(e,c),c--;else break;this.bj(d,e,c)},nj:function(a,c){var e=a[c],f=e.children.length,g=this.dg;this.cj(e,g,f);f=this.dj(e,g,f);f={children:e.children.splice(f,e.children.length-f),height:e.height,bbox:null,Ja:!1};e.Ja&&(f.Ja=!0);d(e,this.ib); d(f,this.ib);c?a[c-1].children.push(f):this.fg(e,f)},fg:function(a,c){this.data={children:[a,c],height:a.height+1,bbox:null,Ja:!1};d(this.data,this.ib)},dj:function(a,c,d){var f,g,h,m,n,p,q;n=p=Infinity;for(f=c;f<=d-c;f++)g=e(a,0,f,this.ib),h=e(a,f,d,this.ib),m=Math.max(0,Math.min(g[2],h[2])-Math.max(g[0],h[0]))*Math.max(0,Math.min(g[3],h[3])-Math.max(g[1],h[1])),g=k(g)+k(h),m=c;p--)q=a.children[p],f(k,a.Ja?g(q):q.bbox),n+=m(k);return n},bj:function(a,c,d){for(;0<=d;d--)f(c[d].bbox,a)},fj:function(a){for(var c=a.length-1,e;0<=c;c--)0===a[c].children.length?0m[2];)++x,p=n*x,p=Ek(this,a,p),q.Pa(r,f,p,h,g),k-=n;p=Ek(this,a,0)}Zj(r,h,c/2,v/2);r!=d&&(Ck(this,"render",r,a,p),d.drawImage(r.canvas,0,0));r.globalAlpha=u}Dk(this,d,a,p)};tm.prototype.oa=function(a,c,d,e){if(this.o){var f=this.a,g={};return this.o.oa(a,c.viewState.resolution,c.viewState.rotation,{},function(a){var c=w(a).toString();if(!(c in g))return g[c]=!0,d.call(e,a,f)})}};tm.prototype.N=function(){li(this)}; tm.prototype.l=function(a){function c(a){var c,e=a.$b();e?c=e.call(a,n):(e=d.i)&&(c=e(a,n));if(c){if(c){e=!1;if(Array.isArray(c))for(var f=0,g=c.length;fL&&tf(this.target,x.target,0)}else{if(!a.viewHints[0]&&!a.viewHints[1]){A= bg(x.c,r,x.g[0],E);L=[];B=O=void 0;for(B in x.a)O=x.a[B],A.contains(O.ja)||L.push(O);Wa=A=void 0;A=0;for(Wa=L.length;A=n;){u=this.g[f];d=this.s[f];r=w(d).toString();if(void 0===k[r]&&d.W()&&(void 0===p||wc(p,d.W().O()))&&(g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),g.drawElements(4,c-u,e,u*a),c=m(d))){k=c;break a}c=u;f--}k=void 0}else g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),ln(this,g,a,k,this.l,this.i),k=(k=m(null))?k:void 0;u=k}g.disableVertexAttribArray(q.f);g.disableVertexAttribArray(q.b);g.disableVertexAttribArray(q.c);g.disableVertexAttribArray(q.a);g.disableVertexAttribArray(q.g);return u}; function ln(a,c,d,e,f,g){var h=d.g?5125:5123;d=d.g?4:2;if(Sa(e)){var k;a=0;e=f.length;for(k=0;ac[0]||c[0]>f[0]||0> c[1]||c[1]>f[1])&&(this.o||(this.o=Mg(1,1)),this.o.clearRect(0,0,1,1),this.o.drawImage(this.c.a(),c[0],c[1],1,1,0,0,1,1),0e?c[0]=e-d:0>f&&(c[0]=Math.abs(f)+ d),0>g?c[1]=g-d:0>h&&(c[1]=Math.abs(h)+d),0===c[0]&&0===c[1])||(d=a.aa().bb(),e=a.Da(d),c=[e[0]+c[0],e[1]+c[1]],this.i&&(this.i.source=d,a.Va(ne(this.i))),a.aa().jb(a.Ma(c)))}}};l.Yk=function(){Pn(this)};l.ai=function(a){this.set("element",a)};l.setMap=function(a){this.set("map",a)};l.gi=function(a){this.set("offset",a)};l.qf=function(a){this.set("position",a)}; function Qn(a,c){var d=lf(a),e=new gf(0,0),f;f=d?lf(d):document;var g;(g=!Se||9<=Number(ef))||(jf(f),g=!0);a!=(g?f.documentElement:f.body)&&(f=zf(a),g=jf(d).b,d=g.scrollingElement?g.scrollingElement:Ve?g.body||g.documentElement:g.documentElement,g=g.parentWindow||g.defaultView,d=Se&&cf("10")&&g.pageYOffset!=d.scrollTop?new gf(d.scrollLeft,d.scrollTop):new gf(g.pageXOffset||d.scrollLeft,g.pageYOffset||d.scrollTop),e.x=f.left+d.x,e.y=f.top+d.y);return[e.x,e.y,e.x+c[0],e.y+c[1]]} l.ji=function(a){this.set("positioning",a)};function Rn(a,c){a.a.visible!==c&&(Cf(a.f,c),a.a.visible=c)} function Pn(a){var c=a.ce(),d=a.ah();if(void 0!==c&&c.f&&void 0!==d){var d=c.Da(d),e=c.$a(),c=a.f.style,f=a.Fg(),g=a.Gg(),h=f[0],f=f[1];if("bottom-right"==g||"center-right"==g||"top-right"==g)""!==a.a.$d&&(a.a.$d=c.left=""),h=Math.round(e[0]-d[0]-h)+"px",a.a.ye!=h&&(a.a.ye=c.right=h);else{""!==a.a.ye&&(a.a.ye=c.right="");if("bottom-center"==g||"center-center"==g||"top-center"==g)h-=Af(a.f).width/2;h=Math.round(d[0]+h)+"px";a.a.$d!=h&&(a.a.$d=c.left=h)}if("bottom-left"==g||"bottom-center"==g||"bottom-right"== g)""!==a.a.Be&&(a.a.Be=c.top=""),d=Math.round(e[1]-d[1]-f)+"px",a.a.Hd!=d&&(a.a.Hd=c.bottom=d);else{""!==a.a.Hd&&(a.a.Hd=c.bottom="");if("center-left"==g||"center-center"==g||"center-right"==g)f-=Af(a.f).height/2;d=Math.round(d[1]+f)+"px";a.a.Be!=d&&(a.a.Be=c.top=d)}Rn(a,!0)}else Rn(a,!1)};function Sn(a){a=a?a:{};this.l=void 0!==a.collapsed?a.collapsed:!0;this.o=void 0!==a.collapsible?a.collapsible:!0;this.o||(this.l=!1);var c=void 0!==a.className?a.className:"ol-overviewmap",d=void 0!==a.tipLabel?a.tipLabel:"Overview map",e=void 0!==a.collapseLabel?a.collapseLabel:"\u00ab";this.v="string"===typeof e?pf("SPAN",{},e):e;e=void 0!==a.label?a.label:"\u00bb";this.B="string"===typeof e?pf("SPAN",{},e):e;d=pf("BUTTON",{type:"button",title:d},this.o&&!this.l?this.v:this.B);C(d,"click",this.am, this);e=document.createElement("DIV");e.className="ol-overviewmap-map";var f=this.f=new S({controls:new we,interactions:new we,target:e,view:a.view});a.layers&&a.layers.forEach(function(a){f.gg(a)},this);var g=document.createElement("DIV");g.className="ol-overviewmap-box";g.style.boxSizing="border-box";this.j=new On({position:[0,0],positioning:"bottom-left",element:g});this.f.hg(this.j);c=pf("DIV",c+" ol-unselectable ol-control"+(this.l&&this.o?" ol-collapsed":"")+(this.o?"":" ol-uncollapsible"), e,d);Jf.call(this,{element:c,render:a.render?a.render:Tn,target:a.target})}y(Sn,Jf);l=Sn.prototype;l.setMap=function(a){var c=this.a;a!==c&&(c&&(c=c.aa())&&cb(c,rb("rotation"),this.Yd,this),Sn.ia.setMap.call(this,a),a&&(this.s.push(C(a,"propertychange",this.Sk,this)),0===this.f.Zg().Zb()&&this.f.ei(a.sc()),a=a.aa()))&&(C(a,rb("rotation"),this.Yd,this),ge(a)&&(this.f.Sc(),Un(this)))}; l.Sk=function(a){"view"===a.key&&((a=a.oldValue)&&cb(a,rb("rotation"),this.Yd,this),a=this.a.aa(),C(a,rb("rotation"),this.Yd,this))};l.Yd=function(){this.f.aa().de(this.a.aa().Ka())};function Tn(){var a=this.a,c=this.f;if(a.f&&c.f){var d=a.$a(),a=a.aa().Fc(d),e=c.$a(),d=c.aa().Fc(e),f=c.Da(oc(a)),g=c.Da(mc(a)),c=Math.abs(f[0]-g[0]),f=Math.abs(f[1]-g[1]),g=e[0],e=e[1];c<.1*g||f<.1*e||c>.75*g||f>.75*e?Un(this):cc(d,a)||(a=this.f,d=this.a.aa(),a.aa().jb(d.bb()))}Vn(this)} function Un(a){var c=a.a;a=a.f;var d=c.$a(),c=c.aa().Fc(d),d=a.$a();a=a.aa();yc(c,1/(.1*Math.pow(2,Math.log(7.5)/Math.LN2/2)));a.Ze(c,d)}function Vn(a){var c=a.a,d=a.f;if(c.f&&d.f){var e=c.$a(),f=c.aa(),g=d.aa();d.$a();var d=f.Ka(),c=a.j,h=a.j.be(),f=f.Fc(e),e=g.$(),g=lc(f),f=nc(f),k;if(a=a.a.aa().bb())k=[g[0]-a[0],g[1]-a[1]],Rb(k,d),Mb(k,a);c.qf(k);h&&(h.style.width=Math.abs((g[0]-f[0])/e)+"px",h.style.height=Math.abs((f[1]-g[1])/e)+"px")}}l.am=function(a){a.preventDefault();Wn(this)}; function Wn(a){a.element.classList.toggle("ol-collapsed");a.l?vf(a.v,a.B):vf(a.B,a.v);a.l=!a.l;var c=a.f;a.l||c.f||(c.Sc(),Un(a),bb(c,"postrender",function(){Vn(this)},a))}l.$l=function(){return this.o};l.cm=function(a){this.o!==a&&(this.o=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.l&&Wn(this))};l.bm=function(a){this.o&&this.l!==a&&Wn(this)};l.Zl=function(){return this.l};l.kk=function(){return this.f};function Xn(a){a=a?a:{};var c=void 0!==a.className?a.className:"ol-scale-line";this.o=document.createElement("DIV");this.o.className=c+"-inner";this.f=document.createElement("DIV");this.f.className=c+" ol-unselectable";this.f.appendChild(this.o);this.v=null;this.j=void 0!==a.minWidth?a.minWidth:64;this.l=!1;this.M=void 0;this.B="";Jf.call(this,{element:this.f,render:a.render?a.render:Yn,target:a.target});C(this,rb("units"),this.R,this);this.N(a.units||"metric")}y(Xn,Jf);var Zn=[1,2,5]; Xn.prototype.vb=function(){return this.get("units")};function Yn(a){(a=a.frameState)?this.v=a.viewState:this.v=null;$n(this)}Xn.prototype.R=function(){$n(this)};Xn.prototype.N=function(a){this.set("units",a)}; function $n(a){var c=a.v;if(c){var d=c.projection,e=d.Vb(),c=d.getPointResolution(c.resolution,c.center)*e,e=a.j*c,d="",f=a.vb();"degrees"==f?(d=Ec.degrees,c/=d,ee?(d="in",c/=.0254):1609.344>e?(d="ft",c/=.3048):(d="mi",c/=1609.344):"nautical"==f?(c/=1852,d="nm"):"metric"==f?1>e?(d="mm",c*=1E3):1E3>e?d="m":(d="km",c/=1E3):"us"==f&&(.9144>e?(d="in",c*=39.37):1609.344>e?(d="ft",c/=.30480061):(d="mi",c/=1609.3472));for(var f= 3*Math.floor(Math.log(a.j*c)/Math.log(10)),g;;){g=Zn[(f%3+3)%3]*Math.pow(10,Math.floor(f/3));e=Math.round(g/c);if(isNaN(e)){Cf(a.f,!1);a.l=!1;return}if(e>=a.j)break;++f}c=g+" "+d;a.B!=c&&(a.o.innerHTML=c,a.B=c);a.M!=e&&(a.o.style.width=e+"px",a.M=e);a.l||(Cf(a.f,!0),a.l=!0)}else a.l&&(Cf(a.f,!1),a.l=!1)};function ao(a){a=a?a:{};this.f=void 0;this.l=bo;this.v=[];this.M=this.j=0;this.T=null;this.ea=!1;this.Y=void 0!==a.duration?a.duration:200;var c=void 0!==a.className?a.className:"ol-zoomslider",d=pf("BUTTON",{type:"button","class":c+"-thumb ol-unselectable"}),c=pf("DIV",[c,"ol-unselectable","ol-control"],d);this.o=new Gh(c);C(this.o,qh,this.Ek,this);C(this.o,rh,this.Ig,this);C(this.o,sh,this.Jg,this);C(c,"click",this.Dk,this);C(d,"click",hb);Jf.call(this,{element:c,render:a.render?a.render:co})} y(ao,Jf);ao.prototype.fa=function(){fb(this.o);ao.ia.fa.call(this)};var bo=0;l=ao.prototype;l.setMap=function(a){ao.ia.setMap.call(this,a);a&&a.render()}; function co(a){if(a.frameState){if(!this.ea){var c=this.element,d=Af(c),e=c.firstElementChild,c=Ff(e,"margin"),f=new hf(e.offsetWidth,e.offsetHeight),e=f.width+c.right+c.left,c=f.height+c.top+c.bottom;this.T=[e,c];d.width>d.height?(this.l=1,this.M=d.width-e):(this.l=bo,this.j=d.height-c);this.ea=!0}a=a.frameState.viewState.resolution;a!==this.f&&(this.f=a,eo(this,a))}} l.Dk=function(a){var c=this.a,d=c.aa(),e=d.$();c.Va(pe({resolution:e,duration:this.Y,easing:je}));a=fo(this,Da(1===this.l?(a.offsetX-this.T[0]/2)/this.M:(a.offsetY-this.T[1]/2)/this.j,0,1));d.Qb(d.constrainResolution(a))}; l.Ek=function(a){if(!this.B&&a.b.target===this.element.firstElementChild&&(he(this.a.aa(),1),this.N=a.clientX,this.R=a.clientY,this.B=!0,0===this.v.length)){a=this.Ig;var c=this.Jg;this.v.push(C(document,"mousemove",a,this),C(document,"touchmove",a,this),C(document,rh,a,this),C(document,"mouseup",c,this),C(document,"touchend",c,this),C(document,sh,c,this))}}; l.Ig=function(a){if(this.B){var c=this.element.firstElementChild;this.f=fo(this,Da(1===this.l?(a.clientX-this.N+parseInt(c.style.left,10))/this.M:(a.clientY-this.R+parseInt(c.style.top,10))/this.j,0,1));this.a.aa().Qb(this.f);eo(this,this.f);this.N=a.clientX;this.R=a.clientY}};l.Jg=function(){if(this.B){var a=this.a,c=a.aa();he(c,-1);a.Va(pe({resolution:this.f,duration:this.Y,easing:je}));a=c.constrainResolution(this.f);c.Qb(a);this.B=!1;this.R=this.N=void 0;this.v.forEach(Xa);this.v.length=0}}; function eo(a,c){var d;d=1-fe(a.a.aa())(c);var e=a.element.firstElementChild;1==a.l?e.style.left=a.M*d+"px":e.style.top=a.j*d+"px"}function fo(a,c){return ee(a.a.aa())(1-c)};function go(a){a=a?a:{};this.f=a.extent?a.extent:null;var c=void 0!==a.className?a.className:"ol-zoom-extent",d=pf("BUTTON",{type:"button",title:void 0!==a.tipLabel?a.tipLabel:"Fit to extent"},void 0!==a.label?a.label:"E");C(d,"click",this.l,this);c=pf("DIV",c+" ol-unselectable ol-control",d);Jf.call(this,{element:c,target:a.target})}y(go,Jf);go.prototype.l=function(a){a.preventDefault();var c=this.a;a=c.aa();var d=this.f?this.f:a.i.O(),c=c.$a();a.Ze(d,c)};function ho(a){pb.call(this);a=a?a:{};this.a=null;C(this,rb("tracking"),this.El,this);this.mf(void 0!==a.tracking?a.tracking:!1)}y(ho,pb);l=ho.prototype;l.fa=function(){this.mf(!1);ho.ia.fa.call(this)}; l.Xn=function(a){if(null!==a.alpha){var c=Ha(a.alpha);this.set("alpha",c);"boolean"===typeof a.absolute&&a.absolute?this.set("heading",c):fa(a.webkitCompassHeading)&&-1!=a.webkitCompassAccuracy&&this.set("heading",Ha(a.webkitCompassHeading))}null!==a.beta&&this.set("beta",Ha(a.beta));null!==a.gamma&&this.set("gamma",Ha(a.gamma));this.u()};l.Kj=function(){return this.get("alpha")};l.Nj=function(){return this.get("beta")};l.Uj=function(){return this.get("gamma")};l.Dl=function(){return this.get("heading")}; l.Vg=function(){return this.get("tracking")};l.El=function(){if(ah){var a=this.Vg();a&&!this.a?this.a=C(qa,"deviceorientation",this.Xn,this):a||null===this.a||(Xa(this.a),this.a=null)}};l.mf=function(a){this.set("tracking",a)};function io(){this.defaultDataProjection=null}function jo(a,c,d){var e;d&&(e={dataProjection:d.dataProjection?d.dataProjection:a.Oa(c),featureProjection:d.featureProjection});return ko(a,e)}function ko(a,c){var d;c&&(d={featureProjection:c.featureProjection,dataProjection:c.dataProjection?c.dataProjection:a.defaultDataProjection,rightHanded:c.rightHanded},c.decimals&&(d.decimals=c.decimals));return d} function lo(a,c,d){var e=d?Ic(d.featureProjection):null,f=d?Ic(d.dataProjection):null,g;e&&f&&!Zc(e,f)?a instanceof dd?g=(c?a.clone():a).hb(c?e:f,c?f:e):g=cd(c?a.slice():a,c?e:f,c?f:e):g=a;if(c&&d&&d.decimals){var h=Math.pow(10,d.decimals);a=function(a){for(var c=0,d=a.length;c>1),k=+tb(h[f],d),0>k?m=f+1:(n=f,p=!k);f=p?m:~m;0>f?(d=(d-h[-f-2])/(h[-f-1]-h[-f-2]),c+=(-f-2)*e,h=La(a[c],a[c+e],d),k=La(a[c+1],a[c+e+1],d)):(h=a[c+f*e],k=a[c+f*e+1])}return g?(g[0]= h,g[1]=k,g):[h,k]}function po(a,c,d,e,f,g){if(d==c)return null;if(f>1,fa||this.i.length<=a)return null;var c=new T(null);c.ba(this.f,this.A.slice(0===a?0:this.i[a-1],this.i[a]));return c}; l.gd=function(){var a=this.A,c=this.i,d=this.f,e=[],f=0,g,h;g=0;for(h=c.length;ga||c<=a)return null;c=new D(null);c.ba(this.f,this.A.slice(a*this.a,(a+1)*this.a));return c};l.ee=function(){var a=this.A,c=this.f,d=this.a,e=[],f,g;f=0;for(g=a.length;fa||this.i.length<=a)return null;var c;0===a?c=0:(c=this.i[a-1],c=c[c.length-1]);a=this.i[a].slice();var d=a[a.length-1];if(0!==c){var e,f;e=0;for(f=a.length;ea||0!==this.o&&a2*this.g&&$p(this),!0):!1};function $p(a){if(a.g!=a.b.length){for(var c=0,d=0;cd?a[1]="?":d==c.length-1&&(a[1]=void 0)}return a.join("")}function eq(a,c,d){if("array"==ca(c))for(var e=0;ec)throw Error("Bad port number "+c);a.o=c}else a.o=null}function jq(a,c,d){c instanceof lq?(a.i=c,rq(a.i,a.c)):(d||(c=mq(c,sq)),a.i=new lq(c,0,a.c))}function tq(a){return a instanceof gq?a.clone():new gq(a,void 0)} function uq(a,c){a instanceof gq||(a=tq(a));c instanceof gq||(c=tq(c));var d=a,e=c,f=d.clone(),g=!!e.g;g?hq(f,e.g):g=!!e.l;g?f.l=e.l:g=!!e.a;g?f.a=e.a:g=null!=e.o;var h=e.b;if(g)iq(f,e.o);else if(g=!!e.b)if("/"!=h.charAt(0)&&(d.a&&!d.b?h="/"+h:(d=f.b.lastIndexOf("/"),-1!=d&&(h=f.b.substr(0,d+1)+h))),d=h,".."==d||"."==d)h="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){for(var h=0==d.lastIndexOf("/",0),d=d.split("/"),k=[],m=0;m>4&15).toString(16)+(a&15).toString(16)} var nq=/[#\/\?@]/g,pq=/[\#\?:]/g,oq=/[\#\?]/g,sq=/[\#\?@]/g,qq=/#/g;function lq(a,c,d){this.a=this.b=null;this.g=a||null;this.f=!!d}function wq(a){a.b||(a.b=new Zp,a.a=0,a.g&&cq(a.g,function(c,d){a.add(decodeURIComponent(c.replace(/\+/g," ")),d)}))}l=lq.prototype;l.rc=function(){wq(this);return this.a};l.add=function(a,c){wq(this);this.g=null;a=xq(this,a);var d=this.b.get(a);d||this.b.set(a,d=[]);d.push(c);this.a=this.a+1;return this}; l.remove=function(a){wq(this);a=xq(this,a);return aq(this.b.a,a)?(this.g=null,this.a=this.a-this.b.get(a).length,this.b.remove(a)):!1};l.clear=function(){this.b=this.g=null;this.a=0};l.Sa=function(){wq(this);return 0==this.a};function yq(a,c){wq(a);c=xq(a,c);return aq(a.b.a,c)}l.K=function(){wq(this);for(var a=this.b.uc(),c=this.b.K(),d=[],e=0;ee;++e){var f=parseInt(d[e],10).toString(16);d[e]=1==f.length?"0"+f:f}Zo(a,d.join(""))} function Er(a,c,d){a={node:a};var e=c.X(),f,g;"GeometryCollection"==e?(f=c.bf(),g=Fr):"MultiPoint"==e?(f=c.ee(),g=Gr):"MultiLineString"==e?(f=c.gd(),g=Hr):"MultiPolygon"==e&&(f=c.Qd(),g=Ir);Tl(a,Jr,g,f,d)}function Kr(a,c,d){Tl({node:a},Lr,Mr,[c],d)} function Nr(a,c,d){var e={node:a};c.Wa()&&a.setAttribute("id",c.Wa());a=c.L();var f=c.$b();f&&(f=f.call(c,0))&&(f=Array.isArray(f)?f[0]:f,this.l&&(a.Style=f),(f=f.Ea())&&(a.name=f.Ea()));f=Or[d[d.length-1].node.namespaceURI];a=Rl(a,f);Tl(e,Pr,Ql,a,d,f);a=d[0];(c=c.W())&&(c=lo(c,!0,a));Tl(e,Pr,Fr,[c],d)}function Qr(a,c,d){var e=c.ga();a={node:a};a.layout=c.f;a.stride=c.ua();Tl(a,Rr,Sr,[e],d)}function Tr(a,c,d){c=c.Pd();var e=c.shift();a={node:a};Tl(a,Ur,Vr,c,d);Tl(a,Ur,Wr,[e],d)} function Xr(a,c){$o(a,Math.round(c*c*1E6)/1E6)} var Yr=N(Dq,["Document","Placemark"]),as=N(Dq,{Document:M(function(a,c,d){Tl({node:a},Zr,$r,c,d,void 0,this)}),Placemark:M(Nr)}),Zr=N(Dq,{Placemark:M(Nr)}),bs={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},cs=N(Dq,["href"],N(Cq,["x","y","w","h"])),ds=N(Dq,{href:M(Zo)},N(Cq,{x:M($o),y:M($o),w:M($o),h:M($o)})),es=N(Dq,["scale","heading","Icon", "hotSpot"]),gs=N(Dq,{Icon:M(function(a,c,d){a={node:a};var e=cs[d[d.length-1].node.namespaceURI],f=Rl(c,e);Tl(a,ds,Ql,f,d,e);e=cs[Cq[0]];f=Rl(c,e);Tl(a,ds,fs,f,d,e)}),heading:M($o),hotSpot:M(function(a,c){a.setAttribute("x",c.x);a.setAttribute("y",c.y);a.setAttribute("xunits",c.Wf);a.setAttribute("yunits",c.Xf)}),scale:M(Xr)}),hs=N(Dq,["color","scale"]),is=N(Dq,{color:M(Dr),scale:M(Xr)}),js=N(Dq,["color","width"]),ks=N(Dq,{color:M(Dr),width:M($o)}),Lr=N(Dq,{LinearRing:M(Qr)}),Jr=N(Dq,{LineString:M(Qr), Point:M(Qr),Polygon:M(Tr),GeometryCollection:M(Er)}),Or=N(Dq,"name open visibility address phoneNumber description styleUrl Style".split(" ")),Pr=N(Dq,{MultiGeometry:M(Er),LineString:M(Qr),LinearRing:M(Qr),Point:M(Qr),Polygon:M(Tr),Style:M(function(a,c,d){a={node:a};var e={},f=c.c,g=c.f,h=c.a;c=c.Ea();h instanceof ui&&(e.IconStyle=h);c&&(e.LabelStyle=c);g&&(e.LineStyle=g);f&&(e.PolyStyle=f);c=ls[d[d.length-1].node.namespaceURI];e=Rl(e,c);Tl(a,ms,Ql,e,d,c)}),address:M(Zo),description:M(Zo),name:M(Zo), open:M(Yo),phoneNumber:M(Zo),styleUrl:M(Zo),visibility:M(Yo)}),Rr=N(Dq,{coordinates:M(function(a,c,d){d=d[d.length-1];var e=d.layout;d=d.stride;var f;"XY"==e||"XYM"==e?f=2:("XYZ"==e||"XYZM"==e)&&(f=3);var g,h=c.length,k="";if(0>1,v=-7;g=e?g-1:0;var x=e?-1:1,z=a[c+g];g+=x;e=z&(1<<-v)-1;z>>=-v;for(v+=q;0>=-v;for(v+=f;0>1,z=23===g?Math.pow(2,-24)-Math.pow(2,-77):0;q=f?0:q-1;var E=f?1:-1,B=0>c||0===c&&0>1/c?1:0;c=Math.abs(c);isNaN(c)||Infinity===c?(c=isNaN(c)?1:0,f=v):(f=Math.floor(Math.log(c)/Math.LN2),1>c*(r=Math.pow(2,-f))&&(f--,r*=2),c=1<=f+x?c+z/r:c+z*Math.pow(2,1-x),2<=c*r&&(f++,r/=2),f+x>=v?(c=0,f=v):1<=f+x?(c=(c*r-1)*Math.pow(2,g),f+=x):(c=c*Math.pow(2,x-1)*Math.pow(2,g),f=0));for(;8<=g;a[e+q]=c&255,q+=E,c/=256,g-=8);f=f<g)if(h)if(56320>g){e.push(239,191,189);h=g;continue}else g=h-55296<<10|g-56320|65536,h=null;else{56319< g||f+1===c?e.push(239,191,189):h=g;continue}else h&&(e.push(239,191,189),h=null);128>g?e.push(g):2048>g?e.push(g>>6|192,g&63|128):65536>g?e.push(g>>12|224,g>>6&63|128,g&63|128):e.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}return e}c.ha=g;var k=a("ieee754"),m,n,p;m={Vh:function(a){return(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},Vf:function(a,c){this[c]=a;this[c+1]=a>>>8;this[c+2]=a>>>16;this[c+3]=a>>>24},Nh:function(a){return(this[a]|this[a+1]<<8|this[a+2]<<16)+(this[a+3]<<24)}, Jf:function(a){return k.read(this,a,!0,23,4)},Df:function(a){return k.read(this,a,!0,52,8)},yi:function(a,c){return k.write(this,a,c,!0,23,4)},vi:function(a,c){return k.write(this,a,c,!0,52,8)},toString:function(a,c,e){var f=a="";e=Math.min(this.length,e||this.length);for(c=c||0;c=g?(a+=decodeURIComponent(f)+String.fromCharCode(g),f=""):f+="%"+g.toString(16)}return a+=decodeURIComponent(f)},write:function(a,c){for(var e=a===n?p:h(a),f=0;f>3,c,this);this.ca===g&&this.ip(f)}return c},vo:function(){var a=this.Eb.Jf(this.ca);this.ca+=4;return a},ro:function(){var a=this.Eb.Df(this.ca);this.ca+=8;return a},Aa:function(){var a=this.Eb,c,e,f,g,h;c=a[this.ca++];if(128>c)return c;c=c&127;f=a[this.ca++];if(128>f)return c|f<<7;f=(f&127)<<7;g=a[this.ca++];if(128>g)return c|f|g<<14;g=(g&127)<<14;h=a[this.ca++];if(128>h)return c|f|g|h<<21;e=a[this.ca++];c=(c|f|g|(h&127)<<21)+268435456*(e&127);if(128>e)return c;e=a[this.ca++];c+=34359738368* (e&127);if(128>e)return c;e=a[this.ca++];c+=4398046511104*(e&127);if(128>e)return c;e=a[this.ca++];c+=562949953421312*(e&127);if(128>e)return c;e=a[this.ca++];c+=72057594037927936*(e&127);if(128>e)return c;e=a[this.ca++];if(128>e)return c+0x7fffffffffffffff*(e&127);throw Error("Expected varint not more than 10 bytes");},Go:function(){var a=this.ca,c=this.Aa();if(cf?g<<7*f:g*Math.pow(2, 7*f));return-c-1},sd:function(){var a=this.Aa();return 1===a%2?(a+1)/-2:a/2},po:function(){return!!this.Aa()},Mf:function(){var a=this.Aa()+this.ca,c=this.Eb.toString("utf8",this.ca,a);this.ca=a;return c},ip:function(a){a=a&7;if(a===h.f)for(;127>3),f--,1===e||2===e)g+=a.sd(),h+=a.sd(),1===e&&(x&&v.push(x),x=[]),x.push(new k(g,h));else if(7===e)x&&x.push(x[0].clone());else throw Error("unknown command "+e);x&&v.push(x);return v};g.prototype.bbox=function(){var a=this.lc;a.ca=this.Me;for(var c=a.Aa()+a.ca,e=1,f=0,g=0,h=0,k=Infinity,x=-Infinity,z=Infinity,E=-Infinity;a.ca< c;)if(f||(f=a.Aa(),e=f&7,f=f>>3),f--,1===e||2===e)g+=a.sd(),h+=a.sd(),gx&&(x=g),hE&&(E=h);else if(7!==e)throw Error("unknown command "+e);return[k,z,x,E]}},{"point-geometry":1}],5:[function(a,c){function g(a,c){this.version=1;this.name=null;this.extent=4096;this.length=0;this.lc=a;this.Dd=[];this.Fd=[];this.Cd=[];a.Hf(h,this,c);this.length=this.Cd.length}function h(a,c,e){15===a?c.version=e.Aa():1===a?c.name=e.Mf():5===a?c.extent=e.Aa():2===a?c.Cd.push(e.ca):3===a?c.Dd.push(e.Mf()): 4===a&&c.Fd.push(k(e))}function k(a){for(var c=null,e=a.Aa()+a.ca;a.ca>3,c=1===c?a.Mf():2===c?a.vo():3===c?a.ro():4===c?a.Go():5===c?a.Aa():6===c?a.sd():7===c?a.po():null;return c}var m=a("./vectortilefeature.js");c.ha=g;g.prototype.feature=function(a){if(0>a||a>=this.Cd.length)throw Error("feature index out of bounds");this.lc.ca=this.Cd[a];a=this.lc.Aa()+this.lc.ca;return new m(this.lc,a,this.extent,this.Dd,this.Fd)}},{"./vectortilefeature.js":4}]},{},[2])(2)});$l=c.ha})();function ps(a){this.defaultDataProjection=null;a=a?a:{};this.defaultDataProjection=new Fc({code:"",units:"tile-pixels"});this.b=a.featureClass?a.featureClass:Zk;this.g=a.geometryName?a.geometryName:"geometry";this.a=a.layerName?a.layerName:"layer";this.f=a.layers?a.layers:null}y(ps,io);ps.prototype.X=function(){return"arraybuffer"}; ps.prototype.Ca=function(a,c){var d=this.f,e=new Zl(a),e=new $l.$i(e),f=[],g=this.b,h,k,m;for(m in e.layers)if(!d||-1!=d.indexOf(m)){h=e.layers[m];for(var n=0,p=h.length;nf?~(f<<1):f<<1;d="";e=0;for(f=a.length;e>=5;k+=String.fromCharCode(g+63);d+=k}return d} function nt(a,c){var d=c?c:1E5,e=[],f=0,g=0,h,k;h=0;for(k=a.length;hm?(e.push(f),g=f=0):g+=5}f=0;for(g=e.length;f>1):h>>1;f=0;for(g=e.length;f=c||"."==c||"-"==c){d.type=4;var e,c=a.b,f=!1,g=!1;do{if("."==e)f=!0;else if("e"==e||"E"==e)g=!0;e=a.a.charAt(++a.b)}while("0"<=e&&"9">=e||"."==e&&(void 0===f||!f)||!g&&("e"==e||"E"==e)||g&&("-"==e||"+"==e));a=parseFloat(a.a.substring(c,a.b--));d.value=a}else if("a"<=c&&"z">=c||"A"<=c&&"Z">=c){d.type=1;c=a.b;do e=a.a.charAt(++a.b);while("a"<=e&&"z">= e||"A"<=e&&"Z">=e);a=a.a.substring(c,a.b--).toUpperCase();d.value=a}else{if(" "==c||"\t"==c||"\r"==c||"\n"==c)return Ut(a);if(""===c)d.type=6;else throw Error("Unexpected character: "+c);}return d}function St(a){this.a=a}l=St.prototype;l.match=function(a){if(a=this.b.type==a)this.b=Ut(this.a);return a}; function Vt(a){var c=a.b;if(a.match(1)){var d=c.value;if("GEOMETRYCOLLECTION"==d){a:{if(a.match(2)){c=[];do c.push(Vt(a));while(a.match(5));if(a.match(3)){a=c;break a}}else if(Wt(a)){a=[];break a}throw Error(Xt(a));}return new Do(a)}var e=Yt[d],c=Zt[d];if(!e||!c)throw Error("Invalid geometry type: "+d);a=e.call(a);return new c(a)}throw Error(Xt(a));}l.Af=function(){if(this.match(2)){var a=$t(this);if(this.match(3))return a}else if(Wt(this))return null;throw Error(Xt(this));}; l.zf=function(){if(this.match(2)){var a=au(this);if(this.match(3))return a}else if(Wt(this))return[];throw Error(Xt(this));};l.Bf=function(){if(this.match(2)){var a=bu(this);if(this.match(3))return a}else if(Wt(this))return[];throw Error(Xt(this));};l.ao=function(){if(this.match(2)){var a;if(2==this.b.type)for(a=[this.Af()];this.match(5);)a.push(this.Af());else a=au(this);if(this.match(3))return a}else if(Wt(this))return[];throw Error(Xt(this));}; l.$n=function(){if(this.match(2)){var a=bu(this);if(this.match(3))return a}else if(Wt(this))return[];throw Error(Xt(this));};l.bo=function(){if(this.match(2)){for(var a=[this.Bf()];this.match(5);)a.push(this.Bf());if(this.match(3))return a}else if(Wt(this))return[];throw Error(Xt(this));};function $t(a){for(var c=[],d=0;2>d;++d){var e=a.b;if(a.match(4))c.push(e.value);else break}if(2==c.length)return c;throw Error(Xt(a));}function au(a){for(var c=[$t(a)];a.match(5);)c.push($t(a));return c} function bu(a){for(var c=[a.zf()];a.match(5);)c.push(a.zf());return c}function Wt(a){var c=1==a.b.type&&"EMPTY"==a.b.value;c&&(a.b=Ut(a.a));return c}function Xt(a){return"Unexpected `"+a.b.value+"` at position "+a.b.position+" in `"+a.a.a+"`"}var Zt={POINT:D,LINESTRING:T,POLYGON:F,MULTIPOINT:so,MULTILINESTRING:U,MULTIPOLYGON:to},Yt={POINT:St.prototype.Af,LINESTRING:St.prototype.zf,POLYGON:St.prototype.Bf,MULTIPOINT:St.prototype.ao,MULTILINESTRING:St.prototype.$n,MULTIPOLYGON:St.prototype.bo};function cu(){this.version=void 0}y(cu,Ss);cu.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(1==a.nodeType)return this.b(a);return null};cu.prototype.b=function(a){this.version=a.getAttribute("version").trim();return(a=P({version:this.version},du,a,[]))?a:null};function eu(a,c){return P({},fu,a,c)}function gu(a,c){return P({},hu,a,c)}function iu(a,c){var d=eu(a,c);if(d){var e=[Xo(a.getAttribute("width")),Xo(a.getAttribute("height"))];d.size=e;return d}} function ju(a,c){return P([],ku,a,c)} var lu=[null,"http://www.opengis.net/wms"],du=N(lu,{Service:K(function(a,c){return P({},mu,a,c)}),Capability:K(function(a,c){return P({},nu,a,c)})}),nu=N(lu,{Request:K(function(a,c){return P({},ou,a,c)}),Exception:K(function(a,c){return P([],pu,a,c)}),Layer:K(function(a,c){return P({},qu,a,c)})}),mu=N(lu,{Name:K(V),Title:K(V),Abstract:K(V),KeywordList:K(ju),OnlineResource:K(Rs),ContactInformation:K(function(a,c){return P({},ru,a,c)}),Fees:K(V),AccessConstraints:K(V),LayerLimit:K(Wo),MaxWidth:K(Wo), MaxHeight:K(Wo)}),ru=N(lu,{ContactPersonPrimary:K(function(a,c){return P({},su,a,c)}),ContactPosition:K(V),ContactAddress:K(function(a,c){return P({},tu,a,c)}),ContactVoiceTelephone:K(V),ContactFacsimileTelephone:K(V),ContactElectronicMailAddress:K(V)}),su=N(lu,{ContactPerson:K(V),ContactOrganization:K(V)}),tu=N(lu,{AddressType:K(V),Address:K(V),City:K(V),StateOrProvince:K(V),PostCode:K(V),Country:K(V)}),pu=N(lu,{Format:Kl(V)}),qu=N(lu,{Name:K(V),Title:K(V),Abstract:K(V),KeywordList:K(ju),CRS:Ml(V), EX_GeographicBoundingBox:K(function(a,c){var d=P({},uu,a,c);if(d){var e=d.westBoundLongitude,f=d.southBoundLatitude,g=d.eastBoundLongitude,d=d.northBoundLatitude;return void 0===e||void 0===f||void 0===g||void 0===d?void 0:[e,f,g,d]}}),BoundingBox:Ml(function(a){var c=[Vo(a.getAttribute("minx")),Vo(a.getAttribute("miny")),Vo(a.getAttribute("maxx")),Vo(a.getAttribute("maxy"))],d=[Vo(a.getAttribute("resx")),Vo(a.getAttribute("resy"))];return{crs:a.getAttribute("CRS"),extent:c,res:d}}),Dimension:Ml(function(a){return{name:a.getAttribute("name"), units:a.getAttribute("units"),unitSymbol:a.getAttribute("unitSymbol"),"default":a.getAttribute("default"),multipleValues:So(a.getAttribute("multipleValues")),nearestValue:So(a.getAttribute("nearestValue")),current:So(a.getAttribute("current")),values:V(a)}}),Attribution:K(function(a,c){return P({},vu,a,c)}),AuthorityURL:Ml(function(a,c){var d=eu(a,c);if(d)return d.name=a.getAttribute("name"),d}),Identifier:Ml(V),MetadataURL:Ml(function(a,c){var d=eu(a,c);if(d)return d.type=a.getAttribute("type"), d}),DataURL:Ml(eu),FeatureListURL:Ml(eu),Style:Ml(function(a,c){return P({},wu,a,c)}),MinScaleDenominator:K(Uo),MaxScaleDenominator:K(Uo),Layer:Ml(function(a,c){var d=c[c.length-1],e=P({},qu,a,c);if(e){var f=So(a.getAttribute("queryable"));void 0===f&&(f=d.queryable);e.queryable=void 0!==f?f:!1;f=Xo(a.getAttribute("cascaded"));void 0===f&&(f=d.cascaded);e.cascaded=f;f=So(a.getAttribute("opaque"));void 0===f&&(f=d.opaque);e.opaque=void 0!==f?f:!1;f=So(a.getAttribute("noSubsets"));void 0===f&&(f=d.noSubsets); e.noSubsets=void 0!==f?f:!1;(f=Vo(a.getAttribute("fixedWidth")))||(f=d.fixedWidth);e.fixedWidth=f;(f=Vo(a.getAttribute("fixedHeight")))||(f=d.fixedHeight);e.fixedHeight=f;["Style","CRS","AuthorityURL"].forEach(function(a){a in d&&(e[a]=(e[a]||[]).concat(d[a]))});"EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" ").forEach(function(a){a in e||(e[a]=d[a])});return e}})}),vu=N(lu,{Title:K(V),OnlineResource:K(Rs),LogoURL:K(iu)}),uu=N(lu,{westBoundLongitude:K(Uo), eastBoundLongitude:K(Uo),southBoundLatitude:K(Uo),northBoundLatitude:K(Uo)}),ou=N(lu,{GetCapabilities:K(gu),GetMap:K(gu),GetFeatureInfo:K(gu)}),hu=N(lu,{Format:Ml(V),DCPType:Ml(function(a,c){return P({},xu,a,c)})}),xu=N(lu,{HTTP:K(function(a,c){return P({},yu,a,c)})}),yu=N(lu,{Get:K(eu),Post:K(eu)}),wu=N(lu,{Name:K(V),Title:K(V),Abstract:K(V),LegendURL:Ml(iu),StyleSheetURL:K(eu),StyleURL:K(eu)}),fu=N(lu,{Format:K(V),OnlineResource:K(Rs)}),ku=N(lu,{Keyword:Kl(V)});function zu(a){a=a?a:{};this.g="http://mapserver.gis.umn.edu/mapserver";this.b=new bp;this.c=a.layers?a.layers:null;Mo.call(this)}y(zu,Mo); zu.prototype.gc=function(a,c){var d={};c&&Pa(d,jo(this,a,c));var e=[d];a.setAttribute("namespaceURI",this.g);var f=a.localName,d=[];if(0!==a.childNodes.length){if("msGMLOutput"==f)for(var g=0,h=a.childNodes.length;g=c[0]||a[1]<=c[1]&&a[3]>=c[1]?!0:kc(a,this.og,this)):!1}; l.dm=function(a){var c=this.a,d=this.A[c]-this.A[0],e=a.slice();e[c]=e[0]+d;for(d=1;dg[2])&&(k*=Math.ceil((g[0]-d)/k),e=[e[0]+ k,e[1],e[2]+k,e[3]]);d=this.s[0];g=this.s[1];k=-1;n=Math.pow(this.ya*h,2);q=[];r=[];h=0;for(m=Vu.length;ha.Ra:a.c===pv&&(e=a.a[0].length>a.Ra,f=[a.a[0][0],a.a[0][a.a[0].length-2]]);if(e)for(var e=c.map,g=0,h=f.length;ga.xa,a.N(g,e);else if(a.c===pv){g=a.a[0];g.push(d.slice());if(f=g.length>a.xa)a.s=g[0];a.N(a.a,e)}yv(a);f&&a.dd()}l.Ko=function(){var a=this.j.W(),c,d;this.c===rv?(c=this.a,c.splice(-2,1),this.N(c,a)):this.c===pv&&(c=this.a[0],c.splice(-2,1),d=this.B.W(),d.ma(c),this.N(this.a,a));0===c.length&&(this.s=null);yv(this)}; l.dd=function(){var a=zv(this),c=this.a,d=a.W();this.c===rv?(c.pop(),this.N(c,d)):this.c===pv&&(c[0].pop(),c[0].push(c[0][0]),this.N(c,d));"MultiPoint"===this.Y?a.Ta(new so([c])):"MultiLineString"===this.Y?a.Ta(new U([c])):"MultiPolygon"===this.Y&&a.Ta(new to([c]));this.b(new jv("drawend",a));this.pb&&this.pb.push(a);this.Cc&&this.Cc.qb(a)};function zv(a){a.s=null;var c=a.j;c&&(a.j=null,a.R=null,a.B=null,a.na.da().clear(!0));return c} l.lm=function(a){var c=a.W();this.j=a;this.a=c.Z();a=this.a[this.a.length-1];this.s=a.slice();this.a.push(a.slice());yv(this);this.b(new jv("drawstart",this.j))};l.Bc=Bc;function yv(a){var c=[];a.j&&c.push(a.j);a.B&&c.push(a.B);a.R&&c.push(a.R);a=a.na.da();a.clear(!0);a.Ec(c)}l.ti=function(){var a=this.v,c=this.f();a&&c||zv(this);this.na.setMap(c?a:null)}; function ov(a){var c;"Point"===a||"MultiPoint"===a?c=qv:"LineString"===a||"MultiLineString"===a?c=rv:"Polygon"===a||"MultiPolygon"===a?c=pv:"Circle"===a&&(c=wv);return c}var qv="Point",rv="LineString",pv="Polygon",wv="Circle";function Av(a,c,d){gb.call(this,a);this.features=c;this.mapBrowserPointerEvent=d}y(Av,gb); function Bv(a){aj.call(this,{handleDownEvent:Cv,handleDragEvent:Dv,handleEvent:Ev,handleUpEvent:Fv});this.Db=a.condition?a.condition:$i;this.Ra=function(a){return Wi(a)&&Vi(a)};this.pb=a.deleteCondition?a.deleteCondition:this.Ra;this.xa=this.c=null;this.na=[0,0];this.N=this.T=!1;this.a=new bm;this.R=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.s=this.ta=!1;this.j=[];this.S=new H({source:new Q({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.style?a.style:Gv(),updateWhileAnimating:!0,updateWhileInteracting:!0}); this.wa={Point:this.sm,LineString:this.fh,LinearRing:this.fh,Polygon:this.tm,MultiPoint:this.qm,MultiLineString:this.pm,MultiPolygon:this.rm,GeometryCollection:this.om};this.B=a.features;this.B.forEach(this.tf,this);C(this.B,"add",this.mm,this);C(this.B,"remove",this.nm,this);this.Y=null}y(Bv,aj);l=Bv.prototype;l.tf=function(a){var c=a.W();c.X()in this.wa&&this.wa[c.X()].call(this,a,c);(c=this.v)&&Hv(this,this.na,c);C(a,"change",this.eh,this)}; function Iv(a,c){a.N||(a.N=!0,a.b(new Av("modifystart",a.B,c)))}function Jv(a,c){Kv(a,c);a.c&&0===a.B.Zb()&&(a.S.da().kb(a.c),a.c=null);cb(c,"change",a.eh,a)}function Kv(a,c){var d=a.a,e=[];d.forEach(function(a){c===a.feature&&e.push(a)});for(var f=e.length-1;0<=f;--f)d.remove(e[f])}l.setMap=function(a){this.S.setMap(a);Bv.ia.setMap.call(this,a)};l.mm=function(a){this.tf(a.element)};l.eh=function(a){this.s||(a=a.target,Jv(this,a),this.tf(a))};l.nm=function(a){Jv(this,a.element)}; l.sm=function(a,c){var d=c.Z(),d={feature:a,geometry:c,la:[d,d]};this.a.za(c.O(),d)};l.qm=function(a,c){var d=c.Z(),e,f,g;f=0;for(g=d.length;fd?h[1]:h[0]);Lv(a,k);d={};d[w(h)]=!0;c=1;for(m=g.length;ck&&(k=0);d=n.geometry;e=f=d.Z();q=!1;switch(d.X()){case "MultiLineString":2d&&(a.index+=f)})}function Gv(){var a=ok();return function(){return a.Point}};function Ov(a,c,d,e){gb.call(this,a);this.selected=c;this.deselected=d;this.mapBrowserEvent=e}y(Ov,gb); function Pv(a){Mi.call(this,{handleEvent:Qv});var c=a?a:{};this.M=c.condition?c.condition:Vi;this.B=c.addCondition?c.addCondition:Bc;this.N=c.removeCondition?c.removeCondition:Bc;this.R=c.toggleCondition?c.toggleCondition:Xi;this.j=c.multi?c.multi:!1;this.o=c.filter?c.filter:Ac;this.c=new H({source:new Q({useSpatialIndex:!1,features:c.features,wrapX:c.wrapX}),style:c.style?c.style:Rv(),updateWhileAnimating:!0,updateWhileInteracting:!0});if(c.layers)if(ga(c.layers))a=function(a){return c.layers(a)}; else{var d=c.layers;a=function(a){return ub(d,a)}}else a=Ac;this.s=a;this.a={};a=this.c.da().c;C(a,"add",this.um,this);C(a,"remove",this.xm,this)}y(Pv,Mi);l=Pv.prototype;l.vm=function(){return this.c.da().c};l.wm=function(a){a=w(a);return this.a[a]}; function Qv(a){if(!this.M(a))return!0;var c=this.B(a),d=this.N(a),e=this.R(a),f=!c&&!d&&!e,g=a.map,h=this.c.da().c,k=[],m=[],n=!1;if(f)Qa(this.a),g.ed(a.pixel,function(a,c){if(this.o(a,c)){m.push(a);var d=w(a);this.a[d]=c;return!this.j}},this,this.s),0d?h[1]:h[0],g=c.Da(m)}else this.T&&(m=Nb(e,h),g=c.Da(m),Math.sqrt(Sb(d,g))<=this.c&&(f=!0,this.na&&(e=c.Da(h[0]),k=c.Da(h[1]),e=Sb(g,e),d=Sb(g,k),k=Math.sqrt(Math.min(e, d)),k=k<=this.c)))&&(m=e>d?h[1]:h[0],g=c.Da(m));f&&(g=[Math.round(g[0]),Math.round(g[1])])}c=m;d=g;f&&(a.coordinate=c.slice(0,2),a.pixel=d);return bj.call(this,a)}function Uv(){var a=Ra(this.B);a.length&&(a.forEach(this.si,this),this.B={});return!1}function Vv(a,c){return Tb(this.S,a.la)-Tb(this.S,c.la)};function Wv(a,c,d){gb.call(this,a);this.features=c;this.coordinate=d}y(Wv,gb);function Xv(a){aj.call(this,{handleDownEvent:Yv,handleDragEvent:Zv,handleMoveEvent:$v,handleUpEvent:aw});this.s=void 0;this.a=null;this.c=void 0!==a.features?a.features:null;var c;if(a.layers)if(ga(a.layers))c=function(c){return a.layers(c)};else{var d=a.layers;c=function(a){return ub(d,a)}}else c=Ac;this.B=c;this.j=null}y(Xv,aj); function Yv(a){this.j=bw(this,a.pixel,a.map);return!this.a&&this.j?(this.a=a.coordinate,$v.call(this,a),this.b(new Wv("translatestart",this.c,a.coordinate)),!0):!1}function aw(a){return this.a?(this.a=null,$v.call(this,a),this.b(new Wv("translateend",this.c,a.coordinate)),!0):!1} function Zv(a){if(this.a){a=a.coordinate;var c=a[0]-this.a[0],d=a[1]-this.a[1];if(this.c)this.c.forEach(function(a){var e=a.W();e.Nc(c,d);a.Ta(e)});else if(this.j){var e=this.j.W();e.Nc(c,d);this.j.Ta(e)}this.a=a;this.b(new Wv("translating",this.c,a))}} function $v(a){var c=a.map.tc();if(a=a.map.ed(a.pixel,function(a){return a})){var d=!1;this.c&&ub(this.c.a,a)&&(d=!0);this.s=c.style.cursor;c.style.cursor=this.a?"-webkit-grabbing":d?"-webkit-grab":"pointer";c.style.cursor=this.a?d?"grab":"pointer":"grabbing"}else c.style.cursor=void 0!==this.s?this.s:"",this.s=void 0}function bw(a,c,d){var e=null;c=d.ed(c,function(a){return a},a,a.B);a.c&&ub(a.c.a,c)&&(e=c);return e};function W(a){a=a?a:{};var c=Pa({},a);delete c.gradient;delete c.radius;delete c.blur;delete c.shadow;delete c.weight;H.call(this,c);this.f=null;this.ea=void 0!==a.shadow?a.shadow:250;this.Y=void 0;this.c=null;C(this,rb("gradient"),this.Hk,this);this.di(a.gradient?a.gradient:cw);this.Zh(void 0!==a.blur?a.blur:15);this.lh(void 0!==a.radius?a.radius:8);C(this,rb("blur"),this.gf,this);C(this,rb("radius"),this.gf,this);this.gf();var d=a.weight?a.weight:"weight",e;"string"===typeof d?e=function(a){return a.get(d)}: e=d;this.l(function(a){a=e(a);a=void 0!==a?Da(a,0,1):1;var c=255*a|0,d=this.c[c];d||(d=[new jk({image:new ui({opacity:a,src:this.Y})})],this.c[c]=d);return d}.bind(this));this.set("renderOrder",null);C(this,"render",this.$k,this)}y(W,H);var cw=["#00f","#0ff","#0f0","#ff0","#f00"];l=W.prototype;l.ug=function(){return this.get("blur")};l.Bg=function(){return this.get("gradient")};l.kh=function(){return this.get("radius")}; l.Hk=function(){for(var a=this.Bg(),c=Mg(1,256),d=c.createLinearGradient(0,0,1,256),e=1/(a.length-1),f=0,g=a.length;f=e)this.state=4;else if(this.B=new ml(a,d,g,f,e*(void 0!==n?n:.5)),0===this.B.f.length)this.state=4;else if(this.s=gg(c,e),d=pl(this.B),f&&(a.a?(d[1]=Da(d[1], f[1],f[3]),d[3]=Da(d[3],f[1],f[3])):d=vc(d,f)),pc(d))if(a=bg(c,d,this.s),100>(a.a-a.b+1)*(a.f-a.g+1)){for(c=a.b;c<=a.a;c++)for(d=a.g;d<=a.f;d++)(n=m(this.s,c,d,h))&&this.g.push(n);0===this.g.length&&(this.state=4)}else this.state=3;else this.state=4}y(ew,Qf);ew.prototype.fa=function(){1==this.state&&(this.Rc.forEach(Xa),this.Rc=null);ew.ia.fa.call(this)}; ew.prototype.ab=function(a){if(void 0!==a){var c=w(a);if(c in this.c)return this.c[c];a=Sa(this.c)?this.l:this.l.cloneNode(!1);return this.c[c]=a}return this.l}; ew.prototype.ud=function(){var a=[];this.g.forEach(function(c){c&&2==c.V()&&a.push({extent:this.j.Ba(c.ja),image:c.ab()})},this);this.g.length=0;if(0===a.length)this.state=3;else{var c=this.U[0],d=this.v.Ha(c),e=fa(d)?d:d[0],d=fa(d)?d:d[1],c=this.v.$(c),f=this.j.$(this.s),g=this.v.Ba(this.U);this.l=ll(e,d,this.N,f,this.j.O(),c,g,this.B,a,this.M,this.R);this.state=2}Rf(this)}; ew.prototype.load=function(){if(0==this.state){this.state=1;Rf(this);var a=0;this.Rc=[];this.g.forEach(function(c){var d=c.V();if(0==d||1==d){a++;var e;e=C(c,"change",function(){var d=c.V();if(2==d||3==d||4==d)Xa(e),a--,0===a&&(this.Rc.forEach(Xa),this.Rc=null,this.ud())},this);this.Rc.push(e)}},this);this.g.forEach(function(a){0==a.V()&&a.load()});0===a&&qa.setTimeout(this.ud.bind(this),0)}};function X(a){zm.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:fw,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:Zu;this.i={};this.s={};this.na=a.reprojectionErrorThreshold; this.M=!1}y(X,zm);l=X.prototype;l.vh=function(){if(Pf(this.a))return!0;for(var a in this.i)if(Pf(this.i[a]))return!0;return!1};l.Gc=function(a,c){var d=this.jd(a);this.a.Gc(this.a==d?c:{});for(var e in this.i){var f=this.i[e];f.Gc(f==d?c:{})}};l.Od=function(a){return this.f&&a&&!Zc(this.f,a)?0:this.cf()};l.cf=function(){return 0};l.ef=function(a){return this.f&&a&&!Zc(this.f,a)?!1:X.ia.ef.call(this,a)}; l.fb=function(a){var c=this.f;return!this.tileGrid||c&&!Zc(c,a)?(c=w(a).toString(),c in this.s||(this.s[c]=hg(a)),this.s[c]):this.tileGrid};l.jd=function(a){var c=this.f;if(!c||Zc(c,a))return this.a;a=w(a).toString();a in this.i||(this.i[a]=new Of);return this.i[a]};function gw(a,c,d,e,f,g,h){c=[c,d,e];f=(d=og(a,c,g))?a.tileUrlFunction(d,f,g):void 0;f=new a.tileClass(c,void 0!==f?0:4,void 0!==f?f:"",a.crossOrigin,a.tileLoadFunction);f.key=h;C(f,"change",a.wh,a);return f} l.Wb=function(a,c,d,e,f){if(this.f&&f&&!Zc(this.f,f)){var g=this.jd(f);c=[a,c,d];a=this.Ab.apply(this,c);if(Lf(g,a))return g.get(a);var h=this.f;d=this.fb(h);var k=this.fb(f),m=og(this,c,f);e=new ew(h,d,f,k,c,m,this.Xb(e),this.cf(),function(a,c,d,e){return hw(this,a,c,d,e,h)}.bind(this),this.na,this.M);g.set(a,e);return e}return hw(this,a,c,d,e,f)}; function hw(a,c,d,e,f,g){var h=null,k=a.Ab(c,d,e),m=a.Yb;if(Lf(a.a,k)){if(h=a.a.get(k),h.key!=m){var n=h;h.a&&h.a.key==m?(h=h.a,2==n.V()&&(h.a=n)):(h=gw(a,c,d,e,f,g,m),2==n.V()?h.a=n:n.a&&2==n.a.V()&&(h.a=n.a,n.a=null));h.a&&(h.a.a=null);a.a.replace(k,h)}}else h=gw(a,c,d,e,f,g,m),a.a.set(k,h);return h}l.lb=function(a){if(this.M!=a){this.M=a;for(var c in this.i)this.i[c].clear();this.u()}};l.mb=function(a,c){var d=Ic(a);d&&(d=w(d).toString(),d in this.s||(this.s[d]=c))}; function fw(a,c){a.ab().src=c};function iw(a){X.call(this,{cacheSize:a.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Ic("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.j=void 0!==a.culture?a.culture:"en-us";this.c=void 0!==a.maxZoom?a.maxZoom:-1;dw("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+a.imagerySet+"?uriScheme=https&include=ImageryProviders&key="+a.key,this.v.bind(this),void 0,"jsonp")} y(iw,X);var jw=new ue({html:'Terms of Use'}); iw.prototype.v=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)Xf(this,"error");else{var c=a.brandLogoUri;-1==c.indexOf("https")&&(c=c.replace("http","https"));var d=a.resourceSets[0].resources[0],e=-1==this.c?d.zoomMax:this.c;a=ig(this.f);var f=kg({extent:a,minZoom:d.zoomMin,maxZoom:e,tileSize:d.imageWidth==d.imageHeight?d.imageWidth:[d.imageWidth,d.imageHeight]});this.tileGrid= f;var g=this.j;this.tileUrlFunction=wm(d.imageUrlSubdomains.map(function(a){var c=[0,0,0],e=d.imageUrl.replace("{subdomain}",a).replace("{culture}",g);return function(a){if(a)return Mf(a[0],a[1],-a[2]-1,c),e.replace("{quadkey}",Nf(c))}}));if(d.imageryProviders){var h=Lc(Ic("EPSG:4326"),this.f);a=d.imageryProviders.map(function(a){var c=a.attribution,d={};a.coverageAreas.forEach(function(a){var c=a.zoomMin,g=Math.min(a.zoomMax,e);a=a.bbox;a=zc([a[1],a[0],a[3],a[2]],h);var k,m;for(k=c;k<=g;++k)m=k.toString(), c=bg(f,a,k),m in d?d[m].push(c):d[m]=[c]});return new ue({html:c,tileRanges:d})});a.push(jw);this.ka(a)}this.R=c;Xf(this,"ready")}};function kw(a){a=a||{};var c=void 0!==a.projection?a.projection:"EPSG:3857",d=void 0!==a.tileGrid?a.tileGrid:kg({extent:ig(c),maxZoom:a.maxZoom,minZoom:a.minZoom,tileSize:a.tileSize});X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:a.opaque,projection:c,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:d,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls, wrapX:void 0!==a.wrapX?a.wrapX:!0})}y(kw,X);function lw(a){this.v=a.account;this.B=a.map||"";this.c=a.config||{};this.j={};kw.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});mw(this)}y(lw,kw);l=lw.prototype;l.Pj=function(){return this.c};l.op=function(a){Pa(this.c,a);mw(this)};l.Uo=function(a){this.c=a||{};mw(this)}; function mw(a){var c=JSON.stringify(a.c);if(a.j[c])nw(a,a.j[c]);else{var d="https://"+a.v+".cartodb.com/api/v1/map";a.B&&(d+="/named/"+a.B);var e=new XMLHttpRequest;e.addEventListener("load",a.Jk.bind(a,c));e.addEventListener("error",a.Ik.bind(a));e.open("POST",d);e.setRequestHeader("Content-type","application/json");e.send(JSON.stringify(a.c))}} l.Jk=function(a,c){var d=c.target;if(200<=d.status&&300>d.status){var e;try{e=JSON.parse(d.responseText)}catch(f){Xf(this,"error");return}nw(this,e);this.j[a]=e;Xf(this,"ready")}else Xf(this,"error")};l.Ik=function(){Xf(this,"error")};function nw(a,c){a.Na("https://"+c.cdn_url.https+"/"+a.v+"/api/v1/map/"+c.layergroupid+"/{z}/{x}/{y}.png")};function Y(a){Q.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,wrapX:a.wrapX});this.M=void 0;this.ta=void 0!==a.distance?a.distance:20;this.B=[];this.ea=a.geometryFunction||function(a){return a.W()};this.v=a.source;this.v.D("change",Y.prototype.Ra,this)}y(Y,Q);Y.prototype.xa=function(){return this.v};Y.prototype.Kc=function(a,c,d){this.v.Kc(a,c,d);c!==this.M&&(this.clear(),this.M=c,ow(this),this.Ec(this.B))}; Y.prototype.Ra=function(){this.clear();ow(this);this.Ec(this.B);this.u()};function ow(a){if(void 0!==a.M){a.B.length=0;for(var c=Wb(),d=a.ta*a.M,e=a.v.je(),f={},g=0,h=e.length;gn*m?k*h/(n*q):m*h/(p*q),SETVIEWCENTERX:g[0],SETVIEWCENTERY:g[1]};Pa(f,this.j);e=dq(fq([e],f));e=new Yu(a,c,d,this.l,e,this.Y,this.c);C(e,"change",this.o,this)}else e=null;this.i=e;this.S=this.g;return e};l.Rm=function(){return this.c};l.Um=function(a){Pa(this.j,a);this.u()};l.Tm=function(a){this.i=null;this.c=a;this.u()};function sw(a){var c=a.imageExtent,d=void 0!==a.crossOrigin?a.crossOrigin:null,e=void 0!==a.imageLoadFunction?a.imageLoadFunction:xl;rl.call(this,{attributions:a.attributions,logo:a.logo,projection:Ic(a.projection)});this.c=new Yu(c,void 0,1,this.l,a.url,d,e);this.i=a.imageSize?a.imageSize:null;C(this.c,"change",this.o,this)}y(sw,rl);sw.prototype.Hc=function(a){return wc(a,this.c.O())?this.c:null}; sw.prototype.o=function(a){if(2==this.c.V()){var c=this.c.O(),d=this.c.a(),e,f;this.i?(e=this.i[0],f=this.i[1]):(e=d.width,f=d.height);c=Math.ceil(rc(c)/(sc(c)/f));if(c!=e){var c=Mg(c,f),g=c.canvas;c.drawImage(d,0,0,e,f,0,0,g.width,g.height);this.c.g=g}}sw.ia.o.call(this,a)};function tw(a){a=a||{};rl.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.ta=void 0!==a.crossOrigin?a.crossOrigin:null;this.j=a.url;this.S=void 0!==a.imageLoadFunction?a.imageLoadFunction:xl;this.i=a.params||{};this.v=!0;uw(this);this.ea=a.serverType;this.xa=void 0!==a.hidpi?a.hidpi:!0;this.c=null;this.T=[0,0];this.Y=0;this.s=void 0!==a.ratio?a.ratio:1.5}y(tw,rl);var vw=[101,101];l=tw.prototype; l.$m=function(a,c,d,e){if(void 0!==this.j){var f=uc(a,c,0,vw),g={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.i.LAYERS};Pa(g,this.i,e);e=Math.floor((f[3]-a[1])/c);g[this.v?"I":"X"]=Math.floor((a[0]-f[0])/c);g[this.v?"J":"Y"]=e;return ww(this,f,vw,1,Ic(d),g)}};l.bn=function(){return this.i}; l.Hc=function(a,c,d,e){if(void 0===this.j)return null;c=sl(this,c);1==d||this.xa&&void 0!==this.ea||(d=1);a=a.slice();var f=(a[0]+a[2])/2,g=(a[1]+a[3])/2,h=c/d,k=rc(a)/h,h=sc(a)/h,m=this.c;if(m&&this.Y==this.g&&m.$()==c&&m.f==d&&cc(m.O(),a))return m;if(1!=this.s){var m=this.s*rc(a)/2,n=this.s*sc(a)/2;a[0]=f-m;a[1]=g-n;a[2]=f+m;a[3]=g+n}f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Pa(f,this.i);this.T[0]=Math.ceil(k*this.s);this.T[1]=Math.ceil(h*this.s);e=ww(this, a,this.T,d,e,f);this.c=new Yu(a,c,d,this.l,e,this.ta,this.S);this.Y=this.g;C(this.c,"change",this.o,this);return this.c};l.an=function(){return this.S}; function ww(a,c,d,e,f,g){g[a.v?"CRS":"SRS"]=f.eb;"STYLES"in a.i||(g.STYLES="");if(1!=e)switch(a.ea){case "geoserver":e=90*e+.5|0;g.FORMAT_OPTIONS="FORMAT_OPTIONS"in g?g.FORMAT_OPTIONS+(";dpi:"+e):"dpi:"+e;break;case "mapserver":g.MAP_RESOLUTION=90*e;break;case "carmentaserver":case "qgis":g.DPI=90*e}g.WIDTH=d[0];g.HEIGHT=d[1];d=f.b;var h;a.v&&"ne"==d.substr(0,2)?h=[c[1],c[0],c[3],c[2]]:h=c;g.BBOX=h.join(",");return dq(fq([a.j],g))}l.cn=function(){return this.j}; l.dn=function(a){this.c=null;this.S=a;this.u()};l.en=function(a){a!=this.j&&(this.j=a,this.c=null,this.u())};l.fn=function(a){Pa(this.i,a);uw(this);this.c=null;this.u()};function uw(a){a.v=0<=Lb(a.i.VERSION||"1.3.0")};function xw(a){a=a||{};var c;void 0!==a.attributions?c=a.attributions:c=[yw];kw.call(this,{attributions:c,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})}y(xw,kw);var yw=new ue({html:'© OpenStreetMap contributors.'});function zw(a){a=a||{};var c=Aw[a.layer];this.c=a.layer;kw.call(this,{attributions:c.attributions,cacheSize:a.cacheSize,crossOrigin:"anonymous",logo:"https://developer.mapquest.com/content/osm/mq_logo.png",maxZoom:c.maxZoom,reprojectionErrorThreshold:a.reprojectionErrorThreshold,opaque:c.opaque,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://otile{1-4}-s.mqcdn.com/tiles/1.0.0/"+this.c+"/{z}/{x}/{y}.jpg"})}y(zw,kw); var Bw=new ue({html:'Tiles Courtesy of MapQuest'}),Aw={osm:{maxZoom:19,opaque:!0,attributions:[Bw,yw]},sat:{maxZoom:18,opaque:!0,attributions:[Bw,new ue({html:"Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"})]},hyb:{maxZoom:18,opaque:!1,attributions:[Bw,yw]}};zw.prototype.j=function(){return this.c};(function(){var a={},c={ha:a};(function(d){if("object"===typeof a&&"undefined"!==typeof c)c.ha=d();else{var e;"undefined"!==typeof window?e=window:"undefined"!==typeof global?e=global:"undefined"!==typeof self?e=self:e=this;e.Np=d()}})(function(){return function e(a,c,h){function k(n,q){if(!c[n]){if(!a[n]){var r="function"==typeof require&&require;if(!q&&r)return r(n,!0);if(m)return m(n,!0);r=Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r;}r=c[n]={ha:{}};a[n][0].call(r.ha,function(c){var e= a[n][1][c];return k(e?e:c)},r,r.ha,e,a,c,h)}return c[n].ha}for(var m="function"==typeof require&&require,n=0;nthis.jj;)this.Vc.shift().mg(null,null)};m.prototype.bg=function(){if(0===this.Ed&&0Stamen Design, under CC BY 3.0.'}),yw];function Ow(a){a=a||{};X.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.j=Wb()}y(Ow,X);Ow.prototype.v=function(){return this.c};Ow.prototype.Xb=function(a){return a}; Ow.prototype.qc=function(a,c,d){var e=this.tileGrid;e||(e=this.fb(d));if(!(e.b.length<=a[0])){var f=e.Ba(a,this.j),g=Uf(e.Ha(a[0]),this.o);1!=c&&(g=Tf(g,c,this.o));e={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Pa(e,this.c);var h=this.urls;h?(d=d.eb.split(":").pop(),e.SIZE=g[0]+","+g[1],e.BBOX=f.join(","),e.BBOXSR=d,e.IMAGESR=d,e.DPI=Math.round(e.DPI?e.DPI*c:90*c),a=(1==h.length?h[0]:h[Ja((a[1]<a.status){var c;try{c=JSON.parse(a.responseText)}catch(d){this.he();return}this.th(c)}else this.he()};l.gn=function(){this.he()};l.wk=function(){return this.c}; l.th=function(a){var c=Ic("EPSG:4326"),d=this.f,e;void 0!==a.bounds&&(e=zc(a.bounds,Lc(c,d)));var f=a.minzoom||0,g=a.maxzoom||22;this.tileGrid=d=kg({extent:ig(d),maxZoom:g,minZoom:f});this.tileUrlFunction=vm(a.tiles,d);if(void 0!==a.attribution&&!this.l){c=void 0!==e?e:c.O();e={};for(var h;f<=g;++f)h=f.toString(),e[h]=[bg(d,c,f)];this.ka([new ue({html:a.attribution,tileRanges:e})])}this.c=a;Xf(this,"ready")};l.he=function(){Xf(this,"error")};function Sw(a){lg.call(this,{projection:Ic("EPSG:3857"),state:"loading"});this.s=void 0!==a.preemptive?a.preemptive:!0;this.j=xm;this.i=void 0;this.c=a.jsonp||!1;if(a.url)if(this.c)dw(a.url,this.xf.bind(this),this.ie.bind(this));else{var c=new XMLHttpRequest;c.addEventListener("load",this.mn.bind(this));c.addEventListener("error",this.ln.bind(this));c.open("GET",a.url);c.send()}else a.tileJSON&&this.xf(a.tileJSON)}y(Sw,lg);l=Sw.prototype; l.mn=function(a){a=a.target;if(200<=a.status&&300>a.status){var c;try{c=JSON.parse(a.responseText)}catch(d){this.ie();return}this.xf(c)}else this.ie()};l.ln=function(){this.ie()};l.tk=function(){return this.i};l.Ej=function(a,c,d,e,f){this.tileGrid?(c=this.tileGrid.Td(a,c),Tw(this.Wb(c[0],c[1],c[2],1,this.f),a,d,e,f)):!0===f?Fg(function(){d.call(e,null)}):d.call(e,null)};l.ie=function(){Xf(this,"error")}; l.xf=function(a){var c=Ic("EPSG:4326"),d=this.f,e;void 0!==a.bounds&&(e=zc(a.bounds,Lc(c,d)));var f=a.minzoom||0,g=a.maxzoom||22;this.tileGrid=d=kg({extent:ig(d),maxZoom:g,minZoom:f});this.i=a.template;var h=a.grids;if(h){this.j=vm(h,d);if(void 0!==a.attribution){c=void 0!==e?e:c.O();for(e={};f<=g;++f)h=f.toString(),e[h]=[bg(d,c,f)];this.ka([new ue({html:a.attribution,tileRanges:e})])}Xf(this,"ready")}else Xf(this,"error")}; l.Wb=function(a,c,d,e,f){var g=this.Ab(a,c,d);if(Lf(this.a,g))return this.a.get(g);a=[a,c,d];c=og(this,a,f);e=this.j(c,e,f);e=new Uw(a,void 0!==e?0:4,void 0!==e?e:"",this.tileGrid.Ba(a),this.s,this.c);this.a.set(g,e);return e};l.Uf=function(a,c,d){a=this.Ab(a,c,d);Lf(this.a,a)&&this.a.get(a)};function Uw(a,c,d,e,f,g){Qf.call(this,a,c);this.s=d;this.g=e;this.U=f;this.c=this.j=this.l=null;this.v=g}y(Uw,Qf);l=Uw.prototype;l.ab=function(){return null}; l.getData=function(a){if(!this.l||!this.j)return null;var c=this.l[Math.floor((1-(a[1]-this.g[1])/(this.g[3]-this.g[1]))*this.l.length)];if("string"!==typeof c)return null;c=c.charCodeAt(Math.floor((a[0]-this.g[0])/(this.g[2]-this.g[0])*c.length));93<=c&&c--;35<=c&&c--;c-=32;a=null;c in this.j&&(c=this.j[c],this.c&&c in this.c?a=this.c[c]:a=c);return a}; function Tw(a,c,d,e,f){0==a.state&&!0===f?(bb(a,"change",function(){d.call(e,this.getData(c))},a),Vw(a)):!0===f?Fg(function(){d.call(e,this.getData(c))},a):d.call(e,a.getData(c))}l.gb=function(){return this.s};l.Vd=function(){this.state=3;Rf(this)};l.uh=function(a){this.l=a.grid;this.j=a.keys;this.c=a.data;this.state=4;Rf(this)}; function Vw(a){if(0==a.state)if(a.state=1,a.v)dw(a.s,a.uh.bind(a),a.Vd.bind(a));else{var c=new XMLHttpRequest;c.addEventListener("load",a.kn.bind(a));c.addEventListener("error",a.jn.bind(a));c.open("GET",a.s);c.send()}}l.kn=function(a){a=a.target;if(200<=a.status&&300>a.status){var c;try{c=JSON.parse(a.responseText)}catch(d){this.Vd();return}this.uh(c)}else this.Vd()};l.jn=function(){this.Vd()};l.load=function(){this.U&&Vw(this)};function Ww(a){a=a||{};var c=a.params||{};X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:!("TRANSPARENT"in c?c.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=c;this.j=!0;this.B=a.serverType;this.T=void 0!==a.hidpi?a.hidpi:!0;this.S=""; Xw(this);this.Y=Wb();Yw(this);ng(this,Zw(this))}y(Ww,X);l=Ww.prototype; l.nn=function(a,c,d,e){d=Ic(d);var f=this.tileGrid;f||(f=this.fb(d));c=f.Td(a,c);if(!(f.b.length<=c[0])){var g=f.$(c[0]),h=f.Ba(c,this.Y),f=Uf(f.Ha(c[0]),this.o),k=this.v;0!==k&&(f=Sf(f,k,this.o),h=Yb(h,g*k,h));k={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.c.LAYERS};Pa(k,this.c,e);e=Math.floor((h[3]-a[1])/g);k[this.j?"I":"X"]=Math.floor((a[0]-h[0])/g);k[this.j?"J":"Y"]=e;return $w(this,c,f,h,1,d,k)}};l.cf=function(){return this.v}; l.Ab=function(a,c,d){return this.S+Ww.ia.Ab.call(this,a,c,d)};l.pn=function(){return this.c}; function $w(a,c,d,e,f,g,h){var k=a.urls;if(k){h.WIDTH=d[0];h.HEIGHT=d[1];h[a.j?"CRS":"SRS"]=g.eb;"STYLES"in a.c||(h.STYLES="");if(1!=f)switch(a.B){case "geoserver":d=90*f+.5|0;h.FORMAT_OPTIONS="FORMAT_OPTIONS"in h?h.FORMAT_OPTIONS+(";dpi:"+d):"dpi:"+d;break;case "mapserver":h.MAP_RESOLUTION=90*f;break;case "carmentaserver":case "qgis":h.DPI=90*f}g=g.b;a.j&&"ne"==g.substr(0,2)&&(a=e[0],e[0]=e[1],e[1]=a,a=e[2],e[2]=e[3],e[3]=a);h.BBOX=e.join(",");return dq(fq([1==k.length?k[0]:k[Ja((c[1]<g||e>g;)f.push([Math.ceil(d/g),Math.ceil(e/g)]),g+=g;break;case "truncated":for(;d>g||e>g;)f.push([Math.ceil(d/g),Math.ceil(e/g)]),d>>=1,e>>=1}f.push([1,1]);f.reverse();for(var g=[1],h=[0],e=1,d=f.length;ethis.g||d+this.b>this.g)return null;e=hx(this,!1,a,c,d,e,g);if(!e)return null;a=hx(this,!0,a,c,d,void 0!==f?f:pa,g);return{offsetX:e.offsetX,offsetY:e.offsetY,image:e.image,Ng:a.image}}; function hx(a,c,d,e,f,g,h){var k=c?a.i:a.c,m,n,p;n=0;for(p=k.length;n=c+this.b&&g.height>=d+this.b)return k={offsetX:g.x+this.b,offsetY:g.y+this.b,image:this.c},this.f[a]=k,e.call(f,this.g,g.x+this.b,g.y+this.b),a=h,c=c+this.b,d=d+this.b,f=e=void 0,g.width-c>g.height-d?(e={x:g.x+c,y:g.y,width:g.width-c,height:g.height},f={x:g.x,y:g.y+d,width:c,height:g.height-d},ix(this,a,e,f)):(e={x:g.x+c,y:g.y,width:g.width-c,height:d},f={x:g.x,y:g.y+d,width:g.width,height:g.height- d},ix(this,a,e,f)),k;return null};function ix(a,c,d,e){c=[c,1];0f&&(f=0);g=d.TileMatrixSetLink[f].TileMatrixSet; var h=d.Format[0];"format"in c&&(h=c.format);f=Db(d.Style,function(a){return"style"in c?a.Title==c.style:a.isDefault});0>f&&(f=0);f=d.Style[f].Identifier;var k={};"Dimension"in d&&d.Dimension.forEach(function(a){var c=a.Identifier,d=a.Default;void 0===d&&(d=a.Value[0]);k[c]=d});var m=zb(a.Contents.TileMatrixSet,function(a){return a.Identifier==g}),n;n="projection"in c?Ic(c.projection):Ic(m.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var p=d.WGS84BoundingBox,q,r;void 0!==p&& (r=Ic("EPSG:4326").O(),r=p[0]==r[0]&&p[2]==r[2],q=cd(p,"EPSG:4326",n),(p=n.O())&&(cc(p,q)||(q=void 0)));var m=bx(m,q),u=[];q=c.requestEncoding;q=void 0!==q?q:"";if(a.hasOwnProperty("OperationsMetadata")&&a.OperationsMetadata.hasOwnProperty("GetTile")&&0!==q.indexOf("REST"))for(var d=a.OperationsMetadata.GetTile.DCP.HTTP.Get,p=0,v=d.length;p