Interactive interface for browsing global, full-resolution satellite imagery
WV-1365: Update to OpenLayers 3.4
Mike McGann38b9c905c0e1
diff --git a/web/ext/map/openlayers-3.3.0.wv1/ol.css b/web/ext/map/openlayers-3.3.0.wv1/ol.cssdeleted file mode 100644index 44212cc7c..000000000--- a/web/ext/map/openlayers-3.3.0.wv1/ol.css+++ /dev/null@@ -1 +0,0 @@-.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:#95b9e6;background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px}.ol-unsupported{display:none}.ol-viewport .ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-control{position:absolute;background-color:#eee;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px}.ol-control:hover{background-color:rgba(255,255,255,.6)}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}@media print{.ol-control{display:none}}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:#7b98bc;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;font-size:1.2em}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:focus,.ol-control button:hover{text-decoration:none;background-color:#4c6079;background-color:rgba(0,60,136,.7)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em)}.ol-attribution ul{margin:0;padding:0 .5em;font-size:.7rem;line-height:1.375em;color:#000;text-shadow:0 0 2px #fff}.ol-attribution li{display:inline;list-style:none;line-height:inherit}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit}.ol-attribution button,.ol-attribution ul{display:inline-block}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution.ol-logo-only ul{display:block}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0;height:1.1em;line-height:1em}.ol-attribution.ol-logo-only{background:0 0;bottom:.4em;height:1.1em;line-height:1em}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-logo-only button,.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{position:absolute;top:4.5em;left:.5em;background:#eee;background:rgba(255,255,255,.4);width:24px;height:200px}.ol-zoomslider-thumb{position:absolute;background:#7b98bc;background:rgba(0,60,136,.5);border-radius:2px;cursor:pointer;height:10px;width:22px;margin:3px}.ol-touch .ol-zoomslider{top:5.5em;width:2.052em}.ol-touch .ol-zoomslider-thumb{width:1.8em}.ol-overviewmap{position:absolute;left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:inline-block}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:1px;left:2px;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-overviewmap-box{border:2px dotted rgba(0,60,136,.7)}\ No newline at end of filediff --git a/web/ext/map/openlayers-3.3.0.wv1/ol.js b/web/ext/map/openlayers-3.3.0.wv1/ol.jsdeleted file mode 100644index 958fa3ca8..000000000--- a/web/ext/map/openlayers-3.3.0.wv1/ol.js+++ /dev/null@@ -1,956 +0,0 @@-// OpenLayers 3. See http://openlayers.org/-// License: https://raw.githubusercontent.com/openlayers/ol3/master/LICENSE.md-// Version: v3.3.0-5-g7753644--(function (root, factory) {- if (typeof define === "function" && define.amd) {- define([], factory);- } else if (typeof exports === "object") {- module.exports = factory();- } else {- root.ol = factory();- }-}(this, function () {- var OPENLAYERS = {};- var l,aa=aa||{},ba=this;function m(a){return void 0!==a}function t(a,b,d){a=a.split(".");d=d||ba;a[0]in d||!d.execScript||d.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)!a.length&&m(b)?d[e]=b:d[e]?d=d[e]:d=d[e]={}}function ca(){}function da(a){a.Ua=function(){return a.Cf?a.Cf:a.Cf=new a}}-function ea(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;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"==b&&"undefined"==typeof a.call)return"object";return b}function fa(a){return null===a}function ga(a){return"array"==ea(a)}function ha(a){var b=ea(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ia(a){return"string"==typeof a}function ja(a){return"number"==typeof a}function ka(a){return"function"==ea(a)}function la(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ma(a){return a[na]||(a[na]=++oa)}-var na="closure_uid_"+(1E9*Math.random()>>>0),oa=0;function pa(a,b,d){return a.call.apply(a.bind,arguments)}function qa(a,b,d){if(!a)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,e);return a.apply(b,d)}}return function(){return a.apply(b,arguments)}}-function ra(a,b,d){ra=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?pa:qa;return ra.apply(null,arguments)}function sa(a,b){var d=Array.prototype.slice.call(arguments,1);return function(){var b=d.slice();b.push.apply(b,arguments);return a.apply(this,b)}}var ta=Date.now||function(){return+new Date};-function v(a,b){function d(){}d.prototype=b.prototype;a.X=b.prototype;a.prototype=new d;a.prototype.constructor=a;a.Rm=function(a,d,g){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[d].apply(a,h)}};var ua,va;function wa(a){if(Error.captureStackTrace)Error.captureStackTrace(this,wa);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}v(wa,Error);wa.prototype.name="CustomError";var xa;function ya(a,b){var d=a.length-b.length;return 0<=d&&a.indexOf(b,d)==d}function za(a,b){for(var d=a.split("%s"),e="",f=Array.prototype.slice.call(arguments,1);f.length&&1<d.length;)e+=d.shift()+f.shift();return e+d.join("%s")}var Aa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};-function Ba(a){if(!Ca.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Da,"&"));-1!=a.indexOf("<")&&(a=a.replace(Ea,"<"));-1!=a.indexOf(">")&&(a=a.replace(Fa,">"));-1!=a.indexOf('"')&&(a=a.replace(Ga,"""));-1!=a.indexOf("'")&&(a=a.replace(Ha,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(Ia,"�"));return a}var Da=/&/g,Ea=/</g,Fa=/>/g,Ga=/"/g,Ha=/'/g,Ia=/\x00/g,Ca=/[\x00&<>"']/;-function La(a){a=m(void 0)?a.toFixed(void 0):String(a);var b=a.indexOf(".");-1==b&&(b=a.length);b=Math.max(0,2-b);return Array(b+1).join("0")+a}-function Ma(a,b){for(var d=0,e=Aa(String(a)).split("."),f=Aa(String(b)).split("."),g=Math.max(e.length,f.length),h=0;0==d&&h<g;h++){var k=e[h]||"",n=f[h]||"",p=RegExp("(\\d*)(\\D*)","g"),q=RegExp("(\\d*)(\\D*)","g");do{var r=p.exec(k)||["","",""],s=q.exec(n)||["","",""];if(0==r[0].length&&0==s[0].length)break;d=Na(0==r[1].length?0:parseInt(r[1],10),0==s[1].length?0:parseInt(s[1],10))||Na(0==r[2].length,0==s[2].length)||Na(r[2],s[2])}while(0==d)}return d}function Na(a,b){return a<b?-1:a>b?1:0};var Oa=Array.prototype;function Pa(a,b,d){Oa.forEach.call(a,b,d)}function Qa(a,b){return Oa.filter.call(a,b,void 0)}function Ra(a,b,d){return Oa.map.call(a,b,d)}function Sa(a,b){return Oa.some.call(a,b,void 0)}function Ta(a,b){var d=Ua(a,b,void 0);return 0>d?null:ia(a)?a.charAt(d):a[d]}function Ua(a,b,d){for(var e=a.length,f=ia(a)?a.split(""):a,g=0;g<e;g++)if(g in f&&b.call(d,f[g],g,a))return g;return-1}function Va(a,b){return 0<=Oa.indexOf.call(a,b,void 0)}-function Wa(a,b){var d=Oa.indexOf.call(a,b,void 0),e;(e=0<=d)&&Oa.splice.call(a,d,1);return e}function Xa(a){return Oa.concat.apply(Oa,arguments)}function Za(a){var b=a.length;if(0<b){for(var d=Array(b),e=0;e<b;e++)d[e]=a[e];return d}return[]}function $a(a,b){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(ha(e)){var f=a.length||0,g=e.length||0;a.length=f+g;for(var h=0;h<g;h++)a[f+h]=e[h]}else a.push(e)}}function ab(a,b,d,e){Oa.splice.apply(a,bb(arguments,1))}-function bb(a,b,d){return 2>=arguments.length?Oa.slice.call(a,b):Oa.slice.call(a,b,d)}function cb(a,b){a.sort(b||db)}function eb(a,b){if(!ha(a)||!ha(b)||a.length!=b.length)return!1;for(var d=a.length,e=fb,f=0;f<d;f++)if(!e(a[f],b[f]))return!1;return!0}function db(a,b){return a>b?1:a<b?-1:0}function fb(a,b){return a===b};var gb;a:{var hb=ba.navigator;if(hb){var ib=hb.userAgent;if(ib){gb=ib;break a}}gb=""}function jb(a){return-1!=gb.indexOf(a)};function kb(a,b,d){for(var e in a)b.call(d,a[e],e,a)}function ob(a,b){for(var d in a)if(b.call(void 0,a[d],d,a))return!0;return!1}function pb(a){var b=0,d;for(d in a)b++;return b}function qb(a){var b=[],d=0,e;for(e in a)b[d++]=a[e];return b}function rb(a){var b=[],d=0,e;for(e in a)b[d++]=e;return b}function sb(a,b){return b in a}function tb(a){var b=ub,d;for(d in b)if(a.call(void 0,b[d],d,b))return d}function vb(a){for(var b in a)return!1;return!0}function wb(a){for(var b in a)delete a[b]}-function xb(a,b){b in a&&delete a[b]}function yb(a,b,d){return b in a?a[b]:d}function zb(a,b){var d=[];return b in a?a[b]:a[b]=d}function Ab(a){var b={},d;for(d in a)b[d]=a[d];return b}var Bb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Cb(a,b){for(var d,e,f=1;f<arguments.length;f++){e=arguments[f];for(d in e)a[d]=e[d];for(var g=0;g<Bb.length;g++)d=Bb[g],Object.prototype.hasOwnProperty.call(e,d)&&(a[d]=e[d])}}-function Db(a){var b=arguments.length;if(1==b&&ga(arguments[0]))return Db.apply(null,arguments[0]);for(var d={},e=0;e<b;e++)d[arguments[e]]=!0;return d};var Eb=jb("Opera")||jb("OPR"),Fb=jb("Trident")||jb("MSIE"),Gb=jb("Gecko")&&-1==gb.toLowerCase().indexOf("webkit")&&!(jb("Trident")||jb("MSIE")),Hb=-1!=gb.toLowerCase().indexOf("webkit"),Ib=jb("Macintosh"),Jb=jb("Windows"),Kb=jb("Linux")||jb("CrOS");function Lb(){var a=ba.document;return a?a.documentMode:void 0}-var Mb=function(){var a="",b;if(Eb&&ba.opera)return a=ba.opera.version,ka(a)?a():a;Gb?b=/rv\:([^\);]+)(\)|;)/:Fb?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:Hb&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(gb))?a[1]:"");return Fb&&(b=Lb(),b>parseFloat(a))?String(b):a}(),Nb={};function Ob(a){return Nb[a]||(Nb[a]=0<=Ma(Mb,a))}var Qb=ba.document,Rb=Qb&&Fb?Lb()||("CSS1Compat"==Qb.compatMode?parseInt(Mb,10):5):void 0;var Sb="https:"===ba.location.protocol,Tb=Fb&&!Ob("9.0")&&""!==Mb;function Vb(a,b,d){return Math.min(Math.max(a,b),d)}function Wb(a,b){var d=a%b;return 0>d*b?d+b:d}function Xb(a,b,d){return a+d*(b-a)}function Yb(a){return a*Math.PI/180};function Zb(a){return function(b){if(m(b))return[Vb(b[0],a[0],a[2]),Vb(b[1],a[1],a[3])]}}function $b(a){return a};function ac(a,b,d){var e=a.length;if(a[0]<=b)return 0;if(!(b<=a[e-1]))if(0<d)for(d=1;d<e;++d){if(a[d]<b)return d-1}else if(0>d)for(d=1;d<e;++d){if(a[d]<=b)return d}else for(d=1;d<e;++d){if(a[d]==b)return d;if(a[d]<b)return a[d-1]-b<b-a[d]?d-1:d}return e-1};function bc(a){return function(b,d,e){if(m(b))return b=ac(a,b,e),b=Vb(b+d,0,a.length-1),a[b]}}function cc(a,b,d){return function(e,f,g){if(m(e))return g=0<g?0:0>g?1:.5,e=Math.floor(Math.log(b/e)/Math.log(a)+g),f=Math.max(e+f,0),m(d)&&(f=Math.min(f,d)),b/Math.pow(a,f)}};function dc(a){if(m(a))return 0}function ec(a,b){if(m(a))return a+b}function fc(a){var b=2*Math.PI/a;return function(a,e){if(m(a))return a=Math.floor((a+e)/b+.5)*b}}function gc(){var a=Yb(5);return function(b,d){if(m(b))return Math.abs(b+d)<=a?0:b+d}};function hc(a,b,d){this.center=a;this.resolution=b;this.rotation=d};var ic=!Fb||Fb&&9<=Rb,jc=!Fb||Fb&&9<=Rb,kc=Fb&&!Ob("9");!Hb||Ob("528");Gb&&Ob("1.9b")||Fb&&Ob("8")||Eb&&Ob("9.5")||Hb&&Ob("528");Gb&&!Ob("8")||Fb&&Ob("9");function lc(){0!=mc&&(nc[ma(this)]=this);this.sa=this.sa;this.ta=this.ta}var mc=0,nc={};lc.prototype.sa=!1;lc.prototype.Nc=function(){if(!this.sa&&(this.sa=!0,this.T(),0!=mc)){var a=ma(this);delete nc[a]}};function oc(a,b){var d=sa(pc,b);a.sa?d.call(void 0):(a.ta||(a.ta=[]),a.ta.push(m(void 0)?ra(d,void 0):d))}lc.prototype.T=function(){if(this.ta)for(;this.ta.length;)this.ta.shift()()};function pc(a){a&&"function"==typeof a.Nc&&a.Nc()};function qc(a,b){this.type=a;this.d=this.target=b;this.i=!1;this.rg=!0}qc.prototype.tb=function(){this.i=!0};qc.prototype.preventDefault=function(){this.rg=!1};function rc(a){a.tb()}function tc(a){a.preventDefault()};var uc=Fb?"focusout":"DOMFocusOut";function vc(a){vc[" "](a);return a}vc[" "]=ca;function wc(a,b){qc.call(this,a?a.type:"");this.relatedTarget=this.d=this.target=null;this.l=this.j=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.n=this.e=this.f=this.q=!1;this.state=null;this.k=!1;this.c=null;a&&xc(this,a,b)}v(wc,qc);var yc=[1,4,2];-function xc(a,b,d){a.c=b;var e=a.type=b.type;a.target=b.target||b.srcElement;a.d=d;if(d=b.relatedTarget){if(Gb){var f;a:{try{vc(d.nodeName);f=!0;break a}catch(g){}f=!1}f||(d=null)}}else"mouseover"==e?d=b.fromElement:"mouseout"==e&&(d=b.toElement);a.relatedTarget=d;Object.defineProperties?Object.defineProperties(a,{offsetX:{configurable:!0,enumerable:!0,get:a.tf,set:a.dm},offsetY:{configurable:!0,enumerable:!0,get:a.uf,set:a.em}}):(a.offsetX=a.tf(),a.offsetY=a.uf());a.clientX=void 0!==b.clientX?b.clientX:-b.pageX;a.clientY=void 0!==b.clientY?b.clientY:b.pageY;a.screenX=b.screenX||0;a.screenY=b.screenY||0;a.button=b.button;a.j=b.keyCode||0;a.l=b.charCode||("keypress"==e?b.keyCode:0);a.q=b.ctrlKey;a.f=b.altKey;a.e=b.shiftKey;a.n=b.metaKey;a.k=Ib?b.metaKey:b.ctrlKey;a.state=b.state;b.defaultPrevented&&a.preventDefault()}function zc(a){return(ic?0==a.c.button:"click"==a.type?!0:!!(a.c.button&yc[0]))&&!(Hb&&Ib&&a.q)}l=wc.prototype;-l.tb=function(){wc.X.tb.call(this);this.c.stopPropagation?this.c.stopPropagation():this.c.cancelBubble=!0};l.preventDefault=function(){wc.X.preventDefault.call(this);var a=this.c;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,kc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};l.xh=function(){return this.c};l.tf=function(){return Hb||void 0!==this.c.offsetX?this.c.offsetX:this.c.layerX};-l.dm=function(a){Object.defineProperties(this,{offsetX:{writable:!0,enumerable:!0,configurable:!0,value:a}})};l.uf=function(){return Hb||void 0!==this.c.offsetY?this.c.offsetY:this.c.layerY};l.em=function(a){Object.defineProperties(this,{offsetY:{writable:!0,enumerable:!0,configurable:!0,value:a}})};var Ac="closure_listenable_"+(1E6*Math.random()|0);function Bc(a){return!(!a||!a[Ac])}var Cc=0;function Dc(a,b,d,e,f){this.cc=a;this.c=null;this.src=b;this.type=d;this.Fc=!!e;this.Bd=f;this.key=++Cc;this.yc=this.fd=!1}function Ec(a){a.yc=!0;a.cc=null;a.c=null;a.src=null;a.Bd=null};function Fc(a){this.src=a;this.c={};this.f=0}Fc.prototype.add=function(a,b,d,e,f){var g=a.toString();a=this.c[g];a||(a=this.c[g]=[],this.f++);var h=Gc(a,b,e,f);-1<h?(b=a[h],d||(b.fd=!1)):(b=new Dc(b,this.src,g,!!e,f),b.fd=d,a.push(b));return b};Fc.prototype.remove=function(a,b,d,e){a=a.toString();if(!(a in this.c))return!1;var f=this.c[a];b=Gc(f,b,d,e);return-1<b?(Ec(f[b]),Oa.splice.call(f,b,1),0==f.length&&(delete this.c[a],this.f--),!0):!1};-function Hc(a,b){var d=b.type;if(!(d in a.c))return!1;var e=Wa(a.c[d],b);e&&(Ec(b),0==a.c[d].length&&(delete a.c[d],a.f--));return e}function Ic(a,b,d,e,f){a=a.c[b.toString()];b=-1;a&&(b=Gc(a,d,e,f));return-1<b?a[b]:null}function Jc(a,b,d){var e=m(b),f=e?b.toString():"",g=m(d);return ob(a.c,function(a){for(var b=0;b<a.length;++b)if(!(e&&a[b].type!=f||g&&a[b].Fc!=d))return!0;return!1})}-function Gc(a,b,d,e){for(var f=0;f<a.length;++f){var g=a[f];if(!g.yc&&g.cc==b&&g.Fc==!!d&&g.Bd==e)return f}return-1};var Kc="closure_lm_"+(1E6*Math.random()|0),Lc={},Nc=0;function w(a,b,d,e,f){if(ga(b)){for(var g=0;g<b.length;g++)w(a,b[g],d,e,f);return null}d=Oc(d);return Bc(a)?a.Wa(b,d,e,f):Pc(a,b,d,!1,e,f)}function Pc(a,b,d,e,f,g){if(!b)throw Error("Invalid event type");var h=!!f,k=Qc(a);k||(a[Kc]=k=new Fc(a));d=k.add(b,d,e,f,g);if(d.c)return d;e=Rc();d.c=e;e.src=a;e.cc=d;a.addEventListener?a.addEventListener(b.toString(),e,h):a.attachEvent(Sc(b.toString()),e);Nc++;return d}-function Rc(){var a=Tc,b=jc?function(d){return a.call(b.src,b.cc,d)}:function(d){d=a.call(b.src,b.cc,d);if(!d)return d};return b}function Uc(a,b,d,e,f){if(ga(b)){for(var g=0;g<b.length;g++)Uc(a,b[g],d,e,f);return null}d=Oc(d);return Bc(a)?a.qb.add(String(b),d,!0,e,f):Pc(a,b,d,!0,e,f)}function Vc(a,b,d,e,f){if(ga(b))for(var g=0;g<b.length;g++)Vc(a,b[g],d,e,f);else d=Oc(d),Bc(a)?a.Re(b,d,e,f):a&&(a=Qc(a))&&(b=Ic(a,b,d,!!e,f))&&Wc(b)}-function Wc(a){if(ja(a)||!a||a.yc)return!1;var b=a.src;if(Bc(b))return Hc(b.qb,a);var d=a.type,e=a.c;b.removeEventListener?b.removeEventListener(d,e,a.Fc):b.detachEvent&&b.detachEvent(Sc(d),e);Nc--;(d=Qc(b))?(Hc(d,a),0==d.f&&(d.src=null,b[Kc]=null)):Ec(a);return!0}function Sc(a){return a in Lc?Lc[a]:Lc[a]="on"+a}function Xc(a,b,d,e){var f=!0;if(a=Qc(a))if(b=a.c[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var g=b[a];g&&g.Fc==d&&!g.yc&&(g=Yc(g,e),f=f&&!1!==g)}return f}-function Yc(a,b){var d=a.cc,e=a.Bd||a.src;a.fd&&Wc(a);return d.call(e,b)}-function Tc(a,b){if(a.yc)return!0;if(!jc){var d;if(!(d=b))a:{d=["window","event"];for(var e=ba,f;f=d.shift();)if(null!=e[f])e=e[f];else{d=null;break a}d=e}f=d;d=new wc(f,this);e=!0;if(!(0>f.keyCode||void 0!=f.returnValue)){a:{var g=!1;if(0==f.keyCode)try{f.keyCode=-1;break a}catch(h){g=!0}if(g||void 0==f.returnValue)f.returnValue=!0}f=[];for(g=d.d;g;g=g.parentNode)f.push(g);for(var g=a.type,k=f.length-1;!d.i&&0<=k;k--){d.d=f[k];var n=Xc(f[k],g,!0,d),e=e&&n}for(k=0;!d.i&&k<f.length;k++)d.d=f[k],n=-Xc(f[k],g,!1,d),e=e&&n}return e}return Yc(a,new wc(b,this))}function Qc(a){a=a[Kc];return a instanceof Fc?a:null}var Zc="__closure_events_fn_"+(1E9*Math.random()>>>0);function Oc(a){if(ka(a))return a;a[Zc]||(a[Zc]=function(b){return a.handleEvent(b)});return a[Zc]};function $c(a){return function(){return a}}var ad=$c(!1),bd=$c(!0),cd=$c(null);function dd(a){return a}function ed(a){var b;b=b||0;return function(){return a.apply(this,Array.prototype.slice.call(arguments,0,b))}}function fd(a){var b=arguments,d=b.length;return function(){for(var a,f=0;f<d;f++)a=b[f].apply(this,arguments);return a}}function gd(a){var b=arguments,d=b.length;return function(){for(var a=0;a<d;a++)if(!b[a].apply(this,arguments))return!1;return!0}};function hd(){lc.call(this);this.qb=new Fc(this);this.ji=this;this.je=null}v(hd,lc);hd.prototype[Ac]=!0;l=hd.prototype;l.addEventListener=function(a,b,d,e){w(this,a,b,d,e)};l.removeEventListener=function(a,b,d,e){Vc(this,a,b,d,e)};-l.dispatchEvent=function(a){var b,d=this.je;if(d)for(b=[];d;d=d.je)b.push(d);var d=this.ji,e=a.type||a;if(ia(a))a=new qc(a,d);else if(a instanceof qc)a.target=a.target||d;else{var f=a;a=new qc(e,d);Cb(a,f)}var f=!0,g;if(b)for(var h=b.length-1;!a.i&&0<=h;h--)g=a.d=b[h],f=id(g,e,!0,a)&&f;a.i||(g=a.d=d,f=id(g,e,!0,a)&&f,a.i||(f=id(g,e,!1,a)&&f));if(b)for(h=0;!a.i&&h<b.length;h++)g=a.d=b[h],f=id(g,e,!1,a)&&f;return f};-l.T=function(){hd.X.T.call(this);if(this.qb){var a=this.qb,b=0,d;for(d in a.c){for(var e=a.c[d],f=0;f<e.length;f++)++b,Ec(e[f]);delete a.c[d];a.f--}}this.je=null};l.Wa=function(a,b,d,e){return this.qb.add(String(a),b,!1,d,e)};l.Re=function(a,b,d,e){return this.qb.remove(String(a),b,d,e)};-function id(a,b,d,e){b=a.qb.c[String(b)];if(!b)return!0;b=b.concat();for(var f=!0,g=0;g<b.length;++g){var h=b[g];if(h&&!h.yc&&h.Fc==d){var k=h.cc,n=h.Bd||h.src;h.fd&&Hc(a.qb,h);f=!1!==k.call(n,e)&&f}}return f&&0!=e.rg}function jd(a,b,d){return Jc(a.qb,m(b)?String(b):void 0,d)};function kd(){hd.call(this);this.f=0}v(kd,hd);function ld(a){Wc(a)}l=kd.prototype;l.p=function(){++this.f;this.dispatchEvent("change")};l.C=function(){return this.f};l.A=function(a,b,d){return w(this,a,b,!1,d)};l.D=function(a,b,d){return Uc(this,a,b,!1,d)};l.B=function(a,b,d){Vc(this,a,b,!1,d)};l.G=ld;function md(a,b,d){qc.call(this,a);this.key=b;this.oldValue=d}v(md,qc);function nd(a,b,d,e){this.source=a;this.target=b;this.d=d;this.f=e;this.e=this.c=dd}nd.prototype.transform=function(a,b){var d=od(this.source,this.d);this.c=a;this.e=b;pd(this.source,this.d,d)};function qd(a){kd.call(this);ma(this);this.q={};this.Ha={};this.ie={};m(a)&&this.I(a)}v(qd,kd);var rd={},sd={},td={};function ud(a){return rd.hasOwnProperty(a)?rd[a]:rd[a]="change:"+a}-function od(a,b){var d=sd.hasOwnProperty(b)?sd[b]:sd[b]="get"+(String(b.charAt(0)).toUpperCase()+String(b.substr(1)).toLowerCase()),d=a[d];return m(d)?d.call(a):a.get(b)}l=qd.prototype;l.O=function(a,b,d){d=d||a;this.P(a);var e=ud(d);this.ie[a]=w(b,e,function(b){pd(this,a,b.oldValue)},void 0,this);b=new nd(this,b,a,d);this.Ha[a]=b;pd(this,a,this.q[a]);return b};l.get=function(a){var b,d=this.Ha;d.hasOwnProperty(a)?(a=d[a],b=od(a.target,a.f),b=a.e(b)):this.q.hasOwnProperty(a)&&(b=this.q[a]);return b};-l.K=function(){var a=this.Ha,b;if(vb(this.q)){if(vb(a))return[];b=a}else if(vb(a))b=this.q;else{b={};for(var d in this.q)b[d]=!0;for(d in a)b[d]=!0}return rb(b)};l.M=function(){var a={},b;for(b in this.q)a[b]=this.q[b];for(b in this.Ha)a[b]=this.get(b);return a};function pd(a,b,d){var e;e=ud(b);a.dispatchEvent(new md(e,b,d));a.dispatchEvent(new md("propertychange",b,d))}-l.set=function(a,b){var d=this.Ha;if(d.hasOwnProperty(a)){var e=d[a];b=e.c(b);var d=e.target,e=e.f,f=b,g=td.hasOwnProperty(e)?td[e]:td[e]="set"+(String(e.charAt(0)).toUpperCase()+String(e.substr(1)).toLowerCase()),g=d[g];m(g)?g.call(d,f):d.set(e,f)}else d=this.q[a],this.q[a]=b,pd(this,a,d)};l.I=function(a){for(var b in a)this.set(b,a[b])};l.P=function(a){var b=this.ie,d=b[a];d&&(delete b[a],Wc(d),b=this.get(a),delete this.Ha[a],this.q[a]=b)};l.Q=function(){for(var a in this.ie)this.P(a)};function vd(a,b){a[0]+=b[0];a[1]+=b[1];return a}function wd(a,b){var d=a[0],e=a[1],f=b[0],g=b[1],h=f[0],f=f[1],k=g[0],g=g[1],n=k-h,p=g-f,d=0===n&&0===p?0:(n*(d-h)+p*(e-f))/(n*n+p*p||0);0>=d||(1<=d?(h=k,f=g):(h+=d*n,f+=d*p));return[h,f]}function xd(a,b){var d=Wb(a+180,360)-180,e=Math.abs(Math.round(3600*d));return Math.floor(e/3600)+"\u00b0 "+Math.floor(e/60%60)+"\u2032 "+Math.floor(e%60)+"\u2033 "+b.charAt(0>d?1:0)}-function yd(a,b,d){return m(a)?b.replace("{x}",a[0].toFixed(d)).replace("{y}",a[1].toFixed(d)):""}function zd(a,b){for(var d=!0,e=a.length-1;0<=e;--e)if(a[e]!=b[e]){d=!1;break}return d}function Ad(a,b){var d=Math.cos(b),e=Math.sin(b),f=a[1]*d+a[0]*e;a[0]=a[0]*d-a[1]*e;a[1]=f;return a}function Bd(a,b){var d=a[0]-b[0],e=a[1]-b[1];return d*d+e*e}function Cd(a,b){return yd(a,"{x}, {y}",b)};function Dd(a){this.length=a.length||a;for(var b=0;b<this.length;b++)this[b]=a[b]||0}Dd.prototype.c=4;Dd.prototype.set=function(a,b){b=b||0;for(var d=0;d<a.length&&b+d<this.length;d++)this[b+d]=a[d]};Dd.prototype.toString=Array.prototype.join;"undefined"==typeof Float32Array&&(Dd.BYTES_PER_ELEMENT=4,Dd.prototype.BYTES_PER_ELEMENT=Dd.prototype.c,Dd.prototype.set=Dd.prototype.set,Dd.prototype.toString=Dd.prototype.toString,t("Float32Array",Dd,void 0));function Ed(a){this.length=a.length||a;for(var b=0;b<this.length;b++)this[b]=a[b]||0}Ed.prototype.c=8;Ed.prototype.set=function(a,b){b=b||0;for(var d=0;d<a.length&&b+d<this.length;d++)this[b+d]=a[d]};Ed.prototype.toString=Array.prototype.join;if("undefined"==typeof Float64Array){try{Ed.BYTES_PER_ELEMENT=8}catch(Fd){}Ed.prototype.BYTES_PER_ELEMENT=Ed.prototype.c;Ed.prototype.set=Ed.prototype.set;Ed.prototype.toString=Ed.prototype.toString;t("Float64Array",Ed,void 0)};function Gd(a,b,d,e,f){a[0]=b;a[1]=d;a[2]=e;a[3]=f};function Hd(){var a=Array(16);Id(a,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return a}function Jd(){var a=Array(16);Id(a,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return a}function Id(a,b,d,e,f,g,h,k,n,p,q,r,s,u,z,y,A){a[0]=b;a[1]=d;a[2]=e;a[3]=f;a[4]=g;a[5]=h;a[6]=k;a[7]=n;a[8]=p;a[9]=q;a[10]=r;a[11]=s;a[12]=u;a[13]=z;a[14]=y;a[15]=A}-function Kd(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];a[9]=b[9];a[10]=b[10];a[11]=b[11];a[12]=b[12];a[13]=b[13];a[14]=b[14];a[15]=b[15]}function Ld(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1}-function Md(a,b,d){var e=a[0],f=a[1],g=a[2],h=a[3],k=a[4],n=a[5],p=a[6],q=a[7],r=a[8],s=a[9],u=a[10],z=a[11],y=a[12],A=a[13],D=a[14];a=a[15];var x=b[0],M=b[1],Q=b[2],O=b[3],W=b[4],Ja=b[5],lb=b[6],Ka=b[7],mb=b[8],Pb=b[9],Ya=b[10],Ub=b[11],nb=b[12],Mc=b[13],sc=b[14];b=b[15];d[0]=e*x+k*M+r*Q+y*O;d[1]=f*x+n*M+s*Q+A*O;d[2]=g*x+p*M+u*Q+D*O;d[3]=h*x+q*M+z*Q+a*O;d[4]=e*W+k*Ja+r*lb+y*Ka;d[5]=f*W+n*Ja+s*lb+A*Ka;d[6]=g*W+p*Ja+u*lb+D*Ka;d[7]=h*W+q*Ja+z*lb+a*Ka;d[8]=e*mb+k*Pb+r*Ya+y*Ub;d[9]=f*mb+n*Pb+s*Ya+A*Ub;-d[10]=g*mb+p*Pb+u*Ya+D*Ub;d[11]=h*mb+q*Pb+z*Ya+a*Ub;d[12]=e*nb+k*Mc+r*sc+y*b;d[13]=f*nb+n*Mc+s*sc+A*b;d[14]=g*nb+p*Mc+u*sc+D*b;d[15]=h*nb+q*Mc+z*sc+a*b}-function Nd(a,b){var d=a[0],e=a[1],f=a[2],g=a[3],h=a[4],k=a[5],n=a[6],p=a[7],q=a[8],r=a[9],s=a[10],u=a[11],z=a[12],y=a[13],A=a[14],D=a[15],x=d*k-e*h,M=d*n-f*h,Q=d*p-g*h,O=e*n-f*k,W=e*p-g*k,Ja=f*p-g*n,lb=q*y-r*z,Ka=q*A-s*z,mb=q*D-u*z,Pb=r*A-s*y,Ya=r*D-u*y,Ub=s*D-u*A,nb=x*Ub-M*Ya+Q*Pb+O*mb-W*Ka+Ja*lb;0!=nb&&(nb=1/nb,b[0]=(k*Ub-n*Ya+p*Pb)*nb,b[1]=(-e*Ub+f*Ya-g*Pb)*nb,b[2]=(y*Ja-A*W+D*O)*nb,b[3]=(-r*Ja+s*W-u*O)*nb,b[4]=(-h*Ub+n*mb-p*Ka)*nb,b[5]=(d*Ub-f*mb+g*Ka)*nb,b[6]=(-z*Ja+A*Q-D*M)*nb,b[7]=(q*Ja-s*-Q+u*M)*nb,b[8]=(h*Ya-k*mb+p*lb)*nb,b[9]=(-d*Ya+e*mb-g*lb)*nb,b[10]=(z*W-y*Q+D*x)*nb,b[11]=(-q*W+r*Q-u*x)*nb,b[12]=(-h*Pb+k*Ka-n*lb)*nb,b[13]=(d*Pb-e*Ka+f*lb)*nb,b[14]=(-z*O+y*M-A*x)*nb,b[15]=(q*O-r*M+s*x)*nb)}function Od(a,b,d){var e=a[1]*b+a[5]*d+0*a[9]+a[13],f=a[2]*b+a[6]*d+0*a[10]+a[14],g=a[3]*b+a[7]*d+0*a[11]+a[15];a[12]=a[0]*b+a[4]*d+0*a[8]+a[12];a[13]=e;a[14]=f;a[15]=g}-function Pd(a,b,d){Id(a,a[0]*b,a[1]*b,a[2]*b,a[3]*b,a[4]*d,a[5]*d,a[6]*d,a[7]*d,1*a[8],1*a[9],1*a[10],1*a[11],a[12],a[13],a[14],a[15])}function Qd(a,b){var d=a[0],e=a[1],f=a[2],g=a[3],h=a[4],k=a[5],n=a[6],p=a[7],q=Math.cos(b),r=Math.sin(b);a[0]=d*q+h*r;a[1]=e*q+k*r;a[2]=f*q+n*r;a[3]=g*q+p*r;a[4]=d*-r+h*q;a[5]=e*-r+k*q;a[6]=f*-r+n*q;a[7]=g*-r+p*q}new Float64Array(3);new Float64Array(3);new Float64Array(4);new Float64Array(4);new Float64Array(4);new Float64Array(16);function Rd(a){for(var b=Sd(),d=0,e=a.length;d<e;++d)Td(b,a[d]);return b}function Ud(a,b,d){var e=Math.min.apply(null,a),f=Math.min.apply(null,b);a=Math.max.apply(null,a);b=Math.max.apply(null,b);return Vd(e,f,a,b,d)}function Wd(a,b,d){return m(d)?(d[0]=a[0]-b,d[1]=a[1]-b,d[2]=a[2]+b,d[3]=a[3]+b,d):[a[0]-b,a[1]-b,a[2]+b,a[3]+b]}function Xd(a,b){return m(b)?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b):a.slice()}-function Yd(a,b,d){b=b<a[0]?a[0]-b:a[2]<b?b-a[2]:0;a=d<a[1]?a[1]-d:a[3]<d?d-a[3]:0;return b*b+a*a}function Zd(a,b){return a[0]<=b[0]&&b[2]<=a[2]&&a[1]<=b[1]&&b[3]<=a[3]}function $d(a,b,d){return a[0]<=b&&b<=a[2]&&a[1]<=d&&d<=a[3]}function ae(a,b){var d=a[1],e=a[2],f=a[3],g=b[0],h=b[1],k=0;g<a[0]?k=k|16:g>e&&(k=k|4);h<d?k|=8:h>f&&(k|=2);0===k&&(k=1);return k}function Sd(){return[Infinity,Infinity,-Infinity,-Infinity]}function Vd(a,b,d,e,f){return m(f)?(f[0]=a,f[1]=b,f[2]=d,f[3]=e,f):[a,b,d,e]}-function be(a,b){var d=a[0],e=a[1];return Vd(d,e,d,e,b)}function ce(a,b){return a[0]==b[0]&&a[2]==b[2]&&a[1]==b[1]&&a[3]==b[3]}function de(a,b){b[0]<a[0]&&(a[0]=b[0]);b[2]>a[2]&&(a[2]=b[2]);b[1]<a[1]&&(a[1]=b[1]);b[3]>a[3]&&(a[3]=b[3]);return a}function Td(a,b){b[0]<a[0]&&(a[0]=b[0]);b[0]>a[2]&&(a[2]=b[0]);b[1]<a[1]&&(a[1]=b[1]);b[1]>a[3]&&(a[3]=b[1])}-function ee(a,b,d,e,f){for(;d<e;d+=f){var g=a,h=b[d],k=b[d+1];g[0]=Math.min(g[0],h);g[1]=Math.min(g[1],k);g[2]=Math.max(g[2],h);g[3]=Math.max(g[3],k)}return a}function fe(a,b){var d;return(d=b.call(void 0,ge(a)))||(d=b.call(void 0,he(a)))||(d=b.call(void 0,ie(a)))?d:(d=b.call(void 0,je(a)))?d:!1}function ge(a){return[a[0],a[1]]}function he(a){return[a[2],a[1]]}function ke(a){return[(a[0]+a[2])/2,(a[1]+a[3])/2]}-function le(a,b){var d;"bottom-left"===b?d=ge(a):"bottom-right"===b?d=he(a):"top-left"===b?d=je(a):"top-right"===b&&(d=ie(a));return d}function me(a,b,d,e){var f=b*e[0]/2;e=b*e[1]/2;b=Math.cos(d);d=Math.sin(d);f=[-f,-f,f,f];e=[-e,e,-e,e];var g,h,k;for(g=0;4>g;++g)h=f[g],k=e[g],f[g]=a[0]+h*b-k*d,e[g]=a[1]+h*d+k*b;return Ud(f,e,void 0)}function ne(a){return a[3]-a[1]}-function oe(a,b,d){d=m(d)?d:Sd();pe(a,b)&&(d[0]=a[0]>b[0]?a[0]:b[0],d[1]=a[1]>b[1]?a[1]:b[1],d[2]=a[2]<b[2]?a[2]:b[2],d[3]=a[3]<b[3]?a[3]:b[3]);return d}function je(a){return[a[0],a[3]]}function ie(a){return[a[2],a[3]]}function qe(a){return a[2]-a[0]}function pe(a,b){return a[0]<=b[2]&&a[2]>=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function re(a){return a[2]<a[0]||a[3]<a[1]}function se(a,b){var d=(a[2]-a[0])/2*(b-1),e=(a[3]-a[1])/2*(b-1);a[0]-=d;a[2]+=d;a[1]-=e;a[3]+=e}-function te(a,b,d){a=[a[0],a[1],a[0],a[3],a[2],a[1],a[2],a[3]];b(a,a,2);return Ud([a[0],a[2],a[4],a[6]],[a[1],a[3],a[5],a[7]],d)};/*-- Latitude/longitude spherical geodesy formulae taken from- http://www.movable-type.co.uk/scripts/latlong.html- Licensed under CC-BY-3.0.-*/-function ue(a){this.radius=a}ue.prototype.f=function(a){for(var b=0,d=a.length,e=a[d-1][0],f=a[d-1][1],g=0;g<d;g++)var h=a[g][0],k=a[g][1],b=b+Yb(h-e)*(2+Math.sin(Yb(f))+Math.sin(Yb(k))),e=h,f=k;return b*this.radius*this.radius/2};ue.prototype.c=function(a,b){var d=Yb(a[1]),e=Yb(b[1]),f=(e-d)/2,g=Yb(b[0]-a[0])/2,d=Math.sin(f)*Math.sin(f)+Math.sin(g)*Math.sin(g)*Math.cos(d)*Math.cos(e);return 2*this.radius*Math.atan2(Math.sqrt(d),Math.sqrt(1-d))};-ue.prototype.offset=function(a,b,d){var e=Yb(a[1]);b/=this.radius;var f=Math.asin(Math.sin(e)*Math.cos(b)+Math.cos(e)*Math.sin(b)*Math.cos(d));return[180*(Yb(a[0])+Math.atan2(Math.sin(d)*Math.sin(b)*Math.cos(e),Math.cos(b)-Math.sin(e)*Math.sin(f)))/Math.PI,180*f/Math.PI]};var ve=new ue(6370997);var we={};we.degrees=2*Math.PI*ve.radius/360;we.ft=.3048;we.m=1;we["us-ft"]=1200/3937;function xe(a){this.c=a.code;this.f=a.units;this.k=m(a.extent)?a.extent:null;this.e=m(a.worldExtent)?a.worldExtent:null;this.d=m(a.axisOrientation)?a.axisOrientation:"enu";this.i=m(a.global)?a.global:!1;this.j=null}l=xe.prototype;l.yh=function(){return this.c};l.N=function(){return this.k};l.Vj=function(){return this.f};l.rd=function(){return we[this.f]};l.fi=function(){return this.e};function ye(a){return a.d}-l.Ti=function(){return this.i};l.Wj=function(a){this.k=a};l.km=function(a){this.e=a};l.ve=function(a,b){if("degrees"==this.f)return a;var d=ze(this,Ae("EPSG:4326")),e=[b[0]-a/2,b[1],b[0]+a/2,b[1],b[0],b[1]-a/2,b[0],b[1]+a/2],e=d(e,e,2),d=(ve.c(e.slice(0,2),e.slice(2,4))+ve.c(e.slice(4,6),e.slice(6,8)))/2,e=this.rd();m(e)&&(d/=e);return d};var Be={},Ce={};function De(a){Ee(a);Pa(a,function(b){Pa(a,function(a){b!==a&&Fe(b,a,Ge)})})}-function He(){var a=Ie,b=Je,d=Ke;Pa(Le,function(e){Pa(a,function(a){Fe(e,a,b);Fe(a,e,d)})})}function Me(a){Be[a.c]=a;Fe(a,a,Ge)}function Ee(a){var b=[];Pa(a,function(a){b.push(Me(a))})}function Ne(a){return null!=a?ia(a)?Ae(a):a:Ae("EPSG:3857")}function Fe(a,b,d){a=a.c;b=b.c;a in Ce||(Ce[a]={});Ce[a][b]=d}function Oe(a,b,d,e){a=Ae(a);b=Ae(b);Fe(a,b,Qe(d));Fe(b,a,Qe(e))}-function Qe(a){return function(b,d,e){var f=b.length;e=m(e)?e:2;d=m(d)?d:Array(f);var g,h;for(h=0;h<f;h+=e)for(g=a([b[h],b[h+1]]),d[h]=g[0],d[h+1]=g[1],g=e-1;2<=g;--g)d[h+g]=b[h+g];return d}}-function Ae(a){var b;if(a instanceof xe)b=a;else if(ia(a)){if(b=Be[a],!m(b)&&"function"==typeof proj4){var d=proj4.defs(a);if(m(d)){b=d.units;!m(b)&&m(d.to_meter)&&(b=d.to_meter.toString(),we[b]=d.to_meter);b=new xe({code:a,units:b,axisOrientation:d.axis});Me(b);var e,f,g;for(e in Be)f=proj4.defs(e),m(f)&&(g=Ae(e),f===d?De([g,b]):(f=proj4(e,a),Oe(g,b,f.forward,f.inverse)))}else b=null}}else b=null;return b}function Re(a,b){return a===b?!0:a.f!=b.f?!1:ze(a,b)===Ge}-function Se(a,b){var d=Ae(a),e=Ae(b);return ze(d,e)}function ze(a,b){var d=a.c,e=b.c,f;d in Ce&&e in Ce[d]&&(f=Ce[d][e]);m(f)||(f=Te);return f}function Te(a,b){if(m(b)&&a!==b){for(var d=0,e=a.length;d<e;++d)b[d]=a[d];a=b}return a}function Ge(a,b){var d;if(m(b)){d=0;for(var e=a.length;d<e;++d)b[d]=a[d];d=b}else d=a.slice();return d}function Ue(a,b,d){b=Se(b,d);return te(a,b)};function B(a){qd.call(this);a=m(a)?a:{};this.u=[0,0];var b={};b.center=m(a.center)?a.center:null;this.t=Ne(a.projection);var d,e,f,g=m(a.minZoom)?a.minZoom:0;d=m(a.maxZoom)?a.maxZoom:28;var h=m(a.zoomFactor)?a.zoomFactor:2;if(m(a.resolutions))d=a.resolutions,e=d[0],f=d[d.length-1],d=bc(d);else{e=Ne(a.projection);f=e.N();var k=(null===f?360*we.degrees/we[e.f]:Math.max(qe(f),ne(f)))/256/Math.pow(2,0),n=k/Math.pow(2,28);e=a.maxResolution;m(e)?g=0:e=k/Math.pow(h,g);f=a.minResolution;m(f)||(f=m(a.maxZoom)?-m(a.maxResolution)?e/Math.pow(h,d):k/Math.pow(h,d):n);d=g+Math.floor(Math.log(e/f)/Math.log(h));f=e/Math.pow(h,d-g);d=cc(h,e,d-g)}this.i=e;this.L=f;this.s=g;g=m(a.extent)?Zb(a.extent):$b;(m(a.enableRotation)?a.enableRotation:1)?(e=a.constrainRotation,e=m(e)&&!0!==e?!1===e?ec:ja(e)?fc(e):ec:gc()):e=dc;this.J=new hc(g,d,e);m(a.resolution)?b.resolution=a.resolution:m(a.zoom)&&(b.resolution=this.constrainResolution(this.i,a.zoom-this.s));b.rotation=m(a.rotation)?a.rotation:0;this.I(b)}v(B,qd);-B.prototype.l=function(a){return this.J.center(a)};B.prototype.constrainResolution=function(a,b,d){return this.J.resolution(a,b||0,d||0)};B.prototype.constrainRotation=function(a,b){return this.J.rotation(a,b||0)};B.prototype.d=function(){return this.get("center")};B.prototype.getCenter=B.prototype.d;B.prototype.k=function(a){var b=this.d(),d=this.c();return[b[0]-d*a[0]/2,b[1]-d*a[1]/2,b[0]+d*a[0]/2,b[1]+d*a[1]/2]};B.prototype.R=function(){return this.t};B.prototype.c=function(){return this.get("resolution")};-B.prototype.getResolution=B.prototype.c;B.prototype.n=function(a,b){return Math.max(qe(a)/b[0],ne(a)/b[1])};function Ve(a){var b=a.i,d=Math.log(b/a.L)/Math.log(2);return function(a){return b/Math.pow(2,a*d)}}B.prototype.e=function(){return this.get("rotation")};B.prototype.getRotation=B.prototype.e;function We(a){var b=a.i,d=Math.log(b/a.L)/Math.log(2);return function(a){return Math.log(b/a)/Math.log(2)/d}}-function Xe(a){var b=a.d(),d=a.t,e=a.c();a=a.e();return{center:b.slice(),projection:m(d)?d:null,resolution:e,rotation:a}}l=B.prototype;l.hi=function(){var a,b=this.c();if(m(b)){var d,e=0;do{d=this.constrainResolution(this.i,e);if(d==b){a=e;break}++e}while(d>this.L)}return m(a)?this.s+a:a};l.re=function(a,b){if(!re(a)){this.Ma(ke(a));var d=this.n(a,b),e=this.constrainResolution(d,0,0);e<d&&(e=this.constrainResolution(e,-1,0));this.j(e)}};-l.vh=function(a,b,d){var e=m(d)?d:{};d=m(e.padding)?e.padding:[0,0,0,0];var f=m(e.constrainResolution)?e.constrainResolution:!0,g=m(e.nearest)?e.nearest:!1,h;m(e.minResolution)?h=e.minResolution:m(e.maxZoom)?h=this.constrainResolution(this.i,e.maxZoom-this.s,0):h=0;var k=a.o,n=this.e(),e=Math.cos(-n),n=Math.sin(-n),p=Infinity,q=Infinity,r=-Infinity,s=-Infinity;a=a.H;for(var u=0,z=k.length;u<z;u+=a)var y=k[u]*e-k[u+1]*n,A=k[u]*n+k[u+1]*e,p=Math.min(p,y),q=Math.min(q,A),r=Math.max(r,y),s=Math.max(s,-A);b=this.n([p,q,r,s],[b[0]-d[1]-d[3],b[1]-d[0]-d[2]]);b=isNaN(b)?h:Math.max(b,h);f&&(h=this.constrainResolution(b,0,0),!g&&h<b&&(h=this.constrainResolution(h,-1,0)),b=h);this.j(b);n=-n;g=(p+r)/2+(d[1]-d[3])/2*b;d=(q+s)/2+(d[0]-d[2])/2*b;this.Ma([g*e-d*n,d*e+g*n])};l.qh=function(a,b,d){var e=this.e(),f=Math.cos(-e),e=Math.sin(-e),g=a[0]*f-a[1]*e;a=a[1]*f+a[0]*e;var h=this.c(),g=g+(b[0]/2-d[0])*h;a+=(d[1]-b[1]/2)*h;e=-e;this.Ma([g*f-a*e,a*f+g*e])};function Ye(a){return null!=a.d()&&m(a.c())}-l.rotate=function(a,b){if(m(b)){var d,e=this.d();m(e)&&(d=[e[0]-b[0],e[1]-b[1]],Ad(d,a-this.e()),vd(d,b));this.Ma(d)}this.v(a)};l.Ma=function(a){this.set("center",a)};B.prototype.setCenter=B.prototype.Ma;function Ze(a,b){a.u[1]+=b}B.prototype.j=function(a){this.set("resolution",a)};B.prototype.setResolution=B.prototype.j;B.prototype.v=function(a){this.set("rotation",a)};B.prototype.setRotation=B.prototype.v;B.prototype.W=function(a){a=this.constrainResolution(this.i,a-this.s,0);this.j(a)};function $e(a){return 1-Math.pow(1-a,3)};function af(a){return 3*a*a-2*a*a*a}function bf(a){return a}function cf(a){return.5>a?af(2*a):1-af(2*(a-.5))};function df(a){var b=a.source,d=m(a.start)?a.start:ta(),e=b[0],f=b[1],g=m(a.duration)?a.duration:1E3,h=m(a.easing)?a.easing:af;return function(a,b){if(b.time<d)return b.animate=!0,b.viewHints[0]+=1,!0;if(b.time<d+g){var p=1-h((b.time-d)/g),q=e-b.viewState.center[0],r=f-b.viewState.center[1];b.animate=!0;b.viewState.center[0]+=p*q;b.viewState.center[1]+=p*r;b.viewHints[0]+=1;return!0}return!1}}-function ef(a){var b=m(a.rotation)?a.rotation:0,d=m(a.start)?a.start:ta(),e=m(a.duration)?a.duration:1E3,f=m(a.easing)?a.easing:af,g=m(a.anchor)?a.anchor:null;return function(a,k){if(k.time<d)return k.animate=!0,k.viewHints[0]+=1,!0;if(k.time<d+e){var n=1-f((k.time-d)/e),n=(b-k.viewState.rotation)*n;k.animate=!0;k.viewState.rotation+=n;if(null!==g){var p=k.viewState.center;p[0]-=g[0];p[1]-=g[1];Ad(p,n);vd(p,g)}k.viewHints[0]+=1;return!0}return!1}}-function ff(a){var b=a.resolution,d=m(a.start)?a.start:ta(),e=m(a.duration)?a.duration:1E3,f=m(a.easing)?a.easing:af;return function(a,h){if(h.time<d)return h.animate=!0,h.viewHints[0]+=1,!0;if(h.time<d+e){var k=1-f((h.time-d)/e),n=b-h.viewState.resolution;h.animate=!0;h.viewState.resolution+=k*n;h.viewHints[0]+=1;return!0}return!1}};function gf(a,b,d,e){return m(e)?(e[0]=a,e[1]=b,e[2]=d,e):[a,b,d]}function hf(a,b,d){return a+"/"+b+"/"+d}function jf(a){var b=a[0],d=Array(b),e=1<<b-1,f,g;for(f=0;f<b;++f)g=48,a[1]&e&&(g+=1),a[2]&e&&(g+=2),d[f]=String.fromCharCode(g),e>>=1;return d.join("")}function kf(a){return hf(a[0],a[1],a[2])};function lf(a,b,d,e){this.c=a;this.e=b;this.d=d;this.f=e}function mf(a,b,d,e,f){return m(f)?(f.c=a,f.e=b,f.d=d,f.f=e,f):new lf(a,b,d,e)}lf.prototype.contains=function(a){return nf(this,a[1],a[2])};function nf(a,b,d){return a.c<=b&&b<=a.e&&a.d<=d&&d<=a.f}function of(a,b){return a.c==b.c&&a.d==b.d&&a.e==b.e&&a.f==b.f};function pf(a){this.f=a.html;this.c=m(a.tileRanges)?a.tileRanges:null}pf.prototype.d=function(){return this.f};var qf=!Fb||Fb&&9<=Rb;!Gb&&!Fb||Fb&&Fb&&9<=Rb||Gb&&Ob("1.9.1");Fb&&Ob("9");Db("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));Db("action","cite","data","formaction","href","manifest","poster","src");Db("embed","iframe","link","object","script","style","template");function rf(a,b){this.x=m(a)?a:0;this.y=m(b)?b:0}l=rf.prototype;l.clone=function(){return new rf(this.x,this.y)};l.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};l.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};l.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};l.scale=function(a,b){var d=ja(b)?b:a;this.x*=a;this.y*=d;return this};function sf(a,b){this.width=a;this.height=b}l=sf.prototype;l.clone=function(){return new sf(this.width,this.height)};l.pa=function(){return!(this.width*this.height)};l.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};-l.scale=function(a,b){var d=ja(b)?b:a;this.width*=a;this.height*=d;return this};function tf(a){return a?new uf(vf(a)):xa||(xa=new uf)}function wf(a){var b=document;return ia(a)?b.getElementById(a):a}function xf(a,b){kb(b,function(b,e){"style"==e?a.style.cssText=b:"class"==e?a.className=b:"for"==e?a.htmlFor=b:e in yf?a.setAttribute(yf[e],b):0==e.lastIndexOf("aria-",0)||0==e.lastIndexOf("data-",0)?a.setAttribute(e,b):a[e]=b})}-var yf={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function zf(a){a=a.document.documentElement;return new sf(a.clientWidth,a.clientHeight)}-function Af(a,b,d){var e=arguments,f=document,g=e[0],h=e[1];if(!qf&&h&&(h.name||h.type)){g=["<",g];h.name&&g.push(' name="',Ba(h.name),'"');if(h.type){g.push(' type="',Ba(h.type),'"');var k={};Cb(k,h);delete k.type;h=k}g.push(">");g=g.join("")}g=f.createElement(g);h&&(ia(h)?g.className=h:ga(h)?g.className=h.join(" "):xf(g,h));2<e.length&&Bf(f,g,e,2);return g}-function Bf(a,b,d,e){function f(d){d&&b.appendChild(ia(d)?a.createTextNode(d):d)}for(;e<d.length;e++){var g=d[e];!ha(g)||la(g)&&0<g.nodeType?f(g):Pa(Cf(g)?Za(g):g,f)}}function Df(a){return document.createElement(a)}function Ef(a,b){Bf(vf(a),a,arguments,1)}function Ff(a){for(var b;b=a.firstChild;)a.removeChild(b)}function Gf(a,b,d){a.insertBefore(b,a.childNodes[d]||null)}function Hf(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function If(a,b){var d=b.parentNode;d&&d.replaceChild(a,b)}-function Jf(a){if(void 0!=a.firstElementChild)a=a.firstElementChild;else for(a=a.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}function Kf(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function vf(a){return 9==a.nodeType?a:a.ownerDocument||a.document}-function Cf(a){if(a&&"number"==typeof a.length){if(la(a))return"function"==typeof a.item||"string"==typeof a.item;if(ka(a))return"function"==typeof a.item}return!1}function uf(a){this.c=a||ba.document||document}function Lf(){return!0}function Mf(a){var b=a.c;a=Hb?b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;return Fb&&Ob("10")&&b.pageYOffset!=a.scrollTop?new rf(a.scrollLeft,a.scrollTop):new rf(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}-uf.prototype.appendChild=function(a,b){a.appendChild(b)};uf.prototype.contains=Kf;function Nf(a,b){var d=Df("CANVAS");m(a)&&(d.width=a);m(b)&&(d.height=b);return d.getContext("2d")}-var Of=function(){var a;return function(){if(!m(a))if(ba.getComputedStyle){var b=Df("P"),d,e={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.appendChild(b);for(var f in e)f in b.style&&(b.style[f]="translate(1px,1px)",d=ba.getComputedStyle(b).getPropertyValue(e[f]));Hf(b);a=d&&"none"!==d}else a=!1;return a}}(),Pf=function(){var a;return function(){if(!m(a))if(ba.getComputedStyle){var b=Df("P"),-d,e={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.appendChild(b);for(var f in e)f in b.style&&(b.style[f]="translate3d(1px,1px,1px)",d=ba.getComputedStyle(b).getPropertyValue(e[f]));Hf(b);a=d&&"none"!==d}else a=!1;return a}}();function Qf(a,b){var d=a.style;d.WebkitTransform=b;d.MozTransform=b;d.c=b;d.msTransform=b;d.transform=b;Fb&&!Tb&&(a.style.transformOrigin="0 0")}-function Rf(a,b){var d;if(Pf()){if(m(6)){var e=Array(16);for(d=0;16>d;++d)e[d]=b[d].toFixed(6);d=e.join(",")}else d=b.join(",");Qf(a,"matrix3d("+d+")")}else if(Of()){e=[b[0],b[1],b[4],b[5],b[12],b[13]];if(m(6)){var f=Array(6);for(d=0;6>d;++d)f[d]=e[d].toFixed(6);d=f.join(",")}else d=e.join(",");Qf(a,"matrix("+d+")")}else a.style.left=Math.round(b[12])+"px",a.style.top=Math.round(b[13])+"px"};var Tf=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Uf(a,b){var d,e,f=Tf.length;for(e=0;e<f;++e)try{if(d=a.getContext(Tf[e],b),null!==d)return d}catch(g){}return null};var Vf,Wf=ba.devicePixelRatio||1,Xf="ArrayBuffer"in ba,Yf=!1,Zf=function(){if(!("HTMLCanvasElement"in ba))return!1;try{var a=Nf();if(null===a)return!1;m(a.setLineDash)&&(Yf=!0);return!0}catch(b){return!1}}(),$f="DeviceOrientationEvent"in ba,ag="geolocation"in ba.navigator,bg="ontouchstart"in ba,cg="PointerEvent"in ba,dg=!!ba.navigator.msPointerEnabled,eg=!1,fg,gg=[];-if("WebGLRenderingContext"in ba)try{var hg=Df("CANVAS"),ig=Uf(hg,{uh:!0});null!==ig&&(eg=!0,fg=ig.getParameter(ig.MAX_TEXTURE_SIZE),gg=ig.getSupportedExtensions())}catch(jg){}Vf=eg;va=gg;ua=fg;function kg(a,b,d){qc.call(this,a,d);this.element=b}v(kg,qc);function lg(a){qd.call(this);this.c=m(a)?a:[];mg(this)}v(lg,qd);l=lg.prototype;l.clear=function(){for(;0<this.Mb();)this.pop()};l.Be=function(a){var b,d;b=0;for(d=a.length;b<d;++b)this.push(a[b]);return this};l.forEach=function(a,b){Pa(this.c,a,b)};l.lj=function(){return this.c};l.item=function(a){return this.c[a]};l.Mb=function(){return this.get("length")};l.Cd=function(a,b){ab(this.c,a,0,b);mg(this);this.dispatchEvent(new kg("add",b,this))};-l.pop=function(){return this.Pe(this.Mb()-1)};l.push=function(a){var b=this.c.length;this.Cd(b,a);return b};l.remove=function(a){var b=this.c,d,e;d=0;for(e=b.length;d<e;++d)if(b[d]===a)return this.Pe(d)};l.Pe=function(a){var b=this.c[a];Oa.splice.call(this.c,a,1);mg(this);this.dispatchEvent(new kg("remove",b,this));return b};-l.Yl=function(a,b){var d=this.Mb();if(a<d)d=this.c[a],this.c[a]=b,this.dispatchEvent(new kg("remove",d,this)),this.dispatchEvent(new kg("add",b,this));else{for(;d<a;++d)this.Cd(d,void 0);this.Cd(a,b)}};function mg(a){a.set("length",a.c.length)};var ng=/^#(?:[0-9a-f]{3}){1,2}$/i,og=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,pg=/^(?: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 qg(a){return ga(a)?a:rg(a)}function sg(a){if(!ia(a)){var b=a[0];b!=(b|0)&&(b=b+.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("+b+","+d+","+e+","+a[3]+")"}return a}-var rg=function(){var a={},b=0;return function(d){var e;if(a.hasOwnProperty(d))e=a[d];else{if(1024<=b){e=0;for(var f in a)0===(e++&3)&&(delete a[f],--b)}var g,h;ng.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=pg.exec(d))?(e=Number(h[1]),f=Number(h[2]),g=Number(h[3]),h=Number(h[4]),e=[e,f,g,h],e=tg(e,e)):(h=og.exec(d))?(e=Number(h[1]),f=Number(h[2]),g=Number(h[3]),-e=[e,f,g,1],e=tg(e,e)):e=void 0;a[d]=e;++b}return e}}();function tg(a,b){var d=m(b)?b:[];d[0]=Vb(a[0]+.5|0,0,255);d[1]=Vb(a[1]+.5|0,0,255);d[2]=Vb(a[2]+.5|0,0,255);d[3]=Vb(a[3],0,1);return d};function ug(){this.k=Hd();this.f=void 0;this.c=Hd();this.e=void 0;this.d=Hd();this.i=void 0;this.j=Hd();this.l=void 0;this.q=Hd()}-function vg(a,b,d,e,f){var g=!1;m(b)&&b!==a.f&&(g=a.c,Ld(g),g[12]=b,g[13]=b,g[14]=b,g[15]=1,a.f=b,g=!0);if(m(d)&&d!==a.e){g=a.d;Ld(g);g[0]=d;g[5]=d;g[10]=d;g[15]=1;var h=-.5*d+.5;g[12]=h;g[13]=h;g[14]=h;g[15]=1;a.e=d;g=!0}m(e)&&e!==a.i&&(g=Math.cos(e),h=Math.sin(e),Id(a.j,.213+.787*g-.213*h,.213-.213*g+.143*h,.213-.213*g-.787*h,0,.715-.715*g-.715*h,.715+.285*g+.14*h,.715-.715*g+.715*h,0,.072-.072*g+.928*h,.072-.072*g-.283*h,.072+.928*g+.072*h,0,0,0,0,1),a.i=e,g=!0);m(f)&&f!==a.l&&(Id(a.q,.213+.787*-f,.213-.213*f,.213-.213*f,0,.715-.715*f,.715+.285*f,.715-.715*f,0,.072-.072*f,.072-.072*f,.072+.928*f,0,0,0,0,1),a.l=f,g=!0);g&&(g=a.k,Ld(g),m(d)&&Md(g,a.d,g),m(b)&&Md(g,a.c,g),m(f)&&Md(g,a.q,g),m(e)&&Md(g,a.j,g));return a.k};function wg(a){if(a.classList)return a.classList;a=a.className;return ia(a)&&a.match(/\S+/g)||[]}function xg(a,b){return a.classList?a.classList.contains(b):Va(wg(a),b)}function yg(a,b){a.classList?a.classList.add(b):xg(a,b)||(a.className+=0<a.className.length?" "+b:b)}function zg(a,b){a.classList?a.classList.remove(b):xg(a,b)&&(a.className=Qa(wg(a),function(a){return a!=b}).join(" "))}function Ag(a,b){xg(a,b)?zg(a,b):yg(a,b)};function Bg(a,b,d,e){this.top=a;this.right=b;this.bottom=d;this.left=e}l=Bg.prototype;l.clone=function(){return new Bg(this.top,this.right,this.bottom,this.left)};l.contains=function(a){return this&&a?a instanceof Bg?a.left>=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,b){var d=ja(b)?b:a;this.left*=a;this.right*=a;this.top*=d;this.bottom*=d;return this};function Cg(a,b,d,e){this.left=a;this.top=b;this.width=d;this.height=e}l=Cg.prototype;l.clone=function(){return new Cg(this.left,this.top,this.width,this.height)};l.contains=function(a){return a instanceof Cg?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};-function Dg(a,b){var d=b.x<a.left?a.left-b.x:Math.max(b.x-(a.left+a.width),0),e=b.y<a.top?a.top-b.y:Math.max(b.y-(a.top+a.height),0);return d*d+e*e}l.distance=function(a){return Math.sqrt(Dg(this,a))};l.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};-l.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};l.scale=function(a,b){var d=ja(b)?b:a;this.left*=a;this.width*=a;this.top*=d;this.height*=d;return this};function Eg(a,b){var d=vf(a);return d.defaultView&&d.defaultView.getComputedStyle&&(d=d.defaultView.getComputedStyle(a,null))?d[b]||d.getPropertyValue(b)||"":""}function Fg(a,b){return Eg(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}function Gg(a,b,d){var e;b instanceof rf?(e=b.x,b=b.y):(e=b,b=d);a.style.left=Hg(e);a.style.top=Hg(b)}-function Ig(a){var b;try{b=a.getBoundingClientRect()}catch(d){return{left:0,top:0,right:0,bottom:0}}Fb&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}-function Jg(a){if(1==a.nodeType)return a=Ig(a),new rf(a.left,a.top);var b=ka(a.xh),d=a;a.targetTouches&&a.targetTouches.length?d=a.targetTouches[0]:b&&a.c.targetTouches&&a.c.targetTouches.length&&(d=a.c.targetTouches[0]);return new rf(d.clientX,d.clientY)}function Hg(a){"number"==typeof a&&(a=a+"px");return a}-function Kg(a){var b=Lg;if("none"!=Fg(a,"display"))return b(a);var d=a.style,e=d.display,f=d.visibility,g=d.position;d.visibility="hidden";d.position="absolute";d.display="inline";a=b(a);d.display=e;d.position=g;d.visibility=f;return a}function Lg(a){var b=a.offsetWidth,d=a.offsetHeight,e=Hb&&!b&&!d;return m(b)&&!e||!a.getBoundingClientRect?new sf(b,d):(a=Ig(a),new sf(a.right-a.left,a.bottom-a.top))}function Mg(a,b){a.style.display=b?"":"none"}-function Ng(a,b,d,e){if(/^\d+px?$/.test(b))return parseInt(b,10);var f=a.style[d],g=a.runtimeStyle[d];a.runtimeStyle[d]=a.currentStyle[d];a.style[d]=b;b=a.style[e];a.style[d]=f;a.runtimeStyle[d]=g;return b}function Og(a,b){var d=a.currentStyle?a.currentStyle[b]:null;return d?Ng(a,d,"left","pixelLeft"):0}-function Pg(a,b){if(Fb){var d=Og(a,b+"Left"),e=Og(a,b+"Right"),f=Og(a,b+"Top"),g=Og(a,b+"Bottom");return new Bg(f,e,g,d)}d=Eg(a,b+"Left");e=Eg(a,b+"Right");f=Eg(a,b+"Top");g=Eg(a,b+"Bottom");return new Bg(parseFloat(f),parseFloat(e),parseFloat(g),parseFloat(d))}var Qg={thin:2,medium:4,thick:6};function Rg(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var d=a.currentStyle?a.currentStyle[b+"Width"]:null;return d in Qg?Qg[d]:Ng(a,d,"left","pixelLeft")}-function Sg(a){if(Fb&&!(Fb&&9<=Rb)){var b=Rg(a,"borderLeft"),d=Rg(a,"borderRight"),e=Rg(a,"borderTop");a=Rg(a,"borderBottom");return new Bg(e,d,a,b)}b=Eg(a,"borderLeftWidth");d=Eg(a,"borderRightWidth");e=Eg(a,"borderTopWidth");a=Eg(a,"borderBottomWidth");return new Bg(parseFloat(e),parseFloat(d),parseFloat(a),parseFloat(b))};function Tg(a,b,d){qc.call(this,a);this.map=b;this.frameState=m(d)?d:null}v(Tg,qc);function Ug(a){qd.call(this);this.element=m(a.element)?a.element:null;this.c=this.l=null;this.u=[];this.render=m(a.render)?a.render:ca;m(a.target)&&this.d(a.target)}v(Ug,qd);Ug.prototype.T=function(){Hf(this.element);Ug.X.T.call(this)};Ug.prototype.j=function(){return this.c};-Ug.prototype.setMap=function(a){null===this.c||Hf(this.element);0!=this.u.length&&(Pa(this.u,Wc),this.u.length=0);this.c=a;null!==this.c&&((null===this.l?a.L:this.l).appendChild(this.element),this.render!==ca&&this.u.push(w(a,"postrender",this.render,!1,this)),a.render())};Ug.prototype.d=function(a){this.l=wf(a)};function Vg(a){a=m(a)?a:{};this.v=Df("UL");this.s=Df("LI");this.v.appendChild(this.s);Mg(this.s,!1);this.e=m(a.collapsed)?a.collapsed:!0;this.k=m(a.collapsible)?a.collapsible:!0;this.k||(this.e=!1);var b=m(a.className)?a.className:"ol-attribution",d=m(a.tipLabel)?a.tipLabel:"Attributions",e=m(a.collapseLabel)?a.collapseLabel:"\u00bb";this.J=ia(e)?Af("SPAN",{},e):e;e=m(a.label)?a.label:"i";this.L=ia(e)?Af("SPAN",{},e):e;d=Af("BUTTON",{type:"button",title:d},this.k&&!this.e?this.J:this.L);w(d,"click",-this.Fj,!1,this);w(d,["mouseout",uc],function(){this.blur()},!1);b=Af("DIV",b+" ol-unselectable ol-control"+(this.e&&this.k?" ol-collapsed":"")+(this.k?"":" ol-uncollapsible"),this.v,d);Ug.call(this,{element:b,render:m(a.render)?a.render:Wg,target:a.target});this.t=!0;this.n={};this.i={};this.R={}}v(Vg,Ug);-function Wg(a){a=a.frameState;if(null===a)this.t&&(Mg(this.element,!1),this.t=!1);else{var b,d,e,f,g,h,k,n,p,q=a.layerStatesArray,r=Ab(a.attributions),s={};d=0;for(b=q.length;d<b;d++)if(e=q[d].layer.c(),null!==e&&(p=ma(e).toString(),n=e.j,null!==n))for(e=0,f=n.length;e<f;e++)if(h=n[e],k=ma(h).toString(),!(k in r)){g=a.usedTiles[p];var u;if(u=m(g))a:if(null===h.c)u=!0;else{var z=u=void 0,y=void 0,A=void 0;for(A in g)if(A in h.c)for(y=g[A],u=0,z=h.c[A].length;u<z;++u){var D=h.c[A][u];if(D.c<=y.e&&D.e>=-y.c&&D.d<=y.f&&D.f>=y.d){u=!0;break a}}u=!1}u?(k in s&&delete s[k],r[k]=h):s[k]=h}b=[r,s];d=b[0];b=b[1];for(var x in this.n)x in d?(this.i[x]||(Mg(this.n[x],!0),this.i[x]=!0),delete d[x]):x in b?(this.i[x]&&(Mg(this.n[x],!1),delete this.i[x]),delete b[x]):(Hf(this.n[x]),delete this.n[x],delete this.i[x]);for(x in d)p=Df("LI"),p.innerHTML=d[x].f,this.v.appendChild(p),this.n[x]=p,this.i[x]=!0;for(x in b)p=Df("LI"),p.innerHTML=b[x].f,Mg(p,!1),this.v.appendChild(p),this.n[x]=p;x=!vb(this.i)||!vb(a.logos);-this.t!=x&&(Mg(this.element,x),this.t=x);x&&vb(this.i)?yg(this.element,"ol-logo-only"):zg(this.element,"ol-logo-only");var M;a=a.logos;x=this.R;for(M in x)M in a||(Hf(x[M]),delete x[M]);for(var Q in a)Q in x||(M=new Image,M.src=Q,d=a[Q],""===d?d=M:(d=Af("A",{href:d}),d.appendChild(M)),this.s.appendChild(d),x[Q]=d);Mg(this.s,!vb(a))}}l=Vg.prototype;l.Fj=function(a){a.preventDefault();Xg(this)};function Xg(a){Ag(a.element,"ol-collapsed");a.e?If(a.J,a.L):If(a.L,a.J);a.e=!a.e}l.Ej=function(){return this.k};-l.Hj=function(a){this.k!==a&&(this.k=a,Ag(this.element,"ol-uncollapsible"),!a&&this.e&&Xg(this))};l.Gj=function(a){this.k&&this.e!==a&&Xg(this)};l.Dj=function(){return this.e};function Yg(a){a=m(a)?a:{};var b=m(a.className)?a.className:"ol-rotate",d=m(a.label)?a.label:"\u21e7";this.e=null;ia(d)?this.e=Af("SPAN","ol-compass",d):(this.e=d,yg(this.e,"ol-compass"));d=Af("BUTTON",{"class":b+"-reset",type:"button",title:m(a.tipLabel)?a.tipLabel:"Reset rotation"},this.e);w(d,"click",Yg.prototype.s,!1,this);w(d,["mouseout",uc],function(){this.blur()},!1);b=Af("DIV",b+" ol-unselectable ol-control",d);Ug.call(this,{element:b,render:m(a.render)?a.render:Zg,target:a.target});this.k=-m(a.duration)?a.duration:250;this.i=m(a.autoHide)?a.autoHide:!0;this.n=void 0;this.i&&yg(this.element,"ol-hidden")}v(Yg,Ug);Yg.prototype.s=function(a){a.preventDefault();a=this.c;var b=a.c();if(null!==b){for(var d=b.e();d<-Math.PI;)d+=2*Math.PI;for(;d>Math.PI;)d-=2*Math.PI;m(d)&&(0<this.k&&a.Qa(ef({rotation:d,duration:this.k,easing:$e})),b.v(0))}};-function Zg(a){a=a.frameState;if(null!==a){a=a.viewState.rotation;if(a!=this.n){var b="rotate("+180*a/Math.PI+"deg)";if(this.i){var d=this.element;0===a?yg(d,"ol-hidden"):zg(d,"ol-hidden")}this.e.style.msTransform=b;this.e.style.webkitTransform=b;this.e.style.transform=b}this.n=a}};function $g(a){a=m(a)?a:{};var b=m(a.className)?a.className:"ol-zoom",d=m(a.delta)?a.delta:1,e=m(a.zoomOutLabel)?a.zoomOutLabel:"\u2212",f=m(a.zoomOutTipLabel)?a.zoomOutTipLabel:"Zoom out",g=Af("BUTTON",{"class":b+"-in",type:"button",title:m(a.zoomInTipLabel)?a.zoomInTipLabel:"Zoom in"},m(a.zoomInLabel)?a.zoomInLabel:"+");w(g,"click",sa($g.prototype.i,d),!1,this);w(g,["mouseout",uc],function(){this.blur()},!1);e=Af("BUTTON",{"class":b+"-out",type:"button",title:f},e);w(e,"click",sa($g.prototype.i,--d),!1,this);w(e,["mouseout",uc],function(){this.blur()},!1);b=Af("DIV",b+" ol-unselectable ol-control",g,e);Ug.call(this,{element:b,target:a.target});this.e=m(a.duration)?a.duration:250}v($g,Ug);$g.prototype.i=function(a,b){b.preventDefault();var d=this.c,e=d.c();if(null!==e){var f=e.c();m(f)&&(0<this.e&&d.Qa(ff({resolution:f,duration:this.e,easing:$e})),d=e.constrainResolution(f,a),e.j(d))}};function ah(a){a=m(a)?a:{};var b=new lg;(m(a.zoom)?a.zoom:1)&&b.push(new $g(a.zoomOptions));(m(a.rotate)?a.rotate:1)&&b.push(new Yg(a.rotateOptions));(m(a.attribution)?a.attribution:1)&&b.push(new Vg(a.attributionOptions));return b};var bh=Hb?"webkitfullscreenchange":Gb?"mozfullscreenchange":Fb?"MSFullscreenChange":"fullscreenchange";function ch(){var a=tf().c,b=a.body;return!!(b.webkitRequestFullscreen||b.mozRequestFullScreen&&a.mozFullScreenEnabled||b.msRequestFullscreen&&a.msFullscreenEnabled||b.requestFullscreen&&a.fullscreenEnabled)}-function dh(a){a.webkitRequestFullscreen?a.webkitRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.msRequestFullscreen?a.msRequestFullscreen():a.requestFullscreen&&a.requestFullscreen()}function eh(){var a=tf().c;return!!(a.webkitIsFullScreen||a.mozFullScreen||a.msFullscreenElement||a.fullscreenElement)};function fh(a){a=m(a)?a:{};this.i=m(a.className)?a.className:"ol-full-screen";var b=m(a.label)?a.label:"\u2194";this.e=ia(b)?document.createTextNode(String(b)):b;b=m(a.labelActive)?a.labelActive:"\u00d7";this.k=ia(b)?document.createTextNode(String(b)):b;b=m(a.tipLabel)?a.tipLabel:"Toggle full-screen";b=Af("BUTTON",{"class":this.i+"-"+eh(),type:"button",title:b},this.e);w(b,"click",this.t,!1,this);w(b,["mouseout",uc],function(){this.blur()},!1);w(ba.document,bh,this.n,!1,this);var d=this.i+" ol-unselectable ol-control "+-(ch()?"":"ol-unsupported"),b=Af("DIV",d,b);Ug.call(this,{element:b,target:a.target});this.s=m(a.keys)?a.keys:!1}v(fh,Ug);-fh.prototype.t=function(a){a.preventDefault();ch()&&(a=this.c,null!==a&&(eh()?(a=tf().c,a.webkitCancelFullScreen?a.webkitCancelFullScreen():a.mozCancelFullScreen?a.mozCancelFullScreen():a.msExitFullscreen?a.msExitFullscreen():a.exitFullscreen&&a.exitFullscreen()):(a=a.vc(),a=wf(a),this.s?a.mozRequestFullScreenWithKeys?a.mozRequestFullScreenWithKeys():a.webkitRequestFullscreen?a.webkitRequestFullscreen():dh(a):dh(a))))};-fh.prototype.n=function(){var a=this.c;eh()?If(this.k,this.e):If(this.e,this.k);null===a||a.u()};function gh(a){a=m(a)?a:{};var b=Af("DIV",m(a.className)?a.className:"ol-mouse-position");Ug.call(this,{element:b,render:m(a.render)?a.render:hh,target:a.target});w(this,ud("projection"),this.W,!1,this);m(a.coordinateFormat)&&this.J(a.coordinateFormat);m(a.projection)&&this.v(Ae(a.projection));this.Z=m(a.undefinedHTML)?a.undefinedHTML:"";this.s=b.innerHTML;this.k=this.i=this.e=null}v(gh,Ug);-function hh(a){a=a.frameState;null===a?this.e=null:this.e!=a.viewState.projection&&(this.e=a.viewState.projection,this.i=null);ih(this,this.k)}gh.prototype.W=function(){this.i=null};gh.prototype.n=function(){return this.get("coordinateFormat")};gh.prototype.getCoordinateFormat=gh.prototype.n;gh.prototype.t=function(){return this.get("projection")};gh.prototype.getProjection=gh.prototype.t;gh.prototype.L=function(a){this.k=this.c.ld(a.c);ih(this,this.k)};-gh.prototype.R=function(){ih(this,null);this.k=null};gh.prototype.setMap=function(a){gh.X.setMap.call(this,a);null!==a&&(a=a.d,this.u.push(w(a,"mousemove",this.L,!1,this),w(a,"mouseout",this.R,!1,this)))};gh.prototype.J=function(a){this.set("coordinateFormat",a)};gh.prototype.setCoordinateFormat=gh.prototype.J;gh.prototype.v=function(a){this.set("projection",a)};gh.prototype.setProjection=gh.prototype.v;-function ih(a,b){var d=a.Z;if(null!==b&&null!==a.e){if(null===a.i){var e=a.t();a.i=m(e)?ze(a.e,e):Te}e=a.c.va(b);null!==e&&(a.i(e,e),d=a.n(),d=m(d)?d(e):e.toString())}m(a.s)&&d==a.s||(a.element.innerHTML=d,a.s=d)};function jh(a,b,d){lc.call(this);this.e=a;this.d=d;this.c=b||window;this.f=ra(this.lf,this)}v(jh,lc);l=jh.prototype;l.ea=null;l.Ue=!1;l.start=function(){kh(this);this.Ue=!1;var a=lh(this),b=mh(this);a&&!b&&this.c.mozRequestAnimationFrame?(this.ea=w(this.c,"MozBeforePaint",this.f),this.c.mozRequestAnimationFrame(null),this.Ue=!0):this.ea=a&&b?a.call(this.c,this.f):this.c.setTimeout(ed(this.f),20)};-function kh(a){if(null!=a.ea){var b=lh(a),d=mh(a);b&&!d&&a.c.mozRequestAnimationFrame?Wc(a.ea):b&&d?d.call(a.c,a.ea):a.c.clearTimeout(a.ea)}a.ea=null}l.lf=function(){this.Ue&&this.ea&&Wc(this.ea);this.ea=null;this.e.call(this.d,ta())};l.T=function(){kh(this);jh.X.T.call(this)};function lh(a){a=a.c;return a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||null}-function mh(a){a=a.c;return a.cancelAnimationFrame||a.cancelRequestAnimationFrame||a.webkitCancelRequestAnimationFrame||a.mozCancelRequestAnimationFrame||a.oCancelRequestAnimationFrame||a.msCancelRequestAnimationFrame||null};function nh(a){ba.setTimeout(function(){throw a;},0)}function oh(a,b){var d=a;b&&(d=ra(a,b));d=ph(d);!ka(ba.setImmediate)||ba.Window&&ba.Window.prototype.setImmediate==ba.setImmediate?(qh||(qh=rh()),qh(d)):ba.setImmediate(d)}var qh;-function rh(){var a=ba.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&(a=function(){var a=document.createElement("iframe");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var d="callImmediate"+Math.random(),e="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,a=ra(function(a){if(("*"==e||a.origin==e)&&a.data==d)this.port1.onmessage()},-this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(d,e)}}});if("undefined"!==typeof a&&!jb("Trident")&&!jb("MSIE")){var b=new a,d={},e=d;b.port1.onmessage=function(){if(m(d.next)){d=d.next;var a=d.ff;d.ff=null;a()}};return function(a){e.next={ff:a};e=e.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("script")?function(a){var b=document.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=-null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){ba.setTimeout(a,0)}}var ph=dd;function sh(a){if("function"==typeof a.sb)return a.sb();if(ia(a))return a.split("");if(ha(a)){for(var b=[],d=a.length,e=0;e<d;e++)b.push(a[e]);return b}return qb(a)}-function th(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(ha(a)||ia(a))Pa(a,b,void 0);else{var d;if("function"==typeof a.K)d=a.K();else if("function"!=typeof a.sb)if(ha(a)||ia(a)){d=[];for(var e=a.length,f=0;f<e;f++)d.push(f)}else d=rb(a);else d=void 0;for(var e=sh(a),f=e.length,g=0;g<f;g++)b.call(void 0,e[g],d&&d[g],a)}};function uh(a,b){this.f={};this.c=[];this.d=0;var d=arguments.length;if(1<d){if(d%2)throw Error("Uneven number of arguments");for(var e=0;e<d;e+=2)this.set(arguments[e],arguments[e+1])}else if(a){a instanceof uh?(d=a.K(),e=a.sb()):(d=rb(a),e=qb(a));for(var f=0;f<d.length;f++)this.set(d[f],e[f])}}l=uh.prototype;l.Xb=function(){return this.d};l.sb=function(){vh(this);for(var a=[],b=0;b<this.c.length;b++)a.push(this.f[this.c[b]]);return a};l.K=function(){vh(this);return this.c.concat()};-l.pa=function(){return 0==this.d};l.clear=function(){this.f={};this.d=this.c.length=0};l.remove=function(a){return wh(this.f,a)?(delete this.f[a],this.d--,this.c.length>2*this.d&&vh(this),!0):!1};function vh(a){if(a.d!=a.c.length){for(var b=0,d=0;b<a.c.length;){var e=a.c[b];wh(a.f,e)&&(a.c[d++]=e);b++}a.c.length=d}if(a.d!=a.c.length){for(var f={},d=b=0;b<a.c.length;)e=a.c[b],wh(f,e)||(a.c[d++]=e,f[e]=1),b++;a.c.length=d}}l.get=function(a,b){return wh(this.f,a)?this.f[a]:b};-l.set=function(a,b){wh(this.f,a)||(this.d++,this.c.push(a));this.f[a]=b};l.forEach=function(a,b){for(var d=this.K(),e=0;e<d.length;e++){var f=d[e],g=this.get(f);a.call(b,g,f,this)}};l.clone=function(){return new uh(this)};function wh(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function xh(){this.c=ta()}new xh;xh.prototype.set=function(a){this.c=a};xh.prototype.get=function(){return this.c};function yh(a){hd.call(this);this.Zc=a||window;this.xd=w(this.Zc,"resize",this.Ki,!1,this);this.yd=zf(this.Zc||window)}v(yh,hd);l=yh.prototype;l.xd=null;l.Zc=null;l.yd=null;l.T=function(){yh.X.T.call(this);this.xd&&(Wc(this.xd),this.xd=null);this.yd=this.Zc=null};l.Ki=function(){var a=zf(this.Zc||window),b=this.yd;a==b||a&&b&&a.width==b.width&&a.height==b.height||(this.yd=a,this.dispatchEvent("resize"))};function zh(a,b,d,e,f){if(!(Fb||Hb&&Ob("525")))return!0;if(Ib&&f)return Ah(a);if(f&&!e)return!1;ja(b)&&(b=Bh(b));if(!d&&(17==b||18==b||Ib&&91==b))return!1;if(Hb&&e&&d)switch(a){case 220:case 219:case 221:case 192:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:return!1}if(Fb&&e&&b==a)return!1;switch(a){case 13:return!0;case 27:return!Hb}return Ah(a)}-function Ah(a){if(48<=a&&57>=a||96<=a&&106>=a||65<=a&&90>=a||Hb&&0==a)return!0;switch(a){case 32:case 63:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:return!0;default:return!1}}function Bh(a){if(Gb)a=Ch(a);else if(Ib&&Hb)a:switch(a){case 93:a=91;break a}return a}-function Ch(a){switch(a){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return a}};function Dh(a,b){hd.call(this);a&&Eh(this,a,b)}v(Dh,hd);l=Dh.prototype;l.fa=null;l.Dd=null;l.ye=null;l.Ed=null;l.Va=-1;l.Kb=-1;l.le=!1;-var Fh={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},Gh={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},Hh=Fb||Hb&&Ob("525"),Ih=Ib&&Gb;-Dh.prototype.c=function(a){Hb&&(17==this.Va&&!a.q||18==this.Va&&!a.f||Ib&&91==this.Va&&!a.n)&&(this.Kb=this.Va=-1);-1==this.Va&&(a.q&&17!=a.j?this.Va=17:a.f&&18!=a.j?this.Va=18:a.n&&91!=a.j&&(this.Va=91));Hh&&!zh(a.j,this.Va,a.e,a.q,a.f)?this.handleEvent(a):(this.Kb=Bh(a.j),Ih&&(this.le=a.f))};Dh.prototype.f=function(a){this.Kb=this.Va=-1;this.le=a.f};-Dh.prototype.handleEvent=function(a){var b=a.c,d,e,f=b.altKey;Fb&&"keypress"==a.type?(d=this.Kb,e=13!=d&&27!=d?b.keyCode:0):Hb&&"keypress"==a.type?(d=this.Kb,e=0<=b.charCode&&63232>b.charCode&&Ah(d)?b.charCode:0):Eb?(d=this.Kb,e=Ah(d)?b.keyCode:0):(d=b.keyCode||this.Kb,e=b.charCode||0,Ih&&(f=this.le),Ib&&63==e&&224==d&&(d=191));var g=d=Bh(d),h=b.keyIdentifier;d?63232<=d&&d in Fh?g=Fh[d]:25==d&&a.e&&(g=9):h&&h in Gh&&(g=Gh[h]);this.Va=g;a=new Jh(g,e,0,b);a.f=f;this.dispatchEvent(a)};-function Eh(a,b,d){a.Ed&&Kh(a);a.fa=b;a.Dd=w(a.fa,"keypress",a,d);a.ye=w(a.fa,"keydown",a.c,d,a);a.Ed=w(a.fa,"keyup",a.f,d,a)}function Kh(a){a.Dd&&(Wc(a.Dd),Wc(a.ye),Wc(a.Ed),a.Dd=null,a.ye=null,a.Ed=null);a.fa=null;a.Va=-1;a.Kb=-1}Dh.prototype.T=function(){Dh.X.T.call(this);Kh(this)};function Jh(a,b,d,e){wc.call(this,e);this.type="key";this.j=a;this.l=b}v(Jh,wc);function Lh(a,b){hd.call(this);var d=this.fa=a;(d=la(d)&&1==d.nodeType?this.fa:this.fa?this.fa.body:null)&&Fg(d,"direction");this.c=w(this.fa,Gb?"DOMMouseScroll":"mousewheel",this,b)}v(Lh,hd);-Lh.prototype.handleEvent=function(a){var b=0,d=0,e=0;a=a.c;if("mousewheel"==a.type){d=1;if(Fb||Hb&&(Jb||Ob("532.0")))d=40;e=Mh(-a.wheelDelta,d);m(a.wheelDeltaX)?(b=Mh(-a.wheelDeltaX,d),d=Mh(-a.wheelDeltaY,d)):d=e}else e=a.detail,100<e?e=3:-100>e&&(e=-3),m(a.axis)&&a.axis===a.HORIZONTAL_AXIS?b=e:d=e;ja(this.f)&&Vb(b,-this.f,this.f);ja(this.d)&&(d=Vb(d,-this.d,this.d));b=new Nh(e,a,0,d);this.dispatchEvent(b)};function Mh(a,b){return Hb&&(Ib||Kb)&&0!=a%b?a:a/b}-Lh.prototype.T=function(){Lh.X.T.call(this);Wc(this.c);this.c=null};function Nh(a,b,d,e){wc.call(this,b);this.type="mousewheel";this.detail=a;this.u=e}v(Nh,wc);function Oh(a,b,d){qc.call(this,a);this.c=b;a=m(d)?d:{};this.buttons=Ph(a);this.pressure=Qh(a,this.buttons);this.bubbles=yb(a,"bubbles",!1);this.cancelable=yb(a,"cancelable",!1);this.view=yb(a,"view",null);this.detail=yb(a,"detail",null);this.screenX=yb(a,"screenX",0);this.screenY=yb(a,"screenY",0);this.clientX=yb(a,"clientX",0);this.clientY=yb(a,"clientY",0);this.button=yb(a,"button",0);this.relatedTarget=yb(a,"relatedTarget",null);this.pointerId=yb(a,"pointerId",0);this.width=yb(a,"width",0);this.height=-yb(a,"height",0);this.pointerType=yb(a,"pointerType","");this.isPrimary=yb(a,"isPrimary",!1);b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})}v(Oh,qc);function Ph(a){if(a.buttons||Rh)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a}function Qh(a,b){var d=0;a.pressure?d=a.pressure:d=b?.5:0;return d}var Rh=!1;try{Rh=1===(new MouseEvent("click",{buttons:1})).buttons}catch(Sh){};function Th(a,b){this.c=a;this.j=b};function Uh(a){Th.call(this,a,{mousedown:this.Yi,mousemove:this.Zi,mouseup:this.bj,mouseover:this.aj,mouseout:this.$i});this.f=a.f;this.d=[]}v(Uh,Th);function Vh(a,b){for(var d=a.d,e=b.clientX,f=b.clientY,g=0,h=d.length,k;g<h&&(k=d[g]);g++){var n=Math.abs(f-k[1]);if(25>=Math.abs(e-k[0])&&25>=n)return!0}return!1}function Xh(a){var b=Yh(a,a.c),d=b.preventDefault;b.preventDefault=function(){a.preventDefault();d()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}l=Uh.prototype;-l.Yi=function(a){if(!Vh(this,a)){(1).toString()in this.f&&this.cancel(a);var b=Xh(a);this.f[(1).toString()]=a;Zh(this.c,$h,b,a)}};l.Zi=function(a){if(!Vh(this,a)){var b=Xh(a);Zh(this.c,ai,b,a)}};l.bj=function(a){if(!Vh(this,a)){var b=this.f[(1).toString()];b&&b.button===a.button&&(b=Xh(a),Zh(this.c,bi,b,a),xb(this.f,(1).toString()))}};l.aj=function(a){if(!Vh(this,a)){var b=Xh(a);ci(this.c,b,a)}};l.$i=function(a){if(!Vh(this,a)){var b=Xh(a);di(this.c,b,a)}};-l.cancel=function(a){var b=Xh(a);this.c.cancel(b,a);xb(this.f,(1).toString())};function ei(a){Th.call(this,a,{MSPointerDown:this.gj,MSPointerMove:this.hj,MSPointerUp:this.kj,MSPointerOut:this.ij,MSPointerOver:this.jj,MSPointerCancel:this.fj,MSGotPointerCapture:this.dj,MSLostPointerCapture:this.ej});this.f=a.f;this.d=["","unavailable","touch","pen","mouse"]}v(ei,Th);function fi(a,b){var d=b;ja(b.c.pointerType)&&(d=Yh(b,b.c),d.pointerType=a.d[b.c.pointerType]);return d}l=ei.prototype;l.gj=function(a){this.f[a.c.pointerId]=a;var b=fi(this,a);Zh(this.c,$h,b,a)};-l.hj=function(a){var b=fi(this,a);Zh(this.c,ai,b,a)};l.kj=function(a){var b=fi(this,a);Zh(this.c,bi,b,a);xb(this.f,a.c.pointerId)};l.ij=function(a){var b=fi(this,a);di(this.c,b,a)};l.jj=function(a){var b=fi(this,a);ci(this.c,b,a)};l.fj=function(a){var b=fi(this,a);this.c.cancel(b,a);xb(this.f,a.c.pointerId)};l.ej=function(a){this.c.dispatchEvent(new Oh("lostpointercapture",a,a.c))};l.dj=function(a){this.c.dispatchEvent(new Oh("gotpointercapture",a,a.c))};function gi(a){Th.call(this,a,{pointerdown:this.tl,pointermove:this.ul,pointerup:this.xl,pointerout:this.vl,pointerover:this.wl,pointercancel:this.sl,gotpointercapture:this.ii,lostpointercapture:this.Xi})}v(gi,Th);l=gi.prototype;l.tl=function(a){hi(this.c,a)};l.ul=function(a){hi(this.c,a)};l.xl=function(a){hi(this.c,a)};l.vl=function(a){hi(this.c,a)};l.wl=function(a){hi(this.c,a)};l.sl=function(a){hi(this.c,a)};l.Xi=function(a){hi(this.c,a)};l.ii=function(a){hi(this.c,a)};function ii(a,b){Th.call(this,a,{touchstart:this.qm,touchmove:this.pm,touchend:this.om,touchcancel:this.nm});this.f=a.f;this.k=b;this.d=void 0;this.i=0;this.e=void 0}v(ii,Th);l=ii.prototype;l.qg=function(){this.i=0;this.e=void 0};-function ji(a,b,d){b=Yh(b,d);b.pointerId=d.identifier+2;b.bubbles=!0;b.cancelable=!0;b.detail=a.i;b.button=0;b.buttons=1;b.width=d.webkitRadiusX||d.radiusX||0;b.height=d.webkitRadiusY||d.radiusY||0;b.pressure=d.webkitForce||d.force||.5;b.isPrimary=a.d===d.identifier;b.pointerType="touch";b.clientX=d.clientX;b.clientY=d.clientY;b.screenX=d.screenX;b.screenY=d.screenY;return b}-function ki(a,b,d){function e(){b.preventDefault()}var f=Array.prototype.slice.call(b.c.changedTouches),g=f.length,h,k;for(h=0;h<g;++h)k=ji(a,b,f[h]),k.preventDefault=e,d.call(a,b,k)}-l.qm=function(a){var b=a.c.touches,d=rb(this.f),e=d.length;if(e>=b.length){var f=[],g,h,k;for(g=0;g<e;++g){h=d[g];k=this.f[h];var n;if(!(n=1==h))a:{n=b.length;for(var p=void 0,q=0;q<n;q++)if(p=b[q],p.identifier===h-2){n=!0;break a}n=!1}n||f.push(k.gc)}for(g=0;g<f.length;++g)this.me(a,f[g])}b=pb(this.f);if(0===b||1===b&&(1).toString()in this.f)this.d=a.c.changedTouches[0].identifier,m(this.e)&&ba.clearTimeout(this.e);li(this,a);this.i++;ki(this,a,this.ol)};-l.ol=function(a,b){this.f[b.pointerId]={target:b.target,gc:b,bg:b.target};var d=this.c;b.bubbles=!0;Zh(d,mi,b,a);d=this.c;b.bubbles=!1;Zh(d,ni,b,a);Zh(this.c,$h,b,a)};l.pm=function(a){a.preventDefault();ki(this,a,this.cj)};l.cj=function(a,b){var d=this.f[b.pointerId];if(d){var e=d.gc,f=d.bg;Zh(this.c,ai,b,a);e&&f!==b.target&&(e.relatedTarget=b.target,b.relatedTarget=f,e.target=f,b.target?(di(this.c,e,a),ci(this.c,b,a)):(b.target=f,b.relatedTarget=null,this.me(a,b)));d.gc=b;d.bg=b.target}};-l.om=function(a){li(this,a);ki(this,a,this.rm)};l.rm=function(a,b){Zh(this.c,bi,b,a);this.c.gc(b,a);var d=this.c;b.bubbles=!1;Zh(d,oi,b,a);xb(this.f,b.pointerId);b.isPrimary&&(this.d=void 0,this.e=ba.setTimeout(ra(this.qg,this),200))};l.nm=function(a){ki(this,a,this.me)};l.me=function(a,b){this.c.cancel(b,a);this.c.gc(b,a);var d=this.c;b.bubbles=!1;Zh(d,oi,b,a);xb(this.f,b.pointerId);b.isPrimary&&(this.d=void 0,this.e=ba.setTimeout(ra(this.qg,this),200))};-function li(a,b){var d=a.k.d,e=b.c.changedTouches[0];if(a.d===e.identifier){var f=[e.clientX,e.clientY];d.push(f);ba.setTimeout(function(){Wa(d,f)},2500)}};function pi(a){hd.call(this);this.fa=a;this.f={};this.d={};this.c=[];cg?qi(this,new gi(this)):dg?qi(this,new ei(this)):(a=new Uh(this),qi(this,a),bg&&qi(this,new ii(this,a)));a=this.c.length;for(var b,d=0;d<a;d++)b=this.c[d],ri(this,rb(b.j))}v(pi,hd);function qi(a,b){var d=rb(b.j);d&&(Pa(d,function(a){var d=b.j[a];d&&(this.d[a]=ra(d,b))},a),a.c.push(b))}pi.prototype.e=function(a){var b=this.d[a.type];b&&b(a)};function ri(a,b){Pa(b,function(a){w(this.fa,a,this.e,!1,this)},a)}-function si(a,b){Pa(b,function(a){Vc(this.fa,a,this.e,!1,this)},a)}function Yh(a,b){for(var d={},e,f=0,g=ti.length;f<g;f++)e=ti[f][0],d[e]=a[e]||b[e]||ti[f][1];return d}pi.prototype.gc=function(a,b){a.bubbles=!0;Zh(this,ui,a,b)};pi.prototype.cancel=function(a,b){Zh(this,vi,a,b)};function di(a,b,d){a.gc(b,d);b.target.contains(b.relatedTarget)||(b.bubbles=!1,Zh(a,oi,b,d))}function ci(a,b,d){b.bubbles=!0;Zh(a,mi,b,d);b.target.contains(b.relatedTarget)||(b.bubbles=!1,Zh(a,ni,b,d))}-function Zh(a,b,d,e){a.dispatchEvent(new Oh(b,e,d))}function hi(a,b){a.dispatchEvent(new Oh(b.type,b,b.c))}pi.prototype.T=function(){for(var a=this.c.length,b,d=0;d<a;d++)b=this.c[d],si(this,rb(b.j));pi.X.T.call(this)};-var ai="pointermove",$h="pointerdown",bi="pointerup",mi="pointerover",ui="pointerout",ni="pointerenter",oi="pointerleave",vi="pointercancel",ti=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",-!1],["type",""],["target",null],["currentTarget",null],["which",0]];function wi(a,b,d,e,f){Tg.call(this,a,b,f);this.c=d;this.originalEvent=d.c;this.pixel=b.ld(this.originalEvent);this.coordinate=b.va(this.pixel);this.dragging=m(e)?e:!1}v(wi,Tg);wi.prototype.preventDefault=function(){wi.X.preventDefault.call(this);this.c.preventDefault()};wi.prototype.tb=function(){wi.X.tb.call(this);this.c.tb()};function xi(a,b,d,e,f){wi.call(this,a,b,d.c,e,f);this.f=d}v(xi,wi);-function yi(a){hd.call(this);this.d=a;this.i=0;this.k=!1;this.f=this.q=this.e=null;a=this.d.d;this.u=0;this.n={};this.j=new pi(a);this.c=null;this.q=w(this.j,$h,this.Gi,!1,this);this.l=w(this.j,ai,this.Ol,!1,this)}v(yi,hd);function zi(a,b){var d;d=new xi(Ai,a.d,b);a.dispatchEvent(d);0!==a.i?(ba.clearTimeout(a.i),a.i=0,d=new xi(Bi,a.d,b),a.dispatchEvent(d)):a.i=ba.setTimeout(ra(function(){this.i=0;var a=new xi(Ci,this.d,b);this.dispatchEvent(a)},a),250)}-function Di(a,b){b.type==Ei||b.type==Fi?delete a.n[b.pointerId]:b.type==Gi&&(a.n[b.pointerId]=!0);a.u=pb(a.n)}l=yi.prototype;l.zf=function(a){Di(this,a);var b=new xi(Ei,this.d,a);this.dispatchEvent(b);!this.k&&0===a.button&&zi(this,this.f);0===this.u&&(Pa(this.e,Wc),this.e=null,this.k=!1,this.f=null,pc(this.c),this.c=null)};-l.Gi=function(a){Di(this,a);var b=new xi(Gi,this.d,a);this.dispatchEvent(b);this.f=a;null===this.e&&(this.c=new pi(document),this.e=[w(this.c,Hi,this.zj,!1,this),w(this.c,Ei,this.zf,!1,this),w(this.j,Fi,this.zf,!1,this)])};l.zj=function(a){if(a.clientX!=this.f.clientX||a.clientY!=this.f.clientY){this.k=!0;var b=new xi(Ii,this.d,a,this.k);this.dispatchEvent(b)}a.preventDefault()};l.Ol=function(a){this.dispatchEvent(new xi(a.type,this.d,a,null!==this.f&&(a.clientX!=this.f.clientX||a.clientY!=this.f.clientY)))};-l.T=function(){null!==this.l&&(Wc(this.l),this.l=null);null!==this.q&&(Wc(this.q),this.q=null);null!==this.e&&(Pa(this.e,Wc),this.e=null);null!==this.c&&(pc(this.c),this.c=null);null!==this.j&&(pc(this.j),this.j=null);yi.X.T.call(this)};var Ci="singleclick",Ai="click",Bi="dblclick",Ii="pointerdrag",Hi="pointermove",Gi="pointerdown",Ei="pointerup",Fi="pointercancel",Ji={Pm:Ci,Em:Ai,Fm:Bi,Im:Ii,Lm:Hi,Hm:Gi,Om:Ei,Nm:"pointerover",Mm:"pointerout",Jm:"pointerenter",Km:"pointerleave",Gm:Fi};function Ki(a){qd.call(this);this.k=Ae(a.projection);this.j=m(a.attributions)?a.attributions:null;this.J=a.logo;this.u=m(a.state)?a.state:"ready"}v(Ki,qd);l=Ki.prototype;l.Ld=ca;l.ba=function(){return this.j};l.aa=function(){return this.J};l.ca=function(){return this.k};l.da=function(){return this.u};function Li(a,b){a.u=b;a.p()};function C(a){qd.call(this);var b=Ab(a);b.brightness=m(a.brightness)?a.brightness:0;b.contrast=m(a.contrast)?a.contrast:1;b.hue=m(a.hue)?a.hue:0;b.opacity=m(a.opacity)?a.opacity:1;b.saturation=m(a.saturation)?a.saturation:1;b.visible=m(a.visible)?a.visible:!0;b.maxResolution=m(a.maxResolution)?a.maxResolution:Infinity;b.minResolution=m(a.minResolution)?a.minResolution:0;this.I(b)}v(C,qd);C.prototype.e=function(){return this.get("brightness")};C.prototype.getBrightness=C.prototype.e;-C.prototype.j=function(){return this.get("contrast")};C.prototype.getContrast=C.prototype.j;C.prototype.i=function(){return this.get("hue")};C.prototype.getHue=C.prototype.i;function Mi(a){var b=a.e(),d=a.j(),e=a.i(),f=a.u(),g=a.n(),h=a.ob(),k=a.d(),n=a.N(),p=a.k(),q=a.l();return{layer:a,brightness:Vb(b,-1,1),contrast:Math.max(d,0),hue:e,opacity:Vb(f,0,1),saturation:Math.max(g,0),zc:h,visible:k,extent:n,maxResolution:p,minResolution:Math.max(q,0)}}C.prototype.N=function(){return this.get("extent")};-C.prototype.getExtent=C.prototype.N;C.prototype.k=function(){return this.get("maxResolution")};C.prototype.getMaxResolution=C.prototype.k;C.prototype.l=function(){return this.get("minResolution")};C.prototype.getMinResolution=C.prototype.l;C.prototype.u=function(){return this.get("opacity")};C.prototype.getOpacity=C.prototype.u;C.prototype.n=function(){return this.get("saturation")};C.prototype.getSaturation=C.prototype.n;C.prototype.d=function(){return this.get("visible")};-C.prototype.getVisible=C.prototype.d;C.prototype.J=function(a){this.set("brightness",a)};C.prototype.setBrightness=C.prototype.J;C.prototype.L=function(a){this.set("contrast",a)};C.prototype.setContrast=C.prototype.L;C.prototype.R=function(a){this.set("hue",a)};C.prototype.setHue=C.prototype.R;C.prototype.s=function(a){this.set("extent",a)};C.prototype.setExtent=C.prototype.s;C.prototype.W=function(a){this.set("maxResolution",a)};C.prototype.setMaxResolution=C.prototype.W;-C.prototype.Z=function(a){this.set("minResolution",a)};C.prototype.setMinResolution=C.prototype.Z;C.prototype.t=function(a){this.set("opacity",a)};C.prototype.setOpacity=C.prototype.t;C.prototype.ga=function(a){this.set("saturation",a)};C.prototype.setSaturation=C.prototype.ga;C.prototype.ha=function(a){this.set("visible",a)};C.prototype.setVisible=C.prototype.ha;function E(a){var b=Ab(a);delete b.source;C.call(this,b);this.za=null;w(this,ud("source"),this.Vi,!1,this);this.ja(m(a.source)?a.source:null)}v(E,C);function Ni(a,b){return a.visible&&b>=a.minResolution&&b<a.maxResolution}E.prototype.ab=function(a){a=m(a)?a:[];a.push(Mi(this));return a};E.prototype.c=function(){var a=this.get("source");return m(a)?a:null};E.prototype.getSource=E.prototype.c;E.prototype.ob=function(){var a=this.c();return null===a?"undefined":a.u};E.prototype.Wi=function(){this.p()};-E.prototype.Vi=function(){null!==this.za&&(Wc(this.za),this.za=null);var a=this.c();null!==a&&(this.za=w(a,"change",this.Wi,!1,this));this.p()};E.prototype.ja=function(a){this.set("source",a)};E.prototype.setSource=E.prototype.ja;function Oi(a,b,d,e,f){hd.call(this);this.i=f;this.extent=a;this.j=d;this.resolution=b;this.state=e}v(Oi,hd);Oi.prototype.N=function(){return this.extent};function Pi(a,b){hd.call(this);this.c=a;this.state=b}v(Pi,hd);Pi.prototype.d=function(){this.dispatchEvent("change")};Pi.prototype.ub=function(){return ma(this).toString()};Pi.prototype.i=function(){return this.c};function Qi(){this.d=0;this.e={};this.f=this.c=null}l=Qi.prototype;l.clear=function(){this.d=0;this.e={};this.f=this.c=null};function Ri(a,b){return a.e.hasOwnProperty(b)}l.forEach=function(a,b){for(var d=this.c;null!==d;)a.call(b,d.kc,d.Fd,this),d=d.ib};l.get=function(a){a=this.e[a];if(a===this.f)return a.kc;a===this.c?(this.c=this.c.ib,this.c.Qb=null):(a.ib.Qb=a.Qb,a.Qb.ib=a.ib);a.ib=null;a.Qb=this.f;this.f=this.f.ib=a;return a.kc};l.Xb=function(){return this.d};-l.K=function(){var a=Array(this.d),b=0,d;for(d=this.f;null!==d;d=d.Qb)a[b++]=d.Fd;return a};l.sb=function(){var a=Array(this.d),b=0,d;for(d=this.f;null!==d;d=d.Qb)a[b++]=d.kc;return a};l.pop=function(){var a=this.c;delete this.e[a.Fd];null!==a.ib&&(a.ib.Qb=null);this.c=a.ib;null===this.c&&(this.f=null);--this.d;return a.kc};l.set=function(a,b){var d={Fd:a,ib:null,Qb:this.f,kc:b};null===this.f?this.c=d:this.f.ib=d;this.f=d;this.e[a]=d;++this.d};function Si(a){Qi.call(this);this.j=m(a)?a:2048}v(Si,Qi);function Ti(a){return a.Xb()>a.j};function Ui(a){this.minZoom=m(a.minZoom)?a.minZoom:0;this.c=a.resolutions;this.maxZoom=this.c.length-1;this.e=m(a.origin)?a.origin:null;this.i=null;m(a.origins)&&(this.i=a.origins);this.f=null;m(a.tileSizes)&&(this.f=a.tileSizes);this.j=m(a.tileSize)?a.tileSize:null===this.f?256:void 0}var Vi=[0,0,0];l=Ui.prototype;l.Hb=function(){return dd};l.kd=function(a,b,d,e,f){f=Wi(this,a,f);for(a=a[0]-1;a>=this.minZoom;){if(b.call(d,a,Xi(this,f,a,e)))return!0;--a}return!1};l.qd=function(){return this.maxZoom};-l.sd=function(){return this.minZoom};l.Pb=function(a){return null===this.e?this.i[a]:this.e};l.ra=function(a){return this.c[a]};l.Sd=function(){return this.c};l.wd=function(a,b,d){return a[0]<this.maxZoom?(d=Wi(this,a,d),Xi(this,d,a[0]+1,b)):null};function Yi(a,b,d,e){Zi(a,b[0],b[1],d,!1,Vi);var f=Vi[1],g=Vi[2];Zi(a,b[2],b[3],d,!0,Vi);return mf(f,Vi[1],g,Vi[2],e)}function Xi(a,b,d,e){return Yi(a,b,a.ra(d),e)}-function $i(a,b){var d=a.Pb(b[0]),e=a.ra(b[0]),f=a.ya(b[0]);return[d[0]+(b[1]+.5)*f*e,d[1]+(b[2]+.5)*f*e]}function Wi(a,b,d){var e=a.Pb(b[0]),f=a.ra(b[0]);a=a.ya(b[0]);var g=e[0]+b[1]*a*f;b=e[1]+b[2]*a*f;return Vd(g,b,g+a*f,b+a*f,d)}l.$b=function(a,b,d){return Zi(this,a[0],a[1],b,!1,d)};function Zi(a,b,d,e,f,g){var h=ac(a.c,e,0),k=e/a.ra(h),n=a.Pb(h);a=a.ya(h);b=k*(b-n[0])/(e*a);d=k*(d-n[1])/(e*a);f?(b=Math.ceil(b)-1,d=Math.ceil(d)-1):(b=Math.floor(b),d=Math.floor(d));return gf(h,b,d,g)}-l.Qc=function(a,b,d){return Zi(this,a[0],a[1],this.ra(b),!1,d)};l.ya=function(a){return m(this.j)?this.j:this.f[a]};function aj(a,b,d){b=m(b)?b:42;d=m(d)?d:256;a=Math.max(qe(a)/d,ne(a)/d);b+=1;d=Array(b);for(var e=0;e<b;++e)d[e]=a/Math.pow(2,e);return d}function bj(a){a=Ae(a);var b=a.N();null===b&&(a=180*we.degrees/a.rd(),b=Vd(-a,-a,a,a));return b};function cj(a){Ki.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.L=m(a.opaque)?a.opaque:!1;this.R=m(a.tilePixelRatio)?a.tilePixelRatio:1;this.tileGrid=m(a.tileGrid)?a.tileGrid:null;this.c=new Si}v(cj,Ki);function dj(a,b,d,e){for(var f=!0,g,h,k=d.c;k<=d.e;++k)for(var n=d.d;n<=d.f;++n)g=a.rb(b,k,n),h=!1,Ri(a.c,g)&&(g=a.c.get(g),(h=2===g.state)&&(h=!1!==e(g))),h||(f=!1);return f}l=cj.prototype;l.md=function(){return 0};l.rb=hf;l.Ba=function(){return this.tileGrid};-function ej(a,b){var d;if(null===a.tileGrid){if(d=b.j,null===d){d=bj(b);var e=m(void 0)?void 0:256,f=m(void 0)?void 0:"bottom-left",g=aj(d,void 0,e);d=new Ui({origin:le(d,f),resolutions:g,tileSize:e});b.j=d}}else d=a.tileGrid;return d}l.Rc=function(a,b,d){return ej(this,d).ya(a)*this.R};l.Te=ca;function fj(a,b){qc.call(this,a);this.tile=b}v(fj,qc);function gj(a,b,d,e,f,g,h,k){Ld(a);0===b&&0===d||Od(a,b,d);1==e&&1==f||Pd(a,e,f);0!==g&&Qd(a,g);0===h&&0===k||Od(a,h,k);return a}function hj(a,b){return a[0]==b[0]&&a[1]==b[1]&&a[4]==b[4]&&a[5]==b[5]&&a[12]==b[12]&&a[13]==b[13]}function ij(a,b,d){var e=a[1],f=a[5],g=a[13],h=b[0];b=b[1];d[0]=a[0]*h+a[4]*b+a[12];d[1]=e*h+f*b+g;return d};function kj(a){kd.call(this);this.c=a}v(kj,kd);l=kj.prototype;l.Ya=ca;l.fc=function(a,b,d,e){a=a.slice();ij(b.pixelToCoordinateMatrix,a,a);if(this.Ya(a,b,bd,this))return d.call(e,this.c)};l.Jd=ad;l.hd=function(a,b){return function(d,e){return dj(a,d,e,function(a){b[d]||(b[d]={});b[d][a.c.toString()]=a})}};l.Xj=function(a){2===a.target.state&&lj(this)};function mj(a,b){var d=b.state;2!=d&&3!=d&&Uc(b,"change",a.Xj,!1,a);0==d&&(b.load(),d=b.state);return 2==d}-function lj(a){var b=a.c;b.d()&&"ready"==b.ob()&&a.p()}function nj(a,b){Ti(b.c)&&a.postRenderFunctions.push(sa(function(a,b,f){b=ma(a).toString();a=a.c;f=f.usedTiles[b];for(var g;Ti(a)&&!(b=a.c.kc,g=b.c[0].toString(),g in f&&f[g].contains(b.c));)a.pop().Nc()},b))}function oj(a,b){if(null!=b){var d,e,f;e=0;for(f=b.length;e<f;++e)d=b[e],a[ma(d).toString()]=d}}function pj(a,b){var d=b.J;m(d)&&(ia(d)?a.logos[d]="":la(d)&&(a.logos[d.src]=d.href))}-function qj(a,b,d,e){b=ma(b).toString();d=d.toString();b in a?d in a[b]?(a=a[b][d],e.c<a.c&&(a.c=e.c),e.e>a.e&&(a.e=e.e),e.d<a.d&&(a.d=e.d),e.f>a.f&&(a.f=e.f)):a[b][d]=e:(a[b]={},a[b][d]=e)}function rj(a,b,d){return[b*(Math.round(a[0]/b)+d[0]%2/2),b*(Math.round(a[1]/b)+d[1]%2/2)]}-function sj(a,b,d,e,f,g,h,k,n,p){var q=ma(b).toString();q in a.wantedTiles||(a.wantedTiles[q]={});var r=a.wantedTiles[q];a=a.tileQueue;var s=d.minZoom,u,z,y,A,D,x;for(x=h;x>=s;--x)for(z=Xi(d,g,x,z),y=d.ra(x),A=z.c;A<=z.e;++A)for(D=z.d;D<=z.f;++D)h-x<=k?(u=b.Zb(x,A,D,e,f),0==u.state&&(r[kf(u.c)]=!0,u.ub()in a.d||tj(a,[u,q,$i(d,u.c),y])),m(n)&&n.call(p,u)):b.Te(x,A,D)};function uj(a){this.s=a.opacity;this.t=a.rotateWithView;this.l=a.rotation;this.n=a.scale;this.v=a.snapToPixel}l=uj.prototype;l.Nd=function(){return this.s};l.ud=function(){return this.t};l.Od=function(){return this.l};l.Pd=function(){return this.n};l.vd=function(){return this.v};l.Qd=function(a){this.l=a};l.Rd=function(a){this.n=a};function vj(a){a=m(a)?a:{};this.j=m(a.anchor)?a.anchor:[.5,.5];this.e=null;this.f=m(a.anchorOrigin)?a.anchorOrigin:"top-left";this.k=m(a.anchorXUnits)?a.anchorXUnits:"fraction";this.q=m(a.anchorYUnits)?a.anchorYUnits:"fraction";var b=m(a.crossOrigin)?a.crossOrigin:null,d=m(a.img)?a.img:null,e=a.src;m(e)&&0!==e.length||null===d||(e=d.src);var f=m(a.src)?0:2,g=wj.Ua(),h=g.get(e,b);null===h&&(h=new xj(d,e,b,f),g.set(e,b,h));this.c=h;this.J=m(a.offset)?a.offset:[0,0];this.d=m(a.offsetOrigin)?a.offsetOrigin:-"top-left";this.i=null;this.u=m(a.size)?a.size:null;uj.call(this,{opacity:m(a.opacity)?a.opacity:1,rotation:m(a.rotation)?a.rotation:0,scale:m(a.scale)?a.scale:1,snapToPixel:m(a.snapToPixel)?a.snapToPixel:!0,rotateWithView:m(a.rotateWithView)?a.rotateWithView:!1})}v(vj,uj);l=vj.prototype;-l.Ab=function(){if(null!==this.e)return this.e;var a=this.j,b=this.kb();if("fraction"==this.k||"fraction"==this.q){if(null===b)return null;a=this.j.slice();"fraction"==this.k&&(a[0]*=b[0]);"fraction"==this.q&&(a[1]*=b[1])}if("top-left"!=this.f){if(null===b)return null;a===this.j&&(a=this.j.slice());if("top-right"==this.f||"bottom-right"==this.f)a[0]=-a[0]+b[0];if("bottom-left"==this.f||"bottom-right"==this.f)a[1]=-a[1]+b[1]}return this.e=a};l.Fb=function(){return this.c.c};l.od=function(){return this.c.f};-l.Sc=function(){return this.c.d};l.Md=function(){var a=this.c;if(null===a.j)if(a.q){var b=a.f[0],d=a.f[1],e=Nf(b,d);e.fillRect(0,0,b,d);a.j=e.canvas}else a.j=a.c;return a.j};l.Gb=function(){if(null!==this.i)return this.i;var a=this.J;if("top-left"!=this.d){var b=this.kb(),d=this.c.f;if(null===b||null===d)return null;a=a.slice();if("top-right"==this.d||"bottom-right"==this.d)a[0]=d[0]-b[0]-a[0];if("bottom-left"==this.d||"bottom-right"==this.d)a[1]=d[1]-b[1]-a[1]}return this.i=a};l.Jk=function(){return this.c.i};-l.kb=function(){return null===this.u?this.c.f:this.u};l.Ae=function(a,b){return w(this.c,"change",a,!1,b)};l.load=function(){this.c.load()};l.Se=function(a,b){Vc(this.c,"change",a,!1,b)};function xj(a,b,d,e){hd.call(this);this.j=null;this.c=null===a?new Image:a;null!==d&&(this.c.crossOrigin=d);this.e=null;this.d=e;this.f=null;this.i=b;this.q=!1}v(xj,hd);xj.prototype.k=function(){this.d=3;Pa(this.e,Wc);this.e=null;this.dispatchEvent("change")};-xj.prototype.l=function(){this.d=2;this.f=[this.c.width,this.c.height];Pa(this.e,Wc);this.e=null;var a=Nf(1,1);a.drawImage(this.c,0,0);try{a.getImageData(0,0,1,1)}catch(b){this.q=!0}this.dispatchEvent("change")};xj.prototype.load=function(){if(0==this.d){this.d=1;this.e=[Uc(this.c,"error",this.k,!1,this),Uc(this.c,"load",this.l,!1,this)];try{this.c.src=this.i}catch(a){this.k()}}};function wj(){this.c={};this.f=0}da(wj);wj.prototype.clear=function(){this.c={};this.f=0};-wj.prototype.get=function(a,b){var d=b+":"+a;return d in this.c?this.c[d]:null};wj.prototype.set=function(a,b,d){this.c[b+":"+a]=d;++this.f};function yj(a,b){lc.call(this);this.k=b;this.d=null;this.i={};this.u={}}v(yj,lc);function zj(a){var b=a.viewState,d=a.coordinateToPixelMatrix;gj(d,a.size[0]/2,a.size[1]/2,1/b.resolution,-1/b.resolution,-b.rotation,-b.center[0],-b.center[1]);Nd(d,a.pixelToCoordinateMatrix)}l=yj.prototype;l.T=function(){kb(this.i,pc);yj.X.T.call(this)};-function Aj(){var a=wj.Ua();if(32<a.f){var b=0,d,e;for(d in a.c){e=a.c[d];var f;if(f=0===(b++&3))Bc(e)?e=jd(e,void 0,void 0):(e=Qc(e),e=!!e&&Jc(e,void 0,void 0)),f=!e;f&&(delete a.c[d],--a.f)}}}-l.De=function(a,b,d,e,f,g){var h,k=b.viewState,n=k.resolution,k=k.rotation;if(null!==this.d){var p={};if(h=this.d.d(a,n,k,{},function(a){var b=ma(a).toString();if(!(b in p))return p[b]=!0,d.call(e,a,null)}))return h}var k=b.layerStatesArray,q;for(q=k.length-1;0<=q;--q){h=k[q];var r=h.layer;if(Ni(h,n)&&f.call(g,r)&&(h=Bj(this,r).Ya(a,b,d,e)))return h}};-l.Nf=function(a,b,d,e,f,g){var h,k=b.viewState,n=k.resolution,k=k.rotation;if(null!==this.d){var p=this.k.va(a);if(this.d.d(p,n,k,{},bd)&&(h=d.call(e,null)))return h}k=b.layerStatesArray;for(p=k.length-1;0<=p;--p){h=k[p];var q=h.layer;if(Ni(h,n)&&f.call(g,q)&&(h=Bj(this,q).fc(a,b,d,e)))return h}};l.Of=function(a,b,d,e){a=this.De(a,b,bd,this,d,e);return m(a)};function Bj(a,b){var d=ma(b).toString();if(d in a.i)return a.i[d];var e=a.pe(b);a.i[d]=e;a.u[d]=w(e,"change",a.yi,!1,a);return e}l.yi=function(){this.k.render()};-l.$d=ca;l.Tl=function(a,b){for(var d in this.i)if(!(null!==b&&d in b.layerStates)){var e=d,f=this.i[e];delete this.i[e];Wc(this.u[e]);delete this.u[e];pc(f)}};function Cj(a,b){for(var d in a.i)if(!(d in b.layerStates)){b.postRenderFunctions.push(ra(a.Tl,a));break}};function Dj(a,b){this.i=a;this.j=b;this.c=[];this.f=[];this.d={}}Dj.prototype.clear=function(){this.c.length=0;this.f.length=0;wb(this.d)};function Ej(a){var b=a.c,d=a.f,e=b[0];1==b.length?(b.length=0,d.length=0):(b[0]=b.pop(),d[0]=d.pop(),Fj(a,0));b=a.j(e);delete a.d[b];return e}function tj(a,b){var d=a.i(b);Infinity!=d&&(a.c.push(b),a.f.push(d),a.d[a.j(b)]=!0,Gj(a,0,a.c.length-1))}Dj.prototype.Xb=function(){return this.c.length};Dj.prototype.pa=function(){return 0===this.c.length};-function Fj(a,b){for(var d=a.c,e=a.f,f=d.length,g=d[b],h=e[b],k=b;b<f>>1;){var n=2*b+1,p=2*b+2,n=p<f&&e[p]<e[n]?p:n;d[b]=d[n];e[b]=e[n];b=n}d[b]=g;e[b]=h;Gj(a,k,b)}function Gj(a,b,d){var e=a.c;a=a.f;for(var f=e[d],g=a[d];d>b;){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 Hj(a){var b=a.i,d=a.c,e=a.f,f=0,g=d.length,h,k,n;for(k=0;k<g;++k)h=d[k],n=b(h),Infinity==n?delete a.d[a.j(h)]:(e[f]=n,d[f++]=h);d.length=f;e.length=f;for(b=(a.c.length>>1)-1;0<=b;b--)Fj(a,b)};function Ij(a,b){Dj.call(this,function(b){return a.apply(null,b)},function(a){return a[0].ub()});this.q=b;this.e=0}v(Ij,Dj);Ij.prototype.k=function(a){a=a.target.state;if(2===a||3===a||4===a)--this.e,this.q()};function Jj(a,b,d){this.e=a;this.d=b;this.i=d;this.c=[];this.f=this.j=0}Jj.prototype.update=function(a,b){this.c.push(a,b,ta())};function Kj(a,b){var d=a.e,e=a.f,f=a.d-e,g=Lj(a);return df({source:b,duration:g,easing:function(a){return e*(Math.exp(d*a*g)-1)/f}})}function Lj(a){return Math.log(a.d/a.f)/a.e};function Mj(a){qd.call(this);this.n=null;this.d(!0);this.handleEvent=a.handleEvent}v(Mj,qd);Mj.prototype.c=function(){return this.get("active")};Mj.prototype.getActive=Mj.prototype.c;Mj.prototype.d=function(a){this.set("active",a)};Mj.prototype.setActive=Mj.prototype.d;Mj.prototype.setMap=function(a){this.n=a};function Nj(a,b,d,e,f){if(null!=d){var g=b.e(),h=b.d();m(g)&&m(h)&&m(f)&&0<f&&(a.Qa(ef({rotation:g,duration:f,easing:$e})),m(e)&&a.Qa(df({source:h,duration:f,easing:$e})));b.rotate(d,e)}}-function Oj(a,b,d,e,f){var g=b.c();d=b.constrainResolution(g,d,0);Pj(a,b,d,e,f)}function Pj(a,b,d,e,f){if(null!=d){var g=b.c(),h=b.d();m(g)&&m(h)&&m(f)&&0<f&&(a.Qa(ff({resolution:g,duration:f,easing:$e})),m(e)&&a.Qa(df({source:h,duration:f,easing:$e})));if(null!=e){var k;a=b.d();f=b.c();m(a)&&m(f)&&(k=[e[0]-d*(e[0]-a[0])/f,e[1]-d*(e[1]-a[1])/f]);b.Ma(k)}b.j(d)}};function Qj(a){a=m(a)?a:{};this.e=m(a.delta)?a.delta:1;Mj.call(this,{handleEvent:Rj});this.j=m(a.duration)?a.duration:250}v(Qj,Mj);function Rj(a){var b=!1,d=a.c;if(a.type==Bi){var b=a.map,e=a.coordinate,d=d.e?-this.e:this.e,f=b.c();Oj(b,f,d,e,this.j);a.preventDefault();b=!0}return!b};function Sj(a){a=a.c;return a.f&&!a.k&&a.e}function Tj(a){return"pointermove"==a.type}function Uj(a){return a.type==Ci}function Vj(a){a=a.c;return!a.f&&!a.k&&!a.e}function Wj(a){a=a.c;return!a.f&&!a.k&&a.e}function Xj(a){a=a.c.target.tagName;return"INPUT"!==a&&"SELECT"!==a&&"TEXTAREA"!==a}function Yj(a){return 1==a.f.pointerId};function Zj(a){a=m(a)?a:{};Mj.call(this,{handleEvent:m(a.handleEvent)?a.handleEvent:ak});this.ma=m(a.handleDownEvent)?a.handleDownEvent:ad;this.oa=m(a.handleDragEvent)?a.handleDragEvent:ca;this.za=m(a.handleMoveEvent)?a.handleMoveEvent:ca;this.Ia=m(a.handleUpEvent)?a.handleUpEvent:ad;this.s=!1;this.J={};this.j=[]}v(Zj,Mj);function bk(a){for(var b=a.length,d=0,e=0,f=0;f<b;f++)d+=a[f].clientX,e+=a[f].clientY;return[d/b,e/b]}-function ak(a){if(!(a instanceof xi))return!0;var b=!1,d=a.type;if(d===Gi||d===Ii||d===Ei)d=a.f,a.type==Ei?delete this.J[d.pointerId]:a.type==Gi?this.J[d.pointerId]=d:d.pointerId in this.J&&(this.J[d.pointerId]=d),this.j=qb(this.J);this.s&&(a.type==Ii?this.oa(a):a.type==Ei&&(this.s=this.Ia(a)));a.type==Gi?(this.s=a=this.ma(a),b=this.t(a)):a.type==Hi&&this.za(a);return!b}Zj.prototype.t=dd;function ck(a){Zj.call(this,{handleDownEvent:dk,handleDragEvent:ek,handleUpEvent:fk});a=m(a)?a:{};this.e=a.kinetic;this.i=this.k=null;this.u=m(a.condition)?a.condition:Vj;this.l=!1}v(ck,Zj);function ek(a){var b=bk(this.j);this.e&&this.e.update(b[0],b[1]);if(null!==this.i){var d=this.i[0]-b[0],e=b[1]-this.i[1];a=a.map;var f=a.c(),g=Xe(f),e=d=[d,e],h=g.resolution;e[0]*=h;e[1]*=h;Ad(d,g.rotation);vd(d,g.center);d=f.l(d);a.render();f.Ma(d)}this.i=b}-function fk(a){a=a.map;var b=a.c();if(0===this.j.length){var d;if(d=!this.l&&this.e)if(d=this.e,6>d.c.length)d=!1;else{var e=ta()-d.i,f=d.c.length-3;if(d.c[f+2]<e)d=!1;else{for(var g=f-3;0<g&&d.c[g+2]>e;)g-=3;var e=d.c[f+2]-d.c[g+2],h=d.c[f]-d.c[g],f=d.c[f+1]-d.c[g+1];d.j=Math.atan2(f,h);d.f=Math.sqrt(h*h+f*f)/e;d=d.f>d.d}}d&&(d=this.e,d=(d.d-d.f)/d.e,f=this.e.j,g=b.d(),this.k=Kj(this.e,g),a.Qa(this.k),g=a.i(g),d=a.va([g[0]-d*Math.cos(f),g[1]-d*Math.sin(f)]),d=b.l(d),b.Ma(d));Ze(b,-1);a.render();-return!1}this.i=null;return!0}function dk(a){if(0<this.j.length&&this.u(a)){var b=a.map,d=b.c();this.i=null;this.s||Ze(d,1);b.render();null!==this.k&&Wa(b.R,this.k)&&(d.Ma(a.frameState.viewState.center),this.k=null);this.e&&(a=this.e,a.c.length=0,a.j=0,a.f=0);this.l=1<this.j.length;return!0}return!1}ck.prototype.t=ad;function gk(a){a=m(a)?a:{};Zj.call(this,{handleDownEvent:hk,handleDragEvent:ik,handleUpEvent:jk});this.i=m(a.condition)?a.condition:Sj;this.e=void 0}v(gk,Zj);function ik(a){if(Yj(a)){var b=a.map,d=b.j();a=a.pixel;d=Math.atan2(d[1]/2-a[1],a[0]-d[0]/2);if(m(this.e)){a=d-this.e;var e=b.c(),f=e.e();b.render();Nj(b,e,f-a)}this.e=d}}function jk(a){if(!Yj(a))return!0;a=a.map;var b=a.c();Ze(b,-1);var d=b.e(),d=b.constrainRotation(d,0);Nj(a,b,d,void 0,250);return!1}-function hk(a){return Yj(a)&&zc(a.c)&&this.i(a)?(a=a.map,Ze(a.c(),1),a.render(),this.e=void 0,!0):!1}gk.prototype.t=ad;function kk(){kd.call(this);this.n=Sd();this.u=-1;this.i={};this.l=this.k=0}v(kk,kd);kk.prototype.j=function(a,b){var d=m(b)?b:[NaN,NaN];this.bb(a[0],a[1],d,Infinity);return d};kk.prototype.Nb=ad;kk.prototype.N=function(a){this.u!=this.f&&(this.n=this.gd(this.n),this.u=this.f);var b=this.n;m(a)?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):a=b;return a};kk.prototype.transform=function(a,b){this.ua(Se(a,b));return this};function lk(a,b,d,e,f,g){var h=f[0],k=f[1],n=f[4],p=f[5],q=f[12];f=f[13];for(var r=m(g)?g:[],s=0;b<d;b+=e){var u=a[b],z=a[b+1];r[s++]=h*u+n*z+q;r[s++]=k*u+p*z+f}m(g)&&r.length!=s&&(r.length=s);return r};function mk(){kk.call(this);this.c="XY";this.H=2;this.o=null}v(mk,kk);function nk(a){if("XY"==a)return 2;if("XYZ"==a||"XYM"==a)return 3;if("XYZM"==a)return 4}l=mk.prototype;l.Nb=ad;l.gd=function(a){var b=this.o,d=this.o.length,e=this.H;a=Vd(Infinity,Infinity,-Infinity,-Infinity,a);return ee(a,b,0,d,e)};l.Cb=function(){return this.o.slice(0,this.H)};l.Db=function(){return this.o.slice(this.o.length-this.H)};l.Eb=function(){return this.c};-l.we=function(a){this.l!=this.f&&(wb(this.i),this.k=0,this.l=this.f);if(0>a||0!==this.k&&a<=this.k)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var d=this.rc(a);if(d.o.length<this.o.length)return this.i[b]=d;this.k=a;return this};l.rc=function(){return this};function ok(a,b,d){a.H=nk(b);a.c=b;a.o=d}-function pk(a,b,d,e){if(m(b))d=nk(b);else{for(b=0;b<e;++b){if(0===d.length){a.c="XY";a.H=2;return}d=d[0]}d=d.length;b=2==d?"XY":3==d?"XYZ":4==d?"XYZM":void 0}a.c=b;a.H=d}l.ua=function(a){null!==this.o&&(a(this.o,this.o,this.H),this.p())};l.Na=function(a,b){var d=this.o;if(null!==d){var e=d.length,f=this.H,g=m(d)?d:[],h=0,k,n;for(k=0;k<e;k+=f)for(g[h++]=d[k]+a,g[h++]=d[k+1]+b,n=k+2;n<k+f;++n)g[h++]=d[n];m(d)&&g.length!=h&&(g.length=h);this.p()}};function qk(a,b,d,e){for(var f=0,g=a[d-e],h=a[d-e+1];b<d;b+=e)var k=a[b],n=a[b+1],f=f+(h*k-g*n),g=k,h=n;return f/2}function rk(a,b,d,e){var f=0,g,h;g=0;for(h=d.length;g<h;++g){var k=d[g],f=f+qk(a,b,k,e);b=k}return f};function sk(a,b,d,e,f,g){var h=f-d,k=g-e;if(0!==h||0!==k){var n=((a-d)*h+(b-e)*k)/(h*h+k*k);1<n?(d=f,e=g):0<n&&(d+=h*n,e+=k*n)}return tk(a,b,d,e)}function tk(a,b,d,e){a=d-a;b=e-b;return a*a+b*b};function uk(a,b,d,e,f,g,h){var k=a[b],n=a[b+1],p=a[d]-k,q=a[d+1]-n;if(0!==p||0!==q)if(g=((f-k)*p+(g-n)*q)/(p*p+q*q),1<g)b=d;else if(0<g){for(f=0;f<e;++f)h[f]=Xb(a[b+f],a[d+f],g);h.length=e;return}for(f=0;f<e;++f)h[f]=a[b+f];h.length=e}function vk(a,b,d,e,f){var g=a[b],h=a[b+1];for(b+=e;b<d;b+=e){var k=a[b],n=a[b+1],g=tk(g,h,k,n);g>f&&(f=g);g=k;h=n}return f}function wk(a,b,d,e,f){var g,h;g=0;for(h=d.length;g<h;++g){var k=d[g];f=vk(a,b,k,e,f);b=k}return f}-function xk(a,b,d,e,f,g,h,k,n,p,q){if(b==d)return p;var r;if(0===f){r=tk(h,k,a[b],a[b+1]);if(r<p){for(q=0;q<e;++q)n[q]=a[b+q];n.length=e;return r}return p}for(var s=m(q)?q:[NaN,NaN],u=b+e;u<d;)if(uk(a,u-e,u,e,h,k,s),r=tk(h,k,s[0],s[1]),r<p){p=r;for(q=0;q<e;++q)n[q]=s[q];n.length=e;u+=e}else u+=e*Math.max((Math.sqrt(r)-Math.sqrt(p))/f|0,1);if(g&&(uk(a,d-e,b,e,h,k,s),r=tk(h,k,s[0],s[1]),r<p)){p=r;for(q=0;q<e;++q)n[q]=s[q];n.length=e}return p}-function yk(a,b,d,e,f,g,h,k,n,p,q){q=m(q)?q:[NaN,NaN];var r,s;r=0;for(s=d.length;r<s;++r){var u=d[r];p=xk(a,b,u,e,f,g,h,k,n,p,q);b=u}return p};function zk(a,b){var d=0,e,f;e=0;for(f=b.length;e<f;++e)a[d++]=b[e];return d}function Ak(a,b,d,e){var f,g;f=0;for(g=d.length;f<g;++f){var h=d[f],k;for(k=0;k<e;++k)a[b++]=h[k]}return b}function Bk(a,b,d,e,f){f=m(f)?f:[];var g=0,h,k;h=0;for(k=d.length;h<k;++h)b=Ak(a,b,d[h],e),f[g++]=b;f.length=g;return f};function Ck(a,b,d,e,f){f=m(f)?f:[];for(var g=0;b<d;b+=e)f[g++]=a.slice(b,b+e);f.length=g;return f}function Dk(a,b,d,e,f){f=m(f)?f:[];var g=0,h,k;h=0;for(k=d.length;h<k;++h){var n=d[h];f[g++]=Ck(a,b,n,e,f[g]);b=n}f.length=g;return f};function Ek(a,b,d,e,f,g,h){var k=(d-b)/e;if(3>k){for(;b<d;b+=e)g[h++]=a[b],g[h++]=a[b+1];return h}var n=Array(k);n[0]=1;n[k-1]=1;d=[b,d-e];for(var p=0,q;0<d.length;){var r=d.pop(),s=d.pop(),u=0,z=a[s],y=a[s+1],A=a[r],D=a[r+1];for(q=s+e;q<r;q+=e){var x=sk(a[q],a[q+1],z,y,A,D);x>u&&(p=q,u=x)}u>f&&(n[(p-b)/e]=1,s+e<p&&d.push(s,p),p+e<r&&d.push(p,r))}for(q=0;q<k;++q)n[q]&&(g[h++]=a[b+q*e],g[h++]=a[b+q*e+1]);return h}-function Fk(a,b,d,e,f,g,h,k){var n,p;n=0;for(p=d.length;n<p;++n){var q=d[n];a:{var r=a,s=q,u=e,z=f,y=g;if(b!=s){var A=z*Math.round(r[b]/z),D=z*Math.round(r[b+1]/z);b+=u;y[h++]=A;y[h++]=D;var x=void 0,M=void 0;do if(x=z*Math.round(r[b]/z),M=z*Math.round(r[b+1]/z),b+=u,b==s){y[h++]=x;y[h++]=M;break a}while(x==A&&M==D);for(;b<s;){var Q,O;Q=z*Math.round(r[b]/z);O=z*Math.round(r[b+1]/z);b+=u;if(Q!=x||O!=M){var W=x-A,Ja=M-D,lb=Q-A,Ka=O-D;W*Ka==Ja*lb&&(0>W&&lb<W||W==lb||0<W&&lb>W)&&(0>Ja&&Ka<Ja||Ja==Ka||-0<Ja&&Ka>Ja)||(y[h++]=x,y[h++]=M,A=x,D=M);x=Q;M=O}}y[h++]=x;y[h++]=M}}k.push(h);b=q}return h};function Gk(a,b){mk.call(this);this.d=this.q=-1;this.$(a,b)}v(Gk,mk);l=Gk.prototype;l.clone=function(){var a=new Gk(null);Hk(a,this.c,this.o.slice());return a};l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;this.d!=this.f&&(this.q=Math.sqrt(vk(this.o,0,this.o.length,this.H,0)),this.d=this.f);return xk(this.o,0,this.o.length,this.H,this.q,!0,a,b,d,e)};l.Rj=function(){return qk(this.o,0,this.o.length,this.H)};l.U=function(){return Ck(this.o,0,this.o.length,this.H)};-l.rc=function(a){var b=[];b.length=Ek(this.o,0,this.o.length,this.H,a,b,0);a=new Gk(null);Hk(a,"XY",b);return a};l.S=function(){return"LinearRing"};l.$=function(a,b){null===a?Hk(this,"XY",null):(pk(this,b,a,1),null===this.o&&(this.o=[]),this.o.length=Ak(this.o,0,a,this.H),this.p())};function Hk(a,b,d){ok(a,b,d);a.p()};function Ik(a,b){mk.call(this);this.$(a,b)}v(Ik,mk);l=Ik.prototype;l.clone=function(){var a=new Ik(null);Jk(a,this.c,this.o.slice());return a};l.bb=function(a,b,d,e){var f=this.o;a=tk(a,b,f[0],f[1]);if(a<e){e=this.H;for(b=0;b<e;++b)d[b]=f[b];d.length=e;return a}return e};l.U=function(){return null===this.o?[]:this.o.slice()};l.gd=function(a){return be(this.o,a)};l.S=function(){return"Point"};l.na=function(a){return $d(a,this.o[0],this.o[1])};-l.$=function(a,b){null===a?Jk(this,"XY",null):(pk(this,b,a,0),null===this.o&&(this.o=[]),this.o.length=zk(this.o,a),this.p())};function Jk(a,b,d){ok(a,b,d);a.p()};function Kk(a,b,d,e,f){return!fe(f,function(f){return!Lk(a,b,d,e,f[0],f[1])})}function Lk(a,b,d,e,f,g){for(var h=!1,k=a[d-e],n=a[d-e+1];b<d;b+=e){var p=a[b],q=a[b+1];n>g!=q>g&&f<(p-k)*(g-n)/(q-n)+k&&(h=!h);k=p;n=q}return h}function Mk(a,b,d,e,f,g){if(0===d.length||!Lk(a,b,d[0],e,f,g))return!1;var h;b=1;for(h=d.length;b<h;++b)if(Lk(a,d[b-1],d[b],e,f,g))return!1;return!0};function Nk(a,b,d,e,f,g,h){var k,n,p,q,r,s=f[g+1],u=[],z=d[0];p=a[z-e];r=a[z-e+1];for(k=b;k<z;k+=e){q=a[k];n=a[k+1];if(s<=r&&n<=s||r<=s&&s<=n)p=(s-r)/(n-r)*(q-p)+p,u.push(p);p=q;r=n}z=NaN;r=-Infinity;u.sort();p=u[0];k=1;for(n=u.length;k<n;++k){q=u[k];var y=Math.abs(q-p);y>r&&(p=(p+q)/2,Mk(a,b,d,e,p,s)&&(z=p,r=y));p=q}isNaN(z)&&(z=f[g]);return m(h)?(h.push(z,s),h):[z,s]};function Ok(a,b,d,e,f){for(var g=[a[b],a[b+1]],h=[],k;b+e<d;b+=e){h[0]=a[b+e];h[1]=a[b+e+1];if(k=f(g,h))return k;g[0]=h[0];g[1]=h[1]}return!1};function Pk(a,b,d,e,f){var g=ee(Sd(),a,b,d,e);return pe(f,g)?Zd(f,g)||g[0]>=f[0]&&g[2]<=f[2]||g[1]>=f[1]&&g[3]<=f[3]?!0:Ok(a,b,d,e,function(a,b){var d=!1,e=ae(f,a),g=ae(f,b);if(1===e||1===g)d=!0;else{var r=f[0],s=f[1],u=f[2],z=f[3],y=b[0],A=b[1],D=(A-a[1])/(y-a[0]);g&2&&!(e&2)?(s=y-(A-z)/D,d=s>=r&&s<=u):g&4&&!(e&4)?(r=A-(y-u)*D,d=r>=s&&r<=z):g&8&&!(e&8)?(s=y-(A-s)/D,d=s>=r&&s<=u):g&16&&!(e&16)&&(r=A-(y-r)*D,d=r>=s&&r<=z)}return d}):!1}-function Qk(a,b,d,e,f){var g=d[0];if(!(Pk(a,b,g,e,f)||Lk(a,b,g,e,f[0],f[1])||Lk(a,b,g,e,f[0],f[3])||Lk(a,b,g,e,f[2],f[1])||Lk(a,b,g,e,f[2],f[3])))return!1;if(1===d.length)return!0;b=1;for(g=d.length;b<g;++b)if(Kk(a,d[b-1],d[b],e,f))return!1;return!0};function Rk(a,b,d,e){for(var f=0,g=a[d-e],h=a[d-e+1];b<d;b+=e)var k=a[b],n=a[b+1],f=f+(k-g)*(n+h),g=k,h=n;return 0<f}function Sk(a,b,d){var e=0,f,g;f=0;for(g=b.length;f<g;++f){var h=b[f],e=Rk(a,e,h,d);if(0===f?!e:e)return!1;e=h}return!0}function Tk(a,b,d,e){var f,g;f=0;for(g=d.length;f<g;++f){var h=d[f],k=Rk(a,b,h,e);if(0===f?!k:k)for(var k=a,n=h,p=e;b<n-p;){var q;for(q=0;q<p;++q){var r=k[b+q];k[b+q]=k[n-p+q];k[n-p+q]=r}b+=p;n-=p}b=h}return b};function F(a,b){mk.call(this);this.d=[];this.s=-1;this.t=null;this.L=this.v=this.J=-1;this.q=null;this.$(a,b)}v(F,mk);l=F.prototype;l.mh=function(a){null===this.o?this.o=a.o.slice():$a(this.o,a.o);this.d.push(this.o.length);this.p()};l.clone=function(){var a=new F(null);Uk(a,this.c,this.o.slice(),this.d.slice());return a};-l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;this.v!=this.f&&(this.J=Math.sqrt(wk(this.o,0,this.d,this.H,0)),this.v=this.f);return yk(this.o,0,this.d,this.H,this.J,!0,a,b,d,e)};l.Nb=function(a,b){return Mk(Vk(this),0,this.d,this.H,a,b)};l.Uj=function(){return rk(Vk(this),0,this.d,this.H)};l.U=function(){return Dk(this.o,0,this.d,this.H)};function Wk(a){if(a.s!=a.f){var b=ke(a.N());a.t=Nk(Vk(a),0,a.d,a.H,b,0);a.s=a.f}return a.t}l.Jh=function(){return new Ik(Wk(this))};l.Ph=function(){return this.d.length};-l.Oh=function(a){if(0>a||this.d.length<=a)return null;var b=new Gk(null);Hk(b,this.c,this.o.slice(0===a?0:this.d[a-1],this.d[a]));return b};l.pd=function(){var a=this.c,b=this.o,d=this.d,e=[],f=0,g,h;g=0;for(h=d.length;g<h;++g){var k=d[g],n=new Gk(null);Hk(n,a,b.slice(f,k));e.push(n);f=k}return e};function Vk(a){if(a.L!=a.f){var b=a.o;Sk(b,a.d,a.H)?a.q=b:(a.q=b.slice(),a.q.length=Tk(a.q,0,a.d,a.H));a.L=a.f}return a.q}-l.rc=function(a){var b=[],d=[];b.length=Fk(this.o,0,this.d,this.H,Math.sqrt(a),b,0,d);a=new F(null);Uk(a,"XY",b,d);return a};l.S=function(){return"Polygon"};l.na=function(a){return Qk(Vk(this),0,this.d,this.H,a)};l.$=function(a,b){if(null===a)Uk(this,"XY",null,this.d);else{pk(this,b,a,2);null===this.o&&(this.o=[]);var d=Bk(this.o,0,a,this.H,this.d);this.o.length=0===d.length?0:d[d.length-1];this.p()}};function Uk(a,b,d,e){ok(a,b,d);a.d=e;a.p()}-function Xk(a,b,d,e){var f=m(e)?e:32;e=[];var g;for(g=0;g<f;++g)$a(e,a.offset(b,d,2*Math.PI*g/f));e.push(e[0],e[1]);a=new F(null);Uk(a,"XY",e,[e.length]);return a};function Yk(a,b,d,e,f,g,h){qc.call(this,a,b);this.vectorContext=d;this.c=e;this.frameState=f;this.context=g;this.glContext=h}v(Yk,qc);function Zk(a){this.d=this.f=this.j=this.e=this.c=null;this.i=a}v(Zk,lc);function $k(a){var b=a.j,d=a.f;a=Ra([b,[b[0],d[1]],d,[d[0],b[1]]],a.c.va,a.c);a[4]=a[0].slice();return new F([a])}Zk.prototype.T=function(){this.setMap(null)};Zk.prototype.k=function(a){var b=this.d,d=this.i;a.vectorContext.nc(Infinity,function(a){a.Fa(d.j,d.d);a.Ga(d.f);a.Vb(b,null)})};Zk.prototype.V=function(){return this.d};function al(a){null===a.c||null===a.j||null===a.f||a.c.render()}-Zk.prototype.setMap=function(a){null!==this.e&&(Wc(this.e),this.e=null,this.c.render(),this.c=null);this.c=a;null!==this.c&&(this.e=w(a,"postcompose",this.k,!1,this),al(this))};function bl(a,b){qc.call(this,a);this.coordinate=b}v(bl,qc);function cl(a){Zj.call(this,{handleDownEvent:dl,handleDragEvent:el,handleUpEvent:fl});a=m(a)?a:{};this.i=new Zk(m(a.style)?a.style:null);this.e=null;this.l=m(a.condition)?a.condition:bd}v(cl,Zj);function el(a){if(Yj(a)){var b=this.i;a=a.pixel;b.j=this.e;b.f=a;b.d=$k(b);al(b)}}cl.prototype.V=function(){return this.i.V()};cl.prototype.k=ca;-function fl(a){if(!Yj(a))return!0;this.i.setMap(null);var b=a.pixel[0]-this.e[0],d=a.pixel[1]-this.e[1];64<=b*b+d*d&&(this.k(a),this.dispatchEvent(new bl("boxend",a.coordinate)));return!1}function dl(a){if(Yj(a)&&zc(a.c)&&this.l(a)){this.e=a.pixel;this.i.setMap(a.map);var b=this.i,d=this.e;b.j=this.e;b.f=d;b.d=$k(b);al(b);this.dispatchEvent(new bl("boxstart",a.coordinate));return!0}return!1};function gl(){this.f=-1};function hl(){this.f=-1;this.f=64;this.c=Array(4);this.j=Array(this.f);this.e=this.d=0;this.c[0]=1732584193;this.c[1]=4023233417;this.c[2]=2562383102;this.c[3]=271733878;this.e=this.d=0}v(hl,gl);-function il(a,b,d){d||(d=0);var e=Array(16);if(ia(b))for(var f=0;16>f;++f)e[f]=b.charCodeAt(d++)|b.charCodeAt(d++)<<8|b.charCodeAt(d++)<<16|b.charCodeAt(d++)<<24;else for(f=0;16>f;++f)e[f]=b[d++]|b[d++]<<8|b[d++]<<16|b[d++]<<24;b=a.c[0];d=a.c[1];var f=a.c[2],g=a.c[3],h=0,h=b+(g^d&(f^g))+e[0]+3614090360&4294967295;b=d+(h<<7&4294967295|h>>>25);h=g+(f^b&(d^f))+e[1]+3905402710&4294967295;g=b+(h<<12&4294967295|h>>>20);h=f+(d^g&(b^d))+e[2]+606105819&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(b^f&(g^-b))+e[3]+3250441966&4294967295;d=f+(h<<22&4294967295|h>>>10);h=b+(g^d&(f^g))+e[4]+4118548399&4294967295;b=d+(h<<7&4294967295|h>>>25);h=g+(f^b&(d^f))+e[5]+1200080426&4294967295;g=b+(h<<12&4294967295|h>>>20);h=f+(d^g&(b^d))+e[6]+2821735955&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(b^f&(g^b))+e[7]+4249261313&4294967295;d=f+(h<<22&4294967295|h>>>10);h=b+(g^d&(f^g))+e[8]+1770035416&4294967295;b=d+(h<<7&4294967295|h>>>25);h=g+(f^b&(d^f))+e[9]+2336552879&4294967295;g=b+(h<<12&4294967295|h>>>20);h=f+-(d^g&(b^d))+e[10]+4294925233&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(b^f&(g^b))+e[11]+2304563134&4294967295;d=f+(h<<22&4294967295|h>>>10);h=b+(g^d&(f^g))+e[12]+1804603682&4294967295;b=d+(h<<7&4294967295|h>>>25);h=g+(f^b&(d^f))+e[13]+4254626195&4294967295;g=b+(h<<12&4294967295|h>>>20);h=f+(d^g&(b^d))+e[14]+2792965006&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(b^f&(g^b))+e[15]+1236535329&4294967295;d=f+(h<<22&4294967295|h>>>10);h=b+(f^g&(d^f))+e[1]+4129170786&4294967295;b=d+(h<<5&4294967295|-h>>>27);h=g+(d^f&(b^d))+e[6]+3225465664&4294967295;g=b+(h<<9&4294967295|h>>>23);h=f+(b^d&(g^b))+e[11]+643717713&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^b&(f^g))+e[0]+3921069994&4294967295;d=f+(h<<20&4294967295|h>>>12);h=b+(f^g&(d^f))+e[5]+3593408605&4294967295;b=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(b^d))+e[10]+38016083&4294967295;g=b+(h<<9&4294967295|h>>>23);h=f+(b^d&(g^b))+e[15]+3634488961&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^b&(f^g))+e[4]+3889429448&4294967295;d=f+(h<<20&4294967295|-h>>>12);h=b+(f^g&(d^f))+e[9]+568446438&4294967295;b=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(b^d))+e[14]+3275163606&4294967295;g=b+(h<<9&4294967295|h>>>23);h=f+(b^d&(g^b))+e[3]+4107603335&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^b&(f^g))+e[8]+1163531501&4294967295;d=f+(h<<20&4294967295|h>>>12);h=b+(f^g&(d^f))+e[13]+2850285829&4294967295;b=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(b^d))+e[2]+4243563512&4294967295;g=b+(h<<9&4294967295|h>>>23);h=f+(b^d&(g^b))+e[7]+1735328473&4294967295;f=g+(h<<14&4294967295|-h>>>18);h=d+(g^b&(f^g))+e[12]+2368359562&4294967295;d=f+(h<<20&4294967295|h>>>12);h=b+(d^f^g)+e[5]+4294588738&4294967295;b=d+(h<<4&4294967295|h>>>28);h=g+(b^d^f)+e[8]+2272392833&4294967295;g=b+(h<<11&4294967295|h>>>21);h=f+(g^b^d)+e[11]+1839030562&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^b)+e[14]+4259657740&4294967295;d=f+(h<<23&4294967295|h>>>9);h=b+(d^f^g)+e[1]+2763975236&4294967295;b=d+(h<<4&4294967295|h>>>28);h=g+(b^d^f)+e[4]+1272893353&4294967295;g=b+(h<<11&4294967295|h>>>21);h=f+(g^-b^d)+e[7]+4139469664&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^b)+e[10]+3200236656&4294967295;d=f+(h<<23&4294967295|h>>>9);h=b+(d^f^g)+e[13]+681279174&4294967295;b=d+(h<<4&4294967295|h>>>28);h=g+(b^d^f)+e[0]+3936430074&4294967295;g=b+(h<<11&4294967295|h>>>21);h=f+(g^b^d)+e[3]+3572445317&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^b)+e[6]+76029189&4294967295;d=f+(h<<23&4294967295|h>>>9);h=b+(d^f^g)+e[9]+3654602809&4294967295;b=d+(h<<4&4294967295|h>>>28);h=g+(b^d^f)+e[12]+3873151461&4294967295;-g=b+(h<<11&4294967295|h>>>21);h=f+(g^b^d)+e[15]+530742520&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^b)+e[2]+3299628645&4294967295;d=f+(h<<23&4294967295|h>>>9);h=b+(f^(d|~g))+e[0]+4096336452&4294967295;b=d+(h<<6&4294967295|h>>>26);h=g+(d^(b|~f))+e[7]+1126891415&4294967295;g=b+(h<<10&4294967295|h>>>22);h=f+(b^(g|~d))+e[14]+2878612391&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~b))+e[5]+4237533241&4294967295;d=f+(h<<21&4294967295|h>>>11);h=b+(f^(d|~g))+e[12]+1700485571&4294967295;b=d+-(h<<6&4294967295|h>>>26);h=g+(d^(b|~f))+e[3]+2399980690&4294967295;g=b+(h<<10&4294967295|h>>>22);h=f+(b^(g|~d))+e[10]+4293915773&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~b))+e[1]+2240044497&4294967295;d=f+(h<<21&4294967295|h>>>11);h=b+(f^(d|~g))+e[8]+1873313359&4294967295;b=d+(h<<6&4294967295|h>>>26);h=g+(d^(b|~f))+e[15]+4264355552&4294967295;g=b+(h<<10&4294967295|h>>>22);h=f+(b^(g|~d))+e[6]+2734768916&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~b))+e[13]+1309151649&4294967295;-d=f+(h<<21&4294967295|h>>>11);h=b+(f^(d|~g))+e[4]+4149444226&4294967295;b=d+(h<<6&4294967295|h>>>26);h=g+(d^(b|~f))+e[11]+3174756917&4294967295;g=b+(h<<10&4294967295|h>>>22);h=f+(b^(g|~d))+e[2]+718787259&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~b))+e[9]+3951481745&4294967295;a.c[0]=a.c[0]+b&4294967295;a.c[1]=a.c[1]+(f+(h<<21&4294967295|h>>>11))&4294967295;a.c[2]=a.c[2]+f&4294967295;a.c[3]=a.c[3]+g&4294967295}-hl.prototype.update=function(a,b){m(b)||(b=a.length);for(var d=b-this.f,e=this.j,f=this.d,g=0;g<b;){if(0==f)for(;g<=d;)il(this,a,g),g+=this.f;if(ia(a))for(;g<b;){if(e[f++]=a.charCodeAt(g++),f==this.f){il(this,e);f=0;break}}else for(;g<b;)if(e[f++]=a[g++],f==this.f){il(this,e);f=0;break}}this.d=f;this.e+=b};function jl(a){a=m(a)?a:{};this.c=m(a.color)?a.color:null;this.e=a.lineCap;this.d=m(a.lineDash)?a.lineDash:null;this.j=a.lineJoin;this.i=a.miterLimit;this.f=a.width;this.k=void 0}l=jl.prototype;l.Pk=function(){return this.c};l.Lh=function(){return this.e};l.Qk=function(){return this.d};l.Mh=function(){return this.j};l.Sh=function(){return this.i};l.Rk=function(){return this.f};l.Sk=function(a){this.c=a;this.k=void 0};l.am=function(a){this.e=a;this.k=void 0};l.Tk=function(a){this.d=a;this.k=void 0};-l.bm=function(a){this.j=a;this.k=void 0};l.cm=function(a){this.i=a;this.k=void 0};l.jm=function(a){this.f=a;this.k=void 0};-l.Bb=function(){if(!m(this.k)){var a="s"+(null===this.c?"-":sg(this.c))+","+(m(this.e)?this.e.toString():"-")+","+(null===this.d?"-":this.d.toString())+","+(m(this.j)?this.j:"-")+","+(m(this.i)?this.i.toString():"-")+","+(m(this.f)?this.f.toString():"-"),b=new hl;b.update(a);var d=Array((56>b.d?b.f:2*b.f)-b.d);d[0]=128;for(a=1;a<d.length-8;++a)d[a]=0;for(var e=8*b.e,a=d.length-8;a<d.length;++a)d[a]=e&255,e/=256;b.update(d);d=Array(16);for(a=e=0;4>a;++a)for(var f=0;32>f;f+=8)d[e++]=b.c[a]>>>f&255;-if(8192>d.length)b=String.fromCharCode.apply(null,d);else for(b="",a=0;a<d.length;a+=8192)b+=String.fromCharCode.apply(null,bb(d,a,a+8192));this.k=b}return this.k};var kl=[0,0,0,1],ll=[],ml=[0,0,0,1];function nl(a){a=m(a)?a:{};this.c=m(a.color)?a.color:null;this.f=void 0}nl.prototype.d=function(){return this.c};nl.prototype.e=function(a){this.c=a;this.f=void 0};nl.prototype.Bb=function(){m(this.f)||(this.f="f"+(null===this.c?"-":sg(this.c)));return this.f};function pl(a){a=m(a)?a:{};this.i=this.c=this.j=null;this.e=m(a.fill)?a.fill:null;this.f=m(a.stroke)?a.stroke:null;this.d=a.radius;this.u=[0,0];this.q=this.J=this.k=null;var b=a.atlasManager,d,e=null,f,g=0;null!==this.f&&(f=sg(this.f.c),g=this.f.f,m(g)||(g=1),e=this.f.d,Yf||(e=null));var h=2*(this.d+g)+1;f={strokeStyle:f,Xc:g,size:h,lineDash:e};m(b)?(h=Math.round(h),(e=null===this.e)&&(d=ra(this.Uf,this,f)),g=this.Bb(),f=b.add(g,h,h,ra(this.Vf,this,f),d),this.c=f.image,this.u=[f.offsetX,f.offsetY],-d=f.image.width,this.i=e?f.Bf:this.c):(this.c=Df("CANVAS"),this.c.height=h,this.c.width=h,d=h=this.c.width,b=this.c.getContext("2d"),this.Vf(f,b,0,0),null===this.e?(b=this.i=Df("CANVAS"),b.height=f.size,b.width=f.size,b=b.getContext("2d"),this.Uf(f,b,0,0)):this.i=this.c);this.k=[h/2,h/2];this.J=[h,h];this.q=[d,d];uj.call(this,{opacity:1,rotateWithView:!1,rotation:0,scale:1,snapToPixel:m(a.snapToPixel)?a.snapToPixel:!0})}v(pl,uj);l=pl.prototype;l.Ab=function(){return this.k};l.Gk=function(){return this.e};-l.Md=function(){return this.i};l.Fb=function(){return this.c};l.Sc=function(){return 2};l.od=function(){return this.q};l.Gb=function(){return this.u};l.Hk=function(){return this.d};l.kb=function(){return this.J};l.Ik=function(){return this.f};l.Ae=ca;l.load=ca;l.Se=ca;-l.Vf=function(a,b,d,e){b.setTransform(1,0,0,1,0,0);b.translate(d,e);b.beginPath();b.arc(a.size/2,a.size/2,this.d,0,2*Math.PI,!0);null!==this.e&&(b.fillStyle=sg(this.e.c),b.fill());null!==this.f&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Xc,null===a.lineDash||b.setLineDash(a.lineDash),b.stroke());b.closePath()};-l.Uf=function(a,b,d,e){b.setTransform(1,0,0,1,0,0);b.translate(d,e);b.beginPath();b.arc(a.size/2,a.size/2,this.d,0,2*Math.PI,!0);b.fillStyle=kl;b.fill();null!==this.f&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Xc,null===a.lineDash||b.setLineDash(a.lineDash),b.stroke());b.closePath()};l.Bb=function(){var a=null===this.f?"-":this.f.Bb(),b=null===this.e?"-":this.e.Bb();if(null===this.j||a!=this.j[1]||b!=this.j[2]||this.d!=this.j[3])this.j=["c"+a+b+(m(this.d)?this.d.toString():"-"),a,b,this.d];return this.j[0]};function ql(a){a=m(a)?a:{};this.k=null;this.e=rl;m(a.geometry)&&this.Yf(a.geometry);this.j=m(a.fill)?a.fill:null;this.i=m(a.image)?a.image:null;this.d=m(a.stroke)?a.stroke:null;this.f=m(a.text)?a.text:null;this.c=a.zIndex}l=ql.prototype;l.V=function(){return this.k};l.Fh=function(){return this.e};l.Uk=function(){return this.j};l.Vk=function(){return this.i};l.Wk=function(){return this.d};l.Xk=function(){return this.f};l.gi=function(){return this.c};-l.Yf=function(a){ka(a)?this.e=a:ia(a)?this.e=function(b){return b.get(a)}:null===a?this.e=rl:m(a)&&(this.e=function(){return a});this.k=a};l.lm=function(a){this.c=a};function sl(a){ka(a)||(a=ga(a)?a:[a],a=$c(a));return a}function tl(){var a=new nl({color:"rgba(255,255,255,0.4)"}),b=new jl({color:"#3399CC",width:1.25}),d=[new ql({image:new pl({fill:a,stroke:b,radius:5}),fill:a,stroke:b})];tl=function(){return d};return d}-function ul(){var a={},b=[255,255,255,1],d=[0,153,255,1];a.Polygon=[new ql({fill:new nl({color:[255,255,255,.5]})})];a.MultiPolygon=a.Polygon;a.LineString=[new ql({stroke:new jl({color:b,width:5})}),new ql({stroke:new jl({color:d,width:3})})];a.MultiLineString=a.LineString;a.Point=[new ql({image:new pl({radius:6,fill:new nl({color:d}),stroke:new jl({color:b,width:1.5})}),zIndex:Infinity})];a.MultiPoint=a.Point;a.GeometryCollection=a.Polygon.concat(a.Point);return a}function rl(a){return a.V()};function vl(a){var b=m(a)?a:{};a=m(b.condition)?b.condition:Wj;b=m(b.style)?b.style:new ql({stroke:new jl({color:[0,0,255,1]})});cl.call(this,{condition:a,style:b})}v(vl,cl);vl.prototype.k=function(){var a=this.n,b=a.c(),d=this.V().N(),e=ke(d),f=a.j(),d=b.n(d,f),d=b.constrainResolution(d,0,void 0);Pj(a,b,d,e,200)};function wl(a){Mj.call(this,{handleEvent:xl});a=m(a)?a:{};this.e=m(a.condition)?a.condition:gd(Vj,Xj);this.j=m(a.pixelDelta)?a.pixelDelta:128}v(wl,Mj);-function xl(a){var b=!1;if("key"==a.type){var d=a.c.j;if(this.e(a)&&(40==d||37==d||39==d||38==d)){var e=a.map,b=e.c(),f=Xe(b),g=f.resolution*this.j,h=0,k=0;40==d?k=-g:37==d?h=-g:39==d?h=g:k=g;d=[h,k];Ad(d,f.rotation);f=b.d();m(f)&&(m(100)&&e.Qa(df({source:f,duration:100,easing:bf})),e=b.l([f[0]+d[0],f[1]+d[1]]),b.Ma(e));a.preventDefault();b=!0}}return!b};function yl(a){Mj.call(this,{handleEvent:zl});a=m(a)?a:{};this.j=m(a.condition)?a.condition:Xj;this.e=m(a.delta)?a.delta:1;this.i=m(a.duration)?a.duration:100}v(yl,Mj);function zl(a){var b=!1;if("key"==a.type){var d=a.c.l;if(this.j(a)&&(43==d||45==d)){b=a.map;d=43==d?this.e:-this.e;b.render();var e=b.c();Oj(b,e,d,void 0,this.i);a.preventDefault();b=!0}}return!b};function Al(a){Mj.call(this,{handleEvent:Bl});a=m(a)?a:{};this.e=0;this.u=m(a.duration)?a.duration:250;this.i=null;this.k=this.j=void 0}v(Al,Mj);function Bl(a){var b=!1;if("mousewheel"==a.type){var b=a.map,d=a.c;this.i=a.coordinate;this.e+=d.u;m(this.j)||(this.j=ta());d=Math.max(80-(ta()-this.j),0);ba.clearTimeout(this.k);this.k=ba.setTimeout(ra(this.l,this,b),d);a.preventDefault();b=!0}return!b}-Al.prototype.l=function(a){var b=Vb(this.e,-1,1),d=a.c();a.render();Oj(a,d,-b,this.i,this.u);this.e=0;this.i=null;this.k=this.j=void 0};function Cl(a){Zj.call(this,{handleDownEvent:Dl,handleDragEvent:El,handleUpEvent:Fl});a=m(a)?a:{};this.i=null;this.k=void 0;this.e=!1;this.l=0;this.u=m(a.threshold)?a.threshold:.3}v(Cl,Zj);-function El(a){var b=0,d=this.j[0],e=this.j[1],d=Math.atan2(e.clientY-d.clientY,e.clientX-d.clientX);m(this.k)&&(b=d-this.k,this.l+=b,!this.e&&Math.abs(this.l)>this.u&&(this.e=!0));this.k=d;a=a.map;d=Jg(a.d);e=bk(this.j);e[0]-=d.x;e[1]-=d.y;this.i=a.va(e);this.e&&(d=a.c(),e=d.e(),a.render(),Nj(a,d,e+b,this.i))}function Fl(a){if(2>this.j.length){a=a.map;var b=a.c();Ze(b,-1);if(this.e){var d=b.e(),e=this.i,d=b.constrainRotation(d,0);Nj(a,b,d,e,250)}return!1}return!0}-function Dl(a){return 2<=this.j.length?(a=a.map,this.i=null,this.k=void 0,this.e=!1,this.l=0,this.s||Ze(a.c(),1),a.render(),!0):!1}Cl.prototype.t=ad;function Gl(a){Zj.call(this,{handleDownEvent:Hl,handleDragEvent:Il,handleUpEvent:Jl});a=m(a)?a:{};this.i=null;this.l=m(a.duration)?a.duration:400;this.e=void 0;this.k=1}v(Gl,Zj);function Il(a){var b=1,d=this.j[0],e=this.j[1],f=d.clientX-e.clientX,d=d.clientY-e.clientY,f=Math.sqrt(f*f+d*d);m(this.e)&&(b=this.e/f);this.e=f;1!=b&&(this.k=b);a=a.map;var f=a.c(),d=f.c(),e=Jg(a.d),g=bk(this.j);g[0]-=e.x;g[1]-=e.y;this.i=a.va(g);a.render();Pj(a,f,d*b,this.i)}-function Jl(a){if(2>this.j.length){a=a.map;var b=a.c();Ze(b,-1);var d=b.c(),e=this.i,f=this.l,d=b.constrainResolution(d,0,this.k-1);Pj(a,b,d,e,f);return!1}return!0}function Hl(a){return 2<=this.j.length?(a=a.map,this.i=null,this.e=void 0,this.k=1,this.s||Ze(a.c(),1),a.render(),!0):!1}Gl.prototype.t=ad;function Kl(a){a=m(a)?a:{};var b=new lg,d=new Jj(-.005,.05,100);(m(a.altShiftDragRotate)?a.altShiftDragRotate:1)&&b.push(new gk);(m(a.doubleClickZoom)?a.doubleClickZoom:1)&&b.push(new Qj({delta:a.zoomDelta,duration:a.zoomDuration}));(m(a.dragPan)?a.dragPan:1)&&b.push(new ck({kinetic:d}));(m(a.pinchRotate)?a.pinchRotate:1)&&b.push(new Cl);(m(a.pinchZoom)?a.pinchZoom:1)&&b.push(new Gl({duration:a.zoomDuration}));if(m(a.keyboard)?a.keyboard:1)b.push(new wl),b.push(new yl({delta:a.zoomDelta,duration:a.zoomDuration}));-(m(a.mouseWheelZoom)?a.mouseWheelZoom:1)&&b.push(new Al({duration:a.zoomDuration}));(m(a.shiftDragZoom)?a.shiftDragZoom:1)&&b.push(new vl);return b};function G(a){var b=m(a)?a:{};a=Ab(b);delete a.layers;b=b.layers;C.call(this,a);this.c=null;w(this,ud("layers"),this.Ai,!1,this);null!=b?ga(b)&&(b=new lg(b.slice())):b=new lg;this.v(b)}v(G,C);l=G.prototype;l.xf=function(){this.d()&&this.p()};-l.Ai=function(){null!==this.c&&(Pa(qb(this.c),Wc),this.c=null);var a=this.dc();if(null!=a){this.c={add:w(a,"add",this.zi,!1,this),remove:w(a,"remove",this.Bi,!1,this)};var a=a.c,b,d,e;b=0;for(d=a.length;b<d;b++)e=a[b],this.c[ma(e).toString()]=w(e,["propertychange","change"],this.xf,!1,this)}this.p()};l.zi=function(a){a=a.element;this.c[ma(a).toString()]=w(a,["propertychange","change"],this.xf,!1,this);this.p()};l.Bi=function(a){a=ma(a.element).toString();Wc(this.c[a]);delete this.c[a];this.p()};-l.dc=function(){return this.get("layers")};G.prototype.getLayers=G.prototype.dc;G.prototype.v=function(a){this.set("layers",a)};G.prototype.setLayers=G.prototype.v;-G.prototype.ab=function(a){var b=m(a)?a:[],d=b.length;this.dc().forEach(function(a){a.ab(b)});a=Mi(this);var e,f;for(e=b.length;d<e;d++)f=b[d],f.brightness=Vb(f.brightness+a.brightness,-1,1),f.contrast*=a.contrast,f.hue+=a.hue,f.opacity*=a.opacity,f.saturation*=a.saturation,f.visible=f.visible&&a.visible,f.maxResolution=Math.min(f.maxResolution,a.maxResolution),f.minResolution=Math.max(f.minResolution,a.minResolution),m(a.extent)&&(f.extent=m(f.extent)?oe(f.extent,a.extent):a.extent);return b};-G.prototype.ob=function(){return"ready"};function Ll(a){xe.call(this,{code:a,units:"m",extent:Ml,global:!0,worldExtent:Nl})}v(Ll,xe);Ll.prototype.ve=function(a,b){var d=b[1]/6378137;return a/((Math.exp(d)+Math.exp(-d))/2)};var Ol=6378137*Math.PI,Ml=[-Ol,-Ol,Ol,Ol],Nl=[-180,-85,180,85],Ie=Ra("EPSG:3857 EPSG:102100 EPSG:102113 EPSG:900913 urn:ogc:def:crs:EPSG:6.18:3:3857 urn:ogc:def:crs:EPSG::3857 http://www.opengis.net/gml/srs/epsg.xml#3857".split(" "),function(a){return new Ll(a)});-function Je(a,b,d){var e=a.length;d=1<d?d:2;m(b)||(2<d?b=a.slice():b=Array(e));for(var f=0;f<e;f+=d)b[f]=6378137*Math.PI*a[f]/180,b[f+1]=6378137*Math.log(Math.tan(Math.PI*(a[f+1]+90)/360));return b}function Ke(a,b,d){var e=a.length;d=1<d?d:2;m(b)||(2<d?b=a.slice():b=Array(e));for(var f=0;f<e;f+=d)b[f]=180*a[f]/(6378137*Math.PI),b[f+1]=360*Math.atan(Math.exp(a[f+1]/6378137))/Math.PI-90;return b};function Pl(a,b){xe.call(this,{code:a,units:"degrees",extent:Ql,axisOrientation:b,global:!0,worldExtent:Ql})}v(Pl,xe);Pl.prototype.ve=function(a){return a};var Ql=[-180,-90,180,90],Le=[new Pl("CRS:84"),new Pl("EPSG:4326","neu"),new Pl("urn:ogc:def:crs:EPSG::4326","neu"),new Pl("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Pl("urn:ogc:def:crs:OGC:1.3:CRS84"),new Pl("urn:ogc:def:crs:OGC:2:84"),new Pl("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Pl("urn:x-ogc:def:crs:EPSG:4326","neu")];function Rl(){De(Ie);De(Le);He()};function H(a){E.call(this,m(a)?a:{})}v(H,E);function I(a){a=m(a)?a:{};var b=Ab(a);delete b.preload;delete b.useInterimTilesOnError;E.call(this,b);this.ma(m(a.preload)?a.preload:0);this.oa(m(a.useInterimTilesOnError)?a.useInterimTilesOnError:!0)}v(I,E);I.prototype.v=function(){return this.get("preload")};I.prototype.getPreload=I.prototype.v;I.prototype.ma=function(a){this.set("preload",a)};I.prototype.setPreload=I.prototype.ma;I.prototype.ia=function(){return this.get("useInterimTilesOnError")};I.prototype.getUseInterimTilesOnError=I.prototype.ia;-I.prototype.oa=function(a){this.set("useInterimTilesOnError",a)};I.prototype.setUseInterimTilesOnError=I.prototype.oa;function J(a){a=m(a)?a:{};var b=Ab(a);delete b.style;delete b.renderBuffer;delete b.updateWhileAnimating;E.call(this,b);this.ia=m(a.renderBuffer)?a.renderBuffer:100;this.Ac=null;this.v=void 0;this.oa(a.style);this.Ec=m(a.updateWhileAnimating)?a.updateWhileAnimating:!1}v(J,E);J.prototype.mf=function(){return this.Ac};J.prototype.of=function(){return this.v};J.prototype.oa=function(a){this.Ac=m(a)?a:tl;this.v=null===a?void 0:sl(this.Ac);this.p()};function Sl(a,b,d,e,f){this.s={};this.d=a;this.v=b;this.j=d;this.L=e;this.ob=f;this.i=this.c=this.f=this.ja=this.ta=this.sa=null;this.ia=this.Ha=this.u=this.Z=this.W=this.R=0;this.ma=!1;this.k=this.oa=0;this.za=!1;this.ga=0;this.e="";this.l=this.J=this.Ja=this.Ia=0;this.ha=this.n=this.q=null;this.t=[];this.ab=Hd()}-function Tl(a,b,d){if(null!==a.i){b=lk(b,0,d,2,a.L,a.t);d=a.d;var e=a.ab,f=d.globalAlpha;1!=a.u&&(d.globalAlpha=f*a.u);var g=a.oa;a.ma&&(g+=a.ob);var h,k;h=0;for(k=b.length;h<k;h+=2){var n=b[h]-a.R,p=b[h+1]-a.W;a.za&&(n=n+.5|0,p=p+.5|0);if(0!==g||1!=a.k){var q=n+a.R,r=p+a.W;gj(e,q,r,a.k,a.k,g,-q,-r);d.setTransform(e[0],e[1],e[4],e[5],e[12],e[13])}d.drawImage(a.i,a.Ha,a.ia,a.ga,a.Z,n,p,a.ga,a.Z)}0===g&&1==a.k||d.setTransform(1,0,0,1,0,0);1!=a.u&&(d.globalAlpha=f)}}-function Ul(a,b,d,e){var f=0;if(null!==a.ha&&""!==a.e){null===a.q||Vl(a,a.q);null===a.n||Wl(a,a.n);var g=a.ha,h=a.d,k=a.ja;null===k?(h.font=g.font,h.textAlign=g.textAlign,h.textBaseline=g.textBaseline,a.ja={font:g.font,textAlign:g.textAlign,textBaseline:g.textBaseline}):(k.font!=g.font&&(k.font=h.font=g.font),k.textAlign!=g.textAlign&&(k.textAlign=h.textAlign=g.textAlign),k.textBaseline!=g.textBaseline&&(k.textBaseline=h.textBaseline=g.textBaseline));b=lk(b,f,d,e,a.L,a.t);for(g=a.d;f<d;f+=e){h=b[f]+-a.Ia;k=b[f+1]+a.Ja;if(0!==a.J||1!=a.l){var n=gj(a.ab,h,k,a.l,a.l,a.J,-h,-k);g.setTransform(n[0],n[1],n[4],n[5],n[12],n[13])}null===a.n||g.strokeText(a.e,h,k);null===a.q||g.fillText(a.e,h,k)}0===a.J&&1==a.l||g.setTransform(1,0,0,1,0,0)}}function Yl(a,b,d,e,f,g){var h=a.d;a=lk(b,d,e,f,a.L,a.t);h.moveTo(a[0],a[1]);for(b=2;b<a.length;b+=2)h.lineTo(a[b],a[b+1]);g&&h.lineTo(a[0],a[1]);return e}function Zl(a,b,d,e,f){var g=a.d,h,k;h=0;for(k=e.length;h<k;++h)d=Yl(a,b,d,e[h],f,!0),g.closePath();return d}-l=Sl.prototype;l.nc=function(a,b){var d=a.toString(),e=this.s[d];m(e)?e.push(b):this.s[d]=[b]};l.oc=function(a){if(pe(this.j,a.N())){if(null!==this.f||null!==this.c){null===this.f||Vl(this,this.f);null===this.c||Wl(this,this.c);var b;b=a.o;b=null===b?null:lk(b,0,b.length,a.H,this.L,this.t);var d=b[2]-b[0],e=b[3]-b[1],d=Math.sqrt(d*d+e*e),e=this.d;e.beginPath();e.arc(b[0],b[1],d,0,2*Math.PI);null===this.f||e.fill();null===this.c||e.stroke()}""!==this.e&&Ul(this,a.Ce(),2,2)}};-l.qe=function(a,b){var d=(0,b.e)(a);if(null!=d&&pe(this.j,d.N())){var e=b.c;m(e)||(e=0);this.nc(e,function(a){a.Fa(b.j,b.d);a.mb(b.i);a.Ga(b.f);$l[d.S()].call(a,d,null)})}};l.jd=function(a,b){var d=a.e,e,f;e=0;for(f=d.length;e<f;++e){var g=d[e];$l[g.S()].call(this,g,b)}};l.yb=function(a){var b=a.o;a=a.H;null===this.i||Tl(this,b,b.length);""!==this.e&&Ul(this,b,b.length,a)};l.xb=function(a){var b=a.o;a=a.H;null===this.i||Tl(this,b,b.length);""!==this.e&&Ul(this,b,b.length,a)};-l.Ib=function(a){if(pe(this.j,a.N())){if(null!==this.c){Wl(this,this.c);var b=this.d,d=a.o;b.beginPath();Yl(this,d,0,d.length,a.H,!1);b.stroke()}""!==this.e&&(a=am(a),Ul(this,a,2,2))}};l.pc=function(a){var b=a.N();if(pe(this.j,b)){if(null!==this.c){Wl(this,this.c);var b=this.d,d=a.o,e=0,f=a.d,g=a.H;b.beginPath();var h,k;h=0;for(k=f.length;h<k;++h)e=Yl(this,d,e,f[h],g,!1);b.stroke()}""!==this.e&&(a=bm(a),Ul(this,a,a.length,2))}};-l.Vb=function(a){if(pe(this.j,a.N())){if(null!==this.c||null!==this.f){null===this.f||Vl(this,this.f);null===this.c||Wl(this,this.c);var b=this.d;b.beginPath();Zl(this,Vk(a),0,a.d,a.H);null===this.f||b.fill();null===this.c||b.stroke()}""!==this.e&&(a=Wk(a),Ul(this,a,2,2))}};-l.qc=function(a){if(pe(this.j,a.N())){if(null!==this.c||null!==this.f){null===this.f||Vl(this,this.f);null===this.c||Wl(this,this.c);var b=this.d,d=cm(a),e=0,f=a.d,g=a.H,h,k;h=0;for(k=f.length;h<k;++h){var n=f[h];b.beginPath();e=Zl(this,d,e,n,g);null===this.f||b.fill();null===this.c||b.stroke()}}""!==this.e&&(a=dm(a),Ul(this,a,a.length,2))}};function em(a){var b=Ra(rb(a.s),Number);cb(b);var d,e,f,g,h;d=0;for(e=b.length;d<e;++d)for(f=a.s[b[d].toString()],g=0,h=f.length;g<h;++g)f[g](a)}-function Vl(a,b){var d=a.d,e=a.sa;null===e?(d.fillStyle=b.fillStyle,a.sa={fillStyle:b.fillStyle}):e.fillStyle!=b.fillStyle&&(e.fillStyle=d.fillStyle=b.fillStyle)}-function Wl(a,b){var d=a.d,e=a.ta;null===e?(d.lineCap=b.lineCap,Yf&&d.setLineDash(b.lineDash),d.lineJoin=b.lineJoin,d.lineWidth=b.lineWidth,d.miterLimit=b.miterLimit,d.strokeStyle=b.strokeStyle,a.ta={lineCap:b.lineCap,lineDash:b.lineDash,lineJoin:b.lineJoin,lineWidth:b.lineWidth,miterLimit:b.miterLimit,strokeStyle:b.strokeStyle}):(e.lineCap!=b.lineCap&&(e.lineCap=d.lineCap=b.lineCap),Yf&&!eb(e.lineDash,b.lineDash)&&d.setLineDash(e.lineDash=b.lineDash),e.lineJoin!=b.lineJoin&&(e.lineJoin=d.lineJoin=-b.lineJoin),e.lineWidth!=b.lineWidth&&(e.lineWidth=d.lineWidth=b.lineWidth),e.miterLimit!=b.miterLimit&&(e.miterLimit=d.miterLimit=b.miterLimit),e.strokeStyle!=b.strokeStyle&&(e.strokeStyle=d.strokeStyle=b.strokeStyle))}-l.Fa=function(a,b){if(null===a)this.f=null;else{var d=a.c;this.f={fillStyle:sg(null===d?kl:d)}}if(null===b)this.c=null;else{var d=b.c,e=b.e,f=b.d,g=b.j,h=b.f,k=b.i;this.c={lineCap:m(e)?e:"round",lineDash:null!=f?f:ll,lineJoin:m(g)?g:"round",lineWidth:this.v*(m(h)?h:1),miterLimit:m(k)?k:10,strokeStyle:sg(null===d?ml:d)}}};-l.mb=function(a){if(null===a)this.i=null;else{var b=a.Ab(),d=a.Fb(1),e=a.Gb(),f=a.kb();this.R=b[0];this.W=b[1];this.Z=f[1];this.i=d;this.u=a.s;this.Ha=e[0];this.ia=e[1];this.ma=a.t;this.oa=a.l;this.k=a.n;this.za=a.v;this.ga=f[0]}};-l.Ga=function(a){if(null===a)this.e="";else{var b=a.c;null===b?this.q=null:(b=b.c,this.q={fillStyle:sg(null===b?kl:b)});var d=a.i;if(null===d)this.n=null;else{var b=d.c,e=d.e,f=d.d,g=d.j,h=d.f,d=d.i;this.n={lineCap:m(e)?e:"round",lineDash:null!=f?f:ll,lineJoin:m(g)?g:"round",lineWidth:m(h)?h:1,miterLimit:m(d)?d:10,strokeStyle:sg(null===b?ml:b)}}var b=a.e,e=a.l,f=a.n,g=a.j,h=a.f,d=a.d,k=a.k;a=a.q;this.ha={font:m(b)?b:"10px sans-serif",textAlign:m(k)?k:"center",textBaseline:m(a)?a:"middle"};this.e=-m(d)?d:"";this.Ia=m(e)?this.v*e:0;this.Ja=m(f)?this.v*f:0;this.J=m(g)?g:0;this.l=this.v*(m(h)?h:1)}};var $l={Point:Sl.prototype.yb,LineString:Sl.prototype.Ib,Polygon:Sl.prototype.Vb,MultiPoint:Sl.prototype.xb,MultiLineString:Sl.prototype.pc,MultiPolygon:Sl.prototype.qc,GeometryCollection:Sl.prototype.jd,Circle:Sl.prototype.oc};var fm=["Polygon","LineString","Image","Text"];function gm(a,b,d){this.ja=a;this.ga=b;this.e=null;this.j=0;this.resolution=d;this.W=this.R=null;this.f=[];this.coordinates=[];this.sa=Hd();this.c=[];this.ha=[];this.ta=Hd()}-function hm(a,b,d,e,f,g){var h=a.coordinates.length,k=a.te(),n=[b[d],b[d+1]],p=[NaN,NaN],q=!0,r,s,u;for(r=d+f;r<e;r+=f)p[0]=b[r],p[1]=b[r+1],u=ae(k,p),u!==s?(q&&(a.coordinates[h++]=n[0],a.coordinates[h++]=n[1]),a.coordinates[h++]=p[0],a.coordinates[h++]=p[1],q=!1):1===u?(a.coordinates[h++]=p[0],a.coordinates[h++]=p[1],q=!1):q=!0,n[0]=p[0],n[1]=p[1],s=u;r===d+f&&(a.coordinates[h++]=n[0],a.coordinates[h++]=n[1]);g&&(a.coordinates[h++]=b[d],a.coordinates[h++]=b[d+1]);return h}-function im(a,b){a.R=[0,b,0];a.f.push(a.R);a.W=[0,b,0];a.c.push(a.W)}-function jm(a,b,d,e,f,g,h,k,n){var p;hj(e,a.sa)?p=a.ha:(p=lk(a.coordinates,0,a.coordinates.length,2,e,a.ha),Kd(a.sa,e));e=0;var q=h.length,r=0,s;for(a=a.ta;e<q;){var u=h[e],z,y,A,D;switch(u[0]){case 0:r=u[1];s=ma(r).toString();m(g[s])?e=u[2]:m(n)&&!pe(n,r.V().N())?e=u[2]:++e;break;case 1:b.beginPath();++e;break;case 2:r=u[1];s=p[r];var x=p[r+1],M=p[r+2]-s,r=p[r+3]-x;b.arc(s,x,Math.sqrt(M*M+r*r),0,2*Math.PI,!0);++e;break;case 3:b.closePath();++e;break;case 4:r=u[1];s=u[2];z=u[3];A=u[4]*d;var Q=u[5]*-d,O=u[6];y=u[7];var W=u[8],Ja=u[9],x=u[11],M=u[12],lb=u[13],Ka=u[14];for(u[10]&&(x+=f);r<s;r+=2){u=p[r]-A;D=p[r+1]-Q;lb&&(u=u+.5|0,D=D+.5|0);if(1!=M||0!==x){var mb=u+A,Pb=D+Q;gj(a,mb,Pb,M,M,x,-mb,-Pb);b.setTransform(a[0],a[1],a[4],a[5],a[12],a[13])}mb=b.globalAlpha;1!=y&&(b.globalAlpha=mb*y);b.drawImage(z,W,Ja,Ka,O,u,D,Ka*d,O*d);1!=y&&(b.globalAlpha=mb);1==M&&0===x||b.setTransform(1,0,0,1,0,0)}++e;break;case 5:r=u[1];s=u[2];A=u[3];Q=u[4]*d;O=u[5]*d;x=u[6];M=u[7]*d;z=u[8];for(y=u[9];r<s;r+=2){u=p[r]+-Q;D=p[r+1]+O;if(1!=M||0!==x)gj(a,u,D,M,M,x,-u,-D),b.setTransform(a[0],a[1],a[4],a[5],a[12],a[13]);y&&b.strokeText(A,u,D);z&&b.fillText(A,u,D);1==M&&0===x||b.setTransform(1,0,0,1,0,0)}++e;break;case 6:if(m(k)&&(r=u[1],r=k(r)))return r;++e;break;case 7:b.fill();++e;break;case 8:r=u[1];s=u[2];b.moveTo(p[r],p[r+1]);for(r+=2;r<s;r+=2)b.lineTo(p[r],p[r+1]);++e;break;case 9:b.fillStyle=u[1];++e;break;case 10:r=m(u[7])?u[7]:!0;s=u[2];b.strokeStyle=u[1];b.lineWidth=r?s*d:s;b.lineCap=u[3];b.lineJoin=u[4];b.miterLimit=-u[5];Yf&&b.setLineDash(u[6]);++e;break;case 11:b.font=u[1];b.textAlign=u[2];b.textBaseline=u[3];++e;break;case 12:b.stroke();++e;break;default:++e}}}gm.prototype.ec=function(a,b,d,e,f){jm(this,a,b,d,e,f,this.f,void 0)};function km(a){var b=a.c;b.reverse();var d,e=b.length,f,g,h=-1;for(d=0;d<e;++d)if(f=b[d],g=f[0],6==g)h=d;else if(0==g){f[2]=d;f=a.c;for(g=d;h<g;){var k=f[h];f[h]=f[g];f[g]=k;++h;--g}h=-1}}-function lm(a,b){a.R[2]=a.f.length;a.R=null;a.W[2]=a.c.length;a.W=null;var d=[6,b];a.f.push(d);a.c.push(d)}gm.prototype.Ob=ca;gm.prototype.te=function(){return this.ga};function mm(a,b,d){gm.call(this,a,b,d);this.q=this.Z=null;this.L=this.J=this.v=this.t=this.s=this.u=this.n=this.l=this.k=this.i=this.d=void 0}v(mm,gm);-mm.prototype.yb=function(a,b){if(null!==this.q){im(this,b);var d=a.o,e=this.coordinates.length,d=hm(this,d,0,d.length,a.H,!1);this.f.push([4,e,d,this.q,this.d,this.i,this.k,this.l,this.n,this.u,this.s,this.t,this.v,this.J,this.L]);this.c.push([4,e,d,this.Z,this.d,this.i,this.k,this.l,this.n,this.u,this.s,this.t,this.v,this.J,this.L]);lm(this,b)}};-mm.prototype.xb=function(a,b){if(null!==this.q){im(this,b);var d=a.o,e=this.coordinates.length,d=hm(this,d,0,d.length,a.H,!1);this.f.push([4,e,d,this.q,this.d,this.i,this.k,this.l,this.n,this.u,this.s,this.t,this.v,this.J,this.L]);this.c.push([4,e,d,this.Z,this.d,this.i,this.k,this.l,this.n,this.u,this.s,this.t,this.v,this.J,this.L]);lm(this,b)}};mm.prototype.Ob=function(){km(this);this.i=this.d=void 0;this.q=this.Z=null;this.L=this.J=this.t=this.s=this.u=this.n=this.l=this.v=this.k=void 0};-mm.prototype.mb=function(a){var b=a.Ab(),d=a.kb(),e=a.Md(1),f=a.Fb(1),g=a.Gb();this.d=b[0];this.i=b[1];this.Z=e;this.q=f;this.k=d[1];this.l=a.s;this.n=g[0];this.u=g[1];this.s=a.t;this.t=a.l;this.v=a.n;this.J=a.v;this.L=d[0]};function nm(a,b,d){gm.call(this,a,b,d);this.d={Mc:void 0,Hc:void 0,Ic:null,Jc:void 0,Kc:void 0,Lc:void 0,ze:0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(nm,gm);-function om(a,b,d,e,f){var g=a.coordinates.length;b=hm(a,b,d,e,f,!1);g=[8,g,b];a.f.push(g);a.c.push(g);return e}l=nm.prototype;l.te=function(){null===this.e&&(this.e=Xd(this.ga),0<this.j&&Wd(this.e,this.resolution*(this.j+1)/2,this.e));return this.e};-function pm(a){var b=a.d,d=b.strokeStyle,e=b.lineCap,f=b.lineDash,g=b.lineJoin,h=b.lineWidth,k=b.miterLimit;b.Mc==d&&b.Hc==e&&eb(b.Ic,f)&&b.Jc==g&&b.Kc==h&&b.Lc==k||(b.ze!=a.coordinates.length&&(a.f.push([12]),b.ze=a.coordinates.length),a.f.push([10,d,h,e,g,k,f],[1]),b.Mc=d,b.Hc=e,b.Ic=f,b.Jc=g,b.Kc=h,b.Lc=k)}-l.Ib=function(a,b){var d=this.d,e=d.lineWidth;m(d.strokeStyle)&&m(e)&&(pm(this),im(this,b),this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash],[1]),d=a.o,om(this,d,0,d.length,a.H),this.c.push([12]),lm(this,b))};-l.pc=function(a,b){var d=this.d,e=d.lineWidth;if(m(d.strokeStyle)&&m(e)){pm(this);im(this,b);this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash],[1]);var d=a.d,e=a.o,f=a.H,g=0,h,k;h=0;for(k=d.length;h<k;++h)g=om(this,e,g,d[h],f);this.c.push([12]);lm(this,b)}};l.Ob=function(){this.d.ze!=this.coordinates.length&&this.f.push([12]);km(this);this.d=null};-l.Fa=function(a,b){var d=b.c;this.d.strokeStyle=sg(null===d?ml:d);d=b.e;this.d.lineCap=m(d)?d:"round";d=b.d;this.d.lineDash=null===d?ll:d;d=b.j;this.d.lineJoin=m(d)?d:"round";d=b.f;this.d.lineWidth=m(d)?d:1;d=b.i;this.d.miterLimit=m(d)?d:10;this.d.lineWidth>this.j&&(this.j=this.d.lineWidth,this.e=null)};-function qm(a,b,d){gm.call(this,a,b,d);this.d={gf:void 0,Mc:void 0,Hc:void 0,Ic:null,Jc:void 0,Kc:void 0,Lc:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(qm,gm);-function rm(a,b,d,e,f){var g=a.d,h=[1];a.f.push(h);a.c.push(h);var k,h=0;for(k=e.length;h<k;++h){var n=e[h],p=a.coordinates.length;d=hm(a,b,d,n,f,!0);d=[8,p,d];p=[3];a.f.push(d,p);a.c.push(d,p);d=n}b=[7];a.c.push(b);m(g.fillStyle)&&a.f.push(b);m(g.strokeStyle)&&(g=[12],a.f.push(g),a.c.push(g));return d}l=qm.prototype;-l.oc=function(a,b){var d=this.d,e=d.strokeStyle;if(m(d.fillStyle)||m(e)){sm(this);im(this,b);this.c.push([9,sg(kl)]);m(d.strokeStyle)&&this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash]);var f=a.o,e=this.coordinates.length;hm(this,f,0,f.length,a.H,!1);f=[1];e=[2,e];this.f.push(f,e);this.c.push(f,e);e=[7];this.c.push(e);m(d.fillStyle)&&this.f.push(e);m(d.strokeStyle)&&(d=[12],this.f.push(d),this.c.push(d));lm(this,b)}};-l.Vb=function(a,b){var d=this.d,e=d.strokeStyle;if(m(d.fillStyle)||m(e))sm(this),im(this,b),this.c.push([9,sg(kl)]),m(d.strokeStyle)&&this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash]),d=a.d,e=Vk(a),rm(this,e,0,d,a.H),lm(this,b)};-l.qc=function(a,b){var d=this.d,e=d.strokeStyle;if(m(d.fillStyle)||m(e)){sm(this);im(this,b);this.c.push([9,sg(kl)]);m(d.strokeStyle)&&this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash]);var d=a.d,e=cm(a),f=a.H,g=0,h,k;h=0;for(k=d.length;h<k;++h)g=rm(this,e,g,d[h],f);lm(this,b)}};l.Ob=function(){km(this);this.d=null;var a=this.ja;if(0!==a){var b=this.coordinates,d,e;d=0;for(e=b.length;d<e;++d)b[d]=a*Math.round(b[d]/a)}};-l.te=function(){null===this.e&&(this.e=Xd(this.ga),0<this.j&&Wd(this.e,this.resolution*(this.j+1)/2,this.e));return this.e};-l.Fa=function(a,b){var d=this.d;if(null===a)d.fillStyle=void 0;else{var e=a.c;d.fillStyle=sg(null===e?kl:e)}null===b?(d.strokeStyle=void 0,d.lineCap=void 0,d.lineDash=null,d.lineJoin=void 0,d.lineWidth=void 0,d.miterLimit=void 0):(e=b.c,d.strokeStyle=sg(null===e?ml:e),e=b.e,d.lineCap=m(e)?e:"round",e=b.d,d.lineDash=null===e?ll:e.slice(),e=b.j,d.lineJoin=m(e)?e:"round",e=b.f,d.lineWidth=m(e)?e:1,e=b.i,d.miterLimit=m(e)?e:10,d.lineWidth>this.j&&(this.j=d.lineWidth,this.e=null))};-function sm(a){var b=a.d,d=b.fillStyle,e=b.strokeStyle,f=b.lineCap,g=b.lineDash,h=b.lineJoin,k=b.lineWidth,n=b.miterLimit;m(d)&&b.gf!=d&&(a.f.push([9,d]),b.gf=b.fillStyle);!m(e)||b.Mc==e&&b.Hc==f&&b.Ic==g&&b.Jc==h&&b.Kc==k&&b.Lc==n||(a.f.push([10,e,k,f,h,n,g]),b.Mc=e,b.Hc=f,b.Ic=g,b.Jc=h,b.Kc=k,b.Lc=n)}function tm(a,b,d){gm.call(this,a,b,d);this.J=this.v=this.t=null;this.q="";this.s=this.u=this.n=this.l=0;this.k=this.i=this.d=null}v(tm,gm);-tm.prototype.zb=function(a,b,d,e,f,g){if(""!==this.q&&null!==this.k&&(null!==this.d||null!==this.i)){if(null!==this.d){f=this.d;var h=this.t;if(null===h||h.fillStyle!=f.fillStyle){var k=[9,f.fillStyle];this.f.push(k);this.c.push(k);null===h?this.t={fillStyle:f.fillStyle}:h.fillStyle=f.fillStyle}}null!==this.i&&(f=this.i,h=this.v,null===h||h.lineCap!=f.lineCap||h.lineDash!=f.lineDash||h.lineJoin!=f.lineJoin||h.lineWidth!=f.lineWidth||h.miterLimit!=f.miterLimit||h.strokeStyle!=f.strokeStyle)&&(k=[10,-f.strokeStyle,f.lineWidth,f.lineCap,f.lineJoin,f.miterLimit,f.lineDash,!1],this.f.push(k),this.c.push(k),null===h?this.v={lineCap:f.lineCap,lineDash:f.lineDash,lineJoin:f.lineJoin,lineWidth:f.lineWidth,miterLimit:f.miterLimit,strokeStyle:f.strokeStyle}:(h.lineCap=f.lineCap,h.lineDash=f.lineDash,h.lineJoin=f.lineJoin,h.lineWidth=f.lineWidth,h.miterLimit=f.miterLimit,h.strokeStyle=f.strokeStyle));f=this.k;h=this.J;if(null===h||h.font!=f.font||h.textAlign!=f.textAlign||h.textBaseline!=f.textBaseline)k=-[11,f.font,f.textAlign,f.textBaseline],this.f.push(k),this.c.push(k),null===h?this.J={font:f.font,textAlign:f.textAlign,textBaseline:f.textBaseline}:(h.font=f.font,h.textAlign=f.textAlign,h.textBaseline=f.textBaseline);im(this,g);f=this.coordinates.length;a=hm(this,a,b,d,e,!1);a=[5,f,a,this.q,this.l,this.n,this.u,this.s,null!==this.d,null!==this.i];this.f.push(a);this.c.push(a);lm(this,g)}};-tm.prototype.Ga=function(a){if(null===a)this.q="";else{var b=a.c;null===b?this.d=null:(b=b.c,b=sg(null===b?kl:b),null===this.d?this.d={fillStyle:b}:this.d.fillStyle=b);var d=a.i;if(null===d)this.i=null;else{var b=d.c,e=d.e,f=d.d,g=d.j,h=d.f,d=d.i,e=m(e)?e:"round",f=null!=f?f.slice():ll,g=m(g)?g:"round",h=m(h)?h:1,d=m(d)?d:10,b=sg(null===b?ml:b);if(null===this.i)this.i={lineCap:e,lineDash:f,lineJoin:g,lineWidth:h,miterLimit:d,strokeStyle:b};else{var k=this.i;k.lineCap=e;k.lineDash=f;k.lineJoin=g;k.lineWidth=-h;k.miterLimit=d;k.strokeStyle=b}}var n=a.e,b=a.l,e=a.n,f=a.j,h=a.f,d=a.d,g=a.k,k=a.q;a=m(n)?n:"10px sans-serif";g=m(g)?g:"center";k=m(k)?k:"middle";null===this.k?this.k={font:a,textAlign:g,textBaseline:k}:(n=this.k,n.font=a,n.textAlign=g,n.textBaseline=k);this.q=m(d)?d:"";this.l=m(b)?b:0;this.n=m(e)?e:0;this.u=m(f)?f:0;this.s=m(h)?h:1}};function um(a,b,d,e){this.l=a;this.e=b;this.q=d;this.j=e;this.f={};this.i=Nf(1,1);this.k=Hd()}-function vm(a){for(var b in a.f){var d=a.f[b],e;for(e in d)d[e].Ob()}}um.prototype.d=function(a,b,d,e,f){var g=this.k;gj(g,.5,.5,1/b,-1/b,-d,-a[0],-a[1]);var h=this.i;h.clearRect(0,0,1,1);var k;m(this.j)&&(k=Sd(),Td(k,a),Wd(k,b*this.j,k));return wm(this,h,g,d,e,function(a){if(0<h.getImageData(0,0,1,1).data[3]){if(a=f(a))return a;h.clearRect(0,0,1,1)}},k)};-um.prototype.c=function(a,b){var d=m(a)?a.toString():"0",e=this.f[d];m(e)||(e={},this.f[d]=e);d=e[b];m(d)||(d=new xm[b](this.l,this.e,this.q),e[b]=d);return d};um.prototype.pa=function(){return vb(this.f)};-function ym(a,b,d,e,f,g){var h=Ra(rb(a.f),Number);cb(h);var k=a.e,n=k[0],p=k[1],q=k[2],k=k[3],n=[n,p,n,k,q,k,q,p];lk(n,0,8,2,e,n);b.save();b.beginPath();b.moveTo(n[0],n[1]);b.lineTo(n[2],n[3]);b.lineTo(n[4],n[5]);b.lineTo(n[6],n[7]);b.closePath();b.clip();for(var r,s,n=0,p=h.length;n<p;++n)for(r=a.f[h[n].toString()],q=0,k=fm.length;q<k;++q)s=r[fm[q]],m(s)&&s.ec(b,d,e,f,g);b.restore()}-function wm(a,b,d,e,f,g,h){var k=Ra(rb(a.f),Number);cb(k,function(a,b){return b-a});var n,p,q,r,s;n=0;for(p=k.length;n<p;++n)for(r=a.f[k[n].toString()],q=fm.length-1;0<=q;--q)if(s=r[fm[q]],m(s)&&(s=jm(s,b,1,d,e,f,s.c,g,h)))return s}var xm={Image:mm,LineString:nm,Polygon:qm,Text:tm};function zm(a){kj.call(this,a);this.v=Hd()}v(zm,kj);-zm.prototype.u=function(a,b,d){Am(this,"precompose",d,a,void 0);var e=this.Kd();if(null!==e){var f=b.extent,g=m(f);if(g){var h=a.pixelRatio,k=je(f),n=ie(f),p=he(f),f=ge(f);ij(a.coordinateToPixelMatrix,k,k);ij(a.coordinateToPixelMatrix,n,n);ij(a.coordinateToPixelMatrix,p,p);ij(a.coordinateToPixelMatrix,f,f);d.save();d.beginPath();d.moveTo(k[0]*h,k[1]*h);d.lineTo(n[0]*h,n[1]*h);d.lineTo(p[0]*h,p[1]*h);d.lineTo(f[0]*h,f[1]*h);d.clip()}h=this.sf();k=d.globalAlpha;d.globalAlpha=b.opacity;0===a.viewState.rotation?-(b=h[13],n=e.width*h[0],p=e.height*h[5],d.drawImage(e,0,0,+e.width,+e.height,Math.round(h[12]),Math.round(b),Math.round(n),Math.round(p))):(d.setTransform(h[0],h[1],h[4],h[5],h[12],h[13]),d.drawImage(e,0,0),d.setTransform(1,0,0,1,0,0));d.globalAlpha=k;g&&d.restore()}Am(this,"postcompose",d,a,void 0)};function Am(a,b,d,e,f){var g=a.c;jd(g,b)&&(a=m(f)?f:Bm(a,e),a=new Sl(d,e.pixelRatio,e.extent,a,e.viewState.rotation),g.dispatchEvent(new Yk(b,g,a,null,e,d,null)),em(a))}-function Bm(a,b){var d=b.viewState,e=b.pixelRatio;return gj(a.v,e*b.size[0]/2,e*b.size[1]/2,e/d.resolution,-e/d.resolution,-d.rotation,-d.center[0],-d.center[1])}function Cm(a,b){var d=[0,0];ij(b,a,d);return d}-var Dm=function(){var a=null,b=null;return function(d){if(null===a){a=Nf(1,1);b=a.createImageData(1,1);var e=b.data;e[0]=42;e[1]=84;e[2]=126;e[3]=255}var e=a.canvas,f=d[0]<=e.width&&d[1]<=e.height;f||(e.width=d[0],e.height=d[1],e=d[0]-1,d=d[1]-1,a.putImageData(b,e,d),d=a.getImageData(e,d,1,1),f=eb(b.data,d.data));return f}}();function Em(a,b,d){mk.call(this);this.tg(a,m(b)?b:0,d)}v(Em,mk);l=Em.prototype;l.clone=function(){var a=new Em(null);ok(a,this.c,this.o.slice());a.p();return a};l.bb=function(a,b,d,e){var f=this.o;a-=f[0];var g=b-f[1];b=a*a+g*g;if(b<e){if(0===b)for(e=0;e<this.H;++e)d[e]=f[e];else for(e=this.Lf()/Math.sqrt(b),d[0]=f[0]+e*a,d[1]=f[1]+e*g,e=2;e<this.H;++e)d[e]=f[e];d.length=this.H;return b}return e};l.Nb=function(a,b){var d=this.o,e=a-d[0],d=b-d[1];return e*e+d*d<=Fm(this)};-l.Ce=function(){return this.o.slice(0,this.H)};l.gd=function(a){var b=this.o,d=b[this.H]-b[0];return Vd(b[0]-d,b[1]-d,b[0]+d,b[1]+d,a)};l.Lf=function(){return Math.sqrt(Fm(this))};function Fm(a){var b=a.o[a.H]-a.o[0];a=a.o[a.H+1]-a.o[1];return b*b+a*a}l.S=function(){return"Circle"};l.Nj=function(a){var b=this.H,d=a.slice();d[b]=d[0]+(this.o[b]-this.o[0]);var e;for(e=1;e<b;++e)d[b+e]=a[e];ok(this,this.c,d);this.p()};-l.tg=function(a,b,d){if(null===a)ok(this,"XY",null);else{pk(this,d,a,0);null===this.o&&(this.o=[]);d=this.o;a=zk(d,a);d[a++]=d[0]+b;var e;b=1;for(e=this.H;b<e;++b)d[a++]=d[b];d.length=a}this.p()};l.Oj=function(a){this.o[this.H]=this.o[0]+a;this.p()};function Gm(a){kk.call(this);this.e=m(a)?a:null;Hm(this)}v(Gm,kk);function Im(a){var b=[],d,e;d=0;for(e=a.length;d<e;++d)b.push(a[d].clone());return b}function Jm(a){var b,d;if(null!==a.e)for(b=0,d=a.e.length;b<d;++b)Vc(a.e[b],"change",a.p,!1,a)}function Hm(a){var b,d;if(null!==a.e)for(b=0,d=a.e.length;b<d;++b)w(a.e[b],"change",a.p,!1,a)}l=Gm.prototype;l.clone=function(){var a=new Gm(null);a.ug(this.e);return a};-l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;var f=this.e,g,h;g=0;for(h=f.length;g<h;++g)e=f[g].bb(a,b,d,e);return e};l.Nb=function(a,b){var d=this.e,e,f;e=0;for(f=d.length;e<f;++e)if(d[e].Nb(a,b))return!0;return!1};l.gd=function(a){Vd(Infinity,Infinity,-Infinity,-Infinity,a);for(var b=this.e,d=0,e=b.length;d<e;++d)de(a,b[d].N());return a};l.rf=function(){return Im(this.e)};-l.we=function(a){this.l!=this.f&&(wb(this.i),this.k=0,this.l=this.f);if(0>a||0!==this.k&&a<this.k)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var d=[],e=this.e,f=!1,g,h;g=0;for(h=e.length;g<h;++g){var k=e[g],n=k.we(a);d.push(n);n!==k&&(f=!0)}if(f)return a=new Gm(null),Jm(a),a.e=d,Hm(a),a.p(),this.i[b]=a;this.k=a;return this};l.S=function(){return"GeometryCollection"};l.na=function(a){var b=this.e,d,e;d=0;for(e=b.length;d<e;++d)if(b[d].na(a))return!0;return!1};-l.pa=function(){return 0==this.e.length};l.ug=function(a){a=Im(a);Jm(this);this.e=a;Hm(this);this.p()};l.ua=function(a){var b=this.e,d,e;d=0;for(e=b.length;d<e;++d)b[d].ua(a);this.p()};l.Na=function(a,b){var d=this.e,e,f;e=0;for(f=d.length;e<f;++e)d[e].Na(a,b);this.p()};l.T=function(){Jm(this);Gm.X.T.call(this)};function Km(a,b,d,e,f){var g=NaN,h=NaN,k=(d-b)/e;if(0!==k)if(1==k)g=a[b],h=a[b+1];else if(2==k)g=.5*a[b]+.5*a[b+e],h=.5*a[b+1]+.5*a[b+e+1];else{var h=a[b],k=a[b+1],n=0,g=[0],p;for(p=b+e;p<d;p+=e){var q=a[p],r=a[p+1],n=n+Math.sqrt((q-h)*(q-h)+(r-k)*(r-k));g.push(n);h=q;k=r}d=.5*n;for(var s,h=db,k=0,n=g.length;k<n;)p=k+n>>1,q=h(d,g[p]),0<q?k=p+1:(n=p,s=!q);s=s?k:~k;0>s?(d=(d-g[-s-2])/(g[-s-1]-g[-s-2]),b+=(-s-2)*e,g=Xb(a[b],a[b+e],d),h=Xb(a[b+1],a[b+e+1],d)):(g=a[b+s*e],h=a[b+s*e+1])}return null!=f?-(f[0]=g,f[1]=h,f):[g,h]}function Lm(a,b,d,e,f,g){if(d==b)return null;if(f<a[b+e-1])return g?(d=a.slice(b,b+e),d[e-1]=f,d):null;if(a[d-1]<f)return g?(d=a.slice(d-e,d),d[e-1]=f,d):null;if(f==a[b+e-1])return a.slice(b,b+e);b/=e;for(d/=e;b<d;)g=b+d>>1,f<a[(g+1)*e-1]?d=g:b=g+1;d=a[b*e-1];if(f==d)return a.slice((b-1)*e,(b-1)*e+e);g=(f-d)/(a[(b+1)*e-1]-d);d=[];var h;for(h=0;h<e-1;++h)d.push(Xb(a[(b-1)*e+h],a[b*e+h],g));d.push(f);return d}-function Mm(a,b,d,e,f,g){var h=0;if(g)return Lm(a,h,b[b.length-1],d,e,f);if(e<a[d-1])return f?(a=a.slice(0,d),a[d-1]=e,a):null;if(a[a.length-1]<e)return f?(a=a.slice(a.length-d),a[d-1]=e,a):null;f=0;for(g=b.length;f<g;++f){var k=b[f];if(h!=k){if(e<a[h+d-1])break;if(e<=a[k-1])return Lm(a,h,k,d,e,!1);h=k}}return null};function Nm(a,b){mk.call(this);this.d=null;this.s=this.t=this.q=-1;this.$(a,b)}v(Nm,mk);l=Nm.prototype;l.kh=function(a){null===this.o?this.o=a.slice():$a(this.o,a);this.p()};l.clone=function(){var a=new Nm(null);Om(a,this.c,this.o.slice());return a};l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;this.s!=this.f&&(this.t=Math.sqrt(vk(this.o,0,this.o.length,this.H,0)),this.s=this.f);return xk(this.o,0,this.o.length,this.H,this.t,!1,a,b,d,e)};-l.Pj=function(a,b){return"XYM"!=this.c&&"XYZM"!=this.c?null:Lm(this.o,0,this.o.length,this.H,a,m(b)?b:!1)};l.U=function(){return Ck(this.o,0,this.o.length,this.H)};l.Qj=function(){var a=this.o,b=this.H,d=a[0],e=a[1],f=0,g;for(g=0+b;g<this.o.length;g+=b)var h=a[g],k=a[g+1],f=f+Math.sqrt((h-d)*(h-d)+(k-e)*(k-e)),d=h,e=k;return f};function am(a){a.q!=a.f&&(a.d=Km(a.o,0,a.o.length,a.H,a.d),a.q=a.f);return a.d}-l.rc=function(a){var b=[];b.length=Ek(this.o,0,this.o.length,this.H,a,b,0);a=new Nm(null);Om(a,"XY",b);return a};l.S=function(){return"LineString"};l.na=function(a){return Pk(this.o,0,this.o.length,this.H,a)};l.$=function(a,b){null===a?Om(this,"XY",null):(pk(this,b,a,1),null===this.o&&(this.o=[]),this.o.length=Ak(this.o,0,a,this.H),this.p())};function Om(a,b,d){ok(a,b,d);a.p()};function Pm(a,b){mk.call(this);this.d=[];this.q=this.s=-1;this.$(a,b)}v(Pm,mk);l=Pm.prototype;l.lh=function(a){null===this.o?this.o=a.o.slice():$a(this.o,a.o.slice());this.d.push(this.o.length);this.p()};l.clone=function(){var a=new Pm(null);Qm(a,this.c,this.o.slice(),this.d.slice());return a};l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;this.q!=this.f&&(this.s=Math.sqrt(wk(this.o,0,this.d,this.H,0)),this.q=this.f);return yk(this.o,0,this.d,this.H,this.s,!1,a,b,d,e)};-l.Sj=function(a,b,d){return"XYM"!=this.c&&"XYZM"!=this.c||0===this.o.length?null:Mm(this.o,this.d,this.H,a,m(b)?b:!1,m(d)?d:!1)};l.U=function(){return Dk(this.o,0,this.d,this.H)};l.Nh=function(a){if(0>a||this.d.length<=a)return null;var b=new Nm(null);Om(b,this.c,this.o.slice(0===a?0:this.d[a-1],this.d[a]));return b};l.Pc=function(){var a=this.o,b=this.d,d=this.c,e=[],f=0,g,h;g=0;for(h=b.length;g<h;++g){var k=b[g],n=new Nm(null);Om(n,d,a.slice(f,k));e.push(n);f=k}return e};-function bm(a){var b=[],d=a.o,e=0,f=a.d;a=a.H;var g,h;g=0;for(h=f.length;g<h;++g){var k=f[g],e=Km(d,e,k,a);$a(b,e);e=k}return b}l.rc=function(a){var b=[],d=[],e=this.o,f=this.d,g=this.H,h=0,k=0,n,p;n=0;for(p=f.length;n<p;++n){var q=f[n],k=Ek(e,h,q,g,a,b,k);d.push(k);h=q}b.length=k;a=new Pm(null);Qm(a,"XY",b,d);return a};l.S=function(){return"MultiLineString"};l.na=function(a){a:{var b=this.o,d=this.d,e=this.H,f=0,g,h;g=0;for(h=d.length;g<h;++g){if(Pk(b,f,d[g],e,a)){a=!0;break a}f=d[g]}a=!1}return a};-l.$=function(a,b){if(null===a)Qm(this,"XY",null,this.d);else{pk(this,b,a,2);null===this.o&&(this.o=[]);var d=Bk(this.o,0,a,this.H,this.d);this.o.length=0===d.length?0:d[d.length-1];this.p()}};function Qm(a,b,d,e){ok(a,b,d);a.d=e;a.p()}function Rm(a,b){var d="XY",e=[],f=[],g,h;g=0;for(h=b.length;g<h;++g){var k=b[g];0===g&&(d=k.c);$a(e,k.o);f.push(e.length)}Qm(a,d,e,f)};function Sm(a,b){mk.call(this);this.$(a,b)}v(Sm,mk);l=Sm.prototype;l.nh=function(a){null===this.o?this.o=a.o.slice():$a(this.o,a.o);this.p()};l.clone=function(){var a=new Sm(null);ok(a,this.c,this.o.slice());a.p();return a};l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;var f=this.o,g=this.H,h,k,n;h=0;for(k=f.length;h<k;h+=g)if(n=tk(a,b,f[h],f[h+1]),n<e){e=n;for(n=0;n<g;++n)d[n]=f[h+n];d.length=g}return e};l.U=function(){return Ck(this.o,0,this.o.length,this.H)};-l.Xh=function(a){var b=null===this.o?0:this.o.length/this.H;if(0>a||b<=a)return null;b=new Ik(null);Jk(b,this.c,this.o.slice(a*this.H,(a+1)*this.H));return b};l.Id=function(){var a=this.o,b=this.c,d=this.H,e=[],f,g;f=0;for(g=a.length;f<g;f+=d){var h=new Ik(null);Jk(h,b,a.slice(f,f+d));e.push(h)}return e};l.S=function(){return"MultiPoint"};l.na=function(a){var b=this.o,d=this.H,e,f,g,h;e=0;for(f=b.length;e<f;e+=d)if(g=b[e],h=b[e+1],$d(a,g,h))return!0;return!1};-l.$=function(a,b){null===a?ok(this,"XY",null):(pk(this,b,a,1),null===this.o&&(this.o=[]),this.o.length=Ak(this.o,0,a,this.H));this.p()};function Tm(a,b){mk.call(this);this.d=[];this.s=-1;this.t=null;this.L=this.v=this.J=-1;this.q=null;this.$(a,b)}v(Tm,mk);l=Tm.prototype;l.oh=function(a){if(null===this.o)this.o=a.o.slice(),a=a.d.slice(),this.d.push();else{var b=this.o.length;$a(this.o,a.o);a=a.d.slice();var d,e;d=0;for(e=a.length;d<e;++d)a[d]+=b}this.d.push(a);this.p()};l.clone=function(){var a=new Tm(null);Um(a,this.c,this.o.slice(),this.d.slice());return a};-l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;if(this.v!=this.f){var f=this.d,g=0,h=0,k,n;k=0;for(n=f.length;k<n;++k)var p=f[k],h=wk(this.o,g,p,this.H,h),g=p[p.length-1];this.J=Math.sqrt(h);this.v=this.f}f=cm(this);g=this.d;h=this.H;k=this.J;n=0;var p=m(void 0)?void 0:[NaN,NaN],q,r;q=0;for(r=g.length;q<r;++q){var s=g[q];e=yk(f,n,s,h,k,!0,a,b,d,e,p);n=s[s.length-1]}return e};-l.Nb=function(a,b){var d;a:{d=cm(this);var e=this.d,f=0;if(0!==e.length){var g,h;g=0;for(h=e.length;g<h;++g){var k=e[g];if(Mk(d,f,k,this.H,a,b)){d=!0;break a}f=k[k.length-1]}}d=!1}return d};l.Tj=function(){var a=cm(this),b=this.d,d=0,e=0,f,g;f=0;for(g=b.length;f<g;++f)var h=b[f],e=e+rk(a,d,h,this.H),d=h[h.length-1];return e};l.U=function(){var a=this.o,b=this.d,d=this.H,e=0,f=m(void 0)?void 0:[],g=0,h,k;h=0;for(k=b.length;h<k;++h){var n=b[h];f[g++]=Dk(a,e,n,d,f[g]);e=n[n.length-1]}f.length=g;return f};-function dm(a){if(a.s!=a.f){var b=a.o,d=a.d,e=a.H,f=0,g=[],h,k,n=Sd();h=0;for(k=d.length;h<k;++h){var p=d[h],n=ee(Vd(Infinity,Infinity,-Infinity,-Infinity,void 0),b,f,p[0],e);g.push((n[0]+n[2])/2,(n[1]+n[3])/2);f=p[p.length-1]}b=cm(a);d=a.d;e=a.H;f=0;h=[];k=0;for(n=d.length;k<n;++k)p=d[k],h=Nk(b,f,p,e,g,2*k,h),f=p[p.length-1];a.t=h;a.s=a.f}return a.t}l.Kh=function(){var a=new Sm(null),b=dm(this).slice();ok(a,"XY",b);a.p();return a};-function cm(a){if(a.L!=a.f){var b=a.o,d;a:{d=a.d;var e,f;e=0;for(f=d.length;e<f;++e)if(!Sk(b,d[e],a.H)){d=!1;break a}d=!0}if(d)a.q=b;else{a.q=b.slice();d=b=a.q;e=a.d;f=a.H;var g=0,h,k;h=0;for(k=e.length;h<k;++h)g=Tk(d,g,e[h],f);b.length=g}a.L=a.f}return a.q}l.rc=function(a){var b=[],d=[],e=this.o,f=this.d,g=this.H;a=Math.sqrt(a);var h=0,k=0,n,p;n=0;for(p=f.length;n<p;++n){var q=f[n],r=[],k=Fk(e,h,q,g,a,b,k,r);d.push(r);h=q[q.length-1]}b.length=k;e=new Tm(null);Um(e,"XY",b,d);return e};-l.Yh=function(a){if(0>a||this.d.length<=a)return null;var b;0===a?b=0:(b=this.d[a-1],b=b[b.length-1]);a=this.d[a].slice();var d=a[a.length-1];if(0!==b){var e,f;e=0;for(f=a.length;e<f;++e)a[e]-=b}e=new F(null);Uk(e,this.c,this.o.slice(b,d),a);return e};l.td=function(){var a=this.c,b=this.o,d=this.d,e=[],f=0,g,h,k,n;g=0;for(h=d.length;g<h;++g){var p=d[g].slice(),q=p[p.length-1];if(0!==f)for(k=0,n=p.length;k<n;++k)p[k]-=f;k=new F(null);Uk(k,a,b.slice(f,q),p);e.push(k);f=q}return e};l.S=function(){return"MultiPolygon"};-l.na=function(a){a:{var b=cm(this),d=this.d,e=this.H,f=0,g,h;g=0;for(h=d.length;g<h;++g){var k=d[g];if(Qk(b,f,k,e,a)){a=!0;break a}f=k[k.length-1]}a=!1}return a};l.$=function(a,b){if(null===a)Um(this,"XY",null,this.d);else{pk(this,b,a,3);null===this.o&&(this.o=[]);var d=this.o,e=this.H,f=this.d,g=0,f=m(f)?f:[],h=0,k,n;k=0;for(n=a.length;k<n;++k)g=Bk(d,g,a[k],e,f[h]),f[h++]=g,g=g[g.length-1];f.length=h;0===f.length?this.o.length=0:(d=f[f.length-1],this.o.length=0===d.length?0:d[d.length-1]);this.p()}};-function Um(a,b,d,e){ok(a,b,d);a.d=e;a.p()}function Vm(a,b){var d="XY",e=[],f=[],g,h,k;g=0;for(h=b.length;g<h;++g){var n=b[g];0===g&&(d=n.c);var p=e.length;k=n.d;var q,r;q=0;for(r=k.length;q<r;++q)k[q]+=p;$a(e,n.o);f.push(k)}Um(a,d,e,f)};function Wm(a,b){return ma(a)-ma(b)}function Xm(a,b){var d=.5*a/b;return d*d}function Ym(a,b,d,e,f,g){var h=!1,k,n;k=d.i;null!==k&&(n=k.Sc(),2==n||3==n?k.Se(f,g):(0==n&&k.load(),k.Ae(f,g),h=!0));f=(0,d.e)(b);null!=f&&(e=f.we(e),(0,Zm[e.S()])(a,e,d,b));return h}-var Zm={Point:function(a,b,d,e){var f=d.i;if(null!==f){if(2!=f.Sc())return;var g=a.c(d.c,"Image");g.mb(f);g.yb(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),a.zb(b.U(),0,2,2,b,e))},LineString:function(a,b,d,e){var f=d.d;if(null!==f){var g=a.c(d.c,"LineString");g.Fa(null,f);g.Ib(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),a.zb(am(b),0,2,2,b,e))},Polygon:function(a,b,d,e){var f=d.j,g=d.d;if(null!==f||null!==g){var h=a.c(d.c,"Polygon");h.Fa(f,g);h.Vb(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),-a.zb(Wk(b),0,2,2,b,e))},MultiPoint:function(a,b,d,e){var f=d.i;if(null!==f){if(2!=f.Sc())return;var g=a.c(d.c,"Image");g.mb(f);g.xb(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),d=b.o,a.zb(d,0,d.length,b.H,b,e))},MultiLineString:function(a,b,d,e){var f=d.d;if(null!==f){var g=a.c(d.c,"LineString");g.Fa(null,f);g.pc(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),d=bm(b),a.zb(d,0,d.length,2,b,e))},MultiPolygon:function(a,b,d,e){var f=d.j,g=d.d;if(null!==g||null!==f){var h=a.c(d.c,"Polygon");h.Fa(f,-g);h.qc(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),d=dm(b),a.zb(d,0,d.length,2,b,e))},GeometryCollection:function(a,b,d,e){b=b.e;var f,g;f=0;for(g=b.length;f<g;++f)(0,Zm[b[f].S()])(a,b[f],d,e)},Circle:function(a,b,d,e){var f=d.j,g=d.d;if(null!==f||null!==g){var h=a.c(d.c,"Polygon");h.Fa(f,g);h.oc(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),a.zb(b.Ce(),0,2,2,b,e))}};function $m(a,b,d,e,f){Oi.call(this,a,b,d,2,e);this.f=f}v($m,Oi);$m.prototype.c=function(){return this.f};function an(a){Ki.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.l=m(a.resolutions)?a.resolutions:null}v(an,Ki);function bn(a,b){if(null!==a.l){var d=ac(a.l,b,0);b=a.l[d]}return b}function cn(a,b){a.c().src=b};function dn(a){an.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions,state:m(a.state)?a.state:void 0});this.L=a.canvasFunction;this.t=null;this.v=0;this.R=m(a.ratio)?a.ratio:1.5}v(dn,an);dn.prototype.wc=function(a,b,d,e){b=bn(this,b);var f=this.t;if(null!==f&&this.v==this.f&&f.resolution==b&&f.j==d&&Zd(f.N(),a))return f;a=a.slice();se(a,this.R);e=this.L(a,b,d,[qe(a)/b*d,ne(a)/b*d],e);null===e||(f=new $m(a,b,d,this.j,e));this.t=f;this.v=this.f;return f};var en;-(function(){var a={nf:{}};(function(){function b(a,d){if(!(this instanceof b))return new b(a,d);this.ke=Math.max(4,a||9);this.bf=Math.max(2,Math.ceil(.4*this.ke));d&&this.gh(d);this.clear()}function d(a,b){a.bbox=e(a,0,a.children.length,b)}function e(a,b,d,e){for(var g=[Infinity,Infinity,-Infinity,-Infinity],h;b<d;b++)h=a.children[b],f(g,a.Da?e(h):h.bbox);return g}function f(a,b){a[0]=Math.min(a[0],b[0]);a[1]=Math.min(a[1],b[1]);a[2]=Math.max(a[2],b[2]);a[3]=Math.max(a[3],b[3])}function g(a,b){return a.bbox[0]--b.bbox[0]}function h(a,b){return a.bbox[1]-b.bbox[1]}function k(a){return(a[2]-a[0])*(a[3]-a[1])}function n(a){return a[2]-a[0]+(a[3]-a[1])}function p(a,b){return a[0]<=b[0]&&a[1]<=b[1]&&b[2]<=a[2]&&b[3]<=a[3]}function q(a,b){return b[0]<=a[2]&&b[1]<=a[3]&&b[2]>=a[0]&&b[3]>=a[1]}function r(a,b,d,e,f){for(var g=[b,d],h;g.length;)d=g.pop(),b=g.pop(),d-b<=e||(h=b+Math.ceil((d-b)/e/2)*e,s(a,b,d,h,f),g.push(b,h,h,d))}function s(a,b,d,e,f){for(var g,h,k,n,p;d>b;){600<d-b&&(g=d-b+1,h=e-b+1,k=Math.log(g),-n=.5*Math.exp(2*k/3),p=.5*Math.sqrt(k*n*(g-n)/g)*(0>h-g/2?-1:1),k=Math.max(b,Math.floor(e-h*n/g+p)),h=Math.min(d,Math.floor(e+(g-h)*n/g+p)),s(a,k,h,e,f));g=a[e];h=b;n=d;u(a,b,e);for(0<f(a[d],g)&&u(a,b,d);h<n;){u(a,h,n);h++;for(n--;0>f(a[h],g);)h++;for(;0<f(a[n],g);)n--}0===f(a[b],g)?u(a,b,n):(n++,u(a,n,d));n<=e&&(b=n+1);e<=n&&(d=n-1)}}function u(a,b,d){var e=a[b];a[b]=a[d];a[d]=e}b.prototype={all:function(){return this.Ye(this.data,[])},search:function(a){var b=this.data,d=[],e=this.Pa;if(!q(a,b.bbox))return d;-for(var f=[],g,h,k,n;b;){g=0;for(h=b.children.length;g<h;g++)k=b.children[g],n=b.Da?e(k):k.bbox,q(a,n)&&(b.Da?d.push(k):p(a,n)?this.Ye(k,d):f.push(k));b=f.pop()}return d},load:function(a){if(!a||!a.length)return this;if(a.length<this.bf){for(var b=0,d=a.length;b<d;b++)this.wa(a[b]);return this}a=this.$e(a.slice(),0,a.length-1,0);this.data.children.length?this.data.height===a.height?this.cf(this.data,a):(this.data.height<a.height&&(b=this.data,this.data=a,a=b),this.af(a,this.data.height-a.height-1,-!0)):this.data=a;return this},wa:function(a){a&&this.af(a,this.data.height-1);return this},clear:function(){this.data={children:[],height:1,bbox:[Infinity,Infinity,-Infinity,-Infinity],Da:!0};return this},remove:function(a){if(!a)return this;for(var b=this.data,d=this.Pa(a),e=[],f=[],g,h,k,n;b||e.length;){b||(b=e.pop(),h=e[e.length-1],g=f.pop(),n=!0);if(b.Da&&(k=b.children.indexOf(a),-1!==k)){b.children.splice(k,1);e.push(b);this.fh(e);break}n||b.Da||!p(b.bbox,d)?h?(g++,b=h.children[g],n=!1):b=null:-(e.push(b),f.push(g),g=0,h=b,b=b.children[0])}return this},Pa:function(a){return a},ne:function(a,b){return a[0]-b[0]},oe:function(a,b){return a[1]-b[1]},toJSON:function(){return this.data},Ye:function(a,b){for(var d=[];a;)a.Da?b.push.apply(b,a.children):d.push.apply(d,a.children),a=d.pop();return b},$e:function(a,b,e,f){var g=e-b+1,h=this.ke,k;if(g<=h)return k={children:a.slice(b,e+1),height:1,bbox:null,Da:!0},d(k,this.Pa),k;f||(f=Math.ceil(Math.log(g)/Math.log(h)),h=Math.ceil(g/Math.pow(h,f-1)));-k={children:[],height:f,bbox:null};var g=Math.ceil(g/h),h=g*Math.ceil(Math.sqrt(h)),n,p,q;for(r(a,b,e,h,this.ne);b<=e;b+=h)for(p=Math.min(b+h-1,e),r(a,b,p,g,this.oe),n=b;n<=p;n+=g)q=Math.min(n+g-1,p),k.children.push(this.$e(a,n,q,f-1));d(k,this.Pa);return k},eh:function(a,b,d,e){for(var f,g,h,n,p,q,r,s;;){e.push(b);if(b.Da||e.length-1===d)break;r=s=Infinity;f=0;for(g=b.children.length;f<g;f++){h=b.children[f];p=k(h.bbox);q=a;var u=h.bbox;q=(Math.max(u[2],q[2])-Math.min(u[0],q[0]))*(Math.max(u[3],-q[3])-Math.min(u[1],q[1]))-p;q<s?(s=q,r=p<r?p:r,n=h):q===s&&p<r&&(r=p,n=h)}b=n}return b},af:function(a,b,d){var e=this.Pa;d=d?a.bbox:e(a);var e=[],g=this.eh(d,this.data,b,e);g.children.push(a);for(f(g.bbox,d);0<=b;)if(e[b].children.length>this.ke)this.hh(e,b),b--;else break;this.ah(d,e,b)},hh:function(a,b){var e=a[b],f=e.children.length,g=this.bf;this.bh(e,g,f);f={children:e.children.splice(this.dh(e,g,f)),height:e.height};e.Da&&(f.Da=!0);d(e,this.Pa);d(f,this.Pa);b?a[b-1].children.push(f):this.cf(e,-f)},cf:function(a,b){this.data={children:[a,b],height:a.height+1};d(this.data,this.Pa)},dh:function(a,b,d){var f,g,h,n,p,q,r;p=q=Infinity;for(f=b;f<=d-b;f++){g=e(a,0,f,this.Pa);h=e(a,f,d,this.Pa);var s=g,u=h;n=Math.max(s[0],u[0]);var mb=Math.max(s[1],u[1]),Pb=Math.min(s[2],u[2]),s=Math.min(s[3],u[3]);n=Math.max(0,Pb-n)*Math.max(0,s-mb);g=k(g)+k(h);n<p?(p=n,r=f,q=g<q?g:q):n===p&&g<q&&(q=g,r=f)}return r},bh:function(a,b,d){var e=a.Da?this.ne:g,f=a.Da?this.oe:h,k=this.Ze(a,b,d,e);b=this.Ze(a,b,d,f);-k<b&&a.children.sort(e)},Ze:function(a,b,d,g){a.children.sort(g);g=this.Pa;var h=e(a,0,b,g),k=e(a,d-b,d,g),p=n(h)+n(k),q,r;for(q=b;q<d-b;q++)r=a.children[q],f(h,a.Da?g(r):r.bbox),p+=n(h);for(q=d-b-1;q>=b;q--)r=a.children[q],f(k,a.Da?g(r):r.bbox),p+=n(k);return p},ah:function(a,b,d){for(;0<=d;d--)f(b[d].bbox,a)},fh:function(a){for(var b=a.length-1,e;0<=b;b--)0===a[b].children.length?0<b?(e=a[b-1].children,e.splice(e.indexOf(a[b]),1)):this.clear():d(a[b],this.Pa)},gh:function(a){var b=["return a"," - b",-";"];this.ne=new Function("a","b",b.join(a[0]));this.oe=new Function("a","b",b.join(a[1]));this.Pa=new Function("a","return [a"+a.join(", a")+"];")}};"function"===typeof define&&define.Qm?define(function(){return b}):"undefined"!==typeof a?a.nf=b:"undefined"!==typeof self?self.c=b:window.c=b})();en=a.nf})();function fn(a){this.f=en(a);this.c={}}l=fn.prototype;l.wa=function(a,b){var d=[a[0],a[1],a[2],a[3],b];this.f.wa(d);this.c[ma(b)]=d};l.load=function(a,b){for(var d=Array(b.length),e=0,f=b.length;e<f;e++){var g=a[e],h=b[e],g=[g[0],g[1],g[2],g[3],h];d[e]=g;this.c[ma(h)]=g}this.f.load(d)};l.remove=function(a){a=ma(a);var b=this.c[a];xb(this.c,a);return null!==this.f.remove(b)};l.update=function(a,b){var d=ma(b);ce(this.c[d].slice(0,4),a)||(this.remove(b),this.wa(a,b))};-function gn(a){a=a.f.all();return Ra(a,function(a){return a[4]})}function hn(a,b){var d=a.f.search(b);return Ra(d,function(a){return a[4]})}l.forEach=function(a,b){return jn(gn(this),a,b)};function kn(a,b,d,e){return jn(hn(a,b),d,e)}function jn(a,b,d){for(var e,f=0,g=a.length;f<g&&!(e=b.call(d,a[f]));f++);return e}l.pa=function(){return vb(this.c)};l.clear=function(){this.f.clear();this.c={}};l.N=function(){return this.f.data.bbox};function ln(a){a=m(a)?a:{};Ki.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,state:m(a.state)?a.state:void 0});this.d=new fn;this.e={};this.i={};this.l={};this.n={};m(a.features)&&this.pb(a.features)}v(ln,Ki);l=ln.prototype;l.Za=function(a){var b=ma(a).toString();mn(this,b,a);var d=a.V();null!=d?(d=d.N(),this.d.wa(d,a)):this.e[b]=a;nn(this,b,a);this.dispatchEvent(new on("addfeature",a));this.p()};-function mn(a,b,d){a.n[b]=[w(d,"change",a.Tf,!1,a),w(d,"propertychange",a.Tf,!1,a)]}function nn(a,b,d){var e=d.ea;m(e)?a.i[e.toString()]=d:a.l[b]=d}l.Ka=function(a){this.pb(a);this.p()};l.pb=function(a){var b,d,e,f,g=[],h=[];d=0;for(e=a.length;d<e;d++){f=a[d];b=ma(f).toString();mn(this,b,f);var k=f.V();null!=k?(b=k.N(),g.push(b),h.push(f)):this.e[b]=f}this.d.load(g,h);d=0;for(e=a.length;d<e;d++)f=a[d],b=ma(f).toString(),nn(this,b,f),this.dispatchEvent(new on("addfeature",f))};-l.clear=function(a){if(a){for(var b in this.n)Pa(this.n[b],Wc);this.n={};this.i={};this.l={}}else a=this.pg,this.d.forEach(a,this),kb(this.e,a,this);this.d.clear();this.e={};this.dispatchEvent(new on("clear"));this.p()};l.eb=function(a,b){return this.d.forEach(a,b)};function pn(a,b,d){a.Aa([b[0],b[1],b[0],b[1]],function(a){if(a.V().Nb(b[0],b[1]))return d.call(void 0,a)})}l.Aa=function(a,b,d){return kn(this.d,a,b,d)};l.Jb=function(a,b,d,e){return this.Aa(a,d,e)};-l.Ra=function(a,b,d){return this.Aa(a,function(e){if(e.V().na(a)&&(e=b.call(d,e)))return e})};l.Ea=function(){var a=gn(this.d);vb(this.e)||$a(a,qb(this.e));return a};l.Ta=function(a){var b=[];pn(this,a,function(a){b.push(a)});return b};l.fb=function(a){var b=a[0],d=a[1],e=null,f=[NaN,NaN],g=Infinity,h=[-Infinity,-Infinity,Infinity,Infinity];kn(this.d,h,function(a){var n=a.V(),p=g;g=n.bb(b,d,f,g);g<p&&(e=a,a=Math.sqrt(g),h[0]=b-a,h[1]=d-a,h[2]=b+a,h[3]=d+a)});return e};l.N=function(){return this.d.N()};-l.Sa=function(a){a=this.i[a.toString()];return m(a)?a:null};l.Tf=function(a){a=a.target;var b=ma(a).toString(),d=a.V();null!=d?(d=d.N(),b in this.e?(delete this.e[b],this.d.wa(d,a)):this.d.update(d,a)):b in this.e||(this.d.remove(a),this.e[b]=a);d=a.ea;m(d)?(d=d.toString(),b in this.l?(delete this.l[b],this.i[d]=a):this.i[d]!==a&&(qn(this,a),this.i[d]=a)):b in this.l||(qn(this,a),this.l[b]=a);this.p();this.dispatchEvent(new on("changefeature",a))};l.pa=function(){return this.d.pa()&&vb(this.e)};-l.Lb=ca;l.jb=function(a){var b=ma(a).toString();b in this.e?delete this.e[b]:this.d.remove(a);this.pg(a);this.p()};l.pg=function(a){var b=ma(a).toString();Pa(this.n[b],Wc);delete this.n[b];var d=a.ea;m(d)?delete this.i[d.toString()]:delete this.l[b];this.dispatchEvent(new on("removefeature",a))};function qn(a,b){for(var d in a.i)if(a.i[d]===b){delete a.i[d];break}}function on(a,b){qc.call(this,a);this.feature=b}v(on,qc);function rn(a){this.c=a.source;this.W=Hd();this.d=Nf();this.e=[0,0];this.n=null;dn.call(this,{attributions:a.attributions,canvasFunction:ra(this.ph,this),logo:a.logo,projection:a.projection,ratio:a.ratio,resolutions:a.resolutions,state:this.c.u});this.s=null;this.i=void 0;this.Qf(a.style);w(this.c,"change",this.jk,void 0,this)}v(rn,dn);l=rn.prototype;-l.ph=function(a,b,d,e,f){var g=new um(.5*b/d,a,b);this.c.Lb(a,b,f);var h=!1;this.c.Jb(a,b,function(a){var e;if(!(e=h)){var f;m(a.c)?f=a.c.call(a,b):m(this.i)&&(f=this.i(a,b));if(null!=f){var q,r=!1;e=0;for(q=f.length;e<q;++e)r=Ym(g,a,f[e],Xm(b,d),this.ik,this)||r;e=r}else e=!1}h=e},this);vm(g);if(h)return null;this.e[0]!=e[0]||this.e[1]!=e[1]?(this.d.canvas.width=e[0],this.d.canvas.height=e[1],this.e[0]=e[0],this.e[1]=e[1]):this.d.clearRect(0,0,e[0],e[1]);a=sn(this,ke(a),b,d,e);ym(g,this.d,d,a,0,-{});this.n=g;return this.d.canvas};l.Ld=function(a,b,d,e,f){if(null!==this.n){var g={};return this.n.d(a,b,0,e,function(a){var b=ma(a).toString();if(!(b in g))return g[b]=!0,f(a)})}};l.fk=function(){return this.c};l.gk=function(){return this.s};l.hk=function(){return this.i};function sn(a,b,d,e,f){return gj(a.W,f[0]/2,f[1]/2,e/d,-e/d,0,-b[0],-b[1])}l.ik=function(){this.p()};l.jk=function(){Li(this,this.c.u)};l.Qf=function(a){this.s=m(a)?a:tl;this.i=null===a?void 0:sl(this.s);this.p()};function tn(a){zm.call(this,a);this.j=null;this.i=Hd();this.d=this.e=null}v(tn,zm);l=tn.prototype;l.Ya=function(a,b,d,e){var f=this.c;return f.c().Ld(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};-l.fc=function(a,b,d,e){if(!fa(this.Kd()))if(this.c.c()instanceof rn){if(a=a.slice(),ij(b.pixelToCoordinateMatrix,a,a),this.Ya(a,b,bd,this))return d.call(e,this.c)}else if(null===this.e&&(this.e=Hd(),Nd(this.i,this.e)),b=Cm(a,this.e),null===this.d&&(this.d=Nf(1,1)),this.d.clearRect(0,0,1,1),this.d.drawImage(this.Kd(),b[0],b[1],1,1,0,0,1,1),0<this.d.getImageData(0,0,1,1).data[3])return d.call(e,this.c)};l.Kd=function(){return null===this.j?null:this.j.c()};l.sf=function(){return this.i};-l.Ee=function(a,b){var d=a.pixelRatio,e=a.viewState,f=e.center,g=e.resolution,h=e.rotation,k,n=this.c.c(),p=a.viewHints;k=a.extent;m(b.extent)&&(k=oe(k,b.extent));p[0]||p[1]||re(k)||(e=e.projection,p=n.k,null===p||(e=p),k=n.wc(k,g,d,e),null!==k&&mj(this,k)&&(this.j=k));if(null!==this.j){k=this.j;var e=k.N(),p=k.resolution,q=k.j,g=d*p/(g*q);gj(this.i,d*a.size[0]/2,d*a.size[1]/2,g,g,h,q*(e[0]-f[0])/p,q*(f[1]-e[3])/p);this.e=null;oj(a.attributions,k.i);pj(a,n)}return!0};function un(a){zm.call(this,a);this.d=this.i=null;this.l=!1;this.k=null;this.n=Hd();this.j=null;this.t=this.s=NaN;this.q=this.e=null}v(un,zm);un.prototype.Kd=function(){return this.i};un.prototype.sf=function(){return this.n};-un.prototype.Ee=function(a,b){var d=a.pixelRatio,e=a.viewState,f=e.projection,g=this.c,h=g.c(),k=ej(h,f),n=h.md(),p=ac(k.c,e.resolution,0),q=h.Rc(p,a.pixelRatio,f),r=k.ra(p),s=r/(q/k.ya(p)),u=e.center,z;r==e.resolution?(u=rj(u,r,a.size),z=me(u,r,e.rotation,a.size)):z=a.extent;m(b.extent)&&(z=oe(z,b.extent));if(re(z))return!1;var y=Yi(k,z,r),A=q*(y.e-y.c+1),D=q*(y.f-y.d+1),x,M;null===this.i?(M=Nf(A,D),this.i=M.canvas,this.d=[A,D],this.k=M,this.l=!Dm(this.d)):(x=this.i,M=this.k,this.d[0]<A||this.d[1]<-D||this.t!==q||this.l&&(this.d[0]>A||this.d[1]>D)?(x.width=A,x.height=D,this.d=[A,D],this.l=!Dm(this.d),this.e=null):(A=this.d[0],D=this.d[1],(x=p!=this.s)||(x=this.e,x=!(x.c<=y.c&&y.e<=x.e&&x.d<=y.d&&y.f<=x.f)),x&&(this.e=null)));var Q,O;null===this.e?(A/=q,D/=q,Q=y.c-Math.floor((A-(y.e-y.c+1))/2),O=y.d-Math.floor((D-(y.f-y.d+1))/2),this.s=p,this.t=q,this.e=new lf(Q,Q+A-1,O,O+D-1),this.q=Array(A*D),D=this.e):(D=this.e,A=D.e-D.c+1);x={};x[p]={};var W=[],Ja=this.hd(h,x),lb=g.ia(),Ka=Sd(),mb=new lf(0,-0,0,0),Pb,Ya,Ub;for(O=y.c;O<=y.e;++O)for(Ub=y.d;Ub<=y.f;++Ub)Ya=h.Zb(p,O,Ub,d,f),Q=Ya.state,2==Q||4==Q||3==Q&&!lb?x[p][kf(Ya.c)]=Ya:(Pb=k.kd(Ya.c,Ja,null,mb,Ka),Pb||(W.push(Ya),Pb=k.wd(Ya.c,mb,Ka),null===Pb||Ja(p+1,Pb)));Ja=0;for(Pb=W.length;Ja<Pb;++Ja)Ya=W[Ja],O=q*(Ya.c[1]-D.c),Ub=q*(D.f-Ya.c[2]),M.clearRect(O,Ub,q,q);W=Ra(rb(x),Number);cb(W);var nb=h.L,Mc=je(Wi(k,[p,D.c,D.f],Ka)),sc,Pe,jj,Wh,Sf,Xl,Ja=0;for(Pb=W.length;Ja<Pb;++Ja)if(sc=W[Ja],q=h.Rc(sc,d,f),Wh=x[sc],sc==p)for(jj in Wh)Ya=Wh[jj],Pe=-(Ya.c[2]-D.d)*A+(Ya.c[1]-D.c),this.q[Pe]!=Ya&&(O=q*(Ya.c[1]-D.c),Ub=q*(D.f-Ya.c[2]),Q=Ya.state,4!=Q&&(3!=Q||lb)&&nb||M.clearRect(O,Ub,q,q),2==Q&&M.drawImage(Ya.La(),n,n,q,q,O,Ub,q,q),this.q[Pe]=Ya);else for(jj in sc=k.ra(sc)/r,Wh)for(Ya=Wh[jj],Pe=Wi(k,Ya.c,Ka),O=(Pe[0]-Mc[0])/s,Ub=(Mc[1]-Pe[3])/s,Xl=sc*q,Sf=sc*q,Q=Ya.state,4!=Q&&nb||M.clearRect(O,Ub,Xl,Sf),2==Q&&M.drawImage(Ya.La(),n,n,q,q,O,Ub,Xl,Sf),Ya=Xi(k,Pe,p,mb),Q=Math.max(Ya.c,D.c),Ub=Math.min(Ya.e,D.e),O=Math.max(Ya.d,D.d),Ya=Math.min(Ya.f,-D.f);Q<=Ub;++Q)for(Sf=O;Sf<=Ya;++Sf)Pe=(Sf-D.d)*A+(Q-D.c),this.q[Pe]=void 0;qj(a.usedTiles,h,p,y);sj(a,h,k,d,f,z,p,g.v());nj(a,h);pj(a,h);gj(this.n,d*a.size[0]/2,d*a.size[1]/2,d*s/e.resolution,d*s/e.resolution,e.rotation,(Mc[0]-u[0])/s,(u[1]-Mc[1])/s);this.j=null;return!0};un.prototype.fc=function(a,b,d,e){if(null!==this.k&&(null===this.j&&(this.j=Hd(),Nd(this.n,this.j)),a=Cm(a,this.j),0<this.k.getImageData(a[0],a[1],1,1).data[3]))return d.call(e,this.c)};function vn(a){zm.call(this,a);this.e=!1;this.l=-1;this.q=NaN;this.i=Sd();this.d=this.k=null;this.j=Nf()}v(vn,zm);-vn.prototype.u=function(a,b,d){var e=Bm(this,a);Am(this,"precompose",d,a,e);var f=this.d;if(null!==f&&!f.pa()){var g;jd(this.c,"render")?(this.j.canvas.width=d.canvas.width,this.j.canvas.height=d.canvas.height,g=this.j):g=d;var h=g.globalAlpha;g.globalAlpha=b.opacity;ym(f,g,a.pixelRatio,e,a.viewState.rotation,a.skippedFeatureUids);g!=d&&(Am(this,"render",g,a,e),d.drawImage(g.canvas,0,0));g.globalAlpha=h}Am(this,"postcompose",d,a,e)};-vn.prototype.Ya=function(a,b,d,e){if(null!==this.d){var f=this.c,g={};return this.d.d(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){var b=ma(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};vn.prototype.n=function(){lj(this)};-vn.prototype.Ee=function(a){function b(a){var b;m(a.c)?b=a.c.call(a,k):m(d.v)&&(b=(0,d.v)(a,k));if(null!=b){if(null!=b){var e,f,g=!1;e=0;for(f=b.length;e<f;++e)g=Ym(q,a,b[e],Xm(k,n),this.n,this)||g;a=g}else a=!1;this.e=this.e||a}}var d=this.c,e=d.c();oj(a.attributions,e.j);pj(a,e);if(!this.e&&(!d.Ec&&a.viewHints[0]||a.viewHints[1]))return!0;var f=a.extent,g=a.viewState,h=g.projection,k=g.resolution,n=a.pixelRatio;a=d.f;var p=d.ia,g=d.get("renderOrder");m(g)||(g=Wm);f=Wd(f,p*k);if(!this.e&&this.q==-k&&this.l==a&&this.k==g&&Zd(this.i,f))return!0;pc(this.d);this.d=null;this.e=!1;var q=new um(.5*k/n,f,k,d.ia);e.Lb(f,k,h);if(null===g)e.Jb(f,k,b,this);else{var r=[];e.Jb(f,k,function(a){r.push(a)},this);cb(r,g);Pa(r,b,this)}vm(q);this.q=k;this.l=a;this.k=g;this.i=f;this.d=q;return!0};function wn(a,b){yj.call(this,0,b);this.e=Nf();this.c=this.e.canvas;this.c.style.width="100%";this.c.style.height="100%";this.c.className="ol-unselectable";Gf(a,this.c,0);this.f=!0;this.j=Hd()}v(wn,yj);wn.prototype.pe=function(a){return a instanceof H?new tn(a):a instanceof I?new un(a):a instanceof J?new vn(a):null};-function xn(a,b,d){var e=a.k,f=a.e;if(jd(e,b)){var g=d.extent,h=d.pixelRatio,k=d.viewState,n=k.resolution,p=k.rotation;gj(a.j,a.c.width/2,a.c.height/2,h/n,-h/n,-p,-k.center[0],-k.center[1]);k=new um(.5*n/h,g,n);g=new Sl(f,h,g,a.j,p);e.dispatchEvent(new Yk(b,e,g,k,d,f,null));vm(k);k.pa()||ym(k,f,h,a.j,p,{});em(g);a.d=k}}wn.prototype.S=function(){return"canvas"};-wn.prototype.$d=function(a){if(null===a)this.f&&(Mg(this.c,!1),this.f=!1);else{var b=this.e,d=a.size[0]*a.pixelRatio,e=a.size[1]*a.pixelRatio;this.c.width!=d||this.c.height!=e?(this.c.width=d,this.c.height=e):b.clearRect(0,0,this.c.width,this.c.height);zj(a);xn(this,"precompose",a);var d=a.layerStatesArray,e=a.viewState.resolution,f,g,h,k;f=0;for(g=d.length;f<g;++f)k=d[f],h=k.layer,h=Bj(this,h),Ni(k,e)&&"ready"==k.zc&&h.Ee(a,k)&&h.u(a,k,b);xn(this,"postcompose",a);this.f||(Mg(this.c,!0),this.f=!0);-Cj(this,a);a.postRenderFunctions.push(Aj)}};function yn(a,b){kj.call(this,a);this.target=b}v(yn,kj);yn.prototype.j=ca;yn.prototype.q=ca;function zn(a){var b=Df("DIV");b.style.position="absolute";yn.call(this,a,b);this.d=null;this.e=Jd()}v(zn,yn);zn.prototype.Ya=function(a,b,d,e){var f=this.c;return f.c().Ld(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};zn.prototype.j=function(){Ff(this.target);this.d=null};-zn.prototype.i=function(a,b){var d=a.viewState,e=d.center,f=d.resolution,g=d.rotation,h=this.d,k=this.c.c(),n=a.viewHints,p=a.extent;m(b.extent)&&(p=oe(p,b.extent));n[0]||n[1]||re(p)||(d=d.projection,n=k.k,null===n||(d=n),p=k.wc(p,f,a.pixelRatio,d),null===p||mj(this,p)&&(h=p));null!==h&&(d=h.N(),n=h.resolution,p=Hd(),gj(p,a.size[0]/2,a.size[1]/2,n/f,n/f,g,(d[0]-e[0])/n,(e[1]-d[3])/n),h!=this.d&&(e=h.c(this),e.style.maxWidth="none",e.style.position="absolute",Ff(this.target),this.target.appendChild(e),-this.d=h),hj(p,this.e)||(Rf(this.target,p),Kd(this.e,p)),oj(a.attributions,h.i),pj(a,k));return!0};function An(a){var b=Df("DIV");b.style.position="absolute";yn.call(this,a,b);this.e=!0;this.l=1;this.k=0;this.d={}}v(An,yn);An.prototype.j=function(){Ff(this.target);this.k=0};-An.prototype.i=function(a,b){if(!b.visible)return this.e&&(Mg(this.target,!1),this.e=!1),!0;var d=a.pixelRatio,e=a.viewState,f=e.projection,g=this.c,h=g.c(),k=ej(h,f),n=h.md(),p=ac(k.c,e.resolution,0),q=k.ra(p),r=e.center,s;q==e.resolution?(r=rj(r,q,a.size),s=me(r,q,e.rotation,a.size)):s=a.extent;m(b.extent)&&(s=oe(s,b.extent));var q=Yi(k,s,q),u={};u[p]={};var z=this.hd(h,u),y=g.ia(),A=Sd(),D=new lf(0,0,0,0),x,M,Q,O;for(Q=q.c;Q<=q.e;++Q)for(O=q.d;O<=q.f;++O)x=h.Zb(p,Q,O,d,f),M=x.state,2==M?u[p][kf(x.c)]=-x:4==M||3==M&&!y||(M=k.kd(x.c,z,null,D,A),M||(x=k.wd(x.c,D,A),null===x||z(p+1,x)));var W;if(this.k!=h.f){for(W in this.d)y=this.d[+W],Hf(y.target);this.d={};this.k=h.f}A=Ra(rb(u),Number);cb(A);var z={},Ja;Q=0;for(O=A.length;Q<O;++Q){W=A[Q];W in this.d?y=this.d[W]:(y=k.Qc(r,W),y=new Bn(k,y),z[W]=!0,this.d[W]=y);W=u[W];for(Ja in W){x=y;M=W[Ja];var lb=n,Ka=M.c,mb=Ka[0],Pb=Ka[1],Ya=Ka[2],Ka=kf(Ka);if(!(Ka in x.f)){var mb=x.e.ya(mb),Ub=M.La(x),nb=Ub.style;nb.maxWidth="none";var Mc=void 0,sc=void 0;0<lb?-(Mc=Df("DIV"),sc=Mc.style,sc.overflow="hidden",sc.width=mb+"px",sc.height=mb+"px",nb.position="absolute",nb.left=-lb+"px",nb.top=-lb+"px",nb.width=mb+2*lb+"px",nb.height=mb+2*lb+"px",Mc.appendChild(Ub)):(nb.width=mb+"px",nb.height=mb+"px",Mc=Ub,sc=nb);sc.position="absolute";sc.left=(Pb-x.d[1])*mb+"px";sc.top=(x.d[2]-Ya)*mb+"px";null===x.c&&(x.c=document.createDocumentFragment());x.c.appendChild(Mc);x.f[Ka]=M}}null!==y.c&&(y.target.appendChild(y.c),y.c=null)}n=Ra(rb(this.d),Number);cb(n);Q=Hd();Ja=-0;for(A=n.length;Ja<A;++Ja)if(W=n[Ja],y=this.d[W],W in u)if(x=y.k,O=y.i,gj(Q,a.size[0]/2,a.size[1]/2,x/e.resolution,x/e.resolution,e.rotation,(O[0]-r[0])/x,(r[1]-O[1])/x),O=y,x=Q,hj(x,O.j)||(Rf(O.target,x),Kd(O.j,x)),W in z){for(--W;0<=W;--W)if(W in this.d){O=this.d[W].target;O.parentNode&&O.parentNode.insertBefore(y.target,O.nextSibling);break}0>W&&Gf(this.target,y.target,0)}else{if(!a.viewHints[0]&&!a.viewHints[1]){M=Xi(y.e,s,y.d[0],D);W=[];x=O=void 0;for(x in y.f)O=y.f[x],M.contains(O.c)||W.push(O);-lb=M=void 0;M=0;for(lb=W.length;M<lb;++M)O=W[M],x=kf(O.c),Hf(O.La(y)),delete y.f[x]}}else Hf(y.target),delete this.d[W];b.opacity!=this.l&&(this.l=this.target.style.opacity=b.opacity);b.visible&&!this.e&&(Mg(this.target,!0),this.e=!0);qj(a.usedTiles,h,p,q);sj(a,h,k,d,f,s,p,g.v());nj(a,h);pj(a,h);return!0};-function Bn(a,b){this.target=Df("DIV");this.target.style.position="absolute";this.target.style.width="100%";this.target.style.height="100%";this.e=a;this.d=b;this.i=je(Wi(a,b));this.k=a.ra(b[0]);this.f={};this.c=null;this.j=Jd()};function Cn(a){this.k=Nf();var b=this.k.canvas;b.style.maxWidth="none";b.style.position="absolute";yn.call(this,a,b);this.e=!1;this.s=-1;this.u=NaN;this.l=Sd();this.d=this.n=null;this.v=Hd();this.t=Hd()}v(Cn,yn);-Cn.prototype.q=function(a,b){var d=a.viewState,e=d.center,f=d.rotation,g=d.resolution,d=a.pixelRatio,h=a.size[0],k=a.size[1],n=h*d,p=k*d,e=gj(this.v,d*h/2,d*k/2,d/g,-d/g,-f,-e[0],-e[1]),g=this.k;g.canvas.width=n;g.canvas.height=p;h=gj(this.t,0,0,1/d,1/d,0,-(n-h)/2*d,-(p-k)/2*d);Rf(g.canvas,h);Dn(this,"precompose",a,e);h=this.d;null===h||h.pa()||(g.globalAlpha=b.opacity,ym(h,g,d,e,f,a.skippedFeatureUids),Dn(this,"render",a,e));Dn(this,"postcompose",a,e)};-function Dn(a,b,d,e){var f=a.k;a=a.c;jd(a,b)&&(e=new Sl(f,d.pixelRatio,d.extent,e,d.viewState.rotation),a.dispatchEvent(new Yk(b,a,e,null,d,f,null)),em(e))}Cn.prototype.Ya=function(a,b,d,e){if(null!==this.d){var f=this.c,g={};return this.d.d(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){var b=ma(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};Cn.prototype.J=function(){lj(this)};-Cn.prototype.i=function(a){function b(a){var b;m(a.c)?b=a.c.call(a,k):m(d.v)&&(b=(0,d.v)(a,k));if(null!=b){if(null!=b){var e,f,g=!1;e=0;for(f=b.length;e<f;++e)g=Ym(q,a,b[e],Xm(k,n),this.J,this)||g;a=g}else a=!1;this.e=this.e||a}}var d=this.c,e=d.c();oj(a.attributions,e.j);pj(a,e);if(!this.e&&(!d.Ec&&a.viewHints[0]||a.viewHints[1]))return!0;var f=a.extent,g=a.viewState,h=g.projection,k=g.resolution,n=a.pixelRatio;a=d.f;var p=d.ia,g=d.get("renderOrder");m(g)||(g=Wm);f=Wd(f,p*k);if(!this.e&&this.u==-k&&this.s==a&&this.n==g&&Zd(this.l,f))return!0;pc(this.d);this.d=null;this.e=!1;var q=new um(.5*k/n,f,k,d.ia);e.Lb(f,k,h);if(null===g)e.Jb(f,k,b,this);else{var r=[];e.Jb(f,k,function(a){r.push(a)},this);cb(r,g);Pa(r,b,this)}vm(q);this.u=k;this.s=a;this.n=g;this.l=f;this.d=q;return!0};function En(a,b){yj.call(this,0,b);this.f=null;this.f=Nf();var d=this.f.canvas;d.style.position="absolute";d.style.width="100%";d.style.height="100%";d.className="ol-unselectable";Gf(a,d,0);this.j=Hd();this.c=Df("DIV");this.c.className="ol-unselectable";d=this.c.style;d.position="absolute";d.width="100%";d.height="100%";w(this.c,"touchstart",tc);Gf(a,this.c,0);this.e=!0}v(En,yj);En.prototype.T=function(){Hf(this.c);En.X.T.call(this)};-En.prototype.pe=function(a){if(a instanceof H)a=new zn(a);else if(a instanceof I)a=new An(a);else if(a instanceof J)a=new Cn(a);else return null;return a};-function Fn(a,b,d){var e=a.k;if(jd(e,b)){var f=d.extent,g=d.pixelRatio,h=d.viewState,k=h.resolution,n=h.rotation,p=a.f,q=p.canvas;gj(a.j,q.width/2,q.height/2,g/h.resolution,-g/h.resolution,-h.rotation,-h.center[0],-h.center[1]);h=new Sl(p,g,f,a.j,n);f=new um(.5*k/g,f,k);e.dispatchEvent(new Yk(b,e,h,f,d,p,null));vm(f);f.pa()||ym(f,p,g,a.j,n,{});em(h);a.d=f}}En.prototype.S=function(){return"dom"};-En.prototype.$d=function(a){if(null===a)this.e&&(Mg(this.c,!1),this.e=!1);else{var b;b=function(a,b){Gf(this.c,a,b)};var d=this.k;if(jd(d,"precompose")||jd(d,"postcompose")){var d=this.f.canvas,e=a.pixelRatio;d.width=a.size[0]*e;d.height=a.size[1]*e}Fn(this,"precompose",a);var d=a.layerStatesArray,f,g,h,e=0;for(f=d.length;e<f;++e)h=d[e],g=h.layer,g=Bj(this,g),b.call(this,g.target,e),"ready"==h.zc?g.i(a,h)&&g.q(a,h):g.j();b=a.layerStates;for(var k in this.i)k in b||(g=this.i[k],Hf(g.target));this.e||-(Mg(this.c,!0),this.e=!0);zj(a);Cj(this,a);a.postRenderFunctions.push(Aj);Fn(this,"postcompose",a)}};function Gn(a){this.c=a}function Hn(a){this.c=a}v(Hn,Gn);Hn.prototype.S=function(){return 35632};function In(a){this.c=a}v(In,Gn);In.prototype.S=function(){return 35633};function Jn(){this.c="precision mediump float;varying vec2 a;varying float b;uniform mat4 k;uniform float l;uniform sampler2D m;void main(void){vec4 texColor=texture2D(m,a);float alpha=texColor.a*b*l;if(alpha==0.0){discard;}gl_FragColor.a=alpha;gl_FragColor.rgb=(k*vec4(texColor.rgb,1.)).rgb;}"}v(Jn,Hn);da(Jn);-function Kn(){this.c="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.,0.);gl_Position=h*vec4(c,0.,1.)+offsets;a=d;b=f;}"}v(Kn,In);da(Kn);-function Ln(a,b){this.n=a.getUniformLocation(b,"k");this.q=a.getUniformLocation(b,"j");this.l=a.getUniformLocation(b,"i");this.i=a.getUniformLocation(b,"l");this.k=a.getUniformLocation(b,"h");this.c=a.getAttribLocation(b,"e");this.f=a.getAttribLocation(b,"f");this.e=a.getAttribLocation(b,"c");this.d=a.getAttribLocation(b,"g");this.j=a.getAttribLocation(b,"d")};function Mn(){this.c="precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}v(Mn,Hn);da(Mn);-function Nn(){this.c="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.,0.);gl_Position=h*vec4(c,0.,1.)+offsets;a=d;b=f;}"}v(Nn,In);da(Nn);-function On(a,b){this.q=a.getUniformLocation(b,"j");this.l=a.getUniformLocation(b,"i");this.i=a.getUniformLocation(b,"k");this.k=a.getUniformLocation(b,"h");this.c=a.getAttribLocation(b,"e");this.f=a.getAttribLocation(b,"f");this.e=a.getAttribLocation(b,"c");this.d=a.getAttribLocation(b,"g");this.j=a.getAttribLocation(b,"d")};function Pn(a){this.c=m(a)?a:[];this.f=m(void 0)?void 0:35044};function Qn(a,b){this.n=a;this.c=b;this.f={};this.i={};this.j={};this.q=this.l=this.e=this.k=null;(this.d=Va(va,"OES_element_index_uint"))&&b.getExtension("OES_element_index_uint");w(this.n,"webglcontextlost",this.fl,!1,this);w(this.n,"webglcontextrestored",this.gl,!1,this)}-function Rn(a,b,d){var e=a.c,f=d.c,g=ma(d);if(g in a.f)e.bindBuffer(b,a.f[g].buffer);else{var h=e.createBuffer();e.bindBuffer(b,h);var k;34962==b?k=new Float32Array(f):34963==b&&(k=a.d?new Uint32Array(f):new Uint16Array(f));e.bufferData(b,k,d.f);a.f[g]={d:d,buffer:h}}}function Sn(a,b){var d=a.c,e=ma(b),f=a.f[e];d.isContextLost()||d.deleteBuffer(f.buffer);delete a.f[e]}l=Qn.prototype;-l.T=function(){var a=this.c;a.isContextLost()||(kb(this.f,function(b){a.deleteBuffer(b.buffer)}),kb(this.j,function(b){a.deleteProgram(b)}),kb(this.i,function(b){a.deleteShader(b)}),a.deleteFramebuffer(this.e),a.deleteRenderbuffer(this.q),a.deleteTexture(this.l))};l.el=function(){return this.c};-l.ue=function(){if(null===this.e){var a=this.c,b=a.createFramebuffer();a.bindFramebuffer(a.FRAMEBUFFER,b);var d=Tn(a,1,1),e=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,e);a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_COMPONENT16,1,1);a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,d,0);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,e);a.bindTexture(a.TEXTURE_2D,null);a.bindRenderbuffer(a.RENDERBUFFER,null);a.bindFramebuffer(a.FRAMEBUFFER,-null);this.e=b;this.l=d;this.q=e}return this.e};function Un(a,b){var d=ma(b);if(d in a.i)return a.i[d];var e=a.c,f=e.createShader(b.S());e.shaderSource(f,b.c);e.compileShader(f);return a.i[d]=f}function Vn(a,b,d){var e=ma(b)+"/"+ma(d);if(e in a.j)return a.j[e];var f=a.c,g=f.createProgram();f.attachShader(g,Un(a,b));f.attachShader(g,Un(a,d));f.linkProgram(g);return a.j[e]=g}l.fl=function(){wb(this.f);wb(this.i);wb(this.j);this.q=this.l=this.e=this.k=null};l.gl=function(){};-l.Td=function(a){if(a==this.k)return!1;this.c.useProgram(a);this.k=a;return!0};function Wn(a,b,d){var e=a.createTexture();a.bindTexture(a.TEXTURE_2D,e);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);m(b)&&a.texParameteri(3553,10242,b);m(d)&&a.texParameteri(3553,10243,d);return e}function Tn(a,b,d){var e=Wn(a,void 0,void 0);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,b,d,0,a.RGBA,a.UNSIGNED_BYTE,null);return e}-function Xn(a,b){var d=Wn(a,33071,33071);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);return d};function Yn(a,b){this.v=this.t=void 0;this.Ia=new ug;this.l=ke(b);this.s=[];this.i=[];this.R=void 0;this.j=[];this.e=[];this.Z=this.W=void 0;this.f=[];this.L=this.J=this.q=null;this.ga=void 0;this.oa=Jd();this.za=Jd();this.sa=this.ha=void 0;this.Ja=Jd();this.Ha=this.ja=this.ta=void 0;this.ma=[];this.k=[];this.c=[];this.u=null;this.d=[];this.n=[];this.ia=void 0}-function Zn(a,b){var d=a.u,e=a.q,f=a.ma,g=a.k,h=b.c;return function(){if(!h.isContextLost()){var a,n;a=0;for(n=f.length;a<n;++a)h.deleteTexture(f[a]);a=0;for(n=g.length;a<n;++a)h.deleteTexture(g[a])}Sn(b,d);Sn(b,e)}}-function $n(a,b,d,e){var f=a.t,g=a.v,h=a.R,k=a.W,n=a.Z,p=a.ga,q=a.ha,r=a.sa,s=a.ta?1:0,u=a.ja,z=a.Ha,y=a.ia,A=Math.cos(u),u=Math.sin(u),D=a.f.length,x=a.c.length,M,Q,O,W,Ja,lb;for(M=0;M<d;M+=e)Ja=b[M]-a.l[0],lb=b[M+1]-a.l[1],Q=x/8,O=-z*f,W=-z*(h-g),a.c[x++]=Ja,a.c[x++]=lb,a.c[x++]=O*A-W*u,a.c[x++]=O*u+W*A,a.c[x++]=q/n,a.c[x++]=(r+h)/k,a.c[x++]=p,a.c[x++]=s,O=z*(y-f),W=-z*(h-g),a.c[x++]=Ja,a.c[x++]=lb,a.c[x++]=O*A-W*u,a.c[x++]=O*u+W*A,a.c[x++]=(q+y)/n,a.c[x++]=(r+h)/k,a.c[x++]=p,a.c[x++]=s,O=z*(y--f),W=z*g,a.c[x++]=Ja,a.c[x++]=lb,a.c[x++]=O*A-W*u,a.c[x++]=O*u+W*A,a.c[x++]=(q+y)/n,a.c[x++]=r/k,a.c[x++]=p,a.c[x++]=s,O=-z*f,W=z*g,a.c[x++]=Ja,a.c[x++]=lb,a.c[x++]=O*A-W*u,a.c[x++]=O*u+W*A,a.c[x++]=q/n,a.c[x++]=r/k,a.c[x++]=p,a.c[x++]=s,a.f[D++]=Q,a.f[D++]=Q+1,a.f[D++]=Q+2,a.f[D++]=Q,a.f[D++]=Q+2,a.f[D++]=Q+3}l=Yn.prototype;l.xb=function(a,b){this.d.push(this.f.length);this.n.push(b);var d=a.o;$n(this,d,d.length,a.H)};-l.yb=function(a,b){this.d.push(this.f.length);this.n.push(b);var d=a.o;$n(this,d,d.length,a.H)};l.Ob=function(a){var b=a.c;this.s.push(this.f.length);this.i.push(this.f.length);this.u=new Pn(this.c);Rn(a,34962,this.u);this.q=new Pn(this.f);Rn(a,34963,this.q);a={};ao(this.ma,this.j,a,b);ao(this.k,this.e,a,b);this.R=this.v=this.t=void 0;this.e=this.j=null;this.Z=this.W=void 0;this.f=null;this.Ha=this.ja=this.ta=this.sa=this.ha=this.ga=void 0;this.c=null;this.ia=void 0};-function ao(a,b,d,e){var f,g,h,k=b.length;for(h=0;h<k;++h)f=b[h],g=ma(f).toString(),g in d?f=d[g]:(f=Xn(e,f),d[g]=f),a[h]=f}-l.ec=function(a,b,d,e,f,g,h,k,n,p,q,r,s,u,z){g=a.c;Rn(a,34962,this.u);Rn(a,34963,this.q);var y=k||1!=n||p||1!=q,A,D;y?(A=Jn.Ua(),D=Kn.Ua()):(A=Mn.Ua(),D=Nn.Ua());D=Vn(a,A,D);y?null===this.J?this.J=A=new Ln(g,D):A=this.J:null===this.L?this.L=A=new On(g,D):A=this.L;a.Td(D);g.enableVertexAttribArray(A.e);g.vertexAttribPointer(A.e,2,5126,!1,32,0);g.enableVertexAttribArray(A.c);g.vertexAttribPointer(A.c,2,5126,!1,32,8);g.enableVertexAttribArray(A.j);g.vertexAttribPointer(A.j,2,5126,!1,32,16);g.enableVertexAttribArray(A.f);-g.vertexAttribPointer(A.f,1,5126,!1,32,24);g.enableVertexAttribArray(A.d);g.vertexAttribPointer(A.d,1,5126,!1,32,28);D=this.Ja;gj(D,0,0,2/(d*f[0]),2/(d*f[1]),-e,-(b[0]-this.l[0]),-(b[1]-this.l[1]));b=this.za;d=2/f[0];f=2/f[1];Ld(b);b[0]=d;b[5]=f;b[10]=1;b[15]=1;f=this.oa;Ld(f);0!==e&&Qd(f,-e);g.uniformMatrix4fv(A.k,!1,D);g.uniformMatrix4fv(A.l,!1,b);g.uniformMatrix4fv(A.q,!1,f);g.uniform1f(A.i,h);y&&g.uniformMatrix4fv(A.n,!1,vg(this.Ia,k,n,p,q));var x;if(m(s)){if(u)a:{e=a.d?5125:5123;a=a.d?4:2;p=-this.d.length-1;for(h=this.k.length-1;0<=h;--h)for(g.bindTexture(3553,this.k[h]),k=0<h?this.i[h-1]:0,q=this.i[h];0<=p&&this.d[p]>=k;){n=this.d[p];u=this.n[p];x=ma(u).toString();if(!m(r[x])&&(!m(z)||pe(z,u.V().N()))&&(g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),g.drawElements(4,q-n,e,n*a),q=s(u))){r=q;break a}q=n;p--}r=void 0}else g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),bo(this,g,a,r,this.k,this.i),r=(r=s(null))?r:void 0;x=r}else bo(this,g,a,r,this.ma,this.s);g.disableVertexAttribArray(A.e);-g.disableVertexAttribArray(A.c);g.disableVertexAttribArray(A.j);g.disableVertexAttribArray(A.f);g.disableVertexAttribArray(A.d);return x};-function bo(a,b,d,e,f,g){var h=d.d?5125:5123;d=d.d?4:2;if(vb(e)){var k;a=0;e=f.length;for(k=0;a<e;++a){b.bindTexture(3553,f[a]);var n=g[a];b.drawElements(4,n-k,h,k*d);k=n}}else{k=0;var p,n=0;for(p=f.length;n<p;++n){b.bindTexture(3553,f[n]);for(var q=0<n?g[n-1]:0,r=g[n],s=q;k<a.d.length&&a.d[k]<=r;){var u=ma(a.n[k]).toString();m(e[u])?(s!==q&&b.drawElements(4,q-s,h,s*d),q=s=k===a.d.length-1?r:a.d[k+1]):q=k===a.d.length-1?r:a.d[k+1];k++}s!==q&&b.drawElements(4,q-s,h,s*d)}}}-l.mb=function(a){var b=a.Ab(),d=a.Fb(1),e=a.od(),f=a.Md(1),g=a.s,h=a.Gb(),k=a.t,n=a.l,p=a.kb();a=a.n;var q;0===this.j.length?this.j.push(d):(q=this.j[this.j.length-1],ma(q)!=ma(d)&&(this.s.push(this.f.length),this.j.push(d)));0===this.e.length?this.e.push(f):(q=this.e[this.e.length-1],ma(q)!=ma(f)&&(this.i.push(this.f.length),this.e.push(f)));this.t=b[0];this.v=b[1];this.R=p[1];this.W=e[1];this.Z=e[0];this.ga=g;this.ha=h[0];this.sa=h[1];this.ja=n;this.ta=k;this.Ha=a;this.ia=p[0]};-function co(a,b,d){this.j=b;this.i=a;this.e=d;this.f={}}function eo(a,b){var d=[],e;for(e in a.f)d.push(Zn(a.f[e],b));return fd.apply(null,d)}function fo(a,b){for(var d in a.f)a.f[d].Ob(b)}co.prototype.c=function(a,b){var d=this.f[b];m(d)||(d=new go[b](this.i,this.j),this.f[b]=d);return d};co.prototype.pa=function(){return vb(this.f)};function ho(a,b,d,e,f,g,h,k,n,p,q,r,s,u,z){var y=io,A,D;for(A=fm.length-1;0<=A;--A)if(D=a.f[fm[A]],m(D)&&(D=D.ec(b,d,e,f,y,g,h,k,n,p,q,r,s,u,z)))return D}-co.prototype.d=function(a,b,d,e,f,g,h,k,n,p,q,r,s,u){var z=b.c;z.bindFramebuffer(z.FRAMEBUFFER,b.ue());var y;m(this.e)&&(y=Wd(be(a),e*this.e));return ho(this,b,a,e,f,h,k,n,p,q,r,s,function(a){var b=new Uint8Array(4);z.readPixels(0,0,1,1,z.RGBA,z.UNSIGNED_BYTE,b);if(0<b[3]&&(a=u(a)))return a},!0,y)};-function jo(a,b,d,e,f,g,h,k,n,p,q,r){var s=d.c;s.bindFramebuffer(s.FRAMEBUFFER,d.ue());a=ho(a,d,b,e,f,g,h,k,n,p,q,r,function(){var a=new Uint8Array(4);s.readPixels(0,0,1,1,s.RGBA,s.UNSIGNED_BYTE,a);return 0<a[3]},!1);return m(a)}var go={Image:Yn},io=[1,1];function ko(a,b,d,e,f,g,h){this.d=a;this.j=b;this.c=g;this.i=h;this.l=f;this.q=e;this.k=d;this.e=null;this.f={}}l=ko.prototype;l.nc=function(a,b){var d=a.toString(),e=this.f[d];m(e)?e.push(b):this.f[d]=[b]};l.oc=function(){};l.qe=function(a,b){var d=(0,b.e)(a);if(null!=d&&pe(this.c,d.N())){var e=b.c;m(e)||(e=0);this.nc(e,function(a){a.Fa(b.j,b.d);a.mb(b.i);a.Ga(b.f);var e=lo[d.S()];e&&e.call(a,d,null)})}};-l.jd=function(a,b){var d=a.e,e,f;e=0;for(f=d.length;e<f;++e){var g=d[e],h=lo[g.S()];h&&h.call(this,g,b)}};l.yb=function(a,b){var d=this.d,e=(new co(1,this.c)).c(0,"Image");e.mb(this.e);e.yb(a,b);e.Ob(d);e.ec(this.d,this.j,this.k,this.q,this.l,this.c,this.i,1,0,1,0,1,{});Zn(e,d)()};l.Ib=function(){};l.pc=function(){};l.xb=function(a,b){var d=this.d,e=(new co(1,this.c)).c(0,"Image");e.mb(this.e);e.xb(a,b);e.Ob(d);e.ec(this.d,this.j,this.k,this.q,this.l,this.c,this.i,1,0,1,0,1,{});Zn(e,d)()};l.qc=function(){};-l.Vb=function(){};l.zb=function(){};l.Fa=function(){};l.mb=function(a){this.e=a};l.Ga=function(){};var lo={Point:ko.prototype.yb,MultiPoint:ko.prototype.xb,GeometryCollection:ko.prototype.jd};function mo(){this.c="precision mediump float;varying vec2 a;uniform mat4 f;uniform float g;uniform sampler2D h;void main(void){vec4 texColor=texture2D(h,a);gl_FragColor.rgb=(f*vec4(texColor.rgb,1.)).rgb;gl_FragColor.a=texColor.a*g;}"}v(mo,Hn);da(mo);function no(){this.c="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}"}v(no,In);da(no);-function oo(a,b){this.k=a.getUniformLocation(b,"f");this.d=a.getUniformLocation(b,"g");this.e=a.getUniformLocation(b,"e");this.i=a.getUniformLocation(b,"d");this.j=a.getUniformLocation(b,"h");this.c=a.getAttribLocation(b,"b");this.f=a.getAttribLocation(b,"c")};function po(){this.c="precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}"}v(po,Hn);da(po);function qo(){this.c="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}"}v(qo,In);da(qo);-function ro(a,b){this.d=a.getUniformLocation(b,"f");this.e=a.getUniformLocation(b,"e");this.i=a.getUniformLocation(b,"d");this.j=a.getUniformLocation(b,"g");this.c=a.getAttribLocation(b,"b");this.f=a.getAttribLocation(b,"c")};function so(a,b){kj.call(this,b);this.d=a;this.R=new Pn([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.j=this.$a=null;this.i=void 0;this.l=Hd();this.s=Jd();this.W=new ug;this.u=this.n=null}v(so,kj);-function to(a,b,d){var e=a.d.j;if(m(a.i)&&a.i==d)e.bindFramebuffer(36160,a.j);else{b.postRenderFunctions.push(sa(function(a,b,d){a.isContextLost()||(a.deleteFramebuffer(b),a.deleteTexture(d))},e,a.j,a.$a));b=Tn(e,d,d);var f=e.createFramebuffer();e.bindFramebuffer(36160,f);e.framebufferTexture2D(36160,36064,3553,b,0);a.$a=b;a.j=f;a.i=d}}-so.prototype.Pf=function(a,b,d){uo(this,"precompose",d,a);Rn(d,34962,this.R);var e=d.c,f=b.brightness||1!=b.contrast||b.hue||1!=b.saturation,g,h;f?(g=mo.Ua(),h=no.Ua()):(g=po.Ua(),h=qo.Ua());g=Vn(d,g,h);f?null===this.n?this.n=h=new oo(e,g):h=this.n:null===this.u?this.u=h=new ro(e,g):h=this.u;d.Td(g)&&(e.enableVertexAttribArray(h.c),e.vertexAttribPointer(h.c,2,5126,!1,16,0),e.enableVertexAttribArray(h.f),e.vertexAttribPointer(h.f,2,5126,!1,16,8),e.uniform1i(h.j,0));e.uniformMatrix4fv(h.i,!1,this.l);-e.uniformMatrix4fv(h.e,!1,this.s);f&&e.uniformMatrix4fv(h.k,!1,vg(this.W,b.brightness,b.contrast,b.hue,b.saturation));e.uniform1f(h.d,b.opacity);e.bindTexture(3553,this.$a);e.drawArrays(5,0,4);uo(this,"postcompose",d,a)};function uo(a,b,d,e){a=a.c;if(jd(a,b)){var f=e.viewState;a.dispatchEvent(new Yk(b,a,new ko(d,f.center,f.resolution,f.rotation,e.size,e.extent,e.pixelRatio),null,e,null,d))}}so.prototype.Fe=function(){this.j=this.$a=null;this.i=void 0};function vo(a,b){so.call(this,a,b);this.q=this.k=this.e=null}v(vo,so);function wo(a,b){var d=b.c();return Xn(a.d.j,d)}vo.prototype.Ya=function(a,b,d,e){var f=this.c;return f.c().Ld(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};-vo.prototype.Ge=function(a,b){var d=this.d.j,e=a.viewState,f=e.center,g=e.resolution,h=e.rotation,k=this.e,n=this.$a,p=this.c.c(),q=a.viewHints,r=a.extent;m(b.extent)&&(r=oe(r,b.extent));q[0]||q[1]||re(r)||(e=e.projection,q=p.k,null===q||(e=q),r=p.wc(r,g,a.pixelRatio,e),null!==r&&mj(this,r)&&(k=r,n=wo(this,r),null===this.$a||a.postRenderFunctions.push(sa(function(a,b){a.isContextLost()||a.deleteTexture(b)},d,this.$a))));null!==k&&(d=this.d.e.n,xo(this,d.width,d.height,f,g,h,k.N()),this.q=null,f=this.l,-Ld(f),Pd(f,1,-1),Od(f,0,-1),this.e=k,this.$a=n,oj(a.attributions,k.i),pj(a,p));return!0};function xo(a,b,d,e,f,g,h){b*=f;d*=f;a=a.s;Ld(a);Pd(a,2/b,2/d);Qd(a,-g);Od(a,h[0]-e[0],h[1]-e[1]);Pd(a,(h[2]-h[0])/2,(h[3]-h[1])/2);Od(a,1,1)}vo.prototype.Jd=function(a,b){var d=this.Ya(a,b,bd,this);return m(d)};-vo.prototype.fc=function(a,b,d,e){if(null!==this.e&&!fa(this.e.c()))if(this.c.c()instanceof rn){if(a=a.slice(),ij(b.pixelToCoordinateMatrix,a,a),this.Ya(a,b,bd,this))return d.call(e,this.c)}else{var f=[this.e.c().width,this.e.c().height];if(null===this.q){var g=b.size;b=Hd();Ld(b);Od(b,-1,-1);Pd(b,2/g[0],2/g[1]);Od(b,0,g[1]);Pd(b,1,-1);g=Hd();Nd(this.s,g);var h=Hd();Ld(h);Od(h,0,f[1]);Pd(h,1,-1);Pd(h,f[0]/2,f[1]/2);Od(h,1,1);var k=Hd();Md(h,g,k);Md(k,b,k);this.q=k}b=[0,0];ij(this.q,a,b);if(!(0>b[0]||-b[0]>f[0]||0>b[1]||b[1]>f[1])&&(null===this.k&&(this.k=Nf(1,1)),this.k.clearRect(0,0,1,1),this.k.drawImage(this.e.c(),b[0],b[1],1,1,0,0,1,1),0<this.k.getImageData(0,0,1,1).data[3]))return d.call(e,this.c)}};function yo(){this.c="precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}"}v(yo,Hn);da(yo);function zo(){this.c="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}"}v(zo,In);da(zo);function Ao(a,b){this.d=a.getUniformLocation(b,"e");this.e=a.getUniformLocation(b,"d");this.c=a.getAttribLocation(b,"b");this.f=a.getAttribLocation(b,"c")};function Bo(a,b){so.call(this,a,b);this.J=yo.Ua();this.L=zo.Ua();this.e=null;this.v=new Pn([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.t=this.k=null;this.q=-1}v(Bo,so);l=Bo.prototype;l.T=function(){Sn(this.d.e,this.v);Bo.X.T.call(this)};l.hd=function(a,b){var d=this.d;return function(e,f){return dj(a,e,f,function(a){var f=Ri(d.f,a.ub());f&&(b[e]||(b[e]={}),b[e][a.c.toString()]=a);return f})}};l.Fe=function(){Bo.X.Fe.call(this);this.e=null};-l.Ge=function(a,b,d){var e=this.d,f=d.c,g=a.viewState,h=g.projection,k=this.c,n=k.c(),p=ej(n,h),q=ac(p.c,g.resolution,0),r=p.ra(q),s=n.Rc(q,a.pixelRatio,h),u=s/p.ya(q),z=r/u,y=n.md(),A=g.center,D;r==g.resolution?(A=rj(A,r,a.size),D=me(A,r,g.rotation,a.size)):D=a.extent;r=Yi(p,D,r);if(null!==this.k&&of(this.k,r)&&this.q==n.f)z=this.t;else{var x=[r.e-r.c+1,r.f-r.d+1],x=Math.max(x[0]*s,x[1]*s),M=Math.pow(2,Math.ceil(Math.log(x)/Math.LN2)),x=z*M,Q=p.Pb(q),O=Q[0]+r.c*s*z,z=Q[1]+r.d*s*z,z=[O,z,O+x,z+x];-to(this,a,M);f.viewport(0,0,M,M);f.clearColor(0,0,0,0);f.clear(16384);f.disable(3042);M=Vn(d,this.J,this.L);d.Td(M);null===this.e&&(this.e=new Ao(f,M));Rn(d,34962,this.v);f.enableVertexAttribArray(this.e.c);f.vertexAttribPointer(this.e.c,2,5126,!1,16,0);f.enableVertexAttribArray(this.e.f);f.vertexAttribPointer(this.e.f,2,5126,!1,16,8);f.uniform1i(this.e.d,0);d={};d[q]={};var W=this.hd(n,d),Ja=k.ia(),M=!0,O=Sd(),lb=new lf(0,0,0,0),Ka,mb,Pb;for(mb=r.c;mb<=r.e;++mb)for(Pb=r.d;Pb<=r.f;++Pb){Q=n.Zb(q,-mb,Pb,u,h);if(m(b.extent)&&(Ka=Wi(p,Q.c,O),!pe(Ka,b.extent)))continue;Ka=Q.state;if(2==Ka){if(Ri(e.f,Q.ub())){d[q][kf(Q.c)]=Q;continue}}else if(4==Ka||3==Ka&&!Ja)continue;M=!1;Ka=p.kd(Q.c,W,null,lb,O);Ka||(Q=p.wd(Q.c,lb,O),null===Q||W(q+1,Q))}b=Ra(rb(d),Number);cb(b);for(var W=new Float32Array(4),Ya,Ub,nb,Ja=0,lb=b.length;Ja<lb;++Ja)for(Ya in Ub=d[b[Ja]],Ub)Q=Ub[Ya],Ka=Wi(p,Q.c,O),mb=2*(Ka[2]-Ka[0])/x,Pb=2*(Ka[3]-Ka[1])/x,nb=2*(Ka[0]-z[0])/x-1,Ka=2*(Ka[1]-z[1])/x-1,Gd(W,mb,Pb,nb,Ka),f.uniform4fv(this.e.e,-W),Co(e,Q,s,y*u),f.drawArrays(5,0,4);M?(this.k=r,this.t=z,this.q=n.f):(this.t=this.k=null,this.q=-1,a.animate=!0)}qj(a.usedTiles,n,q,r);var Mc=e.l;sj(a,n,p,u,h,D,q,k.v(),function(a){var b;(b=2!=a.state||Ri(e.f,a.ub()))||(b=a.ub()in Mc.d);b||tj(Mc,[a,$i(p,a.c),p.ra(a.c[0]),s,y*u])},this);nj(a,n);pj(a,n);f=this.l;Ld(f);Od(f,(A[0]-z[0])/(z[2]-z[0]),(A[1]-z[1])/(z[3]-z[1]));0!==g.rotation&&Qd(f,g.rotation);Pd(f,a.size[0]*g.resolution/(z[2]-z[0]),a.size[1]*g.resolution/(z[3]-z[1]));Od(f,-.5,-.5);return!0};-l.fc=function(a,b,d,e){if(null!==this.j){var f=[0,0];ij(this.l,[a[0]/b.size[0],(b.size[1]-a[1])/b.size[1]],f);a=[f[0]*this.i,f[1]*this.i];b=this.d.e.c;b.bindFramebuffer(b.FRAMEBUFFER,this.j);f=new Uint8Array(4);b.readPixels(a[0],a[1],1,1,b.RGBA,b.UNSIGNED_BYTE,f);if(0<f[3])return d.call(e,this.c)}};function Do(a,b){so.call(this,a,b);this.q=!1;this.L=-1;this.J=NaN;this.t=Sd();this.k=this.e=this.v=null}v(Do,so);l=Do.prototype;l.Pf=function(a,b,d){this.k=b;var e=a.viewState,f=this.e;if(null!==f&&!f.pa()){var g=e.center,h=e.resolution,e=e.rotation,k=a.size,n=a.pixelRatio,p=b.opacity,q=b.brightness,r=b.contrast,s=b.hue;b=b.saturation;a=a.skippedFeatureUids;var u,z,y;u=0;for(z=fm.length;u<z;++u)y=f.f[fm[u]],m(y)&&y.ec(d,g,h,e,k,n,p,q,r,s,b,a,void 0,!1)}};-l.T=function(){var a=this.e;null!==a&&(eo(a,this.d.e)(),this.e=null);Do.X.T.call(this)};l.Ya=function(a,b,d,e){if(null!==this.e&&null!==this.k){var f=b.viewState,g=this.c,h=this.k,k={};return this.e.d(a,this.d.e,f.center,f.resolution,f.rotation,b.size,b.pixelRatio,h.opacity,h.brightness,h.contrast,h.hue,h.saturation,b.skippedFeatureUids,function(a){var b=ma(a).toString();if(!(b in k))return k[b]=!0,d.call(e,a,g)})}};-l.Jd=function(a,b){if(null===this.e||null===this.k)return!1;var d=b.viewState,e=this.k;return jo(this.e,a,this.d.e,d.resolution,d.rotation,b.pixelRatio,e.opacity,e.brightness,e.contrast,e.hue,e.saturation,b.skippedFeatureUids)};l.fc=function(a,b,d,e){a=a.slice();ij(b.pixelToCoordinateMatrix,a,a);if(this.Jd(a,b))return d.call(e,this.c)};l.$j=function(){lj(this)};-l.Ge=function(a,b,d){function e(a){var b;m(a.c)?b=a.c.call(a,n):m(f.v)&&(b=(0,f.v)(a,n));if(null!=b){if(null!=b){var d,e,g=!1;d=0;for(e=b.length;d<e;++d)g=Ym(s,a,b[d],Xm(n,p),this.$j,this)||g;a=g}else a=!1;this.q=this.q||a}}var f=this.c;b=f.c();oj(a.attributions,b.j);pj(a,b);if(!this.q&&(!f.Ec&&a.viewHints[0]||a.viewHints[1]))return!0;var g=a.extent,h=a.viewState,k=h.projection,n=h.resolution,p=a.pixelRatio,h=f.f,q=f.ia,r=f.get("renderOrder");m(r)||(r=Wm);g=Wd(g,q*n);if(!this.q&&this.J==n&&this.L==-h&&this.v==r&&Zd(this.t,g))return!0;null===this.e||a.postRenderFunctions.push(eo(this.e,d));this.q=!1;var s=new co(.5*n/p,g,f.ia);b.Lb(g,n,k);if(null===r)b.Jb(g,n,e,this);else{var u=[];b.Jb(g,n,function(a){u.push(a)},this);cb(u,r);Pa(u,e,this)}fo(s,d);this.J=n;this.L=h;this.v=r;this.t=g;this.e=s;return!0};function Eo(a,b){yj.call(this,0,b);this.c=Df("CANVAS");this.c.style.width="100%";this.c.style.height="100%";this.c.className="ol-unselectable";Gf(a,this.c,0);this.t=0;this.v=Nf();this.n=!0;this.j=Uf(this.c,{antialias:!0,depth:!1,uh:!0,preserveDrawingBuffer:!1,stencil:!0});this.e=new Qn(this.c,this.j);w(this.c,"webglcontextlost",this.Yj,!1,this);w(this.c,"webglcontextrestored",this.Zj,!1,this);this.f=new Qi;this.s=null;this.l=new Dj(ra(function(a){var b=a[1];a=a[2];var f=b[0]-this.s[0],b=b[1]-this.s[1];-return 65536*Math.log(a)+Math.sqrt(f*f+b*b)/a},this),function(a){return a[0].ub()});this.J=ra(function(){if(!this.l.pa()){Hj(this.l);var a=Ej(this.l);Co(this,a[0],a[3],a[4])}},this);this.q=0;Fo(this)}v(Eo,yj);-function Co(a,b,d,e){var f=a.j,g=b.ub();if(Ri(a.f,g))a=a.f.get(g),f.bindTexture(3553,a.$a),9729!=a.Ef&&(f.texParameteri(3553,10240,9729),a.Ef=9729),9729!=a.Ff&&(f.texParameteri(3553,10240,9729),a.Ff=9729);else{var h=f.createTexture();f.bindTexture(3553,h);if(0<e){var k=a.v.canvas,n=a.v;a.t!=d?(k.width=d,k.height=d,a.t=d):n.clearRect(0,0,d,d);n.drawImage(b.La(),e,e,d,d,0,0,d,d);f.texImage2D(3553,0,6408,6408,5121,k)}else f.texImage2D(3553,0,6408,6408,5121,b.La());f.texParameteri(3553,10240,9729);f.texParameteri(3553,-10241,9729);f.texParameteri(3553,10242,33071);f.texParameteri(3553,10243,33071);a.f.set(g,{$a:h,Ef:9729,Ff:9729})}}l=Eo.prototype;l.pe=function(a){return a instanceof H?new vo(this,a):a instanceof I?new Bo(this,a):a instanceof J?new Do(this,a):null};-function Go(a,b,d){var e=a.k;if(jd(e,b)){var f=a.e,g=d.extent,h=d.size,k=d.viewState,n=d.pixelRatio,p=k.resolution,q=k.center,r=k.rotation,k=new ko(f,q,p,r,h,g,n),g=new co(.5*p/n,g);e.dispatchEvent(new Yk(b,e,k,g,d,null,f));fo(g,f);if(!g.pa()){var s=Ho;b=s.opacity;d=s.brightness;var e=s.contrast,u=s.hue,s=s.saturation,z={},y,A,D;y=0;for(A=fm.length;y<A;++y)D=g.f[fm[y]],m(D)&&D.ec(f,q,p,r,h,n,b,d,e,u,s,z,void 0,!1)}eo(g,f)();f=Ra(rb(k.f),Number);cb(f);h=0;for(n=f.length;h<n;++h)for(p=k.f[f[h].toString()],-q=0,r=p.length;q<r;++q)p[q](k);a.d=g}}l.T=function(){var a=this.j;a.isContextLost()||this.f.forEach(function(b){null===b||a.deleteTexture(b.$a)});pc(this.e);Eo.X.T.call(this)};l.sh=function(a,b){for(var d=this.j,e;1024<this.f.Xb()-this.q;){e=this.f.c.kc;if(null===e)if(+this.f.c.Fd==b.index)break;else--this.q;else d.deleteTexture(e.$a);this.f.pop()}};l.S=function(){return"webgl"};l.Yj=function(a){a.preventDefault();this.f.clear();this.q=0;kb(this.i,function(a){a.Fe()})};l.Zj=function(){Fo(this);this.k.render()};-function Fo(a){a=a.j;a.activeTexture(33984);a.blendFuncSeparate(770,771,1,771);a.disable(2884);a.disable(2929);a.disable(3089);a.disable(2960)}-l.$d=function(a){var b=this.e,d=this.j;if(d.isContextLost())return!1;if(null===a)return this.n&&(Mg(this.c,!1),this.n=!1),!1;this.s=a.focus;this.f.set((-a.index).toString(),null);++this.q;var e=[],f=a.layerStatesArray,g=a.viewState.resolution,h,k,n,p;h=0;for(k=f.length;h<k;++h)p=f[h],Ni(p,g)&&"ready"==p.zc&&(n=Bj(this,p.layer),n.Ge(a,p,b)&&e.push(p));f=a.size[0]*a.pixelRatio;g=a.size[1]*a.pixelRatio;if(this.c.width!=f||this.c.height!=g)this.c.width=f,this.c.height=g;d.bindFramebuffer(36160,null);-d.clearColor(0,0,0,0);d.clear(16384);d.enable(3042);d.viewport(0,0,this.c.width,this.c.height);Go(this,"precompose",a);h=0;for(k=e.length;h<k;++h)p=e[h],n=Bj(this,p.layer),n.Pf(a,p,b);this.n||(Mg(this.c,!0),this.n=!0);zj(a);1024<this.f.Xb()-this.q&&a.postRenderFunctions.push(ra(this.sh,this));this.l.pa()||(a.postRenderFunctions.push(this.J),a.animate=!0);Go(this,"postcompose",a);Cj(this,a);a.postRenderFunctions.push(Aj)};-l.De=function(a,b,d,e,f,g){var h;if(this.j.isContextLost())return!1;var k=this.e,n=b.viewState;if(null!==this.d){var p={},q=Ho;if(h=this.d.d(a,k,n.center,n.resolution,n.rotation,b.size,b.pixelRatio,q.opacity,q.brightness,q.contrast,q.hue,q.saturation,{},function(a){var b=ma(a).toString();if(!(b in p))return p[b]=!0,d.call(e,a,null)}))return h}k=b.layerStatesArray;for(q=k.length-1;0<=q;--q){h=k[q];var r=h.layer;if(Ni(h,n.resolution)&&f.call(g,r)&&(h=Bj(this,r).Ya(a,b,d,e)))return h}};-l.Of=function(a,b,d,e){var f=!1;if(this.j.isContextLost())return!1;var g=this.e,h=b.viewState;if(null!==this.d&&(f=Ho,f=jo(this.d,a,g,h.resolution,h.rotation,b.pixelRatio,f.opacity,f.brightness,f.contrast,f.hue,f.saturation,{})))return!0;var g=b.layerStatesArray,k;for(k=g.length-1;0<=k;--k){var n=g[k],p=n.layer;if(Ni(n,h.resolution)&&d.call(e,p)&&(f=Bj(this,p).Jd(a,b)))return!0}return f};-l.Nf=function(a,b,d,e,f){if(this.j.isContextLost())return!1;var g=this.e,h=b.viewState,k;if(null!==this.d){var n=Ho;k=this.k.va(a);if(jo(this.d,k,g,h.resolution,h.rotation,b.pixelRatio,n.opacity,n.brightness,n.contrast,n.hue,n.saturation,{})&&(k=d.call(e,null)))return k}g=b.layerStatesArray;for(n=g.length-1;0<=n;--n){k=g[n];var p=k.layer;if(Ni(k,h.resolution)&&f.call(e,p)&&(k=Bj(this,p).fc(a,b,d,e)))return k}};var Ho={opacity:1,brightness:0,contrast:1,hue:0,saturation:1};var Io=["canvas","webgl","dom"];-function K(a){qd.call(this);var b=Jo(a);this.Cc=m(a.loadTilesWhileAnimating)?a.loadTilesWhileAnimating:!1;this.zc=m(a.loadTilesWhileInteracting)?a.loadTilesWhileInteracting:!1;this.Ec=m(a.pixelRatio)?a.pixelRatio:Wf;this.Dc=b.logos;this.v=new jh(this.Ul,void 0,this);oc(this,this.v);this.Ac=Hd();this.ed=Hd();this.Bc=0;this.e=null;this.Ia=Sd();this.s=this.Z=null;this.d=Af("DIV","ol-viewport");this.d.style.position="relative";this.d.style.overflow="hidden";this.d.style.width="100%";this.d.style.height=-"100%";this.d.style.msTouchAction="none";bg&&(this.d.className="ol-touch");this.oa=Af("DIV","ol-overlaycontainer");this.d.appendChild(this.oa);this.L=Af("DIV","ol-overlaycontainer-stopevent");w(this.L,["click","dblclick","mousedown","touchstart","MSPointerDown",Gi,Gb?"DOMMouseScroll":"mousewheel"],rc);this.d.appendChild(this.L);a=new yi(this);w(a,qb(Ji),this.yf,!1,this);oc(this,a);this.ja=b.keyboardEventTarget;this.J=new Dh;w(this.J,"key",this.wf,!1,this);oc(this,this.J);a=new Lh(this.d);w(a,"mousewheel",-this.wf,!1,this);oc(this,a);this.l=b.controls;this.k=b.interactions;this.n=b.overlays;this.t=new b.Wl(this.d,this);oc(this,this.t);this.mc=new yh;oc(this,this.mc);w(this.mc,"resize",this.u,!1,this);this.ga=null;this.R=[];this.za=[];this.ob=new Ij(ra(this.ci,this),ra(this.Bj,this));this.ha={};w(this,ud("layergroup"),this.vi,!1,this);w(this,ud("view"),this.Cj,!1,this);w(this,ud("size"),this.Li,!1,this);w(this,ud("target"),this.Mi,!1,this);this.I(b.tm);this.l.forEach(function(a){a.setMap(this)},this);-w(this.l,"add",function(a){a.element.setMap(this)},!1,this);w(this.l,"remove",function(a){a.element.setMap(null)},!1,this);this.k.forEach(function(a){a.setMap(this)},this);w(this.k,"add",function(a){a.element.setMap(this)},!1,this);w(this.k,"remove",function(a){a.element.setMap(null)},!1,this);this.n.forEach(function(a){a.setMap(this)},this);w(this.n,"add",function(a){a.element.setMap(this)},!1,this);w(this.n,"remove",function(a){a.element.setMap(null)},!1,this)}v(K,qd);l=K.prototype;l.ih=function(a){this.l.push(a)};-l.jh=function(a){this.k.push(a)};l.df=function(a){this.Yb().dc().push(a)};l.ef=function(a){this.n.push(a)};l.Qa=function(a){this.render();Array.prototype.push.apply(this.R,arguments)};l.T=function(){Hf(this.d);K.X.T.call(this)};l.se=function(a,b,d,e,f){if(null!==this.e)return a=this.va(a),this.t.De(a,this.e,b,m(d)?d:null,m(e)?e:bd,m(f)?f:null)};l.Aj=function(a,b,d,e,f){if(null!==this.e)return this.t.Nf(a,this.e,b,m(d)?d:null,m(e)?e:bd,m(f)?f:null)};-l.Oi=function(a,b,d){if(null===this.e)return!1;a=this.va(a);return this.t.Of(a,this.e,m(b)?b:bd,m(d)?d:null)};l.Bh=function(a){return this.va(this.ld(a))};l.ld=function(a){if(m(a.changedTouches)){var b=a.changedTouches[0];a=Jg(this.d);return[b.clientX-a.x,b.clientY-a.y]}b=this.d;a=Jg(a);b=Jg(b);b=new rf(a.x-b.x,a.y-b.y);return[b.x,b.y]};l.vc=function(){return this.get("target")};K.prototype.getTarget=K.prototype.vc;l=K.prototype;l.xe=function(){var a=this.vc();return m(a)?wf(a):null};-l.va=function(a){var b=this.e;if(null===b)return null;a=a.slice();return ij(b.pixelToCoordinateMatrix,a,a)};l.zh=function(){return this.l};l.Vh=function(){return this.n};l.Ih=function(){return this.k};l.Yb=function(){return this.get("layergroup")};K.prototype.getLayerGroup=K.prototype.Yb;K.prototype.ia=function(){return this.Yb().dc()};K.prototype.i=function(a){var b=this.e;if(null===b)return null;a=a.slice(0,2);return ij(b.coordinateToPixelMatrix,a,a)};K.prototype.j=function(){return this.get("size")};-K.prototype.getSize=K.prototype.j;K.prototype.c=function(){return this.get("view")};K.prototype.getView=K.prototype.c;l=K.prototype;l.ei=function(){return this.d};l.ci=function(a,b,d,e){var f=this.e;if(!(null!==f&&b in f.wantedTiles&&f.wantedTiles[b][kf(a.c)]))return Infinity;a=d[0]-f.focus[0];d=d[1]-f.focus[1];return 65536*Math.log(e)+Math.sqrt(a*a+d*d)/e};l.wf=function(a,b){var d=new wi(b||a.type,this,a);this.yf(d)};-l.yf=function(a){if(null!==this.e){this.ga=a.coordinate;a.frameState=this.e;var b=this.k.c,d;if(!1!==this.dispatchEvent(a))for(d=b.length-1;0<=d;d--){var e=b[d];if(e.c()&&!e.handleEvent(a))break}}};-l.Ji=function(){var a=this.e,b=this.ob;if(!b.pa()){var d=16,e=d,f=0;null!==a&&(f=a.viewHints,f[0]&&(d=this.Cc?8:0,e=2),f[1]&&(d=this.zc?8:0,e=2),f=pb(a.wantedTiles));d*=f;e*=f;if(b.e<d){Hj(b);d=Math.min(d-b.e,e,b.Xb());for(e=0;e<d;++e)f=Ej(b)[0],w(f,"change",b.k,!1,b),f.load();b.e+=d}}b=this.za;d=0;for(e=b.length;d<e;++d)b[d](this,a);b.length=0};l.Li=function(){this.render()};-l.Mi=function(){var a=this.vc(),a=m(a)?wf(a):null;Kh(this.J);null===a?Hf(this.d):(a.appendChild(this.d),Eh(this.J,null===this.ja?a:this.ja));this.u()};l.Bj=function(){this.render()};l.Ni=function(){this.render()};l.Cj=function(){null!==this.Z&&(Wc(this.Z),this.Z=null);var a=this.c();null!==a&&(this.Z=w(a,"propertychange",this.Ni,!1,this));this.render()};l.wi=function(){this.render()};l.xi=function(){this.render()};-l.vi=function(){if(null!==this.s){for(var a=this.s.length,b=0;b<a;++b)Wc(this.s[b]);this.s=null}a=this.Yb();null!=a&&(this.s=[w(a,"propertychange",this.xi,!1,this),w(a,"change",this.wi,!1,this)]);this.render()};l.Vl=function(){var a=this.v;kh(a);a.lf()};l.render=function(){null!=this.v.ea||this.v.start()};l.Pl=function(a){if(m(this.l.remove(a)))return a};l.Ql=function(a){var b;m(this.k.remove(a))&&(b=a);return b};l.Rl=function(a){return this.Yb().dc().remove(a)};l.Sl=function(a){if(m(this.n.remove(a)))return a};-l.Ul=function(a){var b,d,e,f=this.j(),g=this.c(),h=null;if(m(f)&&0<f[0]&&0<f[1]&&null!==g&&Ye(g)){var h=g.u.slice(),k=this.Yb().ab(),n={};b=0;for(d=k.length;b<d;++b)n[ma(k[b].layer)]=k[b];e=Xe(g);h={animate:!1,attributions:{},coordinateToPixelMatrix:this.Ac,extent:null,focus:null===this.ga?e.center:this.ga,index:this.Bc++,layerStates:n,layerStatesArray:k,logos:Ab(this.Dc),pixelRatio:this.Ec,pixelToCoordinateMatrix:this.ed,postRenderFunctions:[],size:f,skippedFeatureUids:this.ha,tileQueue:this.ob,-time:a,usedTiles:{},viewState:e,viewHints:h,wantedTiles:{}}}if(null!==h){a=this.R;b=f=0;for(d=a.length;b<d;++b)g=a[b],g(this,h)&&(a[f++]=g);a.length=f;h.extent=me(e.center,e.resolution,e.rotation,h.size)}this.e=h;this.t.$d(h);null!==h&&(h.animate&&this.render(),Array.prototype.push.apply(this.za,h.postRenderFunctions),0!==this.R.length||h.viewHints[0]||h.viewHints[1]||ce(h.extent,this.Ia)||(this.dispatchEvent(new Tg("moveend",this,h)),Xd(h.extent,this.Ia)));this.dispatchEvent(new Tg("postrender",-this,h));oh(this.Ji,this)};l.vg=function(a){this.set("layergroup",a)};K.prototype.setLayerGroup=K.prototype.vg;K.prototype.W=function(a){this.set("size",a)};K.prototype.setSize=K.prototype.W;K.prototype.ma=function(a){this.set("target",a)};K.prototype.setTarget=K.prototype.ma;K.prototype.Ja=function(a){this.set("view",a)};K.prototype.setView=K.prototype.Ja;K.prototype.ab=function(a){a=ma(a).toString();this.ha[a]=!0;this.render()};-K.prototype.u=function(){var a=this.vc(),a=m(a)?wf(a):null;if(null===a)this.W(void 0);else{var b=vf(a),d=Fb&&a.currentStyle;d&&Lf(tf(b))&&"auto"!=d.width&&"auto"!=d.height&&!d.boxSizing?(b=Ng(a,d.width,"width","pixelWidth"),a=Ng(a,d.height,"height","pixelHeight"),a=new sf(b,a)):(d=new sf(a.offsetWidth,a.offsetHeight),b=Pg(a,"padding"),a=Sg(a),a=new sf(d.width-a.left-b.left-b.right-a.right,d.height-a.top-b.top-b.bottom-a.bottom));this.W([a.width,a.height])}};-K.prototype.lc=function(a){a=ma(a).toString();delete this.ha[a];this.render()};-function Jo(a){var b=null;m(a.keyboardEventTarget)&&(b=ia(a.keyboardEventTarget)?document.getElementById(a.keyboardEventTarget):a.keyboardEventTarget);var d={},e={};if(!m(a.logo)||"boolean"==typeof a.logo&&a.logo)e["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszWWMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvYasvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvXH1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1VkbMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLPVcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqTacrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaarldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+HizeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDnBAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSFhYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJREFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxCBrb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7ahgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCnB3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC"]="http://openlayers.org/";-else{var f=a.logo;ia(f)?e[f]="":la(f)&&(e[f.src]=f.href)}f=a.layers instanceof G?a.layers:new G({layers:a.layers});d.layergroup=f;d.target=a.target;d.view=m(a.view)?a.view:new B;var f=yj,g;m(a.renderer)?ga(a.renderer)?g=a.renderer:ia(a.renderer)&&(g=[a.renderer]):g=Io;var h,k;h=0;for(k=g.length;h<k;++h){var n=g[h];if("canvas"==n){if(Zf){f=wn;break}}else if("dom"==n){f=En;break}else if("webgl"==n&&Vf){f=Eo;break}}var p;m(a.controls)?p=ga(a.controls)?new lg(a.controls.slice()):a.controls:p=ah();var q;-m(a.interactions)?q=ga(a.interactions)?new lg(a.interactions.slice()):a.interactions:q=Kl();a=m(a.overlays)?ga(a.overlays)?new lg(a.overlays.slice()):a.overlays:new lg;return{controls:p,interactions:q,keyboardEventTarget:b,logos:e,overlays:a,Wl:f,tm:d}}Rl();function L(a){qd.call(this);this.L=m(a.insertFirst)?a.insertFirst:!0;this.R=m(a.stopEvent)?a.stopEvent:!0;this.fa=Df("DIV");this.fa.style.position="absolute";this.J=m(a.autoPan)?a.autoPan:!1;this.k=m(a.autoPanAnimation)?a.autoPanAnimation:{};this.v=m(a.autoPanMargin)?a.autoPanMargin:20;this.c={dd:"",Gd:"",ae:"",be:"",visible:!0};this.j=null;w(this,ud("element"),this.oi,!1,this);w(this,ud("map"),this.Di,!1,this);w(this,ud("offset"),this.Fi,!1,this);w(this,ud("position"),this.Hi,!1,this);w(this,ud("positioning"),-this.Ii,!1,this);m(a.element)&&this.Qe(a.element);this.s(m(a.offset)?a.offset:[0,0]);this.t(m(a.positioning)?a.positioning:"top-left");m(a.position)&&this.i(a.position)}v(L,qd);L.prototype.d=function(){return this.get("element")};L.prototype.getElement=L.prototype.d;L.prototype.e=function(){return this.get("map")};L.prototype.getMap=L.prototype.e;L.prototype.l=function(){return this.get("offset")};L.prototype.getOffset=L.prototype.l;L.prototype.u=function(){return this.get("position")};-L.prototype.getPosition=L.prototype.u;L.prototype.n=function(){return this.get("positioning")};L.prototype.getPositioning=L.prototype.n;l=L.prototype;l.oi=function(){Ff(this.fa);var a=this.d();null!=a&&Ef(this.fa,a)};l.Di=function(){null!==this.j&&(Hf(this.fa),Wc(this.j),this.j=null);var a=this.e();null!=a&&(this.j=w(a,"postrender",this.render,!1,this),Ko(this),a=this.R?a.L:a.oa,this.L?Gf(a,this.fa,0):Ef(a,this.fa))};l.render=function(){Ko(this)};l.Fi=function(){Ko(this)};-l.Hi=function(){Ko(this);if(m(this.get("position"))&&this.J){var a=this.e();if(m(a)&&!fa(a.xe())){var b=Lo(a.xe(),a.j()),d=this.d(),e=d.offsetWidth,f=d.currentStyle||window.getComputedStyle(d),e=e+(parseInt(f.marginLeft,10)+parseInt(f.marginRight,10)),f=d.offsetHeight,g=d.currentStyle||window.getComputedStyle(d),f=f+(parseInt(g.marginTop,10)+parseInt(g.marginBottom,10)),h=Lo(d,[e,f]),d=this.v;Zd(b,h)||(e=h[0]-b[0],f=b[2]-h[2],g=h[1]-b[1],h=b[3]-h[3],b=[0,0],0>e?b[0]=e-d:0>f&&(b[0]=Math.abs(f)+d),-0>g?b[1]=g-d:0>h&&(b[1]=Math.abs(h)+d),0===b[0]&&0===b[1])||(d=a.c().d(),e=a.i(d),b=[e[0]+b[0],e[1]+b[1]],null!==this.k&&(this.k.source=d,a.Qa(df(this.k))),a.c().Ma(a.va(b)))}}};l.Ii=function(){Ko(this)};l.Qe=function(a){this.set("element",a)};L.prototype.setElement=L.prototype.Qe;L.prototype.setMap=function(a){this.set("map",a)};L.prototype.setMap=L.prototype.setMap;L.prototype.s=function(a){this.set("offset",a)};L.prototype.setOffset=L.prototype.s;L.prototype.i=function(a){this.set("position",a)};-L.prototype.setPosition=L.prototype.i;function Lo(a,b){var d=vf(a);Fg(a,"position");var e=new rf(0,0),f;f=d?vf(d):document;f=!Fb||Fb&&9<=Rb||Lf(tf(f))?f.documentElement:f.body;a!=f&&(f=Ig(a),d=Mf(tf(d)),e.x=f.left+d.x,e.y=f.top+d.y);return[e.x,e.y,e.x+b[0],e.y+b[1]]}L.prototype.t=function(a){this.set("positioning",a)};L.prototype.setPositioning=L.prototype.t;-function Ko(a){var b=a.e(),d=a.u();if(m(b)&&null!==b.e&&m(d)){var d=b.i(d),e=b.j(),b=a.fa.style,f=a.l(),g=a.n(),h=f[0],f=f[1];if("bottom-right"==g||"center-right"==g||"top-right"==g)""!==a.c.Gd&&(a.c.Gd=b.left=""),h=Math.round(e[0]-d[0]-h)+"px",a.c.ae!=h&&(a.c.ae=b.right=h);else{""!==a.c.ae&&(a.c.ae=b.right="");if("bottom-center"==g||"center-center"==g||"top-center"==g)h-=Kg(a.fa).width/2;h=Math.round(d[0]+h)+"px";a.c.Gd!=h&&(a.c.Gd=b.left=h)}if("bottom-left"==g||"bottom-center"==g||"bottom-right"==-g)""!==a.c.be&&(a.c.be=b.top=""),d=Math.round(e[1]-d[1]-f)+"px",a.c.dd!=d&&(a.c.dd=b.bottom=d);else{""!==a.c.dd&&(a.c.dd=b.bottom="");if("center-left"==g||"center-center"==g||"center-right"==g)f-=Kg(a.fa).height/2;d=Math.round(d[1]+f)+"px";a.c.be!=d&&(a.c.be=b.top=d)}a.c.visible||(Mg(a.fa,!0),a.c.visible=!0)}else a.c.visible&&(Mg(a.fa,!1),a.c.visible=!1)};function Mo(a){a=m(a)?a:{};this.i=m(a.collapsed)?a.collapsed:!0;this.k=m(a.collapsible)?a.collapsible:!0;this.k||(this.i=!1);var b=m(a.className)?a.className:"ol-overviewmap",d=m(a.tipLabel)?a.tipLabel:"Overview map",e=m(a.collapseLabel)?a.collapseLabel:"\u00ab";this.s=ia(e)?Af("SPAN",{},e):e;e=m(a.label)?a.label:"\u00bb";this.t=ia(e)?Af("SPAN",{},e):e;d=Af("BUTTON",{type:"button",title:d},this.k&&!this.i?this.s:this.t);w(d,"click",this.Kj,!1,this);w(d,["mouseout",uc],function(){this.blur()},!1);-var e=Af("DIV","ol-overviewmap-map"),f=this.e=new K({controls:new lg,interactions:new lg,target:e});m(a.layers)&&a.layers.forEach(function(a){f.df(a)},this);var g=Af("DIV","ol-overviewmap-box");this.n=new L({position:[0,0],positioning:"bottom-left",element:g});this.e.ef(this.n);b=Af("DIV",b+" ol-unselectable ol-control"+(this.i&&this.k?" ol-collapsed":"")+(this.k?"":" ol-uncollapsible"),e,d);Ug.call(this,{element:b,render:m(a.render)?a.render:No,target:a.target})}v(Mo,Ug);l=Mo.prototype;-l.setMap=function(a){var b=this.c;null===a&&null!==b&&Vc(b,ud("view"),this.Kf,!1,this);Mo.X.setMap.call(this,a);null!==a&&(0===this.e.ia().Mb()&&this.e.O("layergroup",a),Oo(this),w(a,ud("view"),this.Kf,!1,this),this.e.u(),Po(this))};function Oo(a){var b=a.c.c();null===b||a.e.c().O("rotation",b)}-function No(){var a=this.c,b=this.e;if(null!==a.e&&null!==b.e){var d=a.j(),a=a.c().k(d),e=b.j(),d=b.c().k(e),f=b.i(je(a)),b=b.i(he(a)),b=new sf(Math.abs(f[0]-b[0]),Math.abs(f[1]-b[1])),f=e[0],e=e[1];b.width<.1*f||b.height<.1*e||b.width>.75*f||b.height>.75*e?Po(this):Zd(d,a)||(a=this.e,d=this.c.c(),a.c().Ma(d.d()))}Qo(this)}l.Kf=function(){Oo(this)};function Po(a){var b=a.c;a=a.e;var d=b.j(),b=b.c().k(d),d=a.j();a=a.c();var e=Math.log(7.5)/Math.LN2;se(b,1/(.1*Math.pow(2,e/2)));a.re(b,d)}-function Qo(a){var b=a.c,d=a.e;if(null!==b.e&&null!==d.e){var e=b.j(),f=b.c(),g=d.c();d.j();var b=f.e(),h=a.n,d=a.n.d(),f=f.k(e),e=g.c(),g=ge(f),f=ie(f),k;a=a.c.c().d();m(a)&&(k=[g[0]-a[0],g[1]-a[1]],Ad(k,b),vd(k,a));h.i(k);null!=d&&(k=new sf(Math.abs((g[0]-f[0])/e),Math.abs((f[1]-g[1])/e)),b=Lf(tf(vf(d))),!Fb||Ob("10")||b&&Ob("8")?(d=d.style,Gb?d.MozBoxSizing="border-box":Hb?d.WebkitBoxSizing="border-box":d.boxSizing="border-box",d.width=Math.max(k.width,0)+"px",d.height=Math.max(k.height,0)+"px"):-(a=d.style,b?(b=Pg(d,"padding"),d=Sg(d),a.pixelWidth=k.width-d.left-b.left-b.right-d.right,a.pixelHeight=k.height-d.top-b.top-b.bottom-d.bottom):(a.pixelWidth=k.width,a.pixelHeight=k.height)))}}l.Kj=function(a){a.preventDefault();Ro(this)};function Ro(a){Ag(a.element,"ol-collapsed");a.i?If(a.s,a.t):If(a.t,a.s);a.i=!a.i;var b=a.e;a.i||null!==b.e||(b.u(),Po(a),Uc(b,"postrender",function(){Qo(this)},!1,a))}l.Jj=function(){return this.k};-l.Mj=function(a){this.k!==a&&(this.k=a,Ag(this.element,"ol-uncollapsible"),!a&&this.i&&Ro(this))};l.Lj=function(a){this.k&&this.i!==a&&Ro(this)};l.Ij=function(){return this.i};function So(a){a=m(a)?a:{};var b=m(a.className)?a.className:"ol-scale-line";this.k=Af("DIV",b+"-inner");this.fa=Af("DIV",b+" ol-unselectable",this.k);this.v=null;this.n=m(a.minWidth)?a.minWidth:64;this.e=!1;this.L=void 0;this.J="";this.i=null;Ug.call(this,{element:this.fa,render:m(a.render)?a.render:To,target:a.target});w(this,ud("units"),this.R,!1,this);this.t(a.units||"metric")}v(So,Ug);var Uo=[1,2,5];So.prototype.s=function(){return this.get("units")};So.prototype.getUnits=So.prototype.s;-function To(a){a=a.frameState;null===a?this.v=null:this.v=a.viewState;Vo(this)}So.prototype.R=function(){Vo(this)};So.prototype.t=function(a){this.set("units",a)};So.prototype.setUnits=So.prototype.t;-function Vo(a){var b=a.v;if(null===b)a.e&&(Mg(a.fa,!1),a.e=!1);else{var d=b.center,e=b.projection,b=e.ve(b.resolution,d),f=e.f,g=a.s();"degrees"!=f||"metric"!=g&&"imperial"!=g&&"us"!=g&&"nautical"!=g?"ft"!=f&&"m"!=f||"degrees"!=g?a.i=null:(null===a.i&&(a.i=ze(e,Ae("EPSG:4326"))),d=Math.cos(Yb(a.i(d)[1])),e=ve.radius,"ft"==f&&(e/=.3048),b*=180/(Math.PI*d*e)):(a.i=null,d=Math.cos(Yb(d[1])),b*=Math.PI*d*ve.radius/180);d=a.n*b;f="";"degrees"==g?d<1/60?(f="\u2033",b*=3600):1>d?(f="\u2032",b*=60):f="\u00b0":-"imperial"==g?.9144>d?(f="in",b/=.0254):1609.344>d?(f="ft",b/=.3048):(f="mi",b/=1609.344):"nautical"==g?(b/=1852,f="nm"):"metric"==g?1>d?(f="mm",b*=1E3):1E3>d?f="m":(f="km",b/=1E3):"us"==g&&(.9144>d?(f="in",b*=39.37):1609.344>d?(f="ft",b/=.30480061):(f="mi",b/=1609.3472));for(d=3*Math.floor(Math.log(a.n*b)/Math.log(10));;){e=Uo[d%3]*Math.pow(10,Math.floor(d/3));g=Math.round(e/b);if(isNaN(g)){Mg(a.fa,!1);a.e=!1;return}if(g>=a.n)break;++d}b=e+" "+f;a.J!=b&&(a.k.innerHTML=b,a.J=b);a.L!=g&&(a.k.style.width=-g+"px",a.L=g);a.e||(Mg(a.fa,!0),a.e=!0)}};function Wo(a){lc.call(this);this.f=a;this.c={}}v(Wo,lc);var Xo=[];Wo.prototype.Wa=function(a,b,d,e){ga(b)||(b&&(Xo[0]=b.toString()),b=Xo);for(var f=0;f<b.length;f++){var g=w(a,b[f],d||this.handleEvent,e||!1,this.f||this);if(!g)break;this.c[g.key]=g}return this};-Wo.prototype.Re=function(a,b,d,e,f){if(ga(b))for(var g=0;g<b.length;g++)this.Re(a,b[g],d,e,f);else d=d||this.handleEvent,f=f||this.f||this,d=Oc(d),e=!!e,b=Bc(a)?Ic(a.qb,String(b),d,e,f):a?(a=Qc(a))?Ic(a,b,d,e,f):null:null,b&&(Wc(b),delete this.c[b.key]);return this};function Yo(a){kb(a.c,Wc);a.c={}}Wo.prototype.T=function(){Wo.X.T.call(this);Yo(this)};Wo.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Zo(a,b,d){hd.call(this);this.target=a;this.handle=b||a;this.c=d||new Cg(NaN,NaN,NaN,NaN);this.d=vf(a);this.f=new Wo(this);oc(this,this.f);w(this.handle,["touchstart","mousedown"],this.vf,!1,this)}v(Zo,hd);var $o=Fb||Gb&&Ob("1.9.3");l=Zo.prototype;l.clientX=0;l.clientY=0;l.screenX=0;l.screenY=0;l.wg=0;l.xg=0;l.sc=0;l.tc=0;l.bc=!1;l.T=function(){Zo.X.T.call(this);Vc(this.handle,["touchstart","mousedown"],this.vf,!1,this);Yo(this.f);$o&&this.d.releaseCapture();this.handle=this.target=null};-l.vf=function(a){var b="mousedown"==a.type;if(this.bc||b&&!zc(a))this.dispatchEvent("earlycancel");else if(ap(a),this.dispatchEvent(new bp("start",this,a.clientX,a.clientY))){this.bc=!0;a.preventDefault();var b=this.d,d=b.documentElement,e=!$o;this.f.Wa(b,["touchmove","mousemove"],this.Ei,e);this.f.Wa(b,["touchend","mouseup"],this.zd,e);$o?(d.setCapture(!1),this.f.Wa(d,"losecapture",this.zd)):this.f.Wa(b?b.parentWindow||b.defaultView:window,"blur",this.zd);this.j&&this.f.Wa(this.j,"scroll",this.ml,-e);this.clientX=this.wg=a.clientX;this.clientY=this.xg=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;this.sc=this.target.offsetLeft;this.tc=this.target.offsetTop;this.e=Mf(tf(this.d));ta()}};l.zd=function(a){Yo(this.f);$o&&this.d.releaseCapture();if(this.bc){ap(a);this.bc=!1;var b=cp(this,this.sc),d=dp(this,this.tc);this.dispatchEvent(new bp("end",this,a.clientX,a.clientY,0,b,d))}else this.dispatchEvent("earlycancel")};-function ap(a){var b=a.type;"touchstart"==b||"touchmove"==b?xc(a,a.c.targetTouches[0],a.d):"touchend"!=b&&"touchcancel"!=b||xc(a,a.c.changedTouches[0],a.d)}-l.Ei=function(a){ap(a);var b=1*(a.clientX-this.clientX),d=a.clientY-this.clientY;this.clientX=a.clientX;this.clientY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;if(!this.bc){var e=this.wg-this.clientX,f=this.xg-this.clientY;if(0<e*e+f*f)if(this.dispatchEvent(new bp("start",this,a.clientX,a.clientY)))this.bc=!0;else{this.sa||this.zd(a);return}}d=ep(this,b,d);b=d.x;d=d.y;this.bc&&this.dispatchEvent(new bp("beforedrag",this,a.clientX,a.clientY,0,b,d))&&(fp(this,a,b,d),a.preventDefault())};-function ep(a,b,d){var e=Mf(tf(a.d));b+=e.x-a.e.x;d+=e.y-a.e.y;a.e=e;a.sc+=b;a.tc+=d;b=cp(a,a.sc);a=dp(a,a.tc);return new rf(b,a)}l.ml=function(a){var b=ep(this,0,0);a.clientX=this.clientX;a.clientY=this.clientY;fp(this,a,b.x,b.y)};function fp(a,b,d,e){a.target.style.left=d+"px";a.target.style.top=e+"px";a.dispatchEvent(new bp("drag",a,b.clientX,b.clientY,0,d,e))}-function cp(a,b){var d=a.c,e=isNaN(d.left)?null:d.left,d=isNaN(d.width)?0:d.width;return Math.min(null!=e?e+d:Infinity,Math.max(null!=e?e:-Infinity,b))}function dp(a,b){var d=a.c,e=isNaN(d.top)?null:d.top,d=isNaN(d.height)?0:d.height;return Math.min(null!=e?e+d:Infinity,Math.max(null!=e?e:-Infinity,b))}function bp(a,b,d,e,f,g,h){qc.call(this,a);this.clientX=d;this.clientY=e;this.left=m(g)?g:b.sc;this.top=m(h)?h:b.tc}v(bp,qc);function gp(a){a=m(a)?a:{};this.i=void 0;this.k=hp;this.n=null;this.s=!1;var b=m(a.className)?a.className:"ol-zoomslider",d=Af("DIV",[b+"-thumb","ol-unselectable"]),b=Af("DIV",[b,"ol-unselectable","ol-control"],d);this.e=new Zo(d);oc(this,this.e);w(this.e,"start",this.ni,!1,this);w(this.e,"drag",this.li,!1,this);w(this.e,"end",this.mi,!1,this);w(b,"click",this.ki,!1,this);w(d,"click",rc);Ug.call(this,{element:b,render:m(a.render)?a.render:ip})}v(gp,Ug);var hp=0;l=gp.prototype;-l.setMap=function(a){gp.X.setMap.call(this,a);null===a||a.render()};-function ip(a){if(null!==a.frameState){if(!this.s){var b=this.element,d=Kg(b),e=Jf(b),b=Pg(e,"margin"),f=new sf(e.offsetWidth,e.offsetHeight),e=f.width+b.right+b.left,b=f.height+b.top+b.bottom;this.n=[e,b];e=d.width-e;b=d.height-b;d.width>d.height?(this.k=1,d=new Cg(0,0,e,0)):(this.k=hp,d=new Cg(0,0,0,b));this.e.c=d||new Cg(NaN,NaN,NaN,NaN);this.s=!0}a=a.frameState.viewState.resolution;a!==this.i&&(this.i=a,a=1-We(this.c.c())(a),d=this.e,b=Jf(this.element),1==this.k?Gg(b,d.c.left+d.c.width*a):Gg(b,-d.c.left,d.c.top+d.c.height*a))}}l.ki=function(a){var b=this.c,d=b.c(),e=d.c();b.Qa(ff({resolution:e,duration:200,easing:$e}));a=jp(this,a.offsetX-this.n[0]/2,a.offsetY-this.n[1]/2);a=kp(this,a);d.j(d.constrainResolution(a))};l.ni=function(){Ze(this.c.c(),1)};l.li=function(a){a=jp(this,a.left,a.top);this.i=kp(this,a);this.c.c().j(this.i)};l.mi=function(){var a=this.c,b=a.c();Ze(b,-1);a.Qa(ff({resolution:this.i,duration:200,easing:$e}));a=b.constrainResolution(this.i);b.j(a)};-function jp(a,b,d){var e=a.e.c;return Vb(1===a.k?(b-e.left)/e.width:(d-e.top)/e.height,0,1)}function kp(a,b){return Ve(a.c.c())(1-b)};function lp(a){a=m(a)?a:{};this.e=m(a.extent)?a.extent:null;var b=m(a.className)?a.className:"ol-zoom-extent",d=Af("BUTTON",{type:"button",title:m(a.tipLabel)?a.tipLabel:"Fit to extent"},m(a.label)?a.label:"E");w(d,"click",this.i,!1,this);w(d,["mouseout",uc],function(){this.blur()},!1);b=Af("DIV",b+" ol-unselectable ol-control",d);Ug.call(this,{element:b,target:a.target})}v(lp,Ug);-lp.prototype.i=function(a){a.preventDefault();var b=this.c;a=b.c();var d=null===this.e?a.t.N():this.e,b=b.j();a.re(d,b)};function mp(a){qd.call(this);a=m(a)?a:{};this.c=null;w(this,ud("tracking"),this.n,!1,this);this.d(m(a.tracking)?a.tracking:!1)}v(mp,qd);mp.prototype.T=function(){this.d(!1);mp.X.T.call(this)};-mp.prototype.u=function(a){a=a.c;if(null!=a.alpha){var b=Yb(a.alpha);this.set("alpha",b);"boolean"==typeof a.absolute&&a.absolute?this.set("heading",b):null!=a.webkitCompassHeading&&null!=a.webkitCompassAccuracy&&-1!=a.webkitCompassAccuracy&&this.set("heading",Yb(a.webkitCompassHeading))}null!=a.beta&&this.set("beta",Yb(a.beta));null!=a.gamma&&this.set("gamma",Yb(a.gamma));this.p()};mp.prototype.j=function(){return this.get("alpha")};mp.prototype.getAlpha=mp.prototype.j;mp.prototype.i=function(){return this.get("beta")};-mp.prototype.getBeta=mp.prototype.i;mp.prototype.k=function(){return this.get("gamma")};mp.prototype.getGamma=mp.prototype.k;mp.prototype.l=function(){return this.get("heading")};mp.prototype.getHeading=mp.prototype.l;mp.prototype.e=function(){return this.get("tracking")};mp.prototype.getTracking=mp.prototype.e;mp.prototype.n=function(){if($f){var a=this.e();a&&null===this.c?this.c=w(ba,"deviceorientation",this.u,!1,this):a||null===this.c||(Wc(this.c),this.c=null)}};-mp.prototype.d=function(a){this.set("tracking",a)};mp.prototype.setTracking=mp.prototype.d;function np(a){qd.call(this);this.l=a;w(this.l,["change","input"],this.k,!1,this);w(this,ud("value"),this.n,!1,this);w(this,ud("checked"),this.i,!1,this)}v(np,qd);np.prototype.c=function(){return this.get("checked")};np.prototype.getChecked=np.prototype.c;np.prototype.d=function(){return this.get("value")};np.prototype.getValue=np.prototype.d;np.prototype.j=function(a){this.set("value",a)};np.prototype.setValue=np.prototype.j;np.prototype.e=function(a){this.set("checked",a)};-np.prototype.setChecked=np.prototype.e;np.prototype.k=function(){var a=this.l;"checkbox"===a.type||"radio"===a.type?this.e(a.checked):this.j(a.value)};np.prototype.i=function(){this.l.checked=this.c()};np.prototype.n=function(){this.l.value=this.d()};function N(a){qd.call(this);this.ea=void 0;this.d="geometry";this.k=null;this.c=void 0;this.i=null;w(this,ud(this.d),this.Ad,!1,this);m(a)&&(a instanceof kk||null===a?this.Xa(a):this.I(a))}v(N,qd);N.prototype.clone=function(){var a=new N(this.M());a.j(this.d);var b=this.V();null!=b&&a.Xa(b.clone());b=this.k;null===b||a.l(b);return a};N.prototype.V=function(){return this.get(this.d)};N.prototype.getGeometry=N.prototype.V;l=N.prototype;l.Hh=function(){return this.ea};l.Gh=function(){return this.d};-l.sj=function(){return this.k};l.tj=function(){return this.c};l.ui=function(){this.p()};l.Ad=function(){null!==this.i&&(Wc(this.i),this.i=null);var a=this.V();null!=a&&(this.i=w(a,"change",this.ui,!1,this),this.p())};l.Xa=function(a){this.set(this.d,a)};N.prototype.setGeometry=N.prototype.Xa;N.prototype.l=function(a){this.k=a;null===a?a=void 0:ka(a)||(a=ga(a)?a:[a],a=$c(a));this.c=a;this.p()};N.prototype.e=function(a){this.ea=a;this.p()};-N.prototype.j=function(a){Vc(this,ud(this.d),this.Ad,!1,this);this.d=a;w(this,ud(this.d),this.Ad,!1,this);this.Ad()};function op(a){a=m(a)?a:{};this.k=this.j=this.e=this.f=this.d=this.c=null;this.i=void 0;this.Jf(m(a.style)?a.style:tl);m(a.features)?ga(a.features)?this.Wc(new lg(a.features.slice())):this.Wc(a.features):this.Wc(new lg);m(a.map)&&this.setMap(a.map)}l=op.prototype;l.Hf=function(a){this.c.push(a)};l.mj=function(){return this.c};l.nj=function(){return this.e};l.If=function(){pp(this)};l.si=function(a){a=a.element;this.f[ma(a).toString()]=w(a,"change",this.If,!1,this);pp(this)};-l.ti=function(a){a=ma(a.element).toString();Wc(this.f[a]);delete this.f[a];pp(this)};l.qj=function(){pp(this)};l.rj=function(a){if(null!==this.c){var b=this.i;m(b)||(b=tl);var d=a.c;a=a.frameState;var e=a.viewState.resolution,f=Xm(e,a.pixelRatio),g,h,k,n;this.c.forEach(function(a){n=a.c;k=m(n)?n.call(a,e):b(a,e);if(null!=k)for(h=k.length,g=0;g<h;++g)Ym(d,a,k[g],f,this.qj,this)},this)}};l.Hd=function(a){this.c.remove(a)};function pp(a){null===a.e||a.e.render()}-l.Wc=function(a){null!==this.d&&(Pa(this.d,Wc),this.d=null);null!==this.f&&(Pa(qb(this.f),Wc),this.f=null);this.c=a;null!==a&&(this.d=[w(a,"add",this.si,!1,this),w(a,"remove",this.ti,!1,this)],this.f={},a.forEach(function(a){this.f[ma(a).toString()]=w(a,"change",this.If,!1,this)},this));pp(this)};l.setMap=function(a){null!==this.j&&(Wc(this.j),this.j=null);pp(this);this.e=a;null!==a&&(this.j=w(a,"postcompose",this.rj,!1,this),a.render())};l.Jf=function(a){this.k=a;this.i=sl(a);pp(this)};l.oj=function(){return this.k};-l.pj=function(){return this.i};function qp(){this.defaultDataProjection=null}function rp(a,b,d){var e;m(d)&&(e={dataProjection:m(d.dataProjection)?d.dataProjection:a.Oa(b),featureProjection:d.featureProjection});return sp(a,e)}function sp(a,b){var d;m(b)&&(d={featureProjection:b.featureProjection,dataProjection:null!=b.dataProjection?b.dataProjection:a.defaultDataProjection});return d}-function tp(a,b,d){var e=m(d)?Ae(d.featureProjection):null;d=m(d)?Ae(d.dataProjection):null;return null===e||null===d||Re(e,d)?a:a instanceof kk?(b?a.clone():a).transform(b?e:d,b?d:e):Ue(b?a.slice():a,b?e:d,b?d:e)};var up=ba.JSON.parse,vp=ba.JSON.stringify;function wp(){this.defaultDataProjection=null}v(wp,qp);function xp(a){return la(a)?a:ia(a)?(a=up(a),m(a)?a:null):null}l=wp.prototype;l.S=function(){return"json"};l.Rb=function(a,b){return yp(this,xp(a),rp(this,a,b))};l.qa=function(a,b){return this.d(xp(a),rp(this,a,b))};l.Uc=function(a,b){var d=xp(a),e=rp(this,a,b);return zp(d,e)};l.Oa=function(a){a=xp(a).crs;return null!=a?"name"==a.type?Ae(a.properties.name):"EPSG"==a.type?Ae("EPSG:"+a.properties.code):null:this.defaultDataProjection};-l.de=function(a,b){return vp(this.c(a,b))};l.Ub=function(a,b){return vp(this.e(a,b))};l.$c=function(a,b){return vp(this.j(a,b))};function Ap(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=Ae(null!=a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326");this.f=a.geometryName}v(Ap,wp);function zp(a,b){return null===a?null:tp((0,Bp[a.type])(a),!1,b)}-var Bp={Point:function(a){return new Ik(a.coordinates)},LineString:function(a){return new Nm(a.coordinates)},Polygon:function(a){return new F(a.coordinates)},MultiPoint:function(a){return new Sm(a.coordinates)},MultiLineString:function(a){return new Pm(a.coordinates)},MultiPolygon:function(a){return new Tm(a.coordinates)},GeometryCollection:function(a,b){var d=Ra(a.geometries,function(a){return zp(a,b)});return new Gm(d)}},Cp={Point:function(a){return{type:"Point",coordinates:a.U()}},LineString:function(a){return{type:"LineString",-coordinates:a.U()}},Polygon:function(a){return{type:"Polygon",coordinates:a.U()}},MultiPoint:function(a){return{type:"MultiPoint",coordinates:a.U()}},MultiLineString:function(a){return{type:"MultiLineString",coordinates:a.U()}},MultiPolygon:function(a){return{type:"MultiPolygon",coordinates:a.U()}},GeometryCollection:function(a,b){return{type:"GeometryCollection",geometries:Ra(a.e,function(a){return(0,Cp[a.S()])(tp(a,!0,b))})}},Circle:function(){return{type:"GeometryCollection",geometries:[]}}};-function yp(a,b,d){d=zp(b.geometry,d);var e=new N;m(a.f)&&e.j(a.f);e.Xa(d);m(b.id)&&e.e(b.id);m(b.properties)&&e.I(b.properties);return e}Ap.prototype.d=function(a,b){if("Feature"==a.type)return[yp(this,a,b)];if("FeatureCollection"==a.type){var d=[],e=a.features,f,g;f=0;for(g=e.length;f<g;++f)d.push(yp(this,e[f],b));return d}return[]};-Ap.prototype.c=function(a,b){b=sp(this,b);var d={type:"Feature"},e=a.ea;null!=e&&(d.id=e);e=a.V();null!=e&&(d.geometry=(0,Cp[e.S()])(tp(e,!0,b)));e=a.M();xb(e,a.d);vb(e)||(d.properties=e);return d};Ap.prototype.e=function(a,b){b=sp(this,b);var d=[],e,f;e=0;for(f=a.length;e<f;++e)d.push(this.c(a[e],b));return{type:"FeatureCollection",features:d}};Ap.prototype.j=function(a,b){return(0,Cp[a.S()])(tp(a,!0,sp(this,b)))};function Dp(a){if("undefined"!=typeof XMLSerializer)return(new XMLSerializer).serializeToString(a);if(a=a.xml)return a;throw Error("Your browser does not support serializing XML documents");};var Ep;a:if(document.implementation&&document.implementation.createDocument)Ep=document.implementation.createDocument("","",null);else{if("undefined"!=typeof ActiveXObject){var Fp=new ActiveXObject("MSXML2.DOMDocument");if(Fp){Fp.resolveExternals=!1;Fp.validateOnParse=!1;try{Fp.setProperty("ProhibitDTD",!0),Fp.setProperty("MaxXMLSize",2048),Fp.setProperty("MaxElementDepth",256)}catch(Gp){}}if(Fp){Ep=Fp;break a}}throw Error("Your browser does not support creating new documents");}var Hp=Ep;-function Ip(a,b){return Hp.createElementNS(a,b)}function Jp(a,b){null===a&&(a="");return Hp.createNode(1,b,a)}var Kp=document.implementation&&document.implementation.createDocument?Ip:Jp;function Lp(a,b){return Mp(a,b,[]).join("")}function Mp(a,b,d){if(4==a.nodeType||3==a.nodeType)b?d.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):d.push(a.nodeValue);else for(a=a.firstChild;null!==a;a=a.nextSibling)Mp(a,b,d);return d}function Np(a){return a.localName}-function Op(a){var b=a.localName;return m(b)?b:a.baseName}var Pp=Fb?Op:Np;function Qp(a){return a instanceof Document}function Rp(a){return la(a)&&9==a.nodeType}var Sp=Fb?Rp:Qp;function Tp(a){return a instanceof Node}function Up(a){return la(a)&&m(a.nodeType)}var Vp=Fb?Up:Tp;function Wp(a,b,d){return a.getAttributeNS(b,d)||""}function Xp(a,b,d){var e="";a=Yp(a,b,d);m(a)&&(e=a.nodeValue);return e}var Zp=document.implementation&&document.implementation.createDocument?Wp:Xp;-function $p(a,b,d){return a.getAttributeNodeNS(b,d)}function aq(a,b,d){var e=null;a=a.attributes;for(var f,g,h=0,k=a.length;h<k;++h)if(f=a[h],f.namespaceURI==b&&(g=f.prefix?f.prefix+":"+d:d,g==f.nodeName)){e=f;break}return e}var Yp=document.implementation&&document.implementation.createDocument?$p:aq;function bq(a,b,d,e){a.setAttributeNS(b,d,e)}function cq(a,b,d,e){null===b?a.setAttribute(d,e):(b=a.ownerDocument.createNode(2,d,b),b.nodeValue=e,a.setAttributeNode(b))}-var dq=document.implementation&&document.implementation.createDocument?bq:cq;function eq(a){return(new DOMParser).parseFromString(a,"application/xml")}function fq(a,b){return function(d,e){var f=a.call(b,d,e);m(f)&&$a(e[e.length-1],f)}}function gq(a,b){return function(d,e){var f=a.call(m(b)?b:this,d,e);m(f)&&e[e.length-1].push(f)}}function hq(a,b){return function(d,e){var f=a.call(m(b)?b:this,d,e);m(f)&&(e[e.length-1]=f)}}-function iq(a){return function(b,d){var e=a.call(m(void 0)?void 0:this,b,d);m(e)&&zb(d[d.length-1],m(void 0)?void 0:b.localName).push(e)}}function P(a,b){return function(d,e){var f=a.call(m(void 0)?void 0:this,d,e);m(f)&&(e[e.length-1][m(b)?b:d.localName]=f)}}function R(a,b,d){return jq(a,b,d)}function S(a,b){return function(d,e,f){a.call(m(b)?b:this,d,e,f);f[f.length-1].node.appendChild(d)}}-function kq(a){var b,d;return function(e,f,g){if(!m(b)){b={};var h={};h[e.localName]=a;b[e.namespaceURI]=h;d=lq(e.localName)}mq(b,d,f,g)}}function lq(a,b){return function(d,e,f){d=e[e.length-1].node;e=a;m(e)||(e=f);f=b;m(b)||(f=d.namespaceURI);return Kp(f,e)}}var nq=lq();function oq(a,b){for(var d=b.length,e=Array(d),f=0;f<d;++f)e[f]=a[b[f]];return e}function jq(a,b,d){d=m(d)?d:{};var e,f;e=0;for(f=a.length;e<f;++e)d[a[e]]=b;return d}-function pq(a,b,d,e){for(b=b.firstElementChild;null!==b;b=b.nextElementSibling){var f=a[b.namespaceURI];m(f)&&(f=f[b.localName],m(f)&&f.call(e,b,d))}}function T(a,b,d,e,f){e.push(a);pq(b,d,e,f);return e.pop()}function mq(a,b,d,e,f,g){for(var h=(m(f)?f:d).length,k,n,p=0;p<h;++p)k=d[p],m(k)&&(n=b.call(g,k,e,m(f)?f[p]:void 0),m(n)&&a[n.namespaceURI][n.localName].call(g,n,k,e))}function qq(a,b,d,e,f,g,h){f.push(a);mq(b,d,e,f,g,h);f.pop()};function rq(){this.defaultDataProjection=null}v(rq,qp);l=rq.prototype;l.S=function(){return"xml"};l.Rb=function(a,b){if(Sp(a))return sq(this,a,b);if(Vp(a))return this.hg(a,b);if(ia(a)){var d=eq(a);return sq(this,d,b)}return null};function sq(a,b,d){a=tq(a,b,d);return 0<a.length?a[0]:null}l.qa=function(a,b){if(Sp(a))return tq(this,a,b);if(Vp(a))return this.Sb(a,b);if(ia(a)){var d=eq(a);return tq(this,d,b)}return[]};-function tq(a,b,d){var e=[];for(b=b.firstChild;null!==b;b=b.nextSibling)1==b.nodeType&&$a(e,a.Sb(b,d));return e}l.Uc=function(a,b){if(Sp(a))return this.n(a,b);if(Vp(a)){var d=this.Wd(a,[rp(this,a,m(b)?b:{})]);return m(d)?d:null}return ia(a)?(d=eq(a),this.n(d,b)):null};l.Oa=function(a){return Sp(a)?this.Oe(a):Vp(a)?this.Zd(a):ia(a)?(a=eq(a),this.Oe(a)):null};l.Oe=function(){return this.defaultDataProjection};l.Zd=function(){return this.defaultDataProjection};l.de=function(a,b){var d=this.s(a,b);return Dp(d)};-l.Ub=function(a,b){var d=this.c(a,b);return Dp(d)};l.$c=function(a,b){var d=this.l(a,b);return Dp(d)};function uq(a){a=m(a)?a:{};this.featureType=a.featureType;this.featureNS=a.featureNS;this.srsName=a.srsName;this.schemaLocation="";this.f={};this.f["http://www.opengis.net/gml"]={featureMember:hq(uq.prototype.Ud),featureMembers:hq(uq.prototype.Ud)};this.defaultDataProjection=null}v(uq,rq);l=uq.prototype;-l.Ud=function(a,b){var d=Pp(a),e;if("FeatureCollection"==d)e=T(null,this.f,a,b,this);else if("featureMembers"==d||"featureMember"==d){e=b[0];var f=e.featureType;if(!m(f)&&null!==a.firstElementChild){var g=a.firstElementChild,f=g.nodeName.split(":").pop();e.featureType=f;e.featureNS=g.namespaceURI}var g={},h={};g[f]="featureMembers"==d?gq(this.Ke,this):hq(this.Ke,this);h[e.featureNS]=g;e=T([],h,a,b)}m(e)||(e=[]);return e};-l.Wd=function(a,b){var d=b[0];d.srsName=a.firstElementChild.getAttribute("srsName");var e=T(null,this.Xe,a,b,this);if(null!=e)return tp(e,!1,d)};-l.Ke=function(a,b){var d,e=a.getAttribute("fid")||Zp(a,"http://www.opengis.net/gml","id"),f={},g;for(d=a.firstElementChild;null!==d;d=d.nextElementSibling){var h=Pp(d);if(0===d.childNodes.length||1===d.childNodes.length&&3===d.firstChild.nodeType){var k=Lp(d,!1);/^[\s\xa0]*$/.test(k)&&(k=void 0);f[h]=k}else"boundedBy"!==h&&(g=h),f[h]=this.Wd(d,b)}d=new N(f);m(g)&&d.j(g);e&&d.e(e);return d};l.ng=function(a,b){var d=this.Vd(a,b);if(null!=d){var e=new Ik(null);Jk(e,"XYZ",d);return e}};-l.lg=function(a,b){var d=T([],this.Rg,a,b,this);if(m(d))return new Sm(d)};l.kg=function(a,b){var d=T([],this.Qg,a,b,this);if(m(d)){var e=new Pm(null);Rm(e,d);return e}};l.mg=function(a,b){var d=T([],this.Sg,a,b,this);if(m(d)){var e=new Tm(null);Vm(e,d);return e}};l.cg=function(a,b){pq(this.Vg,a,b,this)};l.Df=function(a,b){pq(this.Og,a,b,this)};l.dg=function(a,b){pq(this.Wg,a,b,this)};l.Xd=function(a,b){var d=this.Vd(a,b);if(null!=d){var e=new Nm(null);Om(e,"XYZ",d);return e}};-l.Cl=function(a,b){var d=T(null,this.bd,a,b,this);if(null!=d)return d};l.jg=function(a,b){var d=this.Vd(a,b);if(m(d)){var e=new Gk(null);Hk(e,"XYZ",d);return e}};l.Yd=function(a,b){var d=T([null],this.he,a,b,this);if(m(d)&&null!==d[0]){var e=new F(null),f=d[0],g=[f.length],h,k;h=1;for(k=d.length;h<k;++h)$a(f,d[h]),g.push(f.length);Uk(e,"XYZ",f,g);return e}};l.Vd=function(a,b){return T(null,this.bd,a,b,this)};l.Rg=Object({"http://www.opengis.net/gml":{pointMember:gq(uq.prototype.cg),pointMembers:gq(uq.prototype.cg)}});-l.Qg=Object({"http://www.opengis.net/gml":{lineStringMember:gq(uq.prototype.Df),lineStringMembers:gq(uq.prototype.Df)}});l.Sg=Object({"http://www.opengis.net/gml":{polygonMember:gq(uq.prototype.dg),polygonMembers:gq(uq.prototype.dg)}});l.Vg=Object({"http://www.opengis.net/gml":{Point:gq(uq.prototype.Vd)}});l.Og=Object({"http://www.opengis.net/gml":{LineString:gq(uq.prototype.Xd)}});l.Wg=Object({"http://www.opengis.net/gml":{Polygon:gq(uq.prototype.Yd)}});l.cd=Object({"http://www.opengis.net/gml":{LinearRing:hq(uq.prototype.Cl)}});-l.Sb=function(a,b){var d={featureType:this.featureType,featureNS:this.featureNS};m(b)&&Cb(d,rp(this,a,b));return this.Ud(a,[d])};l.Zd=function(a){return Ae(m(this.u)?this.u:a.firstElementChild.getAttribute("srsName"))};function vq(a){a=Lp(a,!1);return wq(a)}function wq(a){if(a=/^\s*(true|1)|(false|0)\s*$/.exec(a))return m(a[1])||!1}function xq(a){a=Lp(a,!1);if(a=/^\s*(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(Z|(?:([+\-])(\d{2})(?::(\d{2}))?))\s*$/.exec(a)){var b=Date.UTC(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10),parseInt(a[6],10))/1E3;if("Z"!=a[7]){var d="-"==a[8]?-1:1,b=b+60*d*parseInt(a[9],10);m(a[10])&&(b+=3600*d*parseInt(a[10],10))}return b}}-function yq(a){a=Lp(a,!1);return zq(a)}function zq(a){if(a=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(a))return parseFloat(a[1])}function Aq(a){a=Lp(a,!1);return Bq(a)}function Bq(a){if(a=/^\s*(\d+)\s*$/.exec(a))return parseInt(a[1],10)}function U(a){a=Lp(a,!1);return Aa(a)}function Cq(a,b){Dq(a,b?"1":"0")}function Eq(a,b){a.appendChild(Hp.createTextNode(b.toPrecision()))}function Fq(a,b){a.appendChild(Hp.createTextNode(b.toString()))}function Dq(a,b){a.appendChild(Hp.createTextNode(b))};function Gq(a){a=m(a)?a:{};uq.call(this,a);this.q=m(a.surface)?a.surface:!1;this.j=m(a.curve)?a.curve:!1;this.i=m(a.multiCurve)?a.multiCurve:!0;this.k=m(a.multiSurface)?a.multiSurface:!0;this.schemaLocation=m(a.schemaLocation)?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"}v(Gq,uq);l=Gq.prototype;l.Fl=function(a,b){var d=T([],this.Pg,a,b,this);if(m(d)){var e=new Pm(null);Rm(e,d);return e}};-l.Gl=function(a,b){var d=T([],this.Tg,a,b,this);if(m(d)){var e=new Tm(null);Vm(e,d);return e}};l.hf=function(a,b){pq(this.Lg,a,b,this)};l.yg=function(a,b){pq(this.Zg,a,b,this)};l.Jl=function(a,b){return T([null],this.Ug,a,b,this)};l.Ll=function(a,b){return T([null],this.Yg,a,b,this)};l.Kl=function(a,b){return T([null],this.he,a,b,this)};l.El=function(a,b){return T([null],this.bd,a,b,this)};l.Si=function(a,b){var d=T(void 0,this.cd,a,b,this);m(d)&&b[b.length-1].push(d)};-l.th=function(a,b){var d=T(void 0,this.cd,a,b,this);m(d)&&(b[b.length-1][0]=d)};l.og=function(a,b){var d=T([null],this.$g,a,b,this);if(m(d)&&null!==d[0]){var e=new F(null),f=d[0],g=[f.length],h,k;h=1;for(k=d.length;h<k;++h)$a(f,d[h]),g.push(f.length);Uk(e,"XYZ",f,g);return e}};l.fg=function(a,b){var d=T([null],this.Mg,a,b,this);if(m(d)){var e=new Nm(null);Om(e,"XYZ",d);return e}};l.Bl=function(a,b){var d=T([null],this.Ng,a,b,this);return Vd(d[1][0],d[1][1],d[2][0],d[2][1])};-l.Dl=function(a,b){for(var d=Lp(a,!1),e=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,f=[],g;g=e.exec(d);)f.push(parseFloat(g[1])),d=d.substr(g[0].length);if(""===d){d=b[0].srsName;e="enu";null===d||(e=ye(Ae(d)));if("neu"===e)for(d=0,e=f.length;d<e;d+=3)g=f[d],f[d]=f[d+1],f[d+1]=g;d=f.length;2==d&&f.push(0);return 0===d?void 0:f}};-l.Me=function(a,b){var d=Lp(a,!1).replace(/^\s*|\s*$/g,""),e=b[0].srsName,f=a.parentNode.getAttribute("srsDimension"),g="enu";null===e||(g=ye(Ae(e)));d=d.split(/\s+/);e=2;fa(a.getAttribute("srsDimension"))?fa(a.getAttribute("dimension"))?null===f||(e=Bq(f)):e=Bq(a.getAttribute("dimension")):e=Bq(a.getAttribute("srsDimension"));for(var h,k,n=[],p=0,q=d.length;p<q;p+=e)f=parseFloat(d[p]),h=parseFloat(d[p+1]),k=3===e?parseFloat(d[p+2]):0,"en"===g.substr(0,2)?n.push(f,h,k):n.push(h,f,k);return n};-l.bd=Object({"http://www.opengis.net/gml":{pos:hq(Gq.prototype.Dl),posList:hq(Gq.prototype.Me)}});l.he=Object({"http://www.opengis.net/gml":{interior:Gq.prototype.Si,exterior:Gq.prototype.th}});-l.Xe=Object({"http://www.opengis.net/gml":{Point:hq(uq.prototype.ng),MultiPoint:hq(uq.prototype.lg),LineString:hq(uq.prototype.Xd),MultiLineString:hq(uq.prototype.kg),LinearRing:hq(uq.prototype.jg),Polygon:hq(uq.prototype.Yd),MultiPolygon:hq(uq.prototype.mg),Surface:hq(Gq.prototype.og),MultiSurface:hq(Gq.prototype.Gl),Curve:hq(Gq.prototype.fg),MultiCurve:hq(Gq.prototype.Fl),Envelope:hq(Gq.prototype.Bl)}});l.Pg=Object({"http://www.opengis.net/gml":{curveMember:gq(Gq.prototype.hf),curveMembers:gq(Gq.prototype.hf)}});-l.Tg=Object({"http://www.opengis.net/gml":{surfaceMember:gq(Gq.prototype.yg),surfaceMembers:gq(Gq.prototype.yg)}});l.Lg=Object({"http://www.opengis.net/gml":{LineString:gq(uq.prototype.Xd),Curve:gq(Gq.prototype.fg)}});l.Zg=Object({"http://www.opengis.net/gml":{Polygon:gq(uq.prototype.Yd),Surface:gq(Gq.prototype.og)}});l.$g=Object({"http://www.opengis.net/gml":{patches:hq(Gq.prototype.Jl)}});l.Mg=Object({"http://www.opengis.net/gml":{segments:hq(Gq.prototype.Ll)}});-l.Ng=Object({"http://www.opengis.net/gml":{lowerCorner:gq(Gq.prototype.Me),upperCorner:gq(Gq.prototype.Me)}});l.Ug=Object({"http://www.opengis.net/gml":{PolygonPatch:hq(Gq.prototype.Kl)}});l.Yg=Object({"http://www.opengis.net/gml":{LineStringSegment:hq(Gq.prototype.El)}});function Hq(a,b,d){d=d[d.length-1].srsName;b=b.U();for(var e=b.length,f=Array(e),g,h=0;h<e;++h){g=b[h];var k=h,n="enu";null!=d&&(n=ye(Ae(d)));f[k]="en"===n.substr(0,2)?g[0]+" "+g[1]:g[1]+" "+g[0]}Dq(a,f.join(" "))}-l.Hg=function(a,b,d){var e=d[d.length-1].srsName;null!=e&&a.setAttribute("srsName",e);e=Kp(a.namespaceURI,"pos");a.appendChild(e);d=d[d.length-1].srsName;a="enu";null!=d&&(a=ye(Ae(d)));b=b.U();Dq(e,"en"===a.substr(0,2)?b[0]+" "+b[1]:b[1]+" "+b[0])};var Iq={"http://www.opengis.net/gml":{lowerCorner:S(Dq),upperCorner:S(Dq)}};l=Gq.prototype;-l.vm=function(a,b,d){var e=d[d.length-1].srsName;m(e)&&a.setAttribute("srsName",e);qq({node:a},Iq,nq,[b[0]+" "+b[1],b[2]+" "+b[3]],d,["lowerCorner","upperCorner"],this)};l.Eg=function(a,b,d){var e=d[d.length-1].srsName;null!=e&&a.setAttribute("srsName",e);e=Kp(a.namespaceURI,"posList");a.appendChild(e);Hq(e,b,d)};l.Xg=function(a,b){var d=b[b.length-1],e=d.node,f=d.exteriorWritten;m(f)||(d.exteriorWritten=!0);return Kp(e.namespaceURI,m(f)?"interior":"exterior")};-l.ge=function(a,b,d){var e=d[d.length-1].srsName;"PolygonPatch"!==a.nodeName&&null!=e&&a.setAttribute("srsName",e);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.pd(),qq({node:a,srsName:e},Jq,this.Xg,b,d,void 0,this)):"Surface"===a.nodeName&&(e=Kp(a.namespaceURI,"patches"),a.appendChild(e),a=Kp(e.namespaceURI,"PolygonPatch"),e.appendChild(a),this.ge(a,b,d))};-l.ce=function(a,b,d){var e=d[d.length-1].srsName;"LineStringSegment"!==a.nodeName&&null!=e&&a.setAttribute("srsName",e);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(e=Kp(a.namespaceURI,"posList"),a.appendChild(e),Hq(e,b,d)):"Curve"===a.nodeName&&(e=Kp(a.namespaceURI,"segments"),a.appendChild(e),a=Kp(e.namespaceURI,"LineStringSegment"),e.appendChild(a),this.ce(a,b,d))};-l.Gg=function(a,b,d){var e=d[d.length-1],f=e.srsName,e=e.surface;null!=f&&a.setAttribute("srsName",f);b=b.td();qq({node:a,srsName:f,surface:e},Kq,this.e,b,d,void 0,this)};l.zm=function(a,b,d){var e=d[d.length-1].srsName;null!=e&&a.setAttribute("srsName",e);b=b.Id();qq({node:a,srsName:e},Lq,lq("pointMember"),b,d,void 0,this)};l.Fg=function(a,b,d){var e=d[d.length-1],f=e.srsName,e=e.curve;null!=f&&a.setAttribute("srsName",f);b=b.Pc();qq({node:a,srsName:f,curve:e},Mq,this.e,b,d,void 0,this)};-l.Ig=function(a,b,d){var e=Kp(a.namespaceURI,"LinearRing");a.appendChild(e);this.Eg(e,b,d)};l.Jg=function(a,b,d){var e=this.d(b,d);m(e)&&(a.appendChild(e),this.ge(e,b,d))};l.Cm=function(a,b,d){var e=Kp(a.namespaceURI,"Point");a.appendChild(e);this.Hg(e,b,d)};l.Dg=function(a,b,d){var e=this.d(b,d);m(e)&&(a.appendChild(e),this.ce(e,b,d))};-l.fe=function(a,b,d){var e=d[d.length-1],f=Ab(e);f.node=a;var g;ga(b)?m(e.dataProjection)?g=Ue(b,e.featureProjection,e.dataProjection):g=b:g=tp(b,!0,e);qq(f,Nq,this.d,[g],d,void 0,this)};-l.Ag=function(a,b,d){var e=b.ea;m(e)&&a.setAttribute("fid",e);var e=d[d.length-1],f=e.featureNS,g=b.d;m(e.hc)||(e.hc={},e.hc[f]={});var h=b.M();b=[];var k=[],n;for(n in h){var p=h[n];null!==p&&(b.push(n),k.push(p),n==g?n in e.hc[f]||(e.hc[f][n]=S(this.fe,this)):n in e.hc[f]||(e.hc[f][n]=S(Dq)))}n=Ab(e);n.node=a;qq(n,e.hc,lq(void 0,f),k,d,b)};-var Kq={"http://www.opengis.net/gml":{surfaceMember:S(Gq.prototype.Jg),polygonMember:S(Gq.prototype.Jg)}},Lq={"http://www.opengis.net/gml":{pointMember:S(Gq.prototype.Cm)}},Mq={"http://www.opengis.net/gml":{lineStringMember:S(Gq.prototype.Dg),curveMember:S(Gq.prototype.Dg)}},Jq={"http://www.opengis.net/gml":{exterior:S(Gq.prototype.Ig),interior:S(Gq.prototype.Ig)}},Nq={"http://www.opengis.net/gml":{Curve:S(Gq.prototype.ce),MultiCurve:S(Gq.prototype.Fg),Point:S(Gq.prototype.Hg),MultiPoint:S(Gq.prototype.zm),-LineString:S(Gq.prototype.ce),MultiLineString:S(Gq.prototype.Fg),LinearRing:S(Gq.prototype.Eg),Polygon:S(Gq.prototype.ge),MultiPolygon:S(Gq.prototype.Gg),Surface:S(Gq.prototype.ge),MultiSurface:S(Gq.prototype.Gg),Envelope:S(Gq.prototype.vm)}},Oq={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};Gq.prototype.e=function(a,b){return Kp("http://www.opengis.net/gml",Oq[b[b.length-1].node.nodeName])};-Gq.prototype.d=function(a,b){var d=b[b.length-1],e=d.multiSurface,f=d.surface,g=d.curve,d=d.multiCurve,h;ga(a)?h="Envelope":(h=a.S(),"MultiPolygon"===h&&!0===e?h="MultiSurface":"Polygon"===h&&!0===f?h="Surface":"LineString"===h&&!0===g?h="Curve":"MultiLineString"===h&&!0===d&&(h="MultiCurve"));return Kp("http://www.opengis.net/gml",h)};-Gq.prototype.l=function(a,b){b=sp(this,b);var d=Kp("http://www.opengis.net/gml","geom"),e={node:d,srsName:this.srsName,curve:this.j,surface:this.q,multiSurface:this.k,multiCurve:this.i};m(b)&&Cb(e,b);this.fe(d,a,[e]);return d};-Gq.prototype.c=function(a,b){b=sp(this,b);var d=Kp("http://www.opengis.net/gml","featureMembers");dq(d,"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.schemaLocation);var e={srsName:this.srsName,curve:this.j,surface:this.q,multiSurface:this.k,multiCurve:this.i,featureNS:this.featureNS,featureType:this.featureType};m(b)&&Cb(e,b);var e=[e],f=e[e.length-1],g=f.featureType,h=f.featureNS,k={};k[h]={};k[h][g]=S(this.Ag,this);f=Ab(f);f.node=d;qq(f,k,lq(g,h),a,e);return d};function Pq(a){a=m(a)?a:{};uq.call(this,a);this.schemaLocation=m(a.schemaLocation)?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd"}v(Pq,uq);l=Pq.prototype;-l.ig=function(a,b){var d=Lp(a,!1).replace(/^\s*|\s*$/g,""),e=b[0].srsName,f=a.parentNode.getAttribute("srsDimension"),g="enu";null===e||(g=ye(Ae(e)));d=d.split(/[\s,]+/);e=2;fa(a.getAttribute("srsDimension"))?fa(a.getAttribute("dimension"))?null===f||(e=Bq(f)):e=Bq(a.getAttribute("dimension")):e=Bq(a.getAttribute("srsDimension"));for(var h,k,n=[],p=0,q=d.length;p<q;p+=e)f=parseFloat(d[p]),h=parseFloat(d[p+1]),k=3===e?parseFloat(d[p+2]):0,"en"===g.substr(0,2)?n.push(f,h,k):n.push(h,f,k);return n};-l.Al=function(a,b){var d=T([null],this.Kg,a,b,this);return Vd(d[1][0],d[1][1],d[1][3],d[1][4])};l.Qi=function(a,b){var d=T(void 0,this.cd,a,b,this);m(d)&&b[b.length-1].push(d)};l.nl=function(a,b){var d=T(void 0,this.cd,a,b,this);m(d)&&(b[b.length-1][0]=d)};l.bd=Object({"http://www.opengis.net/gml":{coordinates:hq(Pq.prototype.ig)}});l.he=Object({"http://www.opengis.net/gml":{innerBoundaryIs:Pq.prototype.Qi,outerBoundaryIs:Pq.prototype.nl}});l.Kg=Object({"http://www.opengis.net/gml":{coordinates:gq(Pq.prototype.ig)}});-l.Xe=Object({"http://www.opengis.net/gml":{Point:hq(uq.prototype.ng),MultiPoint:hq(uq.prototype.lg),LineString:hq(uq.prototype.Xd),MultiLineString:hq(uq.prototype.kg),LinearRing:hq(uq.prototype.jg),Polygon:hq(uq.prototype.Yd),MultiPolygon:hq(uq.prototype.mg),Box:hq(Pq.prototype.Al)}});function Qq(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=Ae("EPSG:4326");this.f=a.readExtensions}v(Qq,rq);var Rq=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"];function Sq(a,b,d){a.push(parseFloat(b.getAttribute("lon")),parseFloat(b.getAttribute("lat")));"ele"in d?(a.push(d.ele),xb(d,"ele")):a.push(0);"time"in d?(a.push(d.time),xb(d,"time")):a.push(0);return a}-function Tq(a,b){var d=b[b.length-1],e=a.getAttribute("href");null===e||(d.link=e);pq(Uq,a,b)}function Vq(a,b){b[b.length-1].extensionsNode_=a}function Wq(a,b){var d=b[0],e=T({flatCoordinates:[]},Xq,a,b);if(m(e)){var f=e.flatCoordinates;xb(e,"flatCoordinates");var g=new Nm(null);Om(g,"XYZM",f);tp(g,!1,d);d=new N(g);d.I(e);return d}}-function Yq(a,b){var d=b[0],e=T({flatCoordinates:[],ends:[]},Zq,a,b);if(m(e)){var f=e.flatCoordinates;xb(e,"flatCoordinates");var g=e.ends;xb(e,"ends");var h=new Pm(null);Qm(h,"XYZM",f,g);tp(h,!1,d);d=new N(h);d.I(e);return d}}function $q(a,b){var d=b[0],e=T({},ar,a,b);if(m(e)){var f=Sq([],a,e),f=new Ik(f,"XYZM");tp(f,!1,d);d=new N(f);d.I(e);return d}}-var br={rte:Wq,trk:Yq,wpt:$q},cr=R(Rq,{rte:gq(Wq),trk:gq(Yq),wpt:gq($q)}),Uq=R(Rq,{text:P(U,"linkText"),type:P(U,"linkType")}),Xq=R(Rq,{name:P(U),cmt:P(U),desc:P(U),src:P(U),link:Tq,number:P(Aq),extensions:Vq,type:P(U),rtept:function(a,b){var d=T({},dr,a,b);m(d)&&Sq(b[b.length-1].flatCoordinates,a,d)}}),dr=R(Rq,{ele:P(yq),time:P(xq)}),Zq=R(Rq,{name:P(U),cmt:P(U),desc:P(U),src:P(U),link:Tq,number:P(Aq),type:P(U),extensions:Vq,trkseg:function(a,b){var d=b[b.length-1];pq(er,a,b);d.ends.push(d.flatCoordinates.length)}}),-er=R(Rq,{trkpt:function(a,b){var d=T({},fr,a,b);m(d)&&Sq(b[b.length-1].flatCoordinates,a,d)}}),fr=R(Rq,{ele:P(yq),time:P(xq)}),ar=R(Rq,{ele:P(yq),time:P(xq),magvar:P(yq),geoidheight:P(yq),name:P(U),cmt:P(U),desc:P(U),src:P(U),link:Tq,sym:P(U),type:P(U),fix:P(U),sat:P(Aq),hdop:P(yq),vdop:P(yq),pdop:P(yq),ageofdgpsdata:P(yq),dgpsid:P(Aq),extensions:Vq});-function gr(a,b){null===b&&(b=[]);for(var d=0,e=b.length;d<e;++d){var f=b[d];if(m(a.f)){var g=f.get("extensionsNode_")||null;a.f(f,g)}f.set("extensionsNode_",void 0)}}Qq.prototype.hg=function(a,b){if(!Va(Rq,a.namespaceURI))return null;var d=br[a.localName];if(!m(d))return null;d=d(a,[rp(this,a,b)]);if(!m(d))return null;gr(this,[d]);return d};Qq.prototype.Sb=function(a,b){if(!Va(Rq,a.namespaceURI))return[];if("gpx"==a.localName){var d=T([],cr,a,[rp(this,a,b)]);if(m(d))return gr(this,d),d}return[]};-function hr(a,b,d){a.setAttribute("href",b);b=d[d.length-1].properties;qq({node:a},ir,nq,[b.linkText,b.linkType],d,jr)}function kr(a,b,d){var e=d[d.length-1],f=e.node.namespaceURI,g=e.properties;dq(a,null,"lat",b[1]);dq(a,null,"lon",b[0]);switch(e.geometryLayout){case "XYZM":0!==b[3]&&(g.time=b[3]);case "XYZ":0!==b[2]&&(g.ele=b[2]);break;case "XYM":0!==b[2]&&(g.time=b[2])}b=lr[f];e=oq(g,b);qq({node:a,properties:g},mr,nq,e,d,b)}-var jr=["text","type"],ir=jq(Rq,{text:S(Dq),type:S(Dq)}),nr=jq(Rq,"name cmt desc src link number type rtept".split(" ")),or=jq(Rq,{name:S(Dq),cmt:S(Dq),desc:S(Dq),src:S(Dq),link:S(hr),number:S(Fq),type:S(Dq),rtept:kq(S(kr))}),pr=jq(Rq,"name cmt desc src link number type trkseg".split(" ")),sr=jq(Rq,{name:S(Dq),cmt:S(Dq),desc:S(Dq),src:S(Dq),link:S(hr),number:S(Fq),type:S(Dq),trkseg:kq(S(function(a,b,d){qq({node:a,geometryLayout:b.c,properties:{}},qr,rr,b.U(),d)}))}),rr=lq("trkpt"),qr=jq(Rq,{trkpt:S(kr)}),-lr=jq(Rq,"ele time magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid".split(" ")),mr=jq(Rq,{ele:S(Eq),time:S(function(a,b){var d=new Date(1E3*b),d=d.getUTCFullYear()+"-"+La(d.getUTCMonth()+1)+"-"+La(d.getUTCDate())+"T"+La(d.getUTCHours())+":"+La(d.getUTCMinutes())+":"+La(d.getUTCSeconds())+"Z";a.appendChild(Hp.createTextNode(d))}),magvar:S(Eq),geoidheight:S(Eq),name:S(Dq),cmt:S(Dq),desc:S(Dq),src:S(Dq),link:S(hr),sym:S(Dq),type:S(Dq),fix:S(Dq),sat:S(Fq),-hdop:S(Eq),vdop:S(Eq),pdop:S(Eq),ageofdgpsdata:S(Eq),dgpsid:S(Fq)}),tr={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function ur(a,b){var d=a.V();if(m(d))return Kp(b[b.length-1].node.namespaceURI,tr[d.S()])}-var vr=jq(Rq,{rte:S(function(a,b,d){var e=d[0],f=b.M();a={node:a,properties:f};b=b.V();m(b)&&(b=tp(b,!0,e),a.geometryLayout=b.c,f.rtept=b.U());e=nr[d[d.length-1].node.namespaceURI];f=oq(f,e);qq(a,or,nq,f,d,e)}),trk:S(function(a,b,d){var e=d[0],f=b.M();a={node:a,properties:f};b=b.V();m(b)&&(b=tp(b,!0,e),f.trkseg=b.Pc());e=pr[d[d.length-1].node.namespaceURI];f=oq(f,e);qq(a,sr,nq,f,d,e)}),wpt:S(function(a,b,d){var e=d[0],f=d[d.length-1];f.properties=b.M();b=b.V();m(b)&&(b=tp(b,!0,e),f.geometryLayout=-b.c,kr(a,b.U(),d))})});Qq.prototype.c=function(a,b){b=sp(this,b);var d=Kp("http://www.topografix.com/GPX/1/1","gpx");qq({node:d},vr,ur,a,[b]);return d};function wr(a){a=xr(a);return Ra(a,function(a){return a.d.substring(a.f,a.c)})}function yr(a,b,d){this.d=a;this.f=b;this.c=d}function xr(a){for(var b=RegExp("\r\n|\r|\n","g"),d=0,e,f=[];e=b.exec(a);)d=new yr(a,d,e.index),f.push(d),d=b.lastIndex;d<a.length&&(d=new yr(a,d,a.length),f.push(d));return f};function zr(){this.defaultDataProjection=null}v(zr,qp);l=zr.prototype;l.S=function(){return"text"};l.Rb=function(a,b){return this.Tc(ia(a)?a:"",sp(this,b))};l.qa=function(a,b){return this.Le(ia(a)?a:"",sp(this,b))};l.Uc=function(a,b){return this.Vc(ia(a)?a:"",sp(this,b))};l.Oa=function(){return this.defaultDataProjection};l.de=function(a,b){return this.ee(a,sp(this,b))};l.Ub=function(a,b){return this.Bg(a,sp(this,b))};l.$c=function(a,b){return this.ad(a,sp(this,b))};function Ar(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=Ae("EPSG:4326");this.c=m(a.altitudeMode)?a.altitudeMode:"none"}v(Ar,zr);var Br=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Cr=/^H.([A-Z]{3}).*?:(.*)/,Dr=/^HFDTE(\d{2})(\d{2})(\d{2})/;-Ar.prototype.Tc=function(a,b){var d=this.c,e=wr(a),f={},g=[],h=2E3,k=0,n=1,p,q;p=0;for(q=e.length;p<q;++p){var r=e[p],s;if("B"==r.charAt(0)){if(s=Br.exec(r)){var r=parseInt(s[1],10),u=parseInt(s[2],10),z=parseInt(s[3],10),y=parseInt(s[4],10)+parseInt(s[5],10)/6E4;"S"==s[6]&&(y=-y);var A=parseInt(s[7],10)+parseInt(s[8],10)/6E4;"W"==s[9]&&(A=-A);g.push(A,y);"none"!=d&&g.push("gps"==d?parseInt(s[11],10):"barometric"==d?parseInt(s[12],10):0);g.push(Date.UTC(h,k,n,r,u,z)/1E3)}}else if("H"==r.charAt(0))if(s=-Dr.exec(r))n=parseInt(s[1],10),k=parseInt(s[2],10)-1,h=2E3+parseInt(s[3],10);else if(s=Cr.exec(r))f[s[1]]=Aa(s[2]),Dr.exec(r)}if(0===g.length)return null;e=new Nm(null);Om(e,"none"==d?"XYM":"XYZM",g);d=new N(tp(e,!1,b));d.I(f);return d};Ar.prototype.Le=function(a,b){var d=this.Tc(a,b);return null===d?[]:[d]};var Er=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Fr(a){if(Gr){Gr=!1;var b=ba.location;if(b){var d=b.href;if(d&&(d=(d=Fr(d)[3]||null)?decodeURI(d):d)&&d!=b.hostname)throw Gr=!0,Error();}}return a.match(Er)}var Gr=Hb;-function Hr(a,b){for(var d=a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null,h=null;0<=f?(g=d[e].substring(0,f),h=d[e].substring(f+1)):g=d[e];b(g,h?decodeURIComponent(h.replace(/\+/g," ")):"")}}function Ir(a){if(a[1]){var b=a[0],d=b.indexOf("#");0<=d&&(a.push(b.substr(d)),a[0]=b=b.substr(0,d));d=b.indexOf("?");0>d?a[1]="?":d==b.length-1&&(a[1]=void 0)}return a.join("")}-function Jr(a,b,d){if(ga(b))for(var e=0;e<b.length;e++)Jr(a,String(b[e]),d);else null!=b&&d.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function Kr(a,b){for(var d in b)Jr(d,b[d],a);return a};function Lr(a,b){var d;a instanceof Lr?(this.ac=m(b)?b:a.ac,Mr(this,a.Tb),this.jc=a.jc,this.wb=a.wb,Nr(this,a.xc),this.vb=a.vb,Or(this,a.c.clone()),this.Wb=a.Wb):a&&(d=Fr(String(a)))?(this.ac=!!b,Mr(this,d[1]||"",!0),this.jc=Pr(d[2]||""),this.wb=Pr(d[3]||"",!0),Nr(this,d[4]),this.vb=Pr(d[5]||"",!0),Or(this,d[6]||"",!0),this.Wb=Pr(d[7]||"")):(this.ac=!!b,this.c=new Qr(null,0,this.ac))}l=Lr.prototype;l.Tb="";l.jc="";l.wb="";l.xc=null;l.vb="";l.Wb="";l.ac=!1;-l.toString=function(){var a=[],b=this.Tb;b&&a.push(Rr(b,Sr,!0),":");if(b=this.wb){a.push("//");var d=this.jc;d&&a.push(Rr(d,Sr,!0),"@");a.push(encodeURIComponent(String(b)).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.xc;null!=b&&a.push(":",String(b))}if(b=this.vb)this.wb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Rr(b,"/"==b.charAt(0)?Tr:Ur,!0));(b=this.c.toString())&&a.push("?",b);(b=this.Wb)&&a.push("#",Rr(b,Vr));return a.join("")};l.clone=function(){return new Lr(this)};-function Mr(a,b,d){a.Tb=d?Pr(b,!0):b;a.Tb&&(a.Tb=a.Tb.replace(/:$/,""))}function Nr(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.xc=b}else a.xc=null}function Or(a,b,d){b instanceof Qr?(a.c=b,Wr(a.c,a.ac)):(d||(b=Rr(b,Xr)),a.c=new Qr(b,0,a.ac))}function Yr(a){return a instanceof Lr?a.clone():new Lr(a,void 0)}-function Zr(a,b){a instanceof Lr||(a=Yr(a));b instanceof Lr||(b=Yr(b));var d=a,e=b,f=d.clone(),g=!!e.Tb;g?Mr(f,e.Tb):g=!!e.jc;g?f.jc=e.jc:g=!!e.wb;g?f.wb=e.wb:g=null!=e.xc;var h=e.vb;if(g)Nr(f,e.xc);else if(g=!!e.vb)if("/"!=h.charAt(0)&&(d.wb&&!d.vb?h="/"+h:(d=f.vb.lastIndexOf("/"),-1!=d&&(h=f.vb.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=[],n=0;n<d.length;){var p=d[n++];"."==p?h&&n==d.length&&k.push(""):-".."==p?((1<k.length||1==k.length&&""!=k[0])&&k.pop(),h&&n==d.length&&k.push("")):(k.push(p),h=!0)}h=k.join("/")}else h=d;g?f.vb=h:g=""!==e.c.toString();g?Or(f,Pr(e.c.toString())):g=!!e.Wb;g&&(f.Wb=e.Wb);return f}function Pr(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Rr(a,b,d){return ia(a)?(a=encodeURI(a).replace(b,$r),d&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function $r(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}-var Sr=/[#\/\?@]/g,Ur=/[\#\?:]/g,Tr=/[\#\?]/g,Xr=/[\#\?@]/g,Vr=/#/g;function Qr(a,b,d){this.c=a||null;this.f=!!d}function as(a){a.ka||(a.ka=new uh,a.Ca=0,a.c&&Hr(a.c,function(b,d){a.add(decodeURIComponent(b.replace(/\+/g," ")),d)}))}l=Qr.prototype;l.ka=null;l.Ca=null;l.Xb=function(){as(this);return this.Ca};l.add=function(a,b){as(this);this.c=null;a=bs(this,a);var d=this.ka.get(a);d||this.ka.set(a,d=[]);d.push(b);this.Ca++;return this};-l.remove=function(a){as(this);a=bs(this,a);return wh(this.ka.f,a)?(this.c=null,this.Ca-=this.ka.get(a).length,this.ka.remove(a)):!1};l.clear=function(){this.ka=this.c=null;this.Ca=0};l.pa=function(){as(this);return 0==this.Ca};function cs(a,b){as(a);b=bs(a,b);return wh(a.ka.f,b)}l.K=function(){as(this);for(var a=this.ka.sb(),b=this.ka.K(),d=[],e=0;e<b.length;e++)for(var f=a[e],g=0;g<f.length;g++)d.push(b[e]);return d};-l.sb=function(a){as(this);var b=[];if(ia(a))cs(this,a)&&(b=Xa(b,this.ka.get(bs(this,a))));else{a=this.ka.sb();for(var d=0;d<a.length;d++)b=Xa(b,a[d])}return b};l.set=function(a,b){as(this);this.c=null;a=bs(this,a);cs(this,a)&&(this.Ca-=this.ka.get(a).length);this.ka.set(a,[b]);this.Ca++;return this};l.get=function(a,b){var d=a?this.sb(a):[];return 0<d.length?String(d[0]):b};function ds(a,b,d){a.remove(b);0<d.length&&(a.c=null,a.ka.set(bs(a,b),Za(d)),a.Ca+=d.length)}-l.toString=function(){if(this.c)return this.c;if(!this.ka)return"";for(var a=[],b=this.ka.K(),d=0;d<b.length;d++)for(var e=b[d],f=encodeURIComponent(String(e)),e=this.sb(e),g=0;g<e.length;g++){var h=f;""!==e[g]&&(h+="="+encodeURIComponent(String(e[g])));a.push(h)}return this.c=a.join("&")};l.clone=function(){var a=new Qr;a.c=this.c;this.ka&&(a.ka=this.ka.clone(),a.Ca=this.Ca);return a};function bs(a,b){var d=String(b);a.f&&(d=d.toLowerCase());return d}-function Wr(a,b){b&&!a.f&&(as(a),a.c=null,a.ka.forEach(function(a,b){var f=b.toLowerCase();b!=f&&(this.remove(b),ds(this,f,a))},a));a.f=b};function es(a){a=m(a)?a:{};this.e=a.font;this.j=a.rotation;this.f=a.scale;this.d=a.text;this.k=a.textAlign;this.q=a.textBaseline;this.c=m(a.fill)?a.fill:null;this.i=m(a.stroke)?a.stroke:null;this.l=m(a.offsetX)?a.offsetX:0;this.n=m(a.offsetY)?a.offsetY:0}l=es.prototype;l.Dh=function(){return this.e};l.Th=function(){return this.l};l.Uh=function(){return this.n};l.Yk=function(){return this.c};l.Zk=function(){return this.j};l.$k=function(){return this.f};l.al=function(){return this.i};l.bl=function(){return this.d};-l.ai=function(){return this.k};l.bi=function(){return this.q};l.$l=function(a){this.e=a};l.Zl=function(a){this.c=a};l.cl=function(a){this.j=a};l.dl=function(a){this.f=a};l.fm=function(a){this.i=a};l.gm=function(a){this.d=a};l.hm=function(a){this.k=a};l.im=function(a){this.q=a};function fs(a){function b(a){return ga(a)?a:ia(a)?(!(a in e)&&"#"+a in e&&(a="#"+a),b(e[a])):d}a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=Ae("EPSG:4326");var d=m(a.defaultStyle)?a.defaultStyle:gs,e={};this.d=m(a.extractStyles)?a.extractStyles:!0;this.f=e;this.e=function(){var a=this.get("Style");if(m(a))return a;a=this.get("styleUrl");return m(a)?b(a):d}}v(fs,rq);-var hs=["http://www.google.com/kml/ext/2.2"],is=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],js=[255,255,255,1],ks=new nl({color:js}),ls=[20,2],ms=[64,64],ns=new vj({anchor:ls,anchorOrigin:"bottom-left",anchorXUnits:"pixels",anchorYUnits:"pixels",crossOrigin:"anonymous",rotation:0,scale:.5,size:ms,src:"https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"}),os=new jl({color:js,width:1}),ps=new es({font:"normal 16px Helvetica",-fill:ks,stroke:os,scale:1}),gs=[new ql({fill:ks,image:ns,text:ps,stroke:os,zIndex:0})],qs={fraction:"fraction",pixels:"pixels"};function rs(a){a=Lp(a,!1);if(a=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(a))return a=a[1],[parseInt(a.substr(6,2),16),parseInt(a.substr(4,2),16),parseInt(a.substr(2,2),16),parseInt(a.substr(0,2),16)/255]}-function ss(a){a=Lp(a,!1);for(var b=[],d=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i,e;e=d.exec(a);)b.push(parseFloat(e[1]),parseFloat(e[2]),e[3]?parseFloat(e[3]):0),a=a.substr(e[0].length);return""!==a?void 0:b}function ts(a){var b=Lp(a,!1);return null!=a.baseURI?Zr(a.baseURI,Aa(b)).toString():Aa(b)}function us(a){a=yq(a);if(m(a))return Math.sqrt(a)}function vs(a,b){return T(null,ws,a,b)}-function xs(a,b){var d=T({o:[],zg:[]},ys,a,b);if(m(d)){var e=d.o,d=d.zg,f,g;f=0;for(g=Math.min(e.length,d.length);f<g;++f)e[4*f+3]=d[f];d=new Nm(null);Om(d,"XYZM",e);return d}}function zs(a,b){var d=T(null,As,a,b);if(m(d)){var e=new Nm(null);Om(e,"XYZ",d);return e}}function Bs(a,b){var d=T(null,As,a,b);if(m(d)){var e=new F(null);Uk(e,"XYZ",d,[d.length]);return e}}-function Cs(a,b){var d=T([],Ds,a,b);if(!m(d))return null;if(0===d.length)return new Gm(d);var e=!0,f=d[0].S(),g,h,k;h=1;for(k=d.length;h<k;++h)if(g=d[h],g.S()!=f){e=!1;break}if(e){if("Point"==f){g=d[0];e=g.c;f=g.o;h=1;for(k=d.length;h<k;++h)g=d[h],$a(f,g.o);d=new Sm(null);ok(d,e,f);d.p();return d}return"LineString"==f?(g=new Pm(null),Rm(g,d),g):"Polygon"==f?(g=new Tm(null),Vm(g,d),g):"GeometryCollection"==f?new Gm(d):null}return new Gm(d)}-function Es(a,b){var d=T(null,As,a,b);if(null!=d){var e=new Ik(null);Jk(e,"XYZ",d);return e}}function Fs(a,b){var d=T([null],Gs,a,b);if(null!=d&&null!==d[0]){var e=new F(null),f=d[0],g=[f.length],h,k;h=1;for(k=d.length;h<k;++h)$a(f,d[h]),g.push(f.length);Uk(e,"XYZ",f,g);return e}}-function Hs(a,b){var d=T({},Is,a,b);if(!m(d))return null;var e=yb(d,"fillStyle",ks),f=d.fill;m(f)&&!f&&(e=null);var f=yb(d,"imageStyle",ns),g=yb(d,"textStyle",ps),h=yb(d,"strokeStyle",os),d=d.outline;m(d)&&!d&&(h=null);return[new ql({fill:e,image:f,stroke:h,text:g,zIndex:void 0})]}function Js(a,b){pq(Ks,a,b)}-var Ls=R(is,{value:hq(U)}),Ks=R(is,{Data:function(a,b){var d=a.getAttribute("name");if(null!==d){var e=T(void 0,Ls,a,b);m(e)&&(b[b.length-1][d]=e)}},SchemaData:function(a,b){pq(Ms,a,b)}}),ws=R(is,{coordinates:hq(ss)}),Gs=R(is,{innerBoundaryIs:function(a,b){var d=T(void 0,Ns,a,b);m(d)&&b[b.length-1].push(d)},outerBoundaryIs:function(a,b){var d=T(void 0,Os,a,b);m(d)&&(b[b.length-1][0]=d)}}),ys=R(is,{when:function(a,b){var d=b[b.length-1].zg,e=Lp(a,!1);if(e=/^\s*(\d{4})($|-(\d{2})($|-(\d{2})($|T(\d{2}):(\d{2}):(\d{2})(Z|(?:([+\-])(\d{2})(?::(\d{2}))?)))))\s*$/.exec(e)){var f=-Date.UTC(parseInt(e[1],10),m(e[3])?parseInt(e[3],10)-1:0,m(e[5])?parseInt(e[5],10):1,m(e[7])?parseInt(e[7],10):0,m(e[8])?parseInt(e[8],10):0,m(e[9])?parseInt(e[9],10):0);if(m(e[10])&&"Z"!=e[10]){var g="-"==e[11]?-1:1,f=f+60*g*parseInt(e[12],10);m(e[13])&&(f+=3600*g*parseInt(e[13],10))}d.push(f)}else d.push(0)}},R(hs,{coord:function(a,b){var d=b[b.length-1].o,e=Lp(a,!1);(e=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(e))?-d.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]),0):d.push(0,0,0,0)}})),As=R(is,{coordinates:hq(ss)}),Ps=R(is,{href:P(ts)},R(hs,{x:P(yq),y:P(yq),w:P(yq),h:P(yq)})),Qs=R(is,{Icon:P(function(a,b){var d=T({},Ps,a,b);return m(d)?d:null}),heading:P(yq),hotSpot:P(function(a){var b=a.getAttribute("xunits"),d=a.getAttribute("yunits");return{x:parseFloat(a.getAttribute("x")),Ve:qs[b],y:parseFloat(a.getAttribute("y")),We:qs[d]}}),scale:P(us)}),Ns=R(is,{LinearRing:hq(vs)}),Rs=R(is,{color:P(rs),scale:P(us)}),-Ss=R(is,{color:P(rs),width:P(yq)}),Ds=R(is,{LineString:gq(zs),LinearRing:gq(Bs),MultiGeometry:gq(Cs),Point:gq(Es),Polygon:gq(Fs)}),Ts=R(hs,{Track:gq(xs)}),Vs=R(is,{ExtendedData:Js,Link:function(a,b){pq(Us,a,b)},address:P(U),description:P(U),name:P(U),open:P(vq),phoneNumber:P(U),visibility:P(vq)}),Us=R(is,{href:P(ts)}),Os=R(is,{LinearRing:hq(vs)}),Ws=R(is,{Style:P(Hs),key:P(U),styleUrl:P(function(a){var b=Aa(Lp(a,!1));return null!=a.baseURI?Zr(a.baseURI,b).toString():b})}),Ys=R(is,{ExtendedData:Js,-MultiGeometry:P(Cs,"geometry"),LineString:P(zs,"geometry"),LinearRing:P(Bs,"geometry"),Point:P(Es,"geometry"),Polygon:P(Fs,"geometry"),Style:P(Hs),StyleMap:function(a,b){var d=T(void 0,Xs,a,b);if(m(d)){var e=b[b.length-1];ga(d)?e.Style=d:ia(d)&&(e.styleUrl=d)}},address:P(U),description:P(U),name:P(U),open:P(vq),phoneNumber:P(U),styleUrl:P(ts),visibility:P(vq)},R(hs,{MultiTrack:P(function(a,b){var d=T([],Ts,a,b);if(m(d)){var e=new Pm(null);Rm(e,d);return e}},"geometry"),Track:P(xs,"geometry")})),Zs=-R(is,{color:P(rs),fill:P(vq),outline:P(vq)}),Ms=R(is,{SimpleData:function(a,b){var d=a.getAttribute("name");if(null!==d){var e=U(a);b[b.length-1][d]=e}}}),Is=R(is,{IconStyle:function(a,b){var d=T({},Qs,a,b);if(m(d)){var e=b[b.length-1],f=yb(d,"Icon",{}),g;g=f.href;g=m(g)?g:"https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png";var h,k,n,p=d.hotSpot;m(p)?(h=[p.x,p.y],k=p.Ve,n=p.We):"https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"===g?(h=ls,n=k="pixels"):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(g)&&-(h=[.5,0],n=k="fraction");var q,p=f.x,r=f.y;m(p)&&m(r)&&(q=[p,r]);var s,p=f.w,f=f.h;m(p)&&m(f)&&(s=[p,f]);var u,f=d.heading;m(f)&&(u=Yb(f));d=d.scale;"https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"==g&&(s=ms);h=new vj({anchor:h,anchorOrigin:"bottom-left",anchorXUnits:k,anchorYUnits:n,crossOrigin:"anonymous",offset:q,offsetOrigin:"bottom-left",rotation:u,scale:d,size:s,src:g});e.imageStyle=h}},LabelStyle:function(a,b){var d=T({},Rs,a,b);m(d)&&(b[b.length-1].textStyle=new es({fill:new nl({color:yb(d,-"color",js)}),scale:d.scale}))},LineStyle:function(a,b){var d=T({},Ss,a,b);m(d)&&(b[b.length-1].strokeStyle=new jl({color:yb(d,"color",js),width:yb(d,"width",1)}))},PolyStyle:function(a,b){var d=T({},Zs,a,b);if(m(d)){var e=b[b.length-1];e.fillStyle=new nl({color:yb(d,"color",js)});var f=d.fill;m(f)&&(e.fill=f);d=d.outline;m(d)&&(e.outline=d)}}}),Xs=R(is,{Pair:function(a,b){var d=T({},Ws,a,b);if(m(d)){var e=d.key;m(e)&&"normal"==e&&(e=d.styleUrl,m(e)&&(b[b.length-1]=e),d=d.Style,m(d)&&(b[b.length--1]=d))}}});l=fs.prototype;l.gg=function(a,b){Pp(a);var d=R(is,{Folder:fq(this.gg,this),Placemark:gq(this.Ne,this),Style:ra(this.Nl,this),StyleMap:ra(this.Ml,this)}),d=T([],d,a,b,this);if(m(d))return d};l.Ne=function(a,b){var d=T({geometry:null},Ys,a,b);if(m(d)){var e=new N,f=a.getAttribute("id");null===f||e.e(f);f=b[0];null!=d.geometry&&tp(d.geometry,!1,f);e.I(d);this.d&&e.l(this.e);return e}};-l.Nl=function(a,b){var d=a.getAttribute("id");if(null!==d){var e=Hs(a,b);m(e)&&(d=null!=a.baseURI?Zr(a.baseURI,"#"+d).toString():"#"+d,this.f[d]=e)}};l.Ml=function(a,b){var d=a.getAttribute("id");if(null!==d){var e=T(void 0,Xs,a,b);m(e)&&(d=null!=a.baseURI?Zr(a.baseURI,"#"+d).toString():"#"+d,this.f[d]=e)}};l.hg=function(a,b){if(!Va(is,a.namespaceURI))return null;var d=this.Ne(a,[rp(this,a,b)]);return m(d)?d:null};-l.Sb=function(a,b){if(!Va(is,a.namespaceURI))return[];var d;d=Pp(a);if("Document"==d||"Folder"==d)return d=this.gg(a,[rp(this,a,b)]),m(d)?d:[];if("Placemark"==d)return d=this.Ne(a,[rp(this,a,b)]),m(d)?[d]:[];if("kml"==d){d=[];var e;for(e=a.firstElementChild;null!==e;e=e.nextElementSibling){var f=this.Sb(e,b);m(f)&&$a(d,f)}return d}return[]};l.Hl=function(a){if(Sp(a))return $s(this,a);if(Vp(a))return at(this,a);if(ia(a))return a=eq(a),$s(this,a)};-function $s(a,b){var d;for(d=b.firstChild;null!==d;d=d.nextSibling)if(1==d.nodeType){var e=at(a,d);if(m(e))return e}}function at(a,b){var d;for(d=b.firstElementChild;null!==d;d=d.nextElementSibling)if(Va(is,d.namespaceURI)&&"name"==d.localName)return U(d);for(d=b.firstElementChild;null!==d;d=d.nextElementSibling){var e=Pp(d);if(Va(is,d.namespaceURI)&&("Document"==e||"Folder"==e||"Placemark"==e||"kml"==e)&&(e=at(a,d),m(e)))return e}}-l.Il=function(a){var b=[];Sp(a)?$a(b,bt(this,a)):Vp(a)?$a(b,ct(this,a)):ia(a)&&(a=eq(a),$a(b,bt(this,a)));return b};function bt(a,b){var d,e=[];for(d=b.firstChild;null!==d;d=d.nextSibling)1==d.nodeType&&$a(e,ct(a,d));return e}-function ct(a,b){var d,e=[];for(d=b.firstElementChild;null!==d;d=d.nextElementSibling)if(Va(is,d.namespaceURI)&&"NetworkLink"==d.localName){var f=T({},Vs,d,[]);e.push(f)}for(d=b.firstElementChild;null!==d;d=d.nextElementSibling)f=Pp(d),!Va(is,d.namespaceURI)||"Document"!=f&&"Folder"!=f&&"kml"!=f||$a(e,ct(a,d));return e}function dt(a,b){var d=qg(b),d=[255*(4==d.length?d[3]:1),d[2],d[1],d[0]],e;for(e=0;4>e;++e){var f=parseInt(d[e],10).toString(16);d[e]=1==f.length?"0"+f:f}Dq(a,d.join(""))}-function et(a,b,d){qq({node:a},ft,gt,[b],d)}function ht(a,b,d){var e={node:a};null!=b.ea&&a.setAttribute("id",b.ea);a=b.M();var f=b.c;m(f)&&(f=f.call(b,0),null!==f&&0<f.length&&(a.Style=f[0],f=f[0].f,null===f||(a.name=f.d)));f=it[d[d.length-1].node.namespaceURI];a=oq(a,f);qq(e,jt,nq,a,d,f);a=d[0];b=b.V();null!=b&&(b=tp(b,!0,a));qq(e,jt,kt,[b],d)}function lt(a,b,d){var e=b.o;a={node:a};a.layout=b.c;a.stride=b.H;qq(a,mt,nt,[e],d)}-function ot(a,b,d){b=b.pd();var e=b.shift();a={node:a};qq(a,pt,qt,b,d);qq(a,pt,rt,[e],d)}function st(a,b){Eq(a,b*b)}-var tt=jq(is,["Document","Placemark"]),wt=jq(is,{Document:S(function(a,b,d){qq({node:a},ut,vt,b,d)}),Placemark:S(ht)}),ut=jq(is,{Placemark:S(ht)}),xt={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry"},yt=jq(is,["href"],jq(hs,["x","y","w","h"])),zt=jq(is,{href:S(Dq)},jq(hs,{x:S(Eq),y:S(Eq),w:S(Eq),h:S(Eq)})),At=jq(is,["scale","heading","Icon","hotSpot"]),Ct=jq(is,{Icon:S(function(a,-b,d){a={node:a};var e=yt[d[d.length-1].node.namespaceURI],f=oq(b,e);qq(a,zt,nq,f,d,e);e=yt[hs[0]];f=oq(b,e);qq(a,zt,Bt,f,d,e)}),heading:S(Eq),hotSpot:S(function(a,b){a.setAttribute("x",b.x);a.setAttribute("y",b.y);a.setAttribute("xunits",b.Ve);a.setAttribute("yunits",b.We)}),scale:S(st)}),Dt=jq(is,["color","scale"]),Et=jq(is,{color:S(dt),scale:S(st)}),Ft=jq(is,["color","width"]),Gt=jq(is,{color:S(dt),width:S(Eq)}),ft=jq(is,{LinearRing:S(lt)}),Ht=jq(is,{LineString:S(lt),Point:S(lt),Polygon:S(ot)}),-it=jq(is,"name open visibility address phoneNumber description styleUrl Style".split(" ")),jt=jq(is,{MultiGeometry:S(function(a,b,d){a={node:a};var e=b.S(),f,g;"MultiPoint"==e?(f=b.Id(),g=It):"MultiLineString"==e?(f=b.Pc(),g=Jt):"MultiPolygon"==e&&(f=b.td(),g=Kt);qq(a,Ht,g,f,d)}),LineString:S(lt),LinearRing:S(lt),Point:S(lt),Polygon:S(ot),Style:S(function(a,b,d){a={node:a};var e={},f=b.j,g=b.d,h=b.i;b=b.f;null===h||(e.IconStyle=h);null===b||(e.LabelStyle=b);null===g||(e.LineStyle=g);null===f||(e.PolyStyle=-f);b=Lt[d[d.length-1].node.namespaceURI];e=oq(e,b);qq(a,Mt,nq,e,d,b)}),address:S(Dq),description:S(Dq),name:S(Dq),open:S(Cq),phoneNumber:S(Dq),styleUrl:S(Dq),visibility:S(Cq)}),mt=jq(is,{coordinates:S(function(a,b,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=b.length,k="";if(0<h){k+=b[0];for(e=1;e<f;++e)k+=","+b[e];for(g=d;g<h;g+=d)for(k+=" "+b[g],e=1;e<f;++e)k+=","+b[g+e]}Dq(a,k)})}),pt=jq(is,{outerBoundaryIs:S(et),innerBoundaryIs:S(et)}),-Nt=jq(is,{color:S(dt)}),Lt=jq(is,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Mt=jq(is,{IconStyle:S(function(a,b,d){a={node:a};var e={},f=b.kb(),g=b.od(),h={href:b.c.i};if(null!==f){h.w=f[0];h.h=f[1];var k=b.Ab(),n=b.Gb();null!==n&&null!==g&&0!==n[0]&&n[1]!==f[1]&&(h.x=n[0],h.y=g[1]-(n[1]+f[1]));null===k||0===k[0]||k[1]===f[1]||(e.hotSpot={x:k[0],Ve:"pixels",y:f[1]-k[1],We:"pixels"})}e.Icon=h;f=b.n;1!==f&&(e.scale=f);b=b.l;0!==b&&(e.heading=b);b=At[d[d.length-1].node.namespaceURI];e=oq(e,b);-qq(a,Ct,nq,e,d,b)}),LabelStyle:S(function(a,b,d){a={node:a};var e={},f=b.c;null===f||(e.color=f.c);b=b.f;m(b)&&1!==b&&(e.scale=b);b=Dt[d[d.length-1].node.namespaceURI];e=oq(e,b);qq(a,Et,nq,e,d,b)}),LineStyle:S(function(a,b,d){a={node:a};var e=Ft[d[d.length-1].node.namespaceURI];b=oq({color:b.c,width:b.f},e);qq(a,Gt,nq,b,d,e)}),PolyStyle:S(function(a,b,d){qq({node:a},Nt,Ot,[b.c],d)})});function Bt(a,b,d){return Kp(hs[0],"gx:"+d)}-function vt(a,b){return Kp(b[b.length-1].node.namespaceURI,"Placemark")}function kt(a,b){if(null!=a)return Kp(b[b.length-1].node.namespaceURI,xt[a.S()])}var Ot=lq("color"),nt=lq("coordinates"),qt=lq("innerBoundaryIs"),It=lq("Point"),Jt=lq("LineString"),gt=lq("LinearRing"),Kt=lq("Polygon"),rt=lq("outerBoundaryIs");-fs.prototype.c=function(a,b){b=sp(this,b);var d=Kp(is[4],"kml");dq(d,"http://www.w3.org/2000/xmlns/","xmlns:gx",hs[0]);dq(d,"http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");dq(d,"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var e={node:d},f={};1<a.length?f.Document=a:1==a.length&&(f.Placemark=a[0]);var g=tt[d.namespaceURI],f=oq(f,g);qq(e,wt,nq,f,[b],g);-return d};function Pt(){this.defaultDataProjection=null;this.defaultDataProjection=Ae("EPSG:4326")}v(Pt,rq);function Qt(a,b){b[b.length-1].Yc[a.getAttribute("k")]=a.getAttribute("v")}-var Rt=[null],St=R(Rt,{nd:function(a,b){b[b.length-1].uc.push(a.getAttribute("ref"))},tag:Qt}),Ut=R(Rt,{node:function(a,b){var d=b[0],e=b[b.length-1],f=a.getAttribute("id"),g=[parseFloat(a.getAttribute("lon")),parseFloat(a.getAttribute("lat"))];e.Gf[f]=g;var h=T({Yc:{}},Tt,a,b);vb(h.Yc)||(g=new Ik(g),tp(g,!1,d),d=new N(g),d.e(f),d.I(h.Yc),e.features.push(d))},way:function(a,b){for(var d=b[0],e=a.getAttribute("id"),f=T({uc:[],Yc:{}},St,a,b),g=b[b.length-1],h=[],k=0,n=f.uc.length;k<n;k++)$a(h,g.Gf[f.uc[k]]);-f.uc[0]==f.uc[f.uc.length-1]?(k=new F(null),Uk(k,"XY",h,[h.length])):(k=new Nm(null),Om(k,"XY",h));tp(k,!1,d);d=new N(k);d.e(e);d.I(f.Yc);g.features.push(d)}}),Tt=R(Rt,{tag:Qt});Pt.prototype.Sb=function(a,b){var d=rp(this,a,b);return"osm"==a.localName&&(d=T({Gf:{},features:[]},Ut,a,[d]),m(d.features))?d.features:[]};function Vt(a){return a.getAttributeNS("http://www.w3.org/1999/xlink","href")};function Wt(){}Wt.prototype.d=function(a){return Sp(a)?this.f(a):Vp(a)?this.c(a):ia(a)?(a=eq(a),this.f(a)):null};function Xt(){}v(Xt,Wt);Xt.prototype.f=function(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return this.c(a);return null};Xt.prototype.c=function(a){a=T({},Yt,a,[]);return m(a)?a:null};-var Zt=[null,"http://www.opengis.net/ows/1.1"],Yt=R(Zt,{ServiceIdentification:P(function(a,b){return T({},$t,a,b)}),ServiceProvider:P(function(a,b){return T({},au,a,b)}),OperationsMetadata:P(function(a,b){return T({},bu,a,b)})}),cu=R(Zt,{DeliveryPoint:P(U),City:P(U),AdministrativeArea:P(U),PostalCode:P(U),Country:P(U),ElectronicMailAddress:P(U)}),du=R(Zt,{Value:iq(function(a){return U(a)})}),eu=R(Zt,{AllowedValues:P(function(a,b){return T({},du,a,b)})}),gu=R(Zt,{Phone:P(function(a,b){return T({},-fu,a,b)}),Address:P(function(a,b){return T({},cu,a,b)})}),iu=R(Zt,{HTTP:P(function(a,b){return T({},hu,a,b)})}),hu=R(Zt,{Get:iq(function(a,b){var d=Vt(a);return m(d)?T({href:d},ju,a,b):void 0}),Post:void 0}),ku=R(Zt,{DCP:P(function(a,b){return T({},iu,a,b)})}),bu=R(Zt,{Operation:function(a,b){var d=a.getAttribute("name"),e=T({},ku,a,b);m(e)&&(b[b.length-1][d]=e)}}),fu=R(Zt,{Voice:P(U),Facsimile:P(U)}),ju=R(Zt,{Constraint:iq(function(a,b){var d=a.getAttribute("name");return m(d)?T({name:d},eu,a,b):-void 0})}),lu=R(Zt,{IndividualName:P(U),PositionName:P(U),ContactInfo:P(function(a,b){return T({},gu,a,b)})}),$t=R(Zt,{Title:P(U),ServiceTypeVersion:P(U),ServiceType:P(U)}),au=R(Zt,{ProviderName:P(U),ProviderSite:P(Vt),ServiceContact:P(function(a,b){return T({},lu,a,b)})});function mu(a,b,d,e){var f;m(e)?f=m(void 0)?void 0:0:(e=[],f=0);var g,h;for(g=0;g<b;)for(h=a[g++],e[f++]=a[g++],e[f++]=h,h=2;h<d;++h)e[f++]=a[g++];e.length=f};function nu(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=Ae("EPSG:4326");this.c=m(a.factor)?a.factor:1E5}v(nu,zr);function ou(a,b,d){d=m(d)?d:1E5;var e,f=Array(b);for(e=0;e<b;++e)f[e]=0;var g,h;g=0;for(h=a.length;g<h;)for(e=0;e<b;++e,++g){var k=a[g],n=k-f[e];f[e]=k;a[g]=n}return pu(a,d)}function qu(a,b,d){var e=m(d)?d:1E5,f=Array(b);for(d=0;d<b;++d)f[d]=0;a=ru(a,e);var g,e=0;for(g=a.length;e<g;)for(d=0;d<b;++d,++e)f[d]+=a[e],a[e]=f[d];return a}-function pu(a,b){var d=m(b)?b:1E5,e,f;e=0;for(f=a.length;e<f;++e)a[e]=Math.round(a[e]*d);d=0;for(e=a.length;d<e;++d)f=a[d],a[d]=0>f?~(f<<1):f<<1;d="";e=0;for(f=a.length;e<f;++e){for(var g=a[e],h=void 0,k="";32<=g;)h=(32|g&31)+63,k+=String.fromCharCode(h),g>>=5;h=g+63;k+=String.fromCharCode(h);d+=k}return d}-function ru(a,b){var d=m(b)?b:1E5,e=[],f=0,g=0,h,k;h=0;for(k=a.length;h<k;++h){var n=a.charCodeAt(h)-63,f=f|(n&31)<<g;32>n?(e.push(f),g=f=0):g+=5}f=0;for(g=e.length;f<g;++f)h=e[f],e[f]=h&1?~(h>>1):h>>1;f=0;for(g=e.length;f<g;++f)e[f]/=d;return e}l=nu.prototype;l.Tc=function(a,b){var d=this.Vc(a,b);return new N(d)};l.Le=function(a,b){return[this.Tc(a,b)]};l.Vc=function(a,b){var d=qu(a,2,this.c);mu(d,d.length,2,d);d=Ck(d,0,d.length,2);return tp(new Nm(d),!1,sp(this,b))};-l.ee=function(a,b){var d=a.V();return null!=d?this.ad(d,b):""};l.Bg=function(a,b){return this.ee(a[0],b)};l.ad=function(a,b){a=tp(a,!0,sp(this,b));var d=a.o,e=a.H;mu(d,d.length,e,d);return ou(d,e,this.c)};function su(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=Ae(null!=a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326")}v(su,wp);function tu(a,b){var d=[],e,f,g,h;g=0;for(h=a.length;g<h;++g)e=a[g],0<g&&d.pop(),0<=e?f=b[e]:f=b[~e].slice().reverse(),d.push.apply(d,f);e=0;for(f=d.length;e<f;++e)d[e]=d[e].slice();return d}function uu(a,b,d,e,f){a=a.geometries;var g=[],h,k;h=0;for(k=a.length;h<k;++h)g[h]=vu(a[h],b,d,e,f);return g}-function vu(a,b,d,e,f){var g=a.type,h=wu[g];b="Point"===g||"MultiPoint"===g?h(a,d,e):h(a,b);d=new N;d.Xa(tp(b,!1,f));m(a.id)&&d.e(a.id);m(a.properties)&&d.I(a.properties);return d}-su.prototype.d=function(a,b){if("Topology"==a.type){var d,e=null,f=null;m(a.transform)&&(d=a.transform,e=d.scale,f=d.translate);var g=a.arcs;if(m(d)){d=e;var h=f,k,n;k=0;for(n=g.length;k<n;++k)for(var p=g[k],q=d,r=h,s=0,u=0,z=void 0,y=void 0,A=void 0,y=0,A=p.length;y<A;++y)z=p[y],s+=z[0],u+=z[1],z[0]=s,z[1]=u,xu(z,q,r)}d=[];h=qb(a.objects);k=0;for(n=h.length;k<n;++k)"GeometryCollection"===h[k].type?(p=h[k],d.push.apply(d,uu(p,g,e,f,b))):(p=h[k],d.push(vu(p,g,e,f,b)));return d}return[]};-function xu(a,b,d){a[0]=a[0]*b[0]+d[0];a[1]=a[1]*b[1]+d[1]}su.prototype.Oa=function(){return this.defaultDataProjection};-var wu={Point:function(a,b,d){a=a.coordinates;null===b||null===d||xu(a,b,d);return new Ik(a)},LineString:function(a,b){var d=tu(a.arcs,b);return new Nm(d)},Polygon:function(a,b){var d=[],e,f;e=0;for(f=a.arcs.length;e<f;++e)d[e]=tu(a.arcs[e],b);return new F(d)},MultiPoint:function(a,b,d){a=a.coordinates;var e,f;if(null!==b&&null!==d)for(e=0,f=a.length;e<f;++e)xu(a[e],b,d);return new Sm(a)},MultiLineString:function(a,b){var d=[],e,f;e=0;for(f=a.arcs.length;e<f;++e)d[e]=tu(a.arcs[e],b);return new Pm(d)},-MultiPolygon:function(a,b){var d=[],e,f,g,h,k,n;k=0;for(n=a.arcs.length;k<n;++k){e=a.arcs[k];f=[];g=0;for(h=e.length;g<h;++g)f[g]=tu(e[g],b);d[k]=f}return new Tm(d)}};function yu(a){a=m(a)?a:{};this.j=a.featureType;this.d=a.featureNS;this.f=m(a.gmlFormat)?a.gmlFormat:new Gq;this.e=m(a.schemaLocation)?a.schemaLocation:"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";this.defaultDataProjection=null}v(yu,rq);yu.prototype.Sb=function(a,b){var d={featureType:this.j,featureNS:this.d};Cb(d,rp(this,a,m(b)?b:{}));d=[d];this.f.f["http://www.opengis.net/gml"].featureMember=gq(uq.prototype.Ud);d=T([],this.f.f,a,d,this.f);m(d)||(d=[]);return d};-yu.prototype.k=function(a){if(Sp(a))return zu(a);if(Vp(a))return T({},Au,a,[]);if(ia(a))return a=eq(a),zu(a)};yu.prototype.i=function(a){if(Sp(a))return Bu(this,a);if(Vp(a))return Cu(this,a);if(ia(a))return a=eq(a),Bu(this,a)};function Bu(a,b){for(var d=b.firstChild;null!==d;d=d.nextSibling)if(1==d.nodeType)return Cu(a,d)}var Du={"http://www.opengis.net/gml":{boundedBy:P(uq.prototype.Wd,"bounds")}};-function Cu(a,b){var d={},e=Bq(b.getAttribute("numberOfFeatures"));d.numberOfFeatures=e;return T(d,Du,b,[],a.f)}-var Eu={"http://www.opengis.net/wfs":{totalInserted:P(Aq),totalUpdated:P(Aq),totalDeleted:P(Aq)}},Fu={"http://www.opengis.net/ogc":{FeatureId:gq(function(a){return a.getAttribute("fid")})}},Gu={"http://www.opengis.net/wfs":{Feature:function(a,b){pq(Fu,a,b)}}},Au={"http://www.opengis.net/wfs":{TransactionSummary:P(function(a,b){return T({},Eu,a,b)},"transactionSummary"),InsertResults:P(function(a,b){return T([],Gu,a,b)},"insertIds")}};-function zu(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return T({},Au,a,[])}var Hu={"http://www.opengis.net/wfs":{PropertyName:S(Dq)}};function Iu(a,b){var d=Kp("http://www.opengis.net/ogc","Filter"),e=Kp("http://www.opengis.net/ogc","FeatureId");d.appendChild(e);e.setAttribute("fid",b);a.appendChild(d)}-var Ju={"http://www.opengis.net/wfs":{Insert:S(function(a,b,d){var e=d[d.length-1],e=Kp(e.featureNS,e.featureType);a.appendChild(e);Gq.prototype.Ag(e,b,d)}),Update:S(function(a,b,d){var e=d[d.length-1],f=e.featureType,g=e.featurePrefix,g=m(g)?g:"feature",h=e.featureNS;a.setAttribute("typeName",g+":"+f);dq(a,"http://www.w3.org/2000/xmlns/","xmlns:"+g,h);f=b.ea;if(m(f)){for(var g=b.K(),h=[],k=0,n=g.length;k<n;k++){var p=b.get(g[k]);m(p)&&h.push({name:g[k],value:p})}qq({node:a,srsName:e.srsName},Ju,-lq("Property"),h,d);Iu(a,f)}}),Delete:S(function(a,b,d){var e=d[d.length-1];d=e.featureType;var f=e.featurePrefix,f=m(f)?f:"feature",e=e.featureNS;a.setAttribute("typeName",f+":"+d);dq(a,"http://www.w3.org/2000/xmlns/","xmlns:"+f,e);b=b.ea;m(b)&&Iu(a,b)}),Property:S(function(a,b,d){var e=Kp("http://www.opengis.net/wfs","Name");a.appendChild(e);Dq(e,b.name);null!=b.value&&(e=Kp("http://www.opengis.net/wfs","Value"),a.appendChild(e),b.value instanceof kk?Gq.prototype.fe(e,b.value,d):Dq(e,b.value))}),-Native:S(function(a,b){m(b.um)&&a.setAttribute("vendorId",b.um);m(b.Xl)&&a.setAttribute("safeToIgnore",b.Xl);m(b.value)&&Dq(a,b.value)})}},Ku={"http://www.opengis.net/wfs":{Query:S(function(a,b,d){var e=d[d.length-1],f=e.featurePrefix,g=e.featureNS,h=e.propertyNames,k=e.srsName;a.setAttribute("typeName",(m(f)?f+":":"")+b);m(k)&&a.setAttribute("srsName",k);m(g)&&dq(a,"http://www.w3.org/2000/xmlns/","xmlns:"+f,g);b=Ab(e);b.node=a;qq(b,Hu,lq("PropertyName"),h,d);e=e.bbox;m(e)&&(h=Kp("http://www.opengis.net/ogc",-"Filter"),b=d[d.length-1].geometryName,f=Kp("http://www.opengis.net/ogc","BBOX"),h.appendChild(f),g=Kp("http://www.opengis.net/ogc","PropertyName"),Dq(g,b),f.appendChild(g),Gq.prototype.fe(f,e,d),a.appendChild(h))})}};-yu.prototype.q=function(a){var b=Kp("http://www.opengis.net/wfs","GetFeature");b.setAttribute("service","WFS");b.setAttribute("version","1.1.0");m(a)&&(m(a.handle)&&b.setAttribute("handle",a.handle),m(a.outputFormat)&&b.setAttribute("outputFormat",a.outputFormat),m(a.maxFeatures)&&b.setAttribute("maxFeatures",a.maxFeatures),m(a.resultType)&&b.setAttribute("resultType",a.resultType),m(a.mm)&&b.setAttribute("startIndex",a.mm),m(a.count)&&b.setAttribute("count",a.count));dq(b,"http://www.w3.org/2001/XMLSchema-instance",-"xsi:schemaLocation",this.e);var d=a.featureTypes;a=[{node:b,srsName:a.srsName,featureNS:m(a.featureNS)?a.featureNS:this.d,featurePrefix:a.featurePrefix,geometryName:a.geometryName,bbox:a.bbox,eg:m(a.eg)?a.eg:[]}];var e=Ab(a[a.length-1]);e.node=b;qq(e,Ku,lq("Query"),d,a);return b};-yu.prototype.u=function(a,b,d,e){var f=[],g=Kp("http://www.opengis.net/wfs","Transaction");g.setAttribute("service","WFS");g.setAttribute("version","1.1.0");var h,k;m(e)&&(h=m(e.gmlOptions)?e.gmlOptions:{},m(e.handle)&&g.setAttribute("handle",e.handle));dq(g,"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.e);null!=a&&(k={node:g,featureNS:e.featureNS,featureType:e.featureType,featurePrefix:e.featurePrefix},Cb(k,h),qq(k,Ju,lq("Insert"),a,f));null!=b&&(k={node:g,featureNS:e.featureNS,-featureType:e.featureType,featurePrefix:e.featurePrefix},Cb(k,h),qq(k,Ju,lq("Update"),b,f));null!=d&&qq({node:g,featureNS:e.featureNS,featureType:e.featureType,featurePrefix:e.featurePrefix},Ju,lq("Delete"),d,f);m(e.nativeElements)&&qq({node:g,featureNS:e.featureNS,featureType:e.featureType,featurePrefix:e.featurePrefix},Ju,lq("Native"),e.nativeElements,f);return g};yu.prototype.Oe=function(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return this.Zd(a);return null};-yu.prototype.Zd=function(a){if(null!=a.firstElementChild&&null!=a.firstElementChild.firstElementChild)for(a=a.firstElementChild.firstElementChild,a=a.firstElementChild;null!==a;a=a.nextElementSibling)if(0!==a.childNodes.length&&(1!==a.childNodes.length||3!==a.firstChild.nodeType)){var b=[{}];this.f.Wd(a,b);return Ae(b.pop().srsName)}return null};function Lu(a){a=m(a)?a:{};this.defaultDataProjection=null;this.c=m(a.splitCollection)?a.splitCollection:!1}v(Lu,zr);function Mu(a){a=a.U();return 0==a.length?"":a[0]+" "+a[1]}function Nu(a){a=a.U();for(var b=[],d=0,e=a.length;d<e;++d)b.push(a[d][0]+" "+a[d][1]);return b.join(",")}function Ou(a){var b=[];a=a.pd();for(var d=0,e=a.length;d<e;++d)b.push("("+Nu(a[d])+")");return b.join(",")}function Pu(a){var b=a.S();a=(0,Qu[b])(a);b=b.toUpperCase();return 0===a.length?b+" EMPTY":b+"("+a+")"}-var Qu={Point:Mu,LineString:Nu,Polygon:Ou,MultiPoint:function(a){var b=[];a=a.Id();for(var d=0,e=a.length;d<e;++d)b.push("("+Mu(a[d])+")");return b.join(",")},MultiLineString:function(a){var b=[];a=a.Pc();for(var d=0,e=a.length;d<e;++d)b.push("("+Nu(a[d])+")");return b.join(",")},MultiPolygon:function(a){var b=[];a=a.td();for(var d=0,e=a.length;d<e;++d)b.push("("+Ou(a[d])+")");return b.join(",")},GeometryCollection:function(a){var b=[];a=a.rf();for(var d=0,e=a.length;d<e;++d)b.push(Pu(a[d]));return b.join(",")}};-l=Lu.prototype;l.Tc=function(a,b){var d=this.Vc(a,b);if(m(d)){var e=new N;e.Xa(d);return e}return null};l.Le=function(a,b){var d=[],e=this.Vc(a,b);this.c&&"GeometryCollection"==e.S()?d=e.e:d=[e];for(var f=[],g=0,h=d.length;g<h;++g)e=new N,e.Xa(d[g]),f.push(e);return f};l.Vc=function(a,b){var d;d=new Ru(new Su(a));d.c=Tu(d.f);d=Uu(d);return m(d)?tp(d,!1,b):null};l.ee=function(a,b){var d=a.V();return m(d)?this.ad(d,b):""};-l.Bg=function(a,b){if(1==a.length)return this.ee(a[0],b);for(var d=[],e=0,f=a.length;e<f;++e)d.push(a[e].V());d=new Gm(d);return this.ad(d,b)};l.ad=function(a,b){return Pu(tp(a,!0,b))};function Su(a){this.f=a;this.c=-1}function Vu(a,b){var d=m(b)?b:!1;return"0"<=a&&"9">=a||"."==a&&!d}-function Tu(a){var b=a.f.charAt(++a.c),d={position:a.c,value:b};if("("==b)d.type=2;else if(","==b)d.type=5;else if(")"==b)d.type=3;else if(Vu(b)||"-"==b){d.type=4;var e,b=a.c,f=!1;do"."==e&&(f=!0),e=a.f.charAt(++a.c);while(Vu(e,f));a=parseFloat(a.f.substring(b,a.c--));d.value=a}else if("a"<=b&&"z">=b||"A"<=b&&"Z">=b){d.type=1;b=a.c;do e=a.f.charAt(++a.c);while("a"<=e&&"z">=e||"A"<=e&&"Z">=e);a=a.f.substring(b,a.c--).toUpperCase();d.value=a}else{if(" "==b||"\t"==b||"\r"==b||"\n"==b)return Tu(a);if(""===-b)d.type=6;else throw Error("Unexpected character: "+b);}return d}function Ru(a){this.f=a}l=Ru.prototype;l.match=function(a){if(a=this.c.type==a)this.c=Tu(this.f);return a};-function Uu(a){var b=a.c;if(a.match(1)){var d=b.value;if("GEOMETRYCOLLECTION"==d){a:{if(a.match(2)){b=[];do b.push(Uu(a));while(a.match(5));if(a.match(3)){a=b;break a}}else if(Wu(a)){a=[];break a}throw Error(Xu(a));}return new Gm(a)}var e=Yu[d],b=Zu[d];if(!m(e)||!m(b))throw Error("Invalid geometry type: "+d);a=e.call(a);return new b(a)}throw Error(Xu(a));}l.Ie=function(){if(this.match(2)){var a=$u(this);if(this.match(3))return a}else if(Wu(this))return null;throw Error(Xu(this));};-l.He=function(){if(this.match(2)){var a=av(this);if(this.match(3))return a}else if(Wu(this))return[];throw Error(Xu(this));};l.Je=function(){if(this.match(2)){var a=bv(this);if(this.match(3))return a}else if(Wu(this))return[];throw Error(Xu(this));};l.ql=function(){if(this.match(2)){var a;if(2==this.c.type)for(a=[this.Ie()];this.match(5);)a.push(this.Ie());else a=av(this);if(this.match(3))return a}else if(Wu(this))return[];throw Error(Xu(this));};-l.pl=function(){if(this.match(2)){var a=bv(this);if(this.match(3))return a}else if(Wu(this))return[];throw Error(Xu(this));};l.rl=function(){if(this.match(2)){for(var a=[this.Je()];this.match(5);)a.push(this.Je());if(this.match(3))return a}else if(Wu(this))return[];throw Error(Xu(this));};function $u(a){for(var b=[],d=0;2>d;++d){var e=a.c;if(a.match(4))b.push(e.value);else break}if(2==b.length)return b;throw Error(Xu(a));}function av(a){for(var b=[$u(a)];a.match(5);)b.push($u(a));return b}-function bv(a){for(var b=[a.He()];a.match(5);)b.push(a.He());return b}function Wu(a){var b=1==a.c.type&&"EMPTY"==a.c.value;b&&(a.c=Tu(a.f));return b}function Xu(a){return"Unexpected `"+a.c.value+"` at position "+a.c.position+" in `"+a.f.f+"`"}var Zu={POINT:Ik,LINESTRING:Nm,POLYGON:F,MULTIPOINT:Sm,MULTILINESTRING:Pm,MULTIPOLYGON:Tm},Yu={POINT:Ru.prototype.Ie,LINESTRING:Ru.prototype.He,POLYGON:Ru.prototype.Je,MULTIPOINT:Ru.prototype.ql,MULTILINESTRING:Ru.prototype.pl,MULTIPOLYGON:Ru.prototype.rl};function cv(){this.version=void 0}v(cv,Wt);cv.prototype.f=function(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return this.c(a);return null};cv.prototype.c=function(a){this.version=Aa(a.getAttribute("version"));a=T({version:this.version},dv,a,[]);return m(a)?a:null};function ev(a,b){return T({},fv,a,b)}function gv(a,b){return T({},hv,a,b)}function iv(a,b){var d=ev(a,b);if(m(d)){var e=[Bq(a.getAttribute("width")),Bq(a.getAttribute("height"))];d.size=e;return d}}-function jv(a,b){return T([],kv,a,b)}-var lv=[null,"http://www.opengis.net/wms"],dv=R(lv,{Service:P(function(a,b){return T({},mv,a,b)}),Capability:P(function(a,b){return T({},nv,a,b)})}),nv=R(lv,{Request:P(function(a,b){return T({},ov,a,b)}),Exception:P(function(a,b){return T([],pv,a,b)}),Layer:P(function(a,b){return T({},qv,a,b)})}),mv=R(lv,{Name:P(U),Title:P(U),Abstract:P(U),KeywordList:P(jv),OnlineResource:P(Vt),ContactInformation:P(function(a,b){return T({},rv,a,b)}),Fees:P(U),AccessConstraints:P(U),LayerLimit:P(Aq),MaxWidth:P(Aq),-MaxHeight:P(Aq)}),rv=R(lv,{ContactPersonPrimary:P(function(a,b){return T({},sv,a,b)}),ContactPosition:P(U),ContactAddress:P(function(a,b){return T({},tv,a,b)}),ContactVoiceTelephone:P(U),ContactFacsimileTelephone:P(U),ContactElectronicMailAddress:P(U)}),sv=R(lv,{ContactPerson:P(U),ContactOrganization:P(U)}),tv=R(lv,{AddressType:P(U),Address:P(U),City:P(U),StateOrProvince:P(U),PostCode:P(U),Country:P(U)}),pv=R(lv,{Format:gq(U)}),qv=R(lv,{Name:P(U),Title:P(U),Abstract:P(U),KeywordList:P(jv),CRS:iq(U),-EX_GeographicBoundingBox:P(function(a,b){var d=T({},uv,a,b);if(m(d)){var e=d.westBoundLongitude,f=d.southBoundLatitude,g=d.eastBoundLongitude,d=d.northBoundLatitude;return m(e)&&m(f)&&m(g)&&m(d)?[e,f,g,d]:void 0}}),BoundingBox:iq(function(a){var b=[zq(a.getAttribute("minx")),zq(a.getAttribute("miny")),zq(a.getAttribute("maxx")),zq(a.getAttribute("maxy"))],d=[zq(a.getAttribute("resx")),zq(a.getAttribute("resy"))];return{crs:a.getAttribute("CRS"),extent:b,res:d}}),Dimension:iq(function(a){return{name:a.getAttribute("name"),-units:a.getAttribute("units"),unitSymbol:a.getAttribute("unitSymbol"),"default":a.getAttribute("default"),multipleValues:wq(a.getAttribute("multipleValues")),nearestValue:wq(a.getAttribute("nearestValue")),current:wq(a.getAttribute("current")),values:U(a)}}),Attribution:P(function(a,b){return T({},vv,a,b)}),AuthorityURL:iq(function(a,b){var d=ev(a,b);if(m(d))return d.name=a.getAttribute("name"),d}),Identifier:iq(U),MetadataURL:iq(function(a,b){var d=ev(a,b);if(m(d))return d.type=a.getAttribute("type"),-d}),DataURL:iq(ev),FeatureListURL:iq(ev),Style:iq(function(a,b){return T({},wv,a,b)}),MinScaleDenominator:P(yq),MaxScaleDenominator:P(yq),Layer:iq(function(a,b){var d=b[b.length-1],e=T({},qv,a,b);if(m(e)){var f=wq(a.getAttribute("queryable"));m(f)||(f=d.queryable);e.queryable=m(f)?f:!1;f=Bq(a.getAttribute("cascaded"));m(f)||(f=d.cascaded);e.cascaded=f;f=wq(a.getAttribute("opaque"));m(f)||(f=d.opaque);e.opaque=m(f)?f:!1;f=wq(a.getAttribute("noSubsets"));m(f)||(f=d.noSubsets);e.noSubsets=m(f)?f:!1;-f=zq(a.getAttribute("fixedWidth"));m(f)||(f=d.fixedWidth);e.fixedWidth=f;f=zq(a.getAttribute("fixedHeight"));m(f)||(f=d.fixedHeight);e.fixedHeight=f;Pa(["Style","CRS","AuthorityURL"],function(a){var b=d[a];if(m(b)){var f=zb(e,a),f=f.concat(b);e[a]=f}});Pa("EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" "),function(a){m(e[a])||(e[a]=d[a])});return e}})}),vv=R(lv,{Title:P(U),OnlineResource:P(Vt),LogoURL:P(iv)}),uv=R(lv,{westBoundLongitude:P(yq),-eastBoundLongitude:P(yq),southBoundLatitude:P(yq),northBoundLatitude:P(yq)}),ov=R(lv,{GetCapabilities:P(gv),GetMap:P(gv),GetFeatureInfo:P(gv)}),hv=R(lv,{Format:iq(U),DCPType:iq(function(a,b){return T({},xv,a,b)})}),xv=R(lv,{HTTP:P(function(a,b){return T({},yv,a,b)})}),yv=R(lv,{Get:P(ev),Post:P(ev)}),wv=R(lv,{Name:P(U),Title:P(U),Abstract:P(U),LegendURL:iq(iv),StyleSheetURL:P(ev),StyleURL:P(ev)}),fv=R(lv,{Format:P(U),OnlineResource:P(Vt)}),kv=R(lv,{Keyword:gq(U)});function zv(){this.d="http://mapserver.gis.umn.edu/mapserver";this.f=new Pq;this.defaultDataProjection=null}v(zv,rq);-function Av(a,b,d){b.namespaceURI=a.d;var e=Pp(b),f=[];if(0===b.childNodes.length)return f;"msGMLOutput"==e&&Pa(b.childNodes,function(a){if(1===a.nodeType){var b=d[0],e=a.localName,n=RegExp,p;p="_layer".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08");n=new n(p,"");e=e.replace(n,"")+"_feature";b.featureType=e;b.featureNS=this.d;n={};n[e]=gq(this.f.Ke,this.f);b=R([b.featureNS,null],n);a.namespaceURI=this.d;a=T([],b,a,d,this.f);m(a)&&$a(f,a)}},a);"FeatureCollection"==e&&(a=T([],-a.f.f,b,[{}],a.f),m(a)&&(f=a));return f}zv.prototype.Sb=function(a,b){var d={featureType:this.featureType,featureNS:this.featureNS};m(b)&&Cb(d,rp(this,a,b));return Av(this,a,[d])};function Bv(){this.e=new Xt}v(Bv,Wt);Bv.prototype.f=function(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return this.c(a);return null};Bv.prototype.c=function(a){this.version=Aa(a.getAttribute("version"));var b=this.e.c(a);if(!m(b))return null;b.version=this.version;b=T(b,Cv,a,[]);return m(b)?b:null};function Dv(a){var b=U(a).split(" ");if(m(b)&&2==b.length)return a=+b[0],b=+b[1],isNaN(a)||isNaN(b)?void 0:[a,b]}-var Ev=[null,"http://www.opengis.net/wmts/1.0"],Fv=[null,"http://www.opengis.net/ows/1.1"],Cv=R(Ev,{Contents:P(function(a,b){return T({},Gv,a,b)})}),Gv=R(Ev,{Layer:iq(function(a,b){return T({},Hv,a,b)}),TileMatrixSet:iq(function(a,b){return T({},Iv,a,b)})}),Hv=R(Ev,{Style:iq(function(a,b){var d=T({},Jv,a,b);if(m(d)){var e="true"===a.getAttribute("isDefault");d.isDefault=e;return d}}),Format:iq(U),TileMatrixSetLink:iq(function(a,b){return T({},Kv,a,b)}),ResourceURL:iq(function(a){var b=a.getAttribute("format"),-d=a.getAttribute("template");a=a.getAttribute("resourceType");var e={};m(b)&&(e.format=b);m(d)&&(e.template=d);m(a)&&(e.resourceType=a);return e})},R(Fv,{Title:P(U),Abstract:P(U),WGS84BoundingBox:P(function(a,b){var d=T([],Lv,a,b);return 2!=d.length?void 0:Rd(d)}),Identifier:P(U)})),Jv=R(Ev,{LegendURL:iq(function(a){var b={};b.format=a.getAttribute("format");b.href=Vt(a);return b})},R(Fv,{Title:P(U),Identifier:P(U)})),Kv=R(Ev,{TileMatrixSet:P(U)}),Lv=R(Fv,{LowerCorner:gq(Dv),UpperCorner:gq(Dv)}),-Iv=R(Ev,{WellKnownScaleSet:P(U),TileMatrix:iq(function(a,b){return T({},Mv,a,b)})},R(Fv,{SupportedCRS:P(U),Identifier:P(U)})),Mv=R(Ev,{TopLeftCorner:P(Dv),ScaleDenominator:P(yq),TileWidth:P(Aq),TileHeight:P(Aq),MatrixWidth:P(Aq),MatrixHeight:P(Aq)},R(Fv,{Identifier:P(U)}));var Nv=new ue(6378137);function V(a){qd.call(this);a=m(a)?a:{};this.c=null;this.j=Te;this.e=void 0;w(this,ud("projection"),this.uj,!1,this);w(this,ud("tracking"),this.vj,!1,this);m(a.projection)&&this.n(Ae(a.projection));m(a.trackingOptions)&&this.u(a.trackingOptions);this.d(m(a.tracking)?a.tracking:!1)}v(V,qd);l=V.prototype;l.T=function(){this.d(!1);V.X.T.call(this)};l.uj=function(){var a=this.k();null!=a&&(this.j=ze(Ae("EPSG:4326"),a),null===this.c||this.set("position",this.j(this.c)))};-l.vj=function(){if(ag){var a=this.l();a&&!m(this.e)?this.e=ba.navigator.geolocation.watchPosition(ra(this.yl,this),ra(this.zl,this),this.i()):!a&&m(this.e)&&(ba.navigator.geolocation.clearWatch(this.e),this.e=void 0)}};-l.yl=function(a){a=a.coords;this.set("accuracy",a.accuracy);this.set("altitude",null===a.altitude?void 0:a.altitude);this.set("altitudeAccuracy",null===a.altitudeAccuracy?void 0:a.altitudeAccuracy);this.set("heading",null===a.heading?void 0:Yb(a.heading));null===this.c?this.c=[a.longitude,a.latitude]:(this.c[0]=a.longitude,this.c[1]=a.latitude);var b=this.j(this.c);this.set("position",b);this.set("speed",null===a.speed?void 0:a.speed);a=Xk(Nv,this.c,a.accuracy);a.ua(this.j);this.set("accuracyGeometry",-a);this.p()};l.zl=function(a){a.type="error";this.d(!1);this.dispatchEvent(a)};l.qf=function(){return this.get("accuracy")};V.prototype.getAccuracy=V.prototype.qf;V.prototype.s=function(){return this.get("accuracyGeometry")||null};V.prototype.getAccuracyGeometry=V.prototype.s;V.prototype.t=function(){return this.get("altitude")};V.prototype.getAltitude=V.prototype.t;V.prototype.v=function(){return this.get("altitudeAccuracy")};V.prototype.getAltitudeAccuracy=V.prototype.v;V.prototype.L=function(){return this.get("heading")};-V.prototype.getHeading=V.prototype.L;V.prototype.R=function(){return this.get("position")};V.prototype.getPosition=V.prototype.R;V.prototype.k=function(){return this.get("projection")};V.prototype.getProjection=V.prototype.k;V.prototype.J=function(){return this.get("speed")};V.prototype.getSpeed=V.prototype.J;V.prototype.l=function(){return this.get("tracking")};V.prototype.getTracking=V.prototype.l;V.prototype.i=function(){return this.get("trackingOptions")};V.prototype.getTrackingOptions=V.prototype.i;-V.prototype.n=function(a){this.set("projection",a)};V.prototype.setProjection=V.prototype.n;V.prototype.d=function(a){this.set("tracking",a)};V.prototype.setTracking=V.prototype.d;V.prototype.u=function(a){this.set("trackingOptions",a)};V.prototype.setTrackingOptions=V.prototype.u;function Ov(a,b,d){for(var e=[],f=a(0),g=a(1),h=b(f),k=b(g),n=[g,f],p=[k,h],q=[1,0],r={},s=1E5,u,z,y,A,D;0<--s&&0<q.length;)y=q.pop(),f=n.pop(),h=p.pop(),g=y.toString(),g in r||(e.push(h[0],h[1]),r[g]=!0),A=q.pop(),g=n.pop(),k=p.pop(),D=(y+A)/2,u=a(D),z=b(u),sk(z[0],z[1],h[0],h[1],k[0],k[1])<d?(e.push(k[0],k[1]),g=A.toString(),r[g]=!0):(q.push(A,D,D,y),p.push(k,z,z,h),n.push(g,u,u,f));return e}function Pv(a,b,d,e,f){var g=Ae("EPSG:4326");return Ov(function(e){return[a,b+(d-b)*e]},Se(g,e),f)}-function Qv(a,b,d,e,f){var g=Ae("EPSG:4326");return Ov(function(e){return[b+(d-b)*e,a]},Se(g,e),f)};function Rv(a){a=m(a)?a:{};this.q=this.k=null;this.e=this.d=Infinity;this.i=this.j=-Infinity;this.v=m(a.targetSize)?a.targetSize:100;this.s=m(a.maxLines)?a.maxLines:100;this.c=[];this.f=[];this.t=m(a.strokeStyle)?a.strokeStyle:Sv;this.u=this.l=void 0;this.n=null;this.setMap(m(a.map)?a.map:null)}var Sv=new jl({color:"rgba(0,0,0,0.2)"}),Tv=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001];-function Uv(a,b,d,e,f){var g=f;b=Pv(b,a.j,a.d,a.q,d);g=m(a.c[g])?a.c[g]:new Nm(null);Om(g,"XY",b);pe(g.N(),e)&&(a.c[f++]=g);return f}function Vv(a,b,d,e,f){var g=f;b=Qv(b,a.i,a.e,a.q,d);g=m(a.f[g])?a.f[g]:new Nm(null);Om(g,"XY",b);pe(g.N(),e)&&(a.f[f++]=g);return f}l=Rv.prototype;l.wj=function(){return this.k};l.Rh=function(){return this.c};l.Wh=function(){return this.f};-l.Af=function(a){var b=a.vectorContext,d=a.frameState;a=d.extent;var e=d.viewState,f=e.center,g=e.projection,e=e.resolution,d=d.pixelRatio,d=e*e/(4*d*d);if(null===this.q||!Re(this.q,g)){var h=g.N(),k=g.e,n=k[2],p=k[1],q=k[0];this.d=k[3];this.e=n;this.j=p;this.i=q;k=Ae("EPSG:4326");this.l=Se(k,g);this.u=Se(g,k);this.n=this.u(ke(h));this.q=g}for(var g=this.n[0],h=this.n[1],k=-1,r,p=Math.pow(this.v*e,2),q=[],s=[],e=0,n=Tv.length;e<n;++e){r=Tv[e]/2;q[0]=g-r;q[1]=h-r;s[0]=g+r;s[1]=h+r;this.l(q,q);this.l(s,-s);r=Math.pow(s[0]-q[0],2)+Math.pow(s[1]-q[1],2);if(r<=p)break;k=Tv[e]}e=k;if(-1==e)this.c.length=this.f.length=0;else{g=this.u(f);f=g[0];g=g[1];h=this.s;f=Math.floor(f/e)*e;p=Vb(f,this.i,this.e);n=Uv(this,p,d,a,0);for(k=0;p!=this.i&&k++<h;)p=Math.max(p-e,this.i),n=Uv(this,p,d,a,n);p=Vb(f,this.i,this.e);for(k=0;p!=this.e&&k++<h;)p=Math.min(p+e,this.e),n=Uv(this,p,d,a,n);this.c.length=n;g=Math.floor(g/e)*e;f=Vb(g,this.j,this.d);n=Vv(this,f,d,a,0);for(k=0;f!=this.j&&k++<h;)f=Math.max(f-e,this.j),n=-Vv(this,f,d,a,n);f=Vb(g,this.j,this.d);for(k=0;f!=this.d&&k++<h;)f=Math.min(f+e,this.d),n=Vv(this,f,d,a,n);this.f.length=n}b.Fa(null,this.t);a=0;for(d=this.c.length;a<d;++a)f=this.c[a],b.Ib(f,null);a=0;for(d=this.f.length;a<d;++a)f=this.f[a],b.Ib(f,null)};l.setMap=function(a){null!==this.k&&(this.k.B("postcompose",this.Af,this),this.k.render());null!==a&&(a.A("postcompose",this.Af,this),a.render());this.k=a};function Wv(a,b,d,e,f,g,h){Oi.call(this,a,b,d,0,e);this.q=f;this.f=new Image;null!==g&&(this.f.crossOrigin=g);this.e={};this.d=null;this.state=0;this.k=h}v(Wv,Oi);Wv.prototype.c=function(a){if(m(a)){var b=ma(a);if(b in this.e)return this.e[b];a=vb(this.e)?this.f:this.f.cloneNode(!1);return this.e[b]=a}return this.f};Wv.prototype.l=function(){this.state=3;Pa(this.d,Wc);this.d=null;this.dispatchEvent("change")};-Wv.prototype.n=function(){m(this.resolution)||(this.resolution=ne(this.extent)/this.f.height);this.state=2;Pa(this.d,Wc);this.d=null;this.dispatchEvent("change")};Wv.prototype.load=function(){0==this.state&&(this.state=1,this.d=[Uc(this.f,"error",this.l,!1,this),Uc(this.f,"load",this.n,!1,this)],this.k(this,this.q))};function Xv(a,b,d,e,f){Pi.call(this,a,b);this.q=d;this.f=new Image;null!==e&&(this.f.crossOrigin=e);this.j={};this.k=null;this.n=f}v(Xv,Pi);l=Xv.prototype;l.T=function(){Yv(this);Xv.X.T.call(this)};l.La=function(a){if(m(a)){var b=ma(a);if(b in this.j)return this.j[b];a=vb(this.j)?this.f:this.f.cloneNode(!1);return this.j[b]=a}return this.f};l.ub=function(){return this.q};l.xj=function(){this.state=3;Yv(this);this.d()};-l.yj=function(){this.state=this.f.naturalWidth&&this.f.naturalHeight?2:4;Yv(this);this.d()};l.load=function(){0==this.state&&(this.state=1,this.d(),this.k=[Uc(this.f,"error",this.xj,!1,this),Uc(this.f,"load",this.yj,!1,this)],this.n(this,this.q))};function Yv(a){Pa(a.k,Wc);a.k=null};function Zv(a,b,d){return function(e,f,g){return d(a,b,e,f,g)}}function $v(){};function aw(a,b){hd.call(this);this.c=new Wo(this);var d=a;b&&(d=vf(a));this.c.Wa(d,"dragenter",this.hl);d!=a&&this.c.Wa(d,"dragover",this.il);this.c.Wa(a,"dragover",this.jl);this.c.Wa(a,"drop",this.kl)}v(aw,hd);l=aw.prototype;l.Oc=!1;l.T=function(){aw.X.T.call(this);this.c.Nc()};l.hl=function(a){var b=a.c.dataTransfer;(this.Oc=!(!b||!(b.types&&(Va(b.types,"Files")||Va(b.types,"public.file-url"))||b.files&&0<b.files.length)))&&a.preventDefault()};-l.il=function(a){this.Oc&&(a.preventDefault(),a.c.dataTransfer.dropEffect="none")};l.jl=function(a){this.Oc&&(a.preventDefault(),a.tb(),a=a.c.dataTransfer,a.effectAllowed="all",a.dropEffect="copy")};l.kl=function(a){this.Oc&&(a.preventDefault(),a.tb(),a=new wc(a.c),a.type="drop",this.dispatchEvent(a))};function bw(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0}function cw(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};function dw(a,b){ew||fw();gw||(ew(),gw=!0);hw.push(new iw(a,b))}var ew;function fw(){if(ba.Promise&&ba.Promise.resolve){var a=ba.Promise.resolve();ew=function(){a.then(jw)}}else ew=function(){oh(jw)}}var gw=!1,hw=[];function jw(){for(;hw.length;){var a=hw;hw=[];for(var b=0;b<a.length;b++){var d=a[b];try{d.c.call(d.f)}catch(e){nh(e)}}}gw=!1}function iw(a,b){this.c=a;this.f=b};function kw(a,b){this.f=lw;this.i=void 0;this.c=this.d=null;this.e=this.j=!1;try{var d=this;a.call(b,function(a){mw(d,nw,a)},function(a){mw(d,ow,a)})}catch(e){mw(this,ow,e)}}var lw=0,nw=2,ow=3;kw.prototype.then=function(a,b,d){return pw(this,ka(a)?a:null,ka(b)?b:null,d)};bw(kw);kw.prototype.cancel=function(a){this.f==lw&&dw(function(){var b=new qw(a);rw(this,b)},this)};-function rw(a,b){if(a.f==lw)if(a.d){var d=a.d;if(d.c){for(var e=0,f=-1,g=0,h;h=d.c[g];g++)if(h=h.Gc)if(e++,h==a&&(f=g),0<=f&&1<e)break;0<=f&&(d.f==lw&&1==e?rw(d,b):(e=d.c.splice(f,1)[0],sw(d,e,ow,b)))}}else mw(a,ow,b)}function tw(a,b){a.c&&a.c.length||a.f!=nw&&a.f!=ow||uw(a);a.c||(a.c=[]);a.c.push(b)}-function pw(a,b,d,e){var f={Gc:null,Zf:null,ag:null};f.Gc=new kw(function(a,h){f.Zf=b?function(d){try{var f=b.call(e,d);a(f)}catch(p){h(p)}}:a;f.ag=d?function(b){try{var f=d.call(e,b);!m(f)&&b instanceof qw?h(b):a(f)}catch(p){h(p)}}:h});f.Gc.d=a;tw(a,f);return f.Gc}kw.prototype.k=function(a){this.f=lw;mw(this,nw,a)};kw.prototype.q=function(a){this.f=lw;mw(this,ow,a)};-function mw(a,b,d){if(a.f==lw){if(a==d)b=ow,d=new TypeError("Promise cannot resolve to itself");else{if(cw(d)){a.f=1;d.then(a.k,a.q,a);return}if(la(d))try{var e=d.then;if(ka(e)){vw(a,d,e);return}}catch(f){b=ow,d=f}}a.i=d;a.f=b;uw(a);b!=ow||d instanceof qw||ww(a,d)}}function vw(a,b,d){function e(b){g||(g=!0,a.q(b))}function f(b){g||(g=!0,a.k(b))}a.f=1;var g=!1;try{d.call(b,f,e)}catch(h){e(h)}}function uw(a){a.j||(a.j=!0,dw(a.l,a))}-kw.prototype.l=function(){for(;this.c&&this.c.length;){var a=this.c;this.c=[];for(var b=0;b<a.length;b++)sw(this,a[b],this.f,this.i)}this.j=!1};function sw(a,b,d,e){if(d==nw)b.Zf(e);else{if(b.Gc)for(;a&&a.e;a=a.d)a.e=!1;b.ag(e)}}function ww(a,b){a.e=!0;dw(function(){a.e&&xw.call(null,b)})}var xw=nh;function qw(a){wa.call(this,a)}v(qw,wa);qw.prototype.name="cancel";/*- Portions of this code are from MochiKit, received by- The Closure Authors under the MIT license. All other code is Copyright- 2005-2009 The Closure Authors. All Rights Reserved.-*/-function yw(a,b){this.j=[];this.s=a;this.u=b||null;this.e=this.c=!1;this.d=void 0;this.l=this.t=this.k=!1;this.i=0;this.f=null;this.q=0}yw.prototype.cancel=function(a){if(this.c)this.d instanceof yw&&this.d.cancel();else{if(this.f){var b=this.f;delete this.f;a?b.cancel(a):(b.q--,0>=b.q&&b.cancel())}this.s?this.s.call(this.u,this):this.l=!0;this.c||(a=new zw,Aw(this),Bw(this,!1,a))}};yw.prototype.n=function(a,b){this.k=!1;Bw(this,a,b)};function Bw(a,b,d){a.c=!0;a.d=d;a.e=!b;Cw(a)}-function Aw(a){if(a.c){if(!a.l)throw new Dw;a.l=!1}}function Ew(a,b,d,e){a.j.push([b,d,e]);a.c&&Cw(a)}yw.prototype.then=function(a,b,d){var e,f,g=new kw(function(a,b){e=a;f=b});Ew(this,e,function(a){a instanceof zw?g.cancel():f(a)});return g.then(a,b,d)};bw(yw);function Fw(a){return Sa(a.j,function(a){return ka(a[1])})}-function Cw(a){if(a.i&&a.c&&Fw(a)){var b=a.i,d=Gw[b];d&&(ba.clearTimeout(d.ea),delete Gw[b]);a.i=0}a.f&&(a.f.q--,delete a.f);for(var b=a.d,e=d=!1;a.j.length&&!a.k;){var f=a.j.shift(),g=f[0],h=f[1],f=f[2];if(g=a.e?h:g)try{var k=g.call(f||a.u,b);m(k)&&(a.e=a.e&&(k==b||k instanceof Error),a.d=b=k);cw(b)&&(e=!0,a.k=!0)}catch(n){b=n,a.e=!0,Fw(a)||(d=!0)}}a.d=b;e&&(k=ra(a.n,a,!0),e=ra(a.n,a,!1),b instanceof yw?(Ew(b,k,e),b.t=!0):b.then(k,e));d&&(b=new Hw(b),Gw[b.ea]=b,a.i=b.ea)}-function Dw(){wa.call(this)}v(Dw,wa);Dw.prototype.message="Deferred has already fired";Dw.prototype.name="AlreadyCalledError";function zw(){wa.call(this)}v(zw,wa);zw.prototype.message="Deferred was canceled";zw.prototype.name="CanceledError";function Hw(a){this.ea=ba.setTimeout(ra(this.f,this),0);this.c=a}Hw.prototype.f=function(){delete Gw[this.ea];throw this.c;};var Gw={};function Iw(a,b){m(a.name)?(this.name=a.name,this.code=ub[a.name]):(this.code=a.code,this.name=Jw(a.code));wa.call(this,za("%s %s",this.name,b))}v(Iw,wa);function Jw(a){var b=tb(function(b){return a==b});if(!m(b))throw Error("Invalid code: "+a);return b}var ub={AbortError:3,EncodingError:5,InvalidModificationError:9,InvalidStateError:7,NotFoundError:1,NotReadableError:4,NoModificationAllowedError:6,PathExistsError:12,QuotaExceededError:10,SecurityError:2,SyntaxError:8,TypeMismatchError:11};function Kw(a,b){qc.call(this,a.type,b)}v(Kw,qc);function Lw(){hd.call(this);this.lb=new FileReader;this.lb.onloadstart=ra(this.c,this);this.lb.onprogress=ra(this.c,this);this.lb.onload=ra(this.c,this);this.lb.onabort=ra(this.c,this);this.lb.onerror=ra(this.c,this);this.lb.onloadend=ra(this.c,this)}v(Lw,hd);Lw.prototype.getError=function(){return this.lb.error&&new Iw(this.lb.error,"reading file")};Lw.prototype.c=function(a){this.dispatchEvent(new Kw(a,this))};Lw.prototype.T=function(){Lw.X.T.call(this);delete this.lb};-function Mw(a){var b=new yw;a.Wa("loadend",sa(function(a,b){var f=b.lb.result,g=b.getError();null==f||g?(Aw(a),Bw(a,!1,g)):(Aw(a),Bw(a,!0,f));b.Nc()},b,a));return b};function Nw(a){a=m(a)?a:{};Mj.call(this,{handleEvent:bd});this.i=m(a.formatConstructors)?a.formatConstructors:[];this.u=m(a.projection)?Ae(a.projection):null;this.j=null;this.e=void 0}v(Nw,Mj);Nw.prototype.T=function(){m(this.e)&&Wc(this.e);Nw.X.T.call(this)};Nw.prototype.k=function(a){a=a.c.dataTransfer.files;var b,d,e;b=0;for(d=a.length;b<d;++b){var f=e=a[b],g=new Lw,h=Mw(g);g.lb.readAsText(f,"");Ew(h,sa(this.l,e),null,this)}};-Nw.prototype.l=function(a,b){var d=this.n,e=this.u;null===e&&(e=d.c().t);var d=this.i,f=[],g,h;g=0;for(h=d.length;g<h;++g){var k=new d[g],n;try{n=k.qa(b)}catch(p){n=null}if(null!==n){var k=k.Oa(b),k=Se(k,e),q,r;q=0;for(r=n.length;q<r;++q){var s=n[q],u=s.V();null!=u&&u.ua(k);f.push(s)}}}this.dispatchEvent(new Ow(Pw,this,a,f,e))};-Nw.prototype.setMap=function(a){m(this.e)&&(Wc(this.e),this.e=void 0);null!==this.j&&(pc(this.j),this.j=null);Nw.X.setMap.call(this,a);null!==a&&(this.j=new aw(a.d),this.e=w(this.j,"drop",this.k,!1,this))};var Pw="addfeatures";function Ow(a,b,d,e,f){qc.call(this,a,b);this.features=e;this.file=d;this.projection=f}v(Ow,qc);function Qw(a,b){this.x=a;this.y=b}v(Qw,rf);Qw.prototype.clone=function(){return new Qw(this.x,this.y)};Qw.prototype.scale=rf.prototype.scale;Qw.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};Qw.prototype.rotate=function(a){var b=Math.cos(a);a=Math.sin(a);var d=this.y*b+this.x*a;this.x=this.x*b-this.y*a;this.y=d;return this};function Rw(a){a=m(a)?a:{};Zj.call(this,{handleDownEvent:Sw,handleDragEvent:Tw,handleUpEvent:Uw});this.l=m(a.condition)?a.condition:Wj;this.e=this.i=void 0;this.k=0}v(Rw,Zj);function Tw(a){if(Yj(a)){var b=a.map,d=b.j();a=a.pixel;a=new Qw(a[0]-d[0]/2,d[1]/2-a[1]);d=Math.atan2(a.y,a.x);a=Math.sqrt(a.x*a.x+a.y*a.y);var e=b.c(),f=Xe(e);b.render();m(this.i)&&Nj(b,e,f.rotation-(d-this.i));this.i=d;m(this.e)&&Pj(b,e,f.resolution/a*this.e);m(this.e)&&(this.k=this.e/a);this.e=a}}-function Uw(a){if(!Yj(a))return!0;a=a.map;var b=a.c();Ze(b,-1);var d=Xe(b),e=this.k-1,f=d.rotation,f=b.constrainRotation(f,0);Nj(a,b,f,void 0,void 0);d=d.resolution;d=b.constrainResolution(d,0,e);Pj(a,b,d,void 0,400);this.k=0;return!1}function Sw(a){return Yj(a)&&this.l(a)?(Ze(a.map.c(),1),this.e=this.i=void 0,!0):!1};function Vw(a,b){qc.call(this,a);this.feature=b}v(Vw,qc);-function Ww(a){Zj.call(this,{handleDownEvent:Xw,handleEvent:Yw,handleUpEvent:Zw});this.W=null;this.ja=m(a.source)?a.source:null;this.ga=m(a.features)?a.features:null;this.ob=m(a.snapTolerance)?a.snapTolerance:12;this.Ja=m(a.minPointsPerRing)?a.minPointsPerRing:3;var b=this.L=a.type,d;if("Point"===b||"MultiPoint"===b)d=$w;else if("LineString"===b||"MultiLineString"===b)d=ax;else if("Polygon"===b||"MultiPolygon"===b)d=bx;this.e=d;this.i=this.v=this.u=this.k=this.l=null;this.R=new op({style:m(a.style)?-a.style:cx()});this.ha=a.geometryName;this.ab=m(a.condition)?a.condition:Vj;w(this,ud("active"),this.ia,!1,this)}v(Ww,Zj);function cx(){var a=ul();return function(b){return a[b.V().S()]}}Ww.prototype.setMap=function(a){Ww.X.setMap.call(this,a);this.ia()};-function Yw(a){var b;b=a.map;if(Kf(document,b.d)&&"none"!=b.d.style.display){var d=b.j();null==d||0>=d[0]||0>=d[1]?b=!1:(b=b.c(),b=null!==b&&Ye(b)?!0:!1)}else b=!1;if(!b)return!0;b=!0;a.type===Hi?b=dx(this,a):a.type===Bi&&(b=!1);return ak.call(this,a)&&b}function Xw(a){return this.ab(a)?(this.W=a.pixel,!0):!1}-function Zw(a){var b=this.W,d=a.pixel,e=b[0]-d[0],b=b[1]-d[1],d=!0;4>=e*e+b*b&&(dx(this,a),null===this.l?ex(this,a):this.e===$w||fx(this,a)?this.Z():(a=a.coordinate,e=this.k.V(),this.e===ax?(this.l=a.slice(),b=e.U(),b.push(a.slice()),e.$(b)):this.e===bx&&(this.i[0].push(a.slice()),e.$(this.i)),gx(this)),d=!1);return d}-function dx(a,b){if(a.e===$w&&null===a.l)ex(a,b);else if(null===a.l){var d=b.coordinate.slice();null===a.u?(a.u=new N(new Ik(d)),gx(a)):a.u.V().$(d)}else{var d=b.coordinate,e=a.k.V(),f,g;a.e===$w?(g=e.U(),g[0]=d[0],g[1]=d[1],e.$(g)):(a.e===ax?f=e.U():a.e===bx&&(f=a.i[0]),fx(a,b)&&(d=a.l.slice()),a.u.V().$(d),g=f[f.length-1],g[0]=d[0],g[1]=d[1],a.e===ax?e.$(f):a.e===bx&&(a.v.V().$(f),e.$(a.i)));gx(a)}return!0}-function fx(a,b){var d=!1;if(null!==a.k){var e=a.k.V(),f=!1,g=[a.l];a.e===ax?f=2<e.U().length:a.e===bx&&(f=e.U()[0].length>a.Ja,g=[a.i[0][0],a.i[0][a.i[0].length-2]]);if(f)for(var e=b.map,f=0,h=g.length;f<h;f++){var k=g[f],n=e.i(k),p=b.pixel,d=p[0]-n[0],n=p[1]-n[1];if(d=Math.sqrt(d*d+n*n)<=a.ob){a.l=k;break}}}return d}-function ex(a,b){var d=b.coordinate;a.l=d;var e;a.e===$w?e=new Ik(d.slice()):a.e===ax?e=new Nm([d.slice(),d.slice()]):a.e===bx&&(a.v=new N(new Nm([d.slice(),d.slice()])),a.i=[[d.slice(),d.slice()]],e=new F(a.i));a.k=new N;m(a.ha)&&a.k.j(a.ha);a.k.Xa(e);gx(a);a.dispatchEvent(new Vw("drawstart",a.k))}-Ww.prototype.Z=function(){var a=hx(this),b,d=a.V();this.e===$w?b=d.U():this.e===ax?(b=d.U(),b.pop(),d.$(b)):this.e===bx&&(this.i[0].pop(),this.i[0].push(this.i[0][0]),d.$(this.i),b=d.U());"MultiPoint"===this.L?a.Xa(new Sm([b])):"MultiLineString"===this.L?a.Xa(new Pm([b])):"MultiPolygon"===this.L&&a.Xa(new Tm([b]));null===this.ga||this.ga.push(a);null===this.ja||this.ja.Za(a);this.dispatchEvent(new Vw("drawend",a))};-function hx(a){a.l=null;var b=a.k;null!==b&&(a.k=null,a.u=null,a.v=null,a.R.c.clear());return b}Ww.prototype.t=ad;function gx(a){var b=[];null===a.k||b.push(a.k);null===a.v||b.push(a.v);null===a.u||b.push(a.u);a.R.Wc(new lg(b))}Ww.prototype.ia=function(){var a=this.n,b=this.c();null!==a&&b||hx(this);this.R.setMap(b?a:null)};var $w="Point",ax="LineString",bx="Polygon";function ix(a){Zj.call(this,{handleDownEvent:jx,handleDragEvent:kx,handleEvent:lx,handleUpEvent:mx});this.ga=m(a.deleteCondition)?a.deleteCondition:gd(Vj,Uj);this.Z=this.i=null;this.W=[0,0];this.e=new fn;this.l=m(a.pixelTolerance)?a.pixelTolerance:10;this.R=!1;this.k=null;this.u=new op({style:m(a.style)?a.style:nx()});this.L={Point:this.Bm,LineString:this.Cg,LinearRing:this.Cg,Polygon:this.Dm,MultiPoint:this.ym,MultiLineString:this.xm,MultiPolygon:this.Am,GeometryCollection:this.wm};this.v=a.features;-this.v.forEach(this.Mf,this);w(this.v,"add",this.qi,!1,this);w(this.v,"remove",this.ri,!1,this)}v(ix,Zj);l=ix.prototype;l.Mf=function(a){var b=a.V();m(this.L[b.S()])&&this.L[b.S()].call(this,a,b);a=this.n;null===a||ox(this,this.W,a)};l.setMap=function(a){this.u.setMap(a);ix.X.setMap.call(this,a)};l.qi=function(a){this.Mf(a.element)};-l.ri=function(a){var b=a.element;a=this.e;var d,e=[];kn(a,b.V().N(),function(a){b===a.feature&&e.push(a)});for(d=e.length-1;0<=d;--d)a.remove(e[d]);null!==this.i&&0===this.v.Mb()&&(this.u.Hd(this.i),this.i=null)};l.Bm=function(a,b){var d=b.U(),d={feature:a,geometry:b,la:[d,d]};this.e.wa(b.N(),d)};l.ym=function(a,b){var d=b.U(),e,f,g;f=0;for(g=d.length;f<g;++f)e=d[f],e={feature:a,geometry:b,depth:[f],index:f,la:[e,e]},this.e.wa(b.N(),e)};-l.Cg=function(a,b){var d=b.U(),e,f,g,h;e=0;for(f=d.length-1;e<f;++e)g=d.slice(e,e+2),h={feature:a,geometry:b,index:e,la:g},this.e.wa(Rd(g),h)};l.xm=function(a,b){var d=b.U(),e,f,g,h,k,n,p;h=0;for(k=d.length;h<k;++h)for(e=d[h],f=0,g=e.length-1;f<g;++f)n=e.slice(f,f+2),p={feature:a,geometry:b,depth:[h],index:f,la:n},this.e.wa(Rd(n),p)};-l.Dm=function(a,b){var d=b.U(),e,f,g,h,k,n,p;h=0;for(k=d.length;h<k;++h)for(e=d[h],f=0,g=e.length-1;f<g;++f)n=e.slice(f,f+2),p={feature:a,geometry:b,depth:[h],index:f,la:n},this.e.wa(Rd(n),p)};l.Am=function(a,b){var d=b.U(),e,f,g,h,k,n,p,q,r,s;n=0;for(p=d.length;n<p;++n)for(q=d[n],h=0,k=q.length;h<k;++h)for(e=q[h],f=0,g=e.length-1;f<g;++f)r=e.slice(f,f+2),s={feature:a,geometry:b,depth:[h,n],index:f,la:r},this.e.wa(Rd(r),s)};-l.wm=function(a,b){var d,e=b.e;for(d=0;d<e.length;++d)this.L[e[d].S()].call(this,a,e[d])};function px(a,b){var d=a.i;null===d?(d=new N(new Ik(b)),a.i=d,a.u.Hf(d)):d.V().$(b)}-function jx(a){ox(this,a.pixel,a.map);this.k=[];var b=this.i;if(null!==b){a=[];for(var b=b.V().U(),d=Rd([b]),d=hn(this.e,d),e=0,f=d.length;e<f;++e){var g=d[e],h=g.la;zd(h[0],b)?this.k.push([g,0]):zd(h[1],b)?this.k.push([g,1]):ma(h)in this.Z&&a.push([g,b])}for(e=a.length-1;0<=e;--e)this.Ri.apply(this,a[e])}return null!==this.i}-function kx(a){a=a.coordinate;for(var b=0,d=this.k.length;b<d;++b){for(var e=this.k[b],f=e[0],g=f.depth,h=f.geometry,k=h.U(),n=f.la,e=e[1];a.length<h.H;)a.push(0);switch(h.S()){case "Point":k=a;n[0]=n[1]=a;break;case "MultiPoint":k[f.index]=a;n[0]=n[1]=a;break;case "LineString":k[f.index+e]=a;n[e]=a;break;case "MultiLineString":k[g[0]][f.index+e]=a;n[e]=a;break;case "Polygon":k[g[0]][f.index+e]=a;n[e]=a;break;case "MultiPolygon":k[g[1]][g[0]][f.index+e]=a,n[e]=a}h.$(k);px(this,a)}}-function mx(){for(var a,b=this.k.length-1;0<=b;--b)a=this.k[b][0],this.e.update(Rd(a.la),a);return!1}-function lx(a){var b;a.map.c().u.slice()[1]||a.type!=Hi||(this.W=a.pixel,ox(this,a.pixel,a.map));if(null!==this.i&&this.R&&this.ga(a)){this.i.V();b=this.k;var d={},e=!1,f,g,h,k,n,p,q,r,s;for(n=b.length-1;0<=n;--n)if(h=b[n],r=h[0],k=r.geometry,g=k.U(),s=ma(r.feature),f=q=p=void 0,0===h[1]?(q=r,p=r.index):1==h[1]&&(f=r,p=r.index+1),s in d||(d[s]=[f,q,p]),h=d[s],m(f)&&(h[0]=f),m(q)&&(h[1]=q),m(h[0])&&m(h[1])){f=g;e=!1;q=p-1;switch(k.S()){case "MultiLineString":g[r.depth[0]].splice(p,1);e=!0;break;case "LineString":g.splice(p,-1);e=!0;break;case "MultiPolygon":f=f[r.depth[1]];case "Polygon":f=f[r.depth[0]],4<f.length&&(p==f.length-1&&(p=0),f.splice(p,1),e=!0,0===p&&(f.pop(),f.push(f[0]),q=f.length-1))}e&&(this.e.remove(h[0]),this.e.remove(h[1]),k.$(g),g={depth:r.depth,feature:r.feature,geometry:r.geometry,index:q,la:[h[0].la[0],h[1].la[1]]},this.e.wa(Rd(g.la),g),qx(this,k,p,r.depth,-1),this.u.Hd(this.i),this.i=null)}b=e}return ak.call(this,a)&&!b}-function ox(a,b,d){function e(a,b){return Bd(f,wd(f,a.la))-Bd(f,wd(f,b.la))}var f=d.va(b),g=d.va([b[0]-a.l,b[1]+a.l]),h=d.va([b[0]+a.l,b[1]-a.l]),g=Rd([g,h]),g=hn(a.e,g);if(0<g.length){g.sort(e);var h=g[0].la,k=wd(f,h),n=d.i(k);if(Math.sqrt(Bd(b,n))<=a.l){b=d.i(h[0]);d=d.i(h[1]);b=Bd(n,b);d=Bd(n,d);a.R=Math.sqrt(Math.min(b,d))<=a.l;a.R&&(k=b>d?h[1]:h[0]);px(a,k);d={};d[ma(h)]=!0;b=1;for(n=g.length;b<n;++b)if(k=g[b].la,zd(h[0],k[0])&&zd(h[1],k[1])||zd(h[0],k[1])&&zd(h[1],k[0]))d[ma(k)]=!0;else break;-a.Z=d;return}}null!==a.i&&(a.u.Hd(a.i),a.i=null)}-l.Ri=function(a,b){for(var d=a.la,e=a.feature,f=a.geometry,g=a.depth,h=a.index,k;b.length<f.H;)b.push(0);switch(f.S()){case "MultiLineString":k=f.U();k[g[0]].splice(h+1,0,b);break;case "Polygon":k=f.U();k[g[0]].splice(h+1,0,b);break;case "MultiPolygon":k=f.U();k[g[1]][g[0]].splice(h+1,0,b);break;case "LineString":k=f.U();k.splice(h+1,0,b);break;default:return}f.$(k);k=this.e;k.remove(a);qx(this,f,h,g,1);var n={la:[d[0],b],feature:e,geometry:f,depth:g,index:h};k.wa(Rd(n.la),n);this.k.push([n,1]);d=-{la:[b,d[1]],feature:e,geometry:f,depth:g,index:h+1};k.wa(Rd(d.la),d);this.k.push([d,0])};function qx(a,b,d,e,f){kn(a.e,b.N(),function(a){a.geometry===b&&(!m(e)||eb(a.depth,e))&&a.index>d&&(a.index+=f)})}function nx(){var a=ul();return function(){return a.Point}};function rx(a,b,d){qc.call(this,a);this.f=b;this.c=d}v(rx,qc);-function sx(a){Mj.call(this,{handleEvent:tx});a=m(a)?a:{};this.l=m(a.condition)?a.condition:Uj;this.i=m(a.addCondition)?a.addCondition:ad;this.t=m(a.removeCondition)?a.removeCondition:ad;this.J=m(a.toggleCondition)?a.toggleCondition:Wj;this.k=m(a.multi)?a.multi:!1;var b;if(m(a.layers))if(ka(a.layers))b=a.layers;else{var d=a.layers;b=function(a){return Va(d,a)}}else b=bd;this.j=b;this.e=new op({style:m(a.style)?a.style:ux()});a=this.e.c;w(a,"add",this.u,!1,this);w(a,"remove",this.v,!1,this)}v(sx,Mj);-sx.prototype.s=function(){return this.e.c};-function tx(a){if(!this.l(a))return!0;var b=this.i(a),d=this.t(a),e=this.J(a),f=a.map,g=this.e.c,h=[],k=[],n=!1;if(b||d||e){f.se(a.pixel,function(a){-1==Oa.indexOf.call(g.c,a,void 0)?(b||e)&&k.push(a):(d||e)&&h.push(a)},void 0,this.j);for(f=h.length-1;0<=f;--f)g.remove(h[f]);g.Be(k);if(0<k.length||0<h.length)n=!0}else f.se(a.pixel,function(a){k.push(a)},void 0,this.j),0<k.length&&1==g.Mb()&&g.item(0)==k[0]||(n=!0,0!==g.Mb()&&(h=Array.prototype.concat(g.c),g.clear()),this.k?g.Be(k):0<k.length&&g.push(k[0]));-n&&this.dispatchEvent(new rx("select",k,h));return Tj(a)}sx.prototype.setMap=function(a){var b=this.n,d=this.e.c;null===b||d.forEach(b.lc,b);sx.X.setMap.call(this,a);this.e.setMap(a);null===a||d.forEach(a.ab,a)};function ux(){var a=ul();$a(a.Polygon,a.LineString);$a(a.GeometryCollection,a.LineString);return function(b){return a[b.V().S()]}}sx.prototype.u=function(a){a=a.element;var b=this.n;null===b||b.ab(a)};sx.prototype.v=function(a){a=a.element;var b=this.n;null===b||b.lc(a)};function X(a){a=m(a)?a:{};var b=Ab(a);delete b.gradient;delete b.radius;delete b.blur;delete b.shadow;delete b.weight;J.call(this,b);this.ma=null;this.pf=m(a.shadow)?a.shadow:250;this.ed=void 0;this.Dc=null;w(this,ud("gradient"),this.Pi,!1,this);this.Cc(m(a.gradient)?a.gradient:vx);this.Bc(m(a.blur)?a.blur:15);this.mc(m(a.radius)?a.radius:8);w(this,[ud("blur"),ud("radius")],this.jf,!1,this);this.jf();var d=m(a.weight)?a.weight:"weight",e;ia(d)?e=function(a){return a.get(d)}:e=d;this.oa(ra(function(a){a=-e(a);a=m(a)?Vb(a,0,1):1;var b=255*a|0,d=this.Dc[b];m(d)||(d=[new ql({image:new vj({opacity:a,src:this.ed})})],this.Dc[b]=d);return d},this));this.set("renderOrder",null);w(this,"render",this.Ui,!1,this)}v(X,J);var vx=["#00f","#0ff","#0f0","#ff0","#f00"];X.prototype.Ia=function(){return this.get("blur")};X.prototype.getBlur=X.prototype.Ia;X.prototype.Ja=function(){return this.get("gradient")};X.prototype.getGradient=X.prototype.Ja;X.prototype.lc=function(){return this.get("radius")};-X.prototype.getRadius=X.prototype.lc;X.prototype.Pi=function(){for(var a=this.Ja(),b=Nf(1,256),d=b.createLinearGradient(0,0,1,256),e=1/(a.length-1),f=0,g=a.length;f<g;++f)d.addColorStop(f*e,a[f]);b.fillStyle=d;b.fillRect(0,0,1,256);this.ma=b.getImageData(0,0,1,256).data};-X.prototype.jf=function(){var a=this.lc(),b=this.Ia(),d=a+b+1,e=2*d,e=Nf(e,e);e.shadowOffsetX=e.shadowOffsetY=this.pf;e.shadowBlur=b;e.shadowColor="#000";e.beginPath();b=d-this.pf;e.arc(b,b,a,0,2*Math.PI,!0);e.fill();this.ed=e.canvas.toDataURL();this.Dc=Array(256);this.p()};X.prototype.Ui=function(a){a=a.context;var b=a.canvas,b=a.getImageData(0,0,b.width,b.height),d=b.data,e,f,g;e=0;for(f=d.length;e<f;e+=4)if(g=4*d[e+3])d[e]=this.ma[g],d[e+1]=this.ma[g+1],d[e+2]=this.ma[g+2];a.putImageData(b,0,0)};-X.prototype.Bc=function(a){this.set("blur",a)};X.prototype.setBlur=X.prototype.Bc;X.prototype.Cc=function(a){this.set("gradient",a)};X.prototype.setGradient=X.prototype.Cc;X.prototype.mc=function(a){this.set("radius",a)};X.prototype.setRadius=X.prototype.mc;function wx(a){return[a]};function xx(a,b){var d=b||{},e=d.document||document,f=Df("SCRIPT"),g={sg:f,ic:void 0},h=new yw(yx,g),k=null,n=null!=d.timeout?d.timeout:5E3;0<n&&(k=window.setTimeout(function(){zx(f,!0);var b=new Ax(Bx,"Timeout reached for loading script "+a);Aw(h);Bw(h,!1,b)},n),g.ic=k);f.onload=f.onreadystatechange=function(){f.readyState&&"loaded"!=f.readyState&&"complete"!=f.readyState||(zx(f,d.rh||!1,k),Aw(h),Bw(h,!0,null))};f.onerror=function(){zx(f,!0,k);var b=new Ax(Cx,"Error while loading script "+a);Aw(h);-Bw(h,!1,b)};xf(f,{type:"text/javascript",charset:"UTF-8",src:a});Dx(e).appendChild(f);return h}function Dx(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement}function yx(){if(this&&this.sg){var a=this.sg;a&&"SCRIPT"==a.tagName&&zx(a,!0,this.ic)}}function zx(a,b,d){null!=d&&ba.clearTimeout(d);a.onload=ca;a.onerror=ca;a.onreadystatechange=ca;b&&window.setTimeout(function(){Hf(a)},0)}var Cx=0,Bx=1;-function Ax(a,b){var d="Jsloader error (code #"+a+")";b&&(d+=": "+b);wa.call(this,d);this.code=a}v(Ax,wa);function Ex(a,b){this.f=new Lr(a);this.c=b?b:"callback";this.ic=5E3}var Fx=0;-Ex.prototype.send=function(a,b,d,e){a=a||null;e=e||"_"+(Fx++).toString(36)+ta().toString(36);ba._callbacks_||(ba._callbacks_={});var f=this.f.clone();if(a)for(var g in a)if(!a.hasOwnProperty||a.hasOwnProperty(g)){var h=f,k=g,n=a[g];ga(n)||(n=[String(n)]);ds(h.c,k,n)}b&&(ba._callbacks_[e]=Gx(e,b),b=this.c,g="_callbacks_."+e,ga(g)||(g=[String(g)]),ds(f.c,b,g));b=xx(f.toString(),{timeout:this.ic,rh:!0});Ew(b,null,Hx(e,a,d),void 0);return{ea:e,kf:b}};-Ex.prototype.cancel=function(a){a&&(a.kf&&a.kf.cancel(),a.ea&&Ix(a.ea,!1))};function Hx(a,b,d){return function(){Ix(a,!1);d&&d(b)}}function Gx(a,b){return function(d){Ix(a,!0);b.apply(void 0,arguments)}}function Ix(a,b){ba._callbacks_[a]&&(b?delete ba._callbacks_[a]:ba._callbacks_[a]=ca)};function Jx(a){var b=/\{z\}/g,d=/\{x\}/g,e=/\{y\}/g,f=/\{-y\}/g;return function(g){return null===g?void 0:a.replace(b,g[0].toString()).replace(d,g[1].toString()).replace(e,g[2].toString()).replace(f,function(){return((1<<g[0])-g[2]-1).toString()})}}function Kx(a){return Lx(Ra(a,Jx))}function Lx(a){return 1===a.length?a[0]:function(b,d,e){return null===b?void 0:a[Wb((b[1]<<b[0])+b[2],a.length)](b,d,e)}}function Mx(){}-function Nx(a,b){var d=[0,0,0];return function(e,f,g){return null===e?void 0:b(a(e,g,d),f,g)}}function Ox(a){var b=[],d=/\{(\d)-(\d)\}/.exec(a)||/\{([a-z])-([a-z])\}/.exec(a);if(d){var e=d[2].charCodeAt(0),f;for(f=d[1].charCodeAt(0);f<=e;++f)b.push(a.replace(d[0],String.fromCharCode(f)))}else b.push(a);return b};function Px(a){cj.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:m(a.state)?a.state:void 0,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio});this.tileUrlFunction=m(a.tileUrlFunction)?a.tileUrlFunction:Mx;this.crossOrigin=m(a.crossOrigin)?a.crossOrigin:null;this.tileLoadFunction=m(a.tileLoadFunction)?a.tileLoadFunction:Qx;this.tileClass=m(a.tileClass)?a.tileClass:Xv}v(Px,cj);function Qx(a,b){a.La().src=b}l=Px.prototype;-l.Zb=function(a,b,d,e,f){var g=this.rb(a,b,d);if(Ri(this.c,g))return this.c.get(g);a=[a,b,d];e=this.tileUrlFunction(a,e,f);e=new this.tileClass(a,m(e)?0:4,m(e)?e:"",this.crossOrigin,this.tileLoadFunction);w(e,"change",this.wk,!1,this);this.c.set(g,e);return e};l.gb=function(){return this.tileLoadFunction};l.hb=function(){return this.tileUrlFunction};-l.wk=function(a){a=a.target;switch(a.state){case 1:this.dispatchEvent(new fj("tileloadstart",a));break;case 2:this.dispatchEvent(new fj("tileloadend",a));break;case 3:this.dispatchEvent(new fj("tileloaderror",a))}};l.nb=function(a){this.c.clear();this.tileLoadFunction=a;this.p()};l.xa=function(a){this.c.clear();this.tileUrlFunction=a;this.p()};l.Te=function(a,b,d){a=this.rb(a,b,d);Ri(this.c,a)&&this.c.get(a)};function Rx(a){var b=m(a.extent)?a.extent:Ml,d=aj(b,a.maxZoom,a.tileSize);Ui.call(this,{minZoom:a.minZoom,origin:le(b,"top-left"),resolutions:d,tileSize:a.tileSize})}v(Rx,Ui);-Rx.prototype.Hb=function(a){a=m(a)?a:{};var b=this.minZoom,d=this.maxZoom,e=m(a.wrapX)?a.wrapX:!0,f=null;if(m(a.extent)){var f=Array(d+1),g;for(g=0;g<=d;++g)f[g]=g<b?null:Xi(this,a.extent,g)}return function(a,g,n){g=a[0];if(g<b||d<g)return null;var p=Math.pow(2,g),q=a[1];if(e)q=Wb(q,p);else if(0>q||p<=q)return null;a=a[2];return a<-p||-1<a||null!==f&&!nf(f[g],q,a)?null:gf(g,q,-a-1,n)}};Rx.prototype.wd=function(a,b){if(a[0]<this.maxZoom){var d=2*a[1],e=2*a[2];return mf(d,d+1,e,e+1,b)}return null};-Rx.prototype.kd=function(a,b,d,e){e=mf(0,a[1],0,a[2],e);for(a=a[0]-1;a>=this.minZoom;--a)if(e.c=e.e>>=1,e.d=e.f>>=1,b.call(d,a,e))return!0;return!1};function Sx(a){Px.call(this,{crossOrigin:"anonymous",opaque:!0,projection:Ae("EPSG:3857"),state:"loading",tileLoadFunction:a.tileLoadFunction});this.e=m(a.culture)?a.culture:"en-us";this.d=m(a.maxZoom)?a.maxZoom:-1;this.l=m(a.wrapX)?a.wrapX:!0;var b=new Lr((Sb?"https:":"http:")+"//dev.virtualearth.net/REST/v1/Imagery/Metadata/"+a.imagerySet);(new Ex(b,"jsonp")).send({include:"ImageryProviders",uriScheme:Sb?"https":"http",key:a.key},ra(this.i,this))}v(Sx,Px);var Tx=new pf({html:'<a class="ol-attribution-bing-tos" href="http://www.microsoft.com/maps/product/terms.html">Terms of Use</a>'});-Sx.prototype.i=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)Li(this,"error");else{var b=a.brandLogoUri;Sb&&-1==b.indexOf("https")&&(b=b.replace("http","https"));var d=a.resourceSets[0].resources[0],e=-1==this.d?d.zoomMax:this.d,f=new Rx({extent:bj(this.k),minZoom:d.zoomMin,maxZoom:e,tileSize:d.imageWidth});this.tileGrid=f;var g=this.e;this.tileUrlFunction=Nx(f.Hb({wrapX:this.l}),-Lx(Ra(d.imageUrlSubdomains,function(a){var b=d.imageUrl.replace("{subdomain}",a).replace("{culture}",g);return function(a){return null===a?void 0:b.replace("{quadkey}",jf(a))}})));if(d.imageryProviders){var h=ze(Ae("EPSG:4326"),this.k);a=Ra(d.imageryProviders,function(a){var b=a.attribution,d={};Pa(a.coverageAreas,function(a){var b=a.zoomMin,g=Math.min(a.zoomMax,e);a=a.bbox;a=te([a[1],a[0],a[3],a[2]],h);var k,n;for(k=b;k<=g;++k)n=k.toString(),b=Xi(f,a,k),n in d?d[n].push(b):d[n]=[b]});return new pf({html:b,-tileRanges:d})});a.push(Tx);this.j=a}this.J=b;Li(this,"ready")}};function Ux(a){ln.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection});this.t=void 0;this.v=m(a.distance)?a.distance:20;this.s=[];this.c=a.source;this.c.A("change",Ux.prototype.R,this)}v(Ux,ln);Ux.prototype.L=function(){return this.c};Ux.prototype.Lb=function(a,b,d){b!==this.t&&(this.clear(),this.t=b,this.c.Lb(a,b,d),Vx(this),this.Ka(this.s))};Ux.prototype.R=function(){this.clear();Vx(this);this.Ka(this.s);this.p()};-function Vx(a){if(m(a.t)){a.s.length=0;for(var b=Sd(),d=a.v*a.t,e=a.c.Ea(),f={},g=0,h=e.length;g<h;g++){var k=e[g];sb(f,ma(k).toString())||(k=k.V().U(),be(k,b),Wd(b,d,b),k=hn(a.c.d,b),k=Qa(k,function(a){a=ma(a).toString();return a in f?!1:f[a]=!0}),a.s.push(Wx(k)))}}}function Wx(a){for(var b=a.length,d=[0,0],e=0;e<b;e++){var f=a[e].V().U();vd(d,f)}b=1/b;d[0]*=b;d[1]*=b;d=new N(new Ik(d));d.set("features",a);return d};function Xx(a,b,d){if(ka(a))d&&(a=ra(a,d));else if(a&&"function"==typeof a.handleEvent)a=ra(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:ba.setTimeout(a,b||0)};function Yx(){}Yx.prototype.c=null;function Zx(a){var b;(b=a.c)||(b={},$x(a)&&(b[0]=!0,b[1]=!0),b=a.c=b);return b};var ay;function by(){}v(by,Yx);function cy(a){return(a=$x(a))?new ActiveXObject(a):new XMLHttpRequest}function $x(a){if(!a.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],d=0;d<b.length;d++){var e=b[d];try{return new ActiveXObject(e),a.f=e}catch(f){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.f}ay=new by;function dy(a){hd.call(this);this.v=new uh;this.l=a||null;this.c=!1;this.q=this.Y=null;this.j=this.s="";this.f=this.u=this.e=this.n=!1;this.k=0;this.d=null;this.i=ey;this.t=this.J=!1}v(dy,hd);var ey="",fy=/^https?$/i,gy=["POST","PUT"];l=dy.prototype;-l.send=function(a,b,d,e){if(this.Y)throw Error("[goog.net.XhrIo] Object is active with another request="+this.s+"; newUri="+a);b=b?b.toUpperCase():"GET";this.s=a;this.j="";this.n=!1;this.c=!0;this.Y=this.l?cy(this.l):cy(ay);this.q=this.l?Zx(this.l):Zx(ay);this.Y.onreadystatechange=ra(this.$f,this);try{this.u=!0,this.Y.open(b,String(a),!0),this.u=!1}catch(f){hy(this,f);return}a=d||"";var g=this.v.clone();e&&th(e,function(a,b){g.set(b,a)});e=Ta(g.K(),iy);d=ba.FormData&&a instanceof ba.FormData;!Va(gy,-b)||e||d||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");g.forEach(function(a,b){this.Y.setRequestHeader(b,a)},this);this.i&&(this.Y.responseType=this.i);"withCredentials"in this.Y&&(this.Y.withCredentials=this.J);try{jy(this),0<this.k&&((this.t=ky(this.Y))?(this.Y.timeout=this.k,this.Y.ontimeout=ra(this.ic,this)):this.d=Xx(this.ic,this.k,this)),this.e=!0,this.Y.send(a),this.e=!1}catch(h){hy(this,h)}};function ky(a){return Fb&&Ob(9)&&ja(a.timeout)&&m(a.ontimeout)}-function iy(a){return"content-type"==a.toLowerCase()}l.ic=function(){"undefined"!=typeof aa&&this.Y&&(this.j="Timed out after "+this.k+"ms, aborting",this.dispatchEvent("timeout"),this.Y&&this.c&&(this.c=!1,this.f=!0,this.Y.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ly(this)))};function hy(a,b){a.c=!1;a.Y&&(a.f=!0,a.Y.abort(),a.f=!1);a.j=b;my(a);ly(a)}function my(a){a.n||(a.n=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))}-l.T=function(){this.Y&&(this.c&&(this.c=!1,this.f=!0,this.Y.abort(),this.f=!1),ly(this,!0));dy.X.T.call(this)};l.$f=function(){this.sa||(this.u||this.e||this.f?ny(this):this.ll())};l.ll=function(){ny(this)};-function ny(a){if(a.c&&"undefined"!=typeof aa&&(!a.q[1]||4!=oy(a)||2!=py(a)))if(a.e&&4==oy(a))Xx(a.$f,0,a);else if(a.dispatchEvent("readystatechange"),4==oy(a)){a.c=!1;try{if(qy(a))a.dispatchEvent("complete"),a.dispatchEvent("success");else{var b;try{b=2<oy(a)?a.Y.statusText:""}catch(d){b=""}a.j=b+" ["+py(a)+"]";my(a)}}finally{ly(a)}}}function ly(a,b){if(a.Y){jy(a);var d=a.Y,e=a.q[0]?ca:null;a.Y=null;a.q=null;b||a.dispatchEvent("ready");try{d.onreadystatechange=e}catch(f){}}}-function jy(a){a.Y&&a.t&&(a.Y.ontimeout=null);ja(a.d)&&(ba.clearTimeout(a.d),a.d=null)}function qy(a){var b=py(a),d;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=!0;break a;default:d=!1}if(!d){if(b=0===b)a=Fr(String(a.s))[1]||null,!a&&self.location&&(a=self.location.protocol,a=a.substr(0,a.length-1)),b=!fy.test(a?a.toLowerCase():"");d=b}return d}function oy(a){return a.Y?a.Y.readyState:0}function py(a){try{return 2<oy(a)?a.Y.status:-1}catch(b){return-1}}-function ry(a){try{return a.Y?a.Y.responseText:""}catch(b){return""}}function sy(a){try{if(!a.Y)return null;if("response"in a.Y)return a.Y.response;switch(a.i){case ey:case "text":return a.Y.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.Y)return a.Y.mozResponseArrayBuffer}return null}catch(b){return null}};function Y(a){ln.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection});this.format=a.format}v(Y,ln);-function ty(a,b,d,e,f){var g=new dy;g.i="binary"==a.format.S()&&Xf?"arraybuffer":"text";w(g,"complete",function(a){a=a.target;if(qy(a)){var b=this.format.S(),g;if("binary"==b&&Xf)g=sy(a);else if("json"==b)g=ry(a);else if("text"==b)g=ry(a);else if("xml"==b){if(!Fb)try{g=a.Y?a.Y.responseXML:null}catch(p){g=null}null!=g||(g=eq(ry(a)))}null!=g?d.call(f,this.c(g)):Li(this,"error")}else e.call(f);pc(a)},!1,a);g.send(b)}Y.prototype.c=function(a){return this.format.qa(a,{featureProjection:this.k})};function Z(a){Y.call(this,{attributions:a.attributions,format:a.format,logo:a.logo,projection:a.projection});m(a.arrayBuffer)&&this.pb(this.c(a.arrayBuffer));m(a.doc)&&this.pb(this.c(a.doc));m(a.node)&&this.pb(this.c(a.node));m(a.object)&&this.pb(this.c(a.object));m(a.text)&&this.pb(this.c(a.text));if(m(a.url)||m(a.urls))if(Li(this,"loading"),m(a.url)&&ty(this,a.url,this.t,this.s,this),m(a.urls)){a=a.urls;var b,d;b=0;for(d=a.length;b<d;++b)ty(this,a[b],this.t,this.s,this)}}v(Z,Y);-Z.prototype.s=function(){Li(this,"error")};Z.prototype.t=function(a){this.pb(a);Li(this,"ready")};function uy(a){a=m(a)?a:{};Z.call(this,{attributions:a.attributions,extent:a.extent,format:new Ap({defaultDataProjection:a.defaultProjection}),logo:a.logo,object:a.object,projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(uy,Z);function vy(a){a=m(a)?a:{};Z.call(this,{attributions:a.attributions,doc:a.doc,extent:a.extent,format:new Qq,logo:a.logo,node:a.node,projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(vy,Z);function wy(a){a=m(a)?a:{};Z.call(this,{format:new Ar({altitudeMode:a.altitudeMode}),projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(wy,Z);function xy(a){an.call(this,{projection:a.projection,resolutions:a.resolutions});this.L=m(a.crossOrigin)?a.crossOrigin:null;this.i=m(a.displayDpi)?a.displayDpi:96;this.e=m(a.params)?a.params:{};var b;m(a.url)?b=Zv(a.url,this.e,ra(this.ck,this)):b=$v;this.t=b;this.c=m(a.imageLoadFunction)?a.imageLoadFunction:cn;this.R=m(a.hidpi)?a.hidpi:!0;this.v=m(a.metersPerUnit)?a.metersPerUnit:1;this.n=m(a.ratio)?a.ratio:1;this.W=m(a.useOverlay)?a.useOverlay:!1;this.d=null;this.s=0}v(xy,an);l=xy.prototype;-l.bk=function(){return this.e};l.wc=function(a,b,d,e){b=bn(this,b);d=this.R?d:1;var f=this.d;if(null!==f&&this.s==this.f&&f.resolution==b&&f.j==d&&Zd(f.N(),a))return f;1!=this.n&&(a=a.slice(),se(a,this.n));e=this.t(a,[qe(a)/b*d,ne(a)/b*d],e);m(e)?f=new Wv(a,b,d,this.j,e,this.L,this.c):f=null;this.d=f;this.s=this.f;return f};l.ak=function(){return this.c};l.ek=function(a){Cb(this.e,a);this.p()};-l.ck=function(a,b,d,e){var f;f=this.v;var g=qe(d),h=ne(d),k=e[0],n=e[1],p=.0254/this.i;f=n*g>k*h?g*f/(k*p):h*f/(n*p);d=ke(d);e={OPERATION:this.W?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.i,SETDISPLAYWIDTH:Math.round(e[0]),SETDISPLAYHEIGHT:Math.round(e[1]),SETVIEWSCALE:f,SETVIEWCENTERX:d[0],SETVIEWCENTERY:d[1]};Cb(e,b);return Ir(Kr([a],e))};l.dk=function(a){this.d=null;this.c=a;this.p()};function yy(a){var b=m(a.attributions)?a.attributions:null,d=a.imageExtent,e,f;m(a.imageSize)&&(e=ne(d)/a.imageSize[1],f=[e]);var g=m(a.crossOrigin)?a.crossOrigin:null,h=m(a.imageLoadFunction)?a.imageLoadFunction:cn;an.call(this,{attributions:b,logo:a.logo,projection:Ae(a.projection),resolutions:f});this.c=new Wv(d,e,1,b,a.url,g,h)}v(yy,an);yy.prototype.wc=function(a){return pe(a,this.c.N())?this.c:null};function zy(a){a=m(a)?a:{};an.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.R=m(a.crossOrigin)?a.crossOrigin:null;this.e=a.url;this.n=m(a.imageLoadFunction)?a.imageLoadFunction:cn;this.c=a.params;this.i=!0;Ay(this);this.L=a.serverType;this.W=m(a.hidpi)?a.hidpi:!0;this.d=null;this.s=[0,0];this.v=0;this.t=m(a.ratio)?a.ratio:1.5}v(zy,an);var By=[101,101];l=zy.prototype;-l.kk=function(a,b,d,e){if(m(this.e)){var f=me(a,b,0,By),g={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.c.LAYERS};Cb(g,this.c,e);e=Math.floor((f[3]-a[1])/b);g[this.i?"I":"X"]=Math.floor((a[0]-f[0])/b);g[this.i?"J":"Y"]=e;return Cy(this,f,By,1,Ae(d),g)}};l.mk=function(){return this.c};-l.wc=function(a,b,d,e){if(!m(this.e))return null;b=bn(this,b);1==d||this.W&&m(this.L)||(d=1);var f=this.d;if(null!==f&&this.v==this.f&&f.resolution==b&&f.j==d&&Zd(f.N(),a))return f;f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Cb(f,this.c);a=a.slice();var g=(a[0]+a[2])/2,h=(a[1]+a[3])/2;if(1!=this.t){var k=this.t*qe(a)/2,n=this.t*ne(a)/2;a[0]=g-k;a[1]=h-n;a[2]=g+k;a[3]=h+n}var k=b/d,n=Math.ceil(qe(a)/k),p=Math.ceil(ne(a)/k);a[0]=g-k*n/2;a[2]=g+k*n/2;a[1]=h-k*-p/2;a[3]=h+k*p/2;this.s[0]=n;this.s[1]=p;e=Cy(this,a,this.s,d,e,f);this.d=new Wv(a,b,d,this.j,e,this.R,this.n);this.v=this.f;return this.d};l.lk=function(){return this.n};-function Cy(a,b,d,e,f,g){g[a.i?"CRS":"SRS"]=f.c;"STYLES"in a.c||(g.STYLES=new String(""));if(1!=e)switch(a.L){case "geoserver":g.FORMAT_OPTIONS="dpi:"+(90*e+.5|0);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.d;var h;a.i&&"ne"==d.substr(0,2)?h=[b[1],b[0],b[3],b[2]]:h=b;g.BBOX=h.join(",");return Ir(Kr([a.e],g))}l.nk=function(){return this.e};l.ok=function(a){this.d=null;this.n=a;this.p()};-l.pk=function(a){a!=this.e&&(this.e=a,this.d=null,this.p())};l.qk=function(a){Cb(this.c,a);Ay(this);this.d=null;this.p()};function Ay(a){a.i=0<=Ma(yb(a.c,"VERSION","1.3.0"),"1.3")};function Dy(a){a=m(a)?a:{};Z.call(this,{attributions:a.attributions,doc:a.doc,format:new fs({extractStyles:a.extractStyles,defaultStyle:a.defaultStyle}),logo:a.logo,node:a.node,projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(Dy,Z);function Ey(a){var b=m(a.projection)?a.projection:"EPSG:3857",d=new Rx({extent:bj(b),maxZoom:a.maxZoom,tileSize:a.tileSize});Px.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,logo:a.logo,projection:b,tileGrid:d,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:Mx});this.l=d.Hb({wrapX:a.wrapX});m(a.tileUrlFunction)?this.xa(a.tileUrlFunction):m(a.urls)?this.xa(Kx(a.urls)):m(a.url)&&this.d(a.url)}v(Ey,Px);-Ey.prototype.xa=function(a){Ey.X.xa.call(this,Nx(this.l,a))};Ey.prototype.d=function(a){this.xa(Kx(Ox(a)))};function Fy(a){a=m(a)?a:{};var b;m(a.attributions)?b=a.attributions:b=[Gy];var d=Sb?"https:":"http:";Ey.call(this,{attributions:b,crossOrigin:m(a.crossOrigin)?a.crossOrigin:"anonymous",opaque:!0,maxZoom:m(a.maxZoom)?a.maxZoom:19,tileLoadFunction:a.tileLoadFunction,url:m(a.url)?a.url:d+"//{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:a.wrapX})}v(Fy,Ey);var Gy=new pf({html:'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.'});function Hy(a){a=m(a)?a:{};var b=Iy[a.layer];this.e=a.layer;var d=Sb?"https:":"http:";Ey.call(this,{attributions:b.attributions,crossOrigin:"anonymous",logo:"//developer.mapquest.com/content/osm/mq_logo.png",maxZoom:b.maxZoom,opaque:!0,tileLoadFunction:a.tileLoadFunction,url:m(a.url)?a.url:d+"//otile{1-4}-s.mqcdn.com/tiles/1.0.0/"+this.e+"/{z}/{x}/{y}.jpg"})}v(Hy,Ey);-var Jy=new pf({html:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>'}),Iy={osm:{maxZoom:19,attributions:[Jy,Gy]},sat:{maxZoom:18,attributions:[Jy,new pf({html:"Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"})]},hyb:{maxZoom:18,attributions:[Jy,Gy]}};Hy.prototype.i=function(){return this.e};function Ky(a){a=m(a)?a:{};Z.call(this,{attributions:a.attributions,doc:a.doc,format:new Pt,logo:a.logo,node:a.node,projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(Ky,Z);function $(a){Y.call(this,{attributions:a.attributions,format:a.format,logo:a.logo,projection:a.projection});this.t=new fn;this.v=a.loader;this.L=m(a.strategy)?a.strategy:wx;this.s={}}v($,Y);$.prototype.pb=function(a){var b=[],d,e;d=0;for(e=a.length;d<e;++d){var f=a[d],g=f.ea;m(g)?g in this.s||(b.push(f),this.s[g]=!0):b.push(f)}$.X.pb.call(this,b)};$.prototype.clear=function(a){wb(this.s);this.t.clear();$.X.clear.call(this,a)};-$.prototype.Lb=function(a,b,d){var e=this.t;a=this.L(a,b);var f,g;f=0;for(g=a.length;f<g;++f){var h=a[f];kn(e,h,function(a){return Zd(a.extent,h)})||(this.v.call(this,h,b,d),e.wa(h,{extent:h.slice()}))}};var Ly={terrain:{cb:"jpg",opaque:!0},"terrain-background":{cb:"jpg",opaque:!0},"terrain-labels":{cb:"png",opaque:!1},"terrain-lines":{cb:"png",opaque:!1},"toner-background":{cb:"png",opaque:!0},toner:{cb:"png",opaque:!0},"toner-hybrid":{cb:"png",opaque:!1},"toner-labels":{cb:"png",opaque:!1},"toner-lines":{cb:"png",opaque:!1},"toner-lite":{cb:"png",opaque:!0},watercolor:{cb:"jpg",opaque:!0}},My={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:3,maxZoom:16}};-function Ny(a){var b=a.layer.indexOf("-"),d=Ly[a.layer],e=Sb?"https://stamen-tiles-{a-d}.a.ssl.fastly.net/":"http://{a-d}.tile.stamen.com/";Ey.call(this,{attributions:Oy,crossOrigin:"anonymous",maxZoom:My[-1==b?a.layer:a.layer.slice(0,b)].maxZoom,opaque:d.opaque,tileLoadFunction:a.tileLoadFunction,url:m(a.url)?a.url:e+a.layer+"/{z}/{x}/{y}."+d.cb})}v(Ny,Ey);-var Oy=[new pf({html:'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.'}),Gy];function Py(a){a=m(a)?a:{};var b=m(a.params)?a.params:{};Px.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,tileUrlFunction:ra(this.uk,this)});var d=a.urls;!m(d)&&m(a.url)&&(d=Ox(a.url));this.e=null!=d?d:[];this.d=b;this.i=Sd()}v(Py,Px);l=Py.prototype;l.rk=function(){return this.d};l.sk=function(){return this.e};l.tk=function(a){a=m(a)?Ox(a):null;this.Rf(a)};l.Rf=function(a){this.e=null!=a?a:[];this.p()};-l.uk=function(a,b,d){var e=this.tileGrid;null===e&&(e=ej(this,d));if(!(e.c.length<=a[0])){var f=Wi(e,a,this.i),e=e.ya(a[0]);1!=b&&(e=e*b+.5|0);b={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Cb(b,this.d);var g=this.e;0==g.length?a=void 0:(d=d.c.split(":").pop(),b.SIZE=e+","+e,b.BBOX=f.join(","),b.BBOXSR=d,b.IMAGESR=d,a=1==g.length?g[0]:g[Wb((a[1]<<a[0])+a[2],g.length)],ya(a,"/")||(a+="/"),ya(a,"MapServer/")?a+="export":ya(a,"ImageServer/")&&(a+="exportImage"),a=Ir(Kr([a],b)));return a}};-l.vk=function(a){Cb(this.d,a);this.p()};function Qy(a,b){Pi.call(this,a,2);this.e=b.ya(a[0]);this.f={}}v(Qy,Pi);Qy.prototype.La=function(a){a=m(a)?ma(a):-1;if(a in this.f)return this.f[a];var b=this.e,d=Nf(b,b);d.strokeStyle="black";d.strokeRect(.5,.5,b+.5,b+.5);d.fillStyle="black";d.textAlign="center";d.textBaseline="middle";d.font="24px sans-serif";d.fillText(kf(this.c),b/2,b/2);return this.f[a]=d.canvas};function Ry(a){cj.call(this,{opaque:!1,projection:a.projection,tileGrid:a.tileGrid})}v(Ry,cj);-Ry.prototype.Zb=function(a,b,d){var e=this.rb(a,b,d);if(Ri(this.c,e))return this.c.get(e);a=new Qy([a,b,d],this.tileGrid);this.c.set(e,a);return a};function Sy(a){Px.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,projection:Ae("EPSG:3857"),state:"loading",tileLoadFunction:a.tileLoadFunction});this.d=a.wrapX;(new Ex(a.url)).send(void 0,ra(this.e,this))}v(Sy,Px);-Sy.prototype.e=function(a){var b=Ae("EPSG:4326"),d=this.k,e;m(a.bounds)&&(e=te(a.bounds,ze(b,d)));var f=a.minzoom||0,g=a.maxzoom||22;this.tileGrid=d=new Rx({extent:bj(d),maxZoom:g,minZoom:f});this.tileUrlFunction=Nx(d.Hb({extent:e,wrapX:this.d}),Kx(a.tiles));if(m(a.attribution)&&null===this.j){b=m(e)?e:b.N();e={};for(var h;f<=g;++f)h=f.toString(),e[h]=[Xi(d,b,f)];this.j=[new pf({html:a.attribution,tileRanges:e})]}Li(this,"ready")};function Ty(a){cj.call(this,{projection:Ae("EPSG:3857"),state:"loading"});this.i=m(a.preemptive)?a.preemptive:!0;this.d=Mx;this.e=void 0;(new Ex(a.url)).send(void 0,ra(this.xk,this))}v(Ty,cj);l=Ty.prototype;l.$h=function(){return this.e};l.wh=function(a,b,d,e,f){null===this.tileGrid?!0===f?oh(function(){d.call(e,null)}):d.call(e,null):(b=this.tileGrid.$b(a,b),Uy(this.Zb(b[0],b[1],b[2],1,this.k),a,d,e,f))};-l.xk=function(a){var b=Ae("EPSG:4326"),d=this.k,e;m(a.bounds)&&(e=te(a.bounds,ze(b,d)));var f=a.minzoom||0,g=a.maxzoom||22;this.tileGrid=d=new Rx({extent:bj(d),maxZoom:g,minZoom:f});this.e=a.template;var h=a.grids;if(null!=h){this.d=Nx(d.Hb({extent:e}),Kx(h));if(m(a.attribution)){b=m(e)?e:b.N();for(e={};f<=g;++f)h=f.toString(),e[h]=[Xi(d,b,f)];this.j=[new pf({html:a.attribution,tileRanges:e})]}Li(this,"ready")}else Li(this,"error")};-l.Zb=function(a,b,d,e,f){var g=this.rb(a,b,d);if(Ri(this.c,g))return this.c.get(g);a=[a,b,d];e=this.d(a,e,f);e=new Vy(a,m(e)?0:4,m(e)?e:"",Wi(this.tileGrid,a),this.i);this.c.set(g,e);return e};l.Te=function(a,b,d){a=this.rb(a,b,d);Ri(this.c,a)&&this.c.get(a)};function Vy(a,b,d,e,f){Pi.call(this,a,b);this.q=d;this.f=e;this.l=f;this.j=this.k=this.e=null}v(Vy,Pi);l=Vy.prototype;l.La=function(){return null};-function Wy(a,b){if(null===a.e||null===a.k||null===a.j)return null;var d=a.e[Math.floor((1-(b[1]-a.f[1])/(a.f[3]-a.f[1]))*a.e.length)];if(!ia(d))return null;d=d.charCodeAt(Math.floor((b[0]-a.f[0])/(a.f[2]-a.f[0])*d.length));93<=d&&d--;35<=d&&d--;d=a.k[d-32];return null!=d?a.j[d]:null}function Uy(a,b,d,e,f){0==a.state&&!0===f?(Uc(a,"change",function(){d.call(e,Wy(this,b))},!1,a),Xy(a)):!0===f?oh(function(){d.call(e,Wy(this,b))},a):d.call(e,Wy(a,b))}l.ub=function(){return this.q};-l.pi=function(){this.state=3;this.d()};l.Ci=function(a){this.e=a.grid;this.k=a.keys;this.j=a.data;this.state=4;this.d()};function Xy(a){0==a.state&&(a.state=1,(new Ex(a.q)).send(void 0,ra(a.Ci,a),ra(a.pi,a)))}l.load=function(){this.l&&Xy(this)};function Yy(a){Y.call(this,{attributions:a.attributions,format:a.format,logo:a.logo,projection:a.projection});this.t=a.tileGrid;this.v=Mx;this.L=this.t.Hb();this.s={};m(a.tileUrlFunction)?(this.v=a.tileUrlFunction,this.p()):m(a.urls)?(this.v=Kx(a.urls),this.p()):m(a.url)&&(this.v=Kx(Ox(a.url)),this.p())}v(Yy,Y);l=Yy.prototype;l.clear=function(){wb(this.s)};-function Zy(a,b,d,e){var f=a.s;a=a.t.$b(b,d);f=f[a[0]+"/"+a[1]+"/"+a[2]];if(m(f))for(a=0,d=f.length;a<d;++a){var g=f[a];if(g.V().Nb(b[0],b[1])&&e.call(void 0,g))break}}l.Jb=function(a,b,d,e){var f=this.t,g=this.s;b=ac(f.c,b,0);a=Xi(f,a,b);for(var h,f=a.c;f<=a.e;++f)for(h=a.d;h<=a.f;++h){var k=g[b+"/"+f+"/"+h];if(m(k)){var n,p;n=0;for(p=k.length;n<p;++n){var q=d.call(e,k[n]);if(q)return q}}}};l.Ea=function(){var a=this.s,b=[],d;for(d in a)$a(b,a[d]);return b};-l.Ch=function(a,b){var d=[];Zy(this,a,b,function(a){d.push(a)});return d};l.Lb=function(a,b,d){function e(a,b){k[a]=b;Li(this,"ready")}var f=this.L,g=this.t,h=this.v,k=this.s;b=ac(g.c,b,0);a=Xi(g,a,b);var g=[b,0,0],n,p;for(n=a.c;n<=a.e;++n)for(p=a.d;p<=a.f;++p){var q=b+"/"+n+"/"+p;if(!(q in k)){g[0]=b;g[1]=n;g[2]=p;f(g,d,g);var r=h(g,1,d);m(r)&&(k[q]=[],ty(this,r,sa(e,q),ca,this))}}};function $y(a){a=m(a)?a:{};var b=m(a.params)?a.params:{};Px.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,logo:a.logo,opaque:!yb(b,"TRANSPARENT",!0),projection:a.projection,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,tileUrlFunction:ra(this.Ck,this)});var d=a.urls;!m(d)&&m(a.url)&&(d=Ox(a.url));this.e=null!=d?d:[];this.l=m(a.gutter)?a.gutter:0;this.d=b;this.i=!0;this.n=a.serverType;this.t=m(a.hidpi)?a.hidpi:!0;this.s="";az(this);this.v=Sd();bz(this)}v($y,Px);l=$y.prototype;-l.yk=function(a,b,d,e){d=Ae(d);var f=this.tileGrid;null===f&&(f=ej(this,d));b=f.$b(a,b);if(!(f.c.length<=b[0])){var g=f.ra(b[0]),h=Wi(f,b,this.v),f=f.ya(b[0]),k=this.l;0!==k&&(f+=2*k,h=Wd(h,g*k,h));k={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.d.LAYERS};Cb(k,this.d,e);e=Math.floor((h[3]-a[1])/g);k[this.i?"I":"X"]=Math.floor((a[0]-h[0])/g);k[this.i?"J":"Y"]=e;return cz(this,b,f,h,1,d,k)}};l.md=function(){return this.l};-l.rb=function(a,b,d){return this.s+$y.X.rb.call(this,a,b,d)};l.zk=function(){return this.d};-function cz(a,b,d,e,f,g,h){var k=a.e;if(0!=k.length){h.WIDTH=d;h.HEIGHT=d;h[a.i?"CRS":"SRS"]=g.c;"STYLES"in a.d||(h.STYLES=new String(""));if(1!=f)switch(a.n){case "geoserver":h.FORMAT_OPTIONS="dpi:"+(90*f+.5|0);break;case "mapserver":h.MAP_RESOLUTION=90*f;break;case "carmentaserver":case "qgis":h.DPI=90*f}d=g.d;a.i&&"ne"==d.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 Ir(Kr([1==k.length?k[0]:k[Wb((b[1]<<b[0])+b[2],k.length)]],h))}}-l.Rc=function(a,b,d){a=$y.X.Rc.call(this,a,b,d);return 1!=b&&this.t&&m(this.n)?a*b+.5|0:a};l.Ak=function(){return this.e};function az(a){var b=0,d=[],e,f;e=0;for(f=a.e.length;e<f;++e)d[b++]=a.e[e];for(var g in a.d)d[b++]=g+"-"+a.d[g];a.s=d.join("#")}l.Bk=function(a){a=m(a)?Ox(a):null;this.Sf(a)};l.Sf=function(a){this.e=null!=a?a:[];az(this);this.p()};-l.Ck=function(a,b,d){var e=this.tileGrid;null===e&&(e=ej(this,d));if(!(e.c.length<=a[0])){1==b||this.t&&m(this.n)||(b=1);var f=e.ra(a[0]),g=Wi(e,a,this.v),e=e.ya(a[0]),h=this.l;0!==h&&(e+=2*h,g=Wd(g,f*h,g));1!=b&&(e=e*b+.5|0);f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Cb(f,this.d);return cz(this,a,e,g,b,d,f)}};l.Dk=function(a){Cb(this.d,a);az(this);bz(this);this.p()};function bz(a){a.i=0<=Ma(yb(a.d,"VERSION","1.3.0"),"1.3")};function dz(a){a=m(a)?a:{};Z.call(this,{attributions:a.attributions,extent:a.extent,format:new su({defaultDataProjection:a.defaultProjection}),logo:a.logo,object:a.object,projection:a.projection,text:a.text,url:a.url})}v(dz,Z);function ez(a){this.d=a.matrixIds;Ui.call(this,{origin:a.origin,origins:a.origins,resolutions:a.resolutions,tileSize:a.tileSize,tileSizes:a.tileSizes})}v(ez,Ui);ez.prototype.k=function(){return this.d};-function fz(a){var b=[],d=[],e=[],f=[],g;g=Ae(a.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var h=g.rd(),k="ne"==g.d.substr(0,2);cb(a.TileMatrix,function(a,b){return b.ScaleDenominator-a.ScaleDenominator});Pa(a.TileMatrix,function(a){d.push(a.Identifier);k?e.push([a.TopLeftCorner[1],a.TopLeftCorner[0]]):e.push(a.TopLeftCorner);b.push(2.8E-4*a.ScaleDenominator/h);f.push(a.TileWidth)});return new ez({origins:e,resolutions:b,matrixIds:d,tileSizes:f})};function gz(a){function b(a){a="KVP"==e?Ir(Kr([a],g)):a.replace(/\{(\w+?)\}/g,function(a,b){return b.toLowerCase()in g?g[b.toLowerCase()]:a});return function(b){if(null!==b){var d={TileMatrix:f.d[b[0]],TileCol:b[1],TileRow:b[2]};Cb(d,h);b=a;return b="KVP"==e?Ir(Kr([b],d)):b.replace(/\{(\w+?)\}/g,function(a,b){return d[b]})}}}var d=m(a.wrapX)?a.wrapX:!0;this.t=m(a.version)?a.version:"1.0.0";this.e=m(a.format)?a.format:"image/jpeg";this.d=m(a.dimensions)?a.dimensions:{};this.l="";hz(this);this.n=a.layer;-this.i=a.matrixSet;this.s=a.style;var e=m(a.requestEncoding)?a.requestEncoding:"KVP",f=a.tileGrid,g={layer:this.n,style:this.s,tilematrixset:this.i};"KVP"==e&&Cb(g,{Service:"WMTS",Request:"GetTile",Version:this.t,Format:this.e});var h=this.d,k=Mx,n=a.urls;!m(n)&&m(a.url)&&(n=Ox(a.url));m(n)&&(k=Lx(Ra(n,b)));var p=Sd(),q=[0,0,0],k=Nx(function(a,b,e){if(f.c.length<=a[0])return null;var g=a[1],h=-a[2]-1,k=Wi(f,a,p),n=b.N();d&&null!==n&&b.i&&(b=Math.ceil(qe(n)/qe(k)),g=Wb(g,b),q[0]=a[0],q[1]=g,q[2]=a[2],-k=Wi(f,q,p));return!pe(k,n)||pe(k,n)&&(k[0]==n[2]||k[2]==n[0]||k[1]==n[3]||k[3]==n[1])?null:gf(a[0],g,h,e)},k);Px.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,tileClass:a.tileClass,tileGrid:f,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:k})}v(gz,Px);l=gz.prototype;l.Ah=function(){return this.d};l.Eh=function(){return this.e};l.rb=function(a,b,d){return this.l+gz.X.rb.call(this,a,b,d)};l.Ek=function(){return this.n};-l.Qh=function(){return this.i};l.Fk=function(){return this.s};l.di=function(){return this.t};function hz(a){var b=0,d=[],e;for(e in a.d)d[b++]=e+"-"+a.d[e];a.l=d.join("/")}l.sm=function(a){Cb(this.d,a);hz(this);this.p()};function iz(a){var b=m(a)?a:b;Ui.call(this,{origin:[0,0],resolutions:b.resolutions})}v(iz,Ui);iz.prototype.Hb=function(a){a=m(a)?a:{};var b=this.minZoom,d=this.maxZoom,e=null;if(m(a.extent)){var e=Array(d+1),f;for(f=0;f<=d;++f)e[f]=f<b?null:Xi(this,a.extent,f)}return function(a,f,k){f=a[0];if(f<b||d<f)return null;var n=Math.pow(2,f),p=a[1];if(0>p||n<=p)return null;a=a[2];return a<-n||-1<a||null!==e&&!nf(e[f],p,-a-1)?null:gf(f,p,-a-1,k)}};function jz(a){a=m(a)?a:{};var b=a.size,d=b[0],e=b[1],f=[],g=256;switch(m(a.tierSizeCalculation)?a.tierSizeCalculation:"default"){case "default":for(;d>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;e<d;e++)g.push(1<<e),h.push(f[e-1][0]*f[e-1][1]+h[e-1]);g.reverse();var g=new iz({resolutions:g}),k=a.url,b=Nx(g.Hb({extent:[0,0,b[0],b[1]]}),function(a){if(null!==-a){var b=a[0],d=a[1];a=a[2];return k+"TileGroup"+((d+a*f[b][0]+h[b])/256|0)+"/"+b+"-"+d+"-"+a+".jpg"}});Px.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,logo:a.logo,tileClass:kz,tileGrid:g,tileUrlFunction:b})}v(jz,Px);function kz(a,b,d,e,f){Xv.call(this,a,b,d,e,f);this.e={}}v(kz,Xv);-kz.prototype.La=function(a){var b=m(a)?ma(a).toString():"";if(b in this.e)return this.e[b];a=kz.X.La.call(this,a);if(2==this.state){if(256==a.width&&256==a.height)return this.e[b]=a;var d=Nf(256,256);d.drawImage(a,0,0);return this.e[b]=d.canvas}return a};function lz(a){a=m(a)?a:{};this.f=m(a.initialSize)?a.initialSize:256;this.d=m(a.maxSize)?a.maxSize:m(ua)?ua:2048;this.c=m(a.space)?a.space:1;this.j=[new mz(this.f,this.c)];this.e=this.f;this.i=[new mz(this.e,this.c)]}lz.prototype.add=function(a,b,d,e,f,g){if(b+this.c>this.d||d+this.c>this.d)return null;e=nz(this,!1,a,b,d,e,g);if(null===e)return null;a=nz(this,!0,a,b,d,m(f)?f:cd,g);return{offsetX:e.offsetX,offsetY:e.offsetY,image:e.image,Bf:a.image}};-function nz(a,b,d,e,f,g,h){var k=b?a.i:a.j,n,p,q;p=0;for(q=k.length;p<q;++p){n=k[p];n=n.add(d,e,f,g,h);if(null!==n)return n;null===n&&p===q-1&&(b?(n=Math.min(2*a.e,a.d),a.e=n):(n=Math.min(2*a.f,a.d),a.f=n),n=new mz(n,a.c),k.push(n),++q)}}function mz(a,b){this.c=b;this.f=[{x:0,y:0,width:a,height:a}];this.e={};this.d=Df("CANVAS");this.d.width=a;this.d.height=a;this.j=this.d.getContext("2d")}mz.prototype.get=function(a){return yb(this.e,a,null)};-mz.prototype.add=function(a,b,d,e,f){var g,h,k;h=0;for(k=this.f.length;h<k;++h)if(g=this.f[h],g.width>=b+this.c&&g.height>=d+this.c)return k={offsetX:g.x+this.c,offsetY:g.y+this.c,image:this.d},this.e[a]=k,e.call(f,this.j,g.x+this.c,g.y+this.c),a=h,b=b+this.c,d=d+this.c,f=e=void 0,g.width-b>g.height-d?(e={x:g.x+b,y:g.y,width:g.width-b,height:g.height},f={x:g.x,y:g.y+d,width:b,height:g.height-d},oz(this,a,e,f)):(e={x:g.x+b,y:g.y,width:g.width-b,height:d},f={x:g.x,y:g.y+d,width:g.width,height:g.height--d},oz(this,a,e,f)),k;return null};function oz(a,b,d,e){b=[b,1];0<d.width&&0<d.height&&b.push(d);0<e.width&&0<e.height&&b.push(e);a.f.splice.apply(a.f,b)};function pz(a){this.u=this.e=this.j=null;this.q=m(a.fill)?a.fill:null;this.R=[0,0];this.c=a.points;this.d=m(a.radius)?a.radius:a.radius1;this.i=m(a.radius2)?a.radius2:this.d;this.k=m(a.angle)?a.angle:0;this.f=m(a.stroke)?a.stroke:null;this.L=this.W=this.J=null;var b=a.atlasManager,d="",e="",f=0,g=null,h,k=0;null!==this.f&&(h=sg(this.f.c),k=this.f.f,m(k)||(k=1),g=this.f.d,Yf||(g=null),e=this.f.j,m(e)||(e="round"),d=this.f.e,m(d)||(d="round"),f=this.f.i,m(f)||(f=10));var n=2*(this.d+k)+1,d={strokeStyle:h,-Xc:k,size:n,lineCap:d,lineDash:g,lineJoin:e,miterLimit:f};if(m(b)){var n=Math.round(n),e=null===this.q,p;e&&(p=ra(this.Wf,this,d));f=this.Bb();p=b.add(f,n,n,ra(this.Xf,this,d),p);this.e=p.image;this.R=[p.offsetX,p.offsetY];b=p.image.width;this.u=e?p.Bf:this.e}else this.e=Df("CANVAS"),this.e.height=n,this.e.width=n,b=n=this.e.width,p=this.e.getContext("2d"),this.Xf(d,p,0,0),null===this.q?(p=this.u=Df("CANVAS"),p.height=d.size,p.width=d.size,p=p.getContext("2d"),this.Wf(d,p,0,0)):this.u=this.e;this.J=-[n/2,n/2];this.W=[n,n];this.L=[b,b];uj.call(this,{opacity:1,rotateWithView:!1,rotation:m(a.rotation)?a.rotation:0,scale:1,snapToPixel:m(a.snapToPixel)?a.snapToPixel:!0})}v(pz,uj);l=pz.prototype;l.Ab=function(){return this.J};l.Kk=function(){return this.k};l.Lk=function(){return this.q};l.Md=function(){return this.u};l.Fb=function(){return this.e};l.od=function(){return this.L};l.Sc=function(){return 2};l.Gb=function(){return this.R};l.Mk=function(){return this.c};l.Nk=function(){return this.d};-l.Zh=function(){return this.i};l.kb=function(){return this.W};l.Ok=function(){return this.f};l.Ae=ca;l.load=ca;l.Se=ca;-l.Xf=function(a,b,d,e){var f;b.setTransform(1,0,0,1,0,0);b.translate(d,e);b.beginPath();this.i!==this.d&&(this.c*=2);for(d=0;d<=this.c;d++)e=2*d*Math.PI/this.c-Math.PI/2+this.k,f=0===d%2?this.d:this.i,b.lineTo(a.size/2+f*Math.cos(e),a.size/2+f*Math.sin(e));null!==this.q&&(b.fillStyle=sg(this.q.c),b.fill());null!==this.f&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Xc,null===a.lineDash||b.setLineDash(a.lineDash),b.lineCap=a.lineCap,b.lineJoin=a.lineJoin,b.miterLimit=a.miterLimit,b.stroke());b.closePath()};-l.Wf=function(a,b,d,e){b.setTransform(1,0,0,1,0,0);b.translate(d,e);b.beginPath();this.i!==this.d&&(this.c*=2);var f;for(d=0;d<=this.c;d++)f=2*d*Math.PI/this.c-Math.PI/2+this.k,e=0===d%2?this.d:this.i,b.lineTo(a.size/2+e*Math.cos(f),a.size/2+e*Math.sin(f));b.fillStyle=kl;b.fill();null!==this.f&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Xc,null===a.lineDash||b.setLineDash(a.lineDash),b.stroke());b.closePath()};-l.Bb=function(){var a=null===this.f?"-":this.f.Bb(),b=null===this.q?"-":this.q.Bb();if(null===this.j||a!=this.j[1]||b!=this.j[2]||this.d!=this.j[3]||this.i!=this.j[4]||this.k!=this.j[5]||this.c!=this.j[6])this.j=["r"+a+b+(m(this.d)?this.d.toString():"-")+(m(this.i)?this.i.toString():"-")+(m(this.k)?this.k.toString():"-")+(m(this.c)?this.c.toString():"-"),a,b,this.d,this.i,this.k,this.c];return this.j[0]};function qz(a,b,d,e,f,g){Xv.call(this,b,d,e,"anonymous",g);this.l=a;this.e=null}v(qz,Xv);qz.prototype.La=function(){return this.e};-qz.prototype.load=function(){if(0===this.state){this.state=1;var a=this;this.f.addEventListener("load",function(){a.e=document.createElement("canvas");a.e.width=a.f.width;a.e.height=a.f.height;var b=a.e.width*a.e.height*4,d=a.e.getContext("2d");d.drawImage(a.f,0,0);for(var e=d.getImageData(0,0,a.e.width,a.e.height),f=e.data,g=0;g<b;g+=4){var h=a.l[f[g+0]+","+f[g+1]+","+f[g+2]+","+f[g+3]];h&&(f[g+0]=h.r,f[g+1]=h.g,f[g+2]=h.b,f[g+3]=h.a)}d.putImageData(e,0,0);a.state=2;a.d()});this.f.src=this.q}};t("ol.animation.bounce",function(a){var b=a.resolution,d=m(a.start)?a.start:ta(),e=m(a.duration)?a.duration:1E3,f=m(a.easing)?a.easing:cf;return function(a,h){if(h.time<d)return h.animate=!0,h.viewHints[0]+=1,!0;if(h.time<d+e){var k=f((h.time-d)/e),n=b-h.viewState.resolution;h.animate=!0;h.viewState.resolution+=k*n;h.viewHints[0]+=1;return!0}return!1}},OPENLAYERS);t("ol.animation.pan",df,OPENLAYERS);t("ol.animation.rotate",ef,OPENLAYERS);t("ol.animation.zoom",ff,OPENLAYERS);-t("ol.Attribution",pf,OPENLAYERS);pf.prototype.getHTML=pf.prototype.d;kg.prototype.element=kg.prototype.element;t("ol.Collection",lg,OPENLAYERS);lg.prototype.clear=lg.prototype.clear;lg.prototype.extend=lg.prototype.Be;lg.prototype.forEach=lg.prototype.forEach;lg.prototype.getArray=lg.prototype.lj;lg.prototype.item=lg.prototype.item;lg.prototype.getLength=lg.prototype.Mb;lg.prototype.insertAt=lg.prototype.Cd;lg.prototype.pop=lg.prototype.pop;lg.prototype.push=lg.prototype.push;-lg.prototype.remove=lg.prototype.remove;lg.prototype.removeAt=lg.prototype.Pe;lg.prototype.setAt=lg.prototype.Yl;t("ol.coordinate.add",vd,OPENLAYERS);t("ol.coordinate.createStringXY",function(a){return function(b){return Cd(b,a)}},OPENLAYERS);t("ol.coordinate.format",yd,OPENLAYERS);t("ol.coordinate.rotate",Ad,OPENLAYERS);t("ol.coordinate.toStringHDMS",function(a){return m(a)?xd(a[1],"NS")+" "+xd(a[0],"EW"):""},OPENLAYERS);t("ol.coordinate.toStringXY",Cd,OPENLAYERS);t("ol.DeviceOrientation",mp,OPENLAYERS);-mp.prototype.getAlpha=mp.prototype.j;mp.prototype.getBeta=mp.prototype.i;mp.prototype.getGamma=mp.prototype.k;mp.prototype.getHeading=mp.prototype.l;mp.prototype.getTracking=mp.prototype.e;mp.prototype.setTracking=mp.prototype.d;t("ol.easing.easeIn",function(a){return Math.pow(a,3)},OPENLAYERS);t("ol.easing.easeOut",$e,OPENLAYERS);t("ol.easing.inAndOut",af,OPENLAYERS);t("ol.easing.linear",bf,OPENLAYERS);t("ol.easing.upAndDown",cf,OPENLAYERS);t("ol.extent.boundingExtent",Rd,OPENLAYERS);-t("ol.extent.buffer",Wd,OPENLAYERS);t("ol.extent.containsCoordinate",function(a,b){return $d(a,b[0],b[1])},OPENLAYERS);t("ol.extent.containsExtent",Zd,OPENLAYERS);t("ol.extent.containsXY",$d,OPENLAYERS);t("ol.extent.createEmpty",Sd,OPENLAYERS);t("ol.extent.equals",ce,OPENLAYERS);t("ol.extent.extend",de,OPENLAYERS);t("ol.extent.getBottomLeft",ge,OPENLAYERS);t("ol.extent.getBottomRight",he,OPENLAYERS);t("ol.extent.getCenter",ke,OPENLAYERS);t("ol.extent.getHeight",ne,OPENLAYERS);-t("ol.extent.getIntersection",oe,OPENLAYERS);t("ol.extent.getSize",function(a){return[a[2]-a[0],a[3]-a[1]]},OPENLAYERS);t("ol.extent.getTopLeft",je,OPENLAYERS);t("ol.extent.getTopRight",ie,OPENLAYERS);t("ol.extent.getWidth",qe,OPENLAYERS);t("ol.extent.intersects",pe,OPENLAYERS);t("ol.extent.isEmpty",re,OPENLAYERS);t("ol.extent.applyTransform",te,OPENLAYERS);t("ol.Feature",N,OPENLAYERS);N.prototype.clone=N.prototype.clone;N.prototype.getGeometry=N.prototype.V;N.prototype.getId=N.prototype.Hh;-N.prototype.getGeometryName=N.prototype.Gh;N.prototype.getStyle=N.prototype.sj;N.prototype.getStyleFunction=N.prototype.tj;N.prototype.setGeometry=N.prototype.Xa;N.prototype.setStyle=N.prototype.l;N.prototype.setId=N.prototype.e;N.prototype.setGeometryName=N.prototype.j;t("ol.FeatureOverlay",op,OPENLAYERS);op.prototype.addFeature=op.prototype.Hf;op.prototype.getFeatures=op.prototype.mj;op.prototype.getMap=op.prototype.nj;op.prototype.removeFeature=op.prototype.Hd;op.prototype.setFeatures=op.prototype.Wc;-op.prototype.setMap=op.prototype.setMap;op.prototype.setStyle=op.prototype.Jf;op.prototype.getStyle=op.prototype.oj;op.prototype.getStyleFunction=op.prototype.pj;t("ol.Geolocation",V,OPENLAYERS);V.prototype.getAccuracy=V.prototype.qf;V.prototype.getAccuracyGeometry=V.prototype.s;V.prototype.getAltitude=V.prototype.t;V.prototype.getAltitudeAccuracy=V.prototype.v;V.prototype.getHeading=V.prototype.L;V.prototype.getPosition=V.prototype.R;V.prototype.getProjection=V.prototype.k;V.prototype.getSpeed=V.prototype.J;-V.prototype.getTracking=V.prototype.l;V.prototype.getTrackingOptions=V.prototype.i;V.prototype.setProjection=V.prototype.n;V.prototype.setTracking=V.prototype.d;V.prototype.setTrackingOptions=V.prototype.u;t("ol.Graticule",Rv,OPENLAYERS);Rv.prototype.getMap=Rv.prototype.wj;Rv.prototype.getMeridians=Rv.prototype.Rh;Rv.prototype.getParallels=Rv.prototype.Wh;Rv.prototype.setMap=Rv.prototype.setMap;t("ol.has.DEVICE_PIXEL_RATIO",Wf,OPENLAYERS);t("ol.has.CANVAS",Zf,OPENLAYERS);-t("ol.has.DEVICE_ORIENTATION",$f,OPENLAYERS);t("ol.has.GEOLOCATION",ag,OPENLAYERS);t("ol.has.TOUCH",bg,OPENLAYERS);t("ol.has.WEBGL",Vf,OPENLAYERS);Wv.prototype.getImage=Wv.prototype.c;Xv.prototype.getImage=Xv.prototype.La;t("ol.Kinetic",Jj,OPENLAYERS);t("ol.loadingstrategy.all",function(){return[[-Infinity,-Infinity,Infinity,Infinity]]},OPENLAYERS);t("ol.loadingstrategy.bbox",wx,OPENLAYERS);-t("ol.loadingstrategy.createTile",function(a){return function(b,d){var e=ac(a.c,d,0),f=Xi(a,b,e),g=[],e=[e,0,0];for(e[1]=f.c;e[1]<=f.e;++e[1])for(e[2]=f.d;e[2]<=f.f;++e[2])g.push(Wi(a,e));return g}},OPENLAYERS);t("ol.Map",K,OPENLAYERS);K.prototype.addControl=K.prototype.ih;K.prototype.addInteraction=K.prototype.jh;K.prototype.addLayer=K.prototype.df;K.prototype.addOverlay=K.prototype.ef;K.prototype.beforeRender=K.prototype.Qa;K.prototype.forEachFeatureAtPixel=K.prototype.se;-K.prototype.forEachLayerAtPixel=K.prototype.Aj;K.prototype.hasFeatureAtPixel=K.prototype.Oi;K.prototype.getEventCoordinate=K.prototype.Bh;K.prototype.getEventPixel=K.prototype.ld;K.prototype.getTarget=K.prototype.vc;K.prototype.getTargetElement=K.prototype.xe;K.prototype.getCoordinateFromPixel=K.prototype.va;K.prototype.getControls=K.prototype.zh;K.prototype.getOverlays=K.prototype.Vh;K.prototype.getInteractions=K.prototype.Ih;K.prototype.getLayerGroup=K.prototype.Yb;K.prototype.getLayers=K.prototype.ia;-K.prototype.getPixelFromCoordinate=K.prototype.i;K.prototype.getSize=K.prototype.j;K.prototype.getView=K.prototype.c;K.prototype.getViewport=K.prototype.ei;K.prototype.renderSync=K.prototype.Vl;K.prototype.render=K.prototype.render;K.prototype.removeControl=K.prototype.Pl;K.prototype.removeInteraction=K.prototype.Ql;K.prototype.removeLayer=K.prototype.Rl;K.prototype.removeOverlay=K.prototype.Sl;K.prototype.setLayerGroup=K.prototype.vg;K.prototype.setSize=K.prototype.W;K.prototype.setTarget=K.prototype.ma;-K.prototype.setView=K.prototype.Ja;K.prototype.updateSize=K.prototype.u;wi.prototype.originalEvent=wi.prototype.originalEvent;wi.prototype.pixel=wi.prototype.pixel;wi.prototype.coordinate=wi.prototype.coordinate;wi.prototype.dragging=wi.prototype.dragging;wi.prototype.preventDefault=wi.prototype.preventDefault;wi.prototype.stopPropagation=wi.prototype.tb;Tg.prototype.map=Tg.prototype.map;Tg.prototype.frameState=Tg.prototype.frameState;md.prototype.key=md.prototype.key;md.prototype.oldValue=md.prototype.oldValue;-nd.prototype.transform=nd.prototype.transform;t("ol.Object",qd,OPENLAYERS);qd.prototype.bindTo=qd.prototype.O;qd.prototype.get=qd.prototype.get;qd.prototype.getKeys=qd.prototype.K;qd.prototype.getProperties=qd.prototype.M;qd.prototype.set=qd.prototype.set;qd.prototype.setProperties=qd.prototype.I;qd.prototype.unbind=qd.prototype.P;qd.prototype.unbindAll=qd.prototype.Q;t("ol.Observable",kd,OPENLAYERS);t("ol.Observable.unByKey",ld,OPENLAYERS);kd.prototype.changed=kd.prototype.p;-kd.prototype.getRevision=kd.prototype.C;kd.prototype.on=kd.prototype.A;kd.prototype.once=kd.prototype.D;kd.prototype.un=kd.prototype.B;kd.prototype.unByKey=kd.prototype.G;t("ol.WEBGL_MAX_TEXTURE_SIZE",ua,OPENLAYERS);t("ol.inherits",v,OPENLAYERS);t("ol.Overlay",L,OPENLAYERS);L.prototype.getElement=L.prototype.d;L.prototype.getMap=L.prototype.e;L.prototype.getOffset=L.prototype.l;L.prototype.getPosition=L.prototype.u;L.prototype.getPositioning=L.prototype.n;L.prototype.setElement=L.prototype.Qe;-L.prototype.setMap=L.prototype.setMap;L.prototype.setOffset=L.prototype.s;L.prototype.setPosition=L.prototype.i;L.prototype.setPositioning=L.prototype.t;t("ol.Tile",Pi,OPENLAYERS);Pi.prototype.state=Pi.prototype.state;Pi.prototype.changed=Pi.prototype.d;Pi.prototype.getTileCoord=Pi.prototype.i;t("ol.View",B,OPENLAYERS);B.prototype.constrainCenter=B.prototype.l;B.prototype.constrainResolution=B.prototype.constrainResolution;B.prototype.constrainRotation=B.prototype.constrainRotation;-B.prototype.getCenter=B.prototype.d;B.prototype.calculateExtent=B.prototype.k;B.prototype.getProjection=B.prototype.R;B.prototype.getResolution=B.prototype.c;B.prototype.getResolutionForExtent=B.prototype.n;B.prototype.getRotation=B.prototype.e;B.prototype.getZoom=B.prototype.hi;B.prototype.fitExtent=B.prototype.re;B.prototype.fitGeometry=B.prototype.vh;B.prototype.centerOn=B.prototype.qh;B.prototype.rotate=B.prototype.rotate;B.prototype.setCenter=B.prototype.Ma;B.prototype.setResolution=B.prototype.j;-B.prototype.setRotation=B.prototype.v;B.prototype.setZoom=B.prototype.W;t("ol.wv.LookupImageTile.factory",function(a){return function(b,d,e,f,g){return new qz(a,b,d,e,0,g)}},OPENLAYERS);t("ol.xml.getAllTextContent",Lp,OPENLAYERS);t("ol.xml.parse",eq,OPENLAYERS);t("ol.webgl.Context",Qn,OPENLAYERS);Qn.prototype.getGL=Qn.prototype.el;Qn.prototype.getHitDetectionFramebuffer=Qn.prototype.ue;Qn.prototype.useProgram=Qn.prototype.Td;t("ol.tilegrid.TileGrid",Ui,OPENLAYERS);Ui.prototype.getMaxZoom=Ui.prototype.qd;-Ui.prototype.getMinZoom=Ui.prototype.sd;Ui.prototype.getOrigin=Ui.prototype.Pb;Ui.prototype.getResolution=Ui.prototype.ra;Ui.prototype.getResolutions=Ui.prototype.Sd;Ui.prototype.getTileCoordForCoordAndResolution=Ui.prototype.$b;Ui.prototype.getTileCoordForCoordAndZ=Ui.prototype.Qc;Ui.prototype.getTileSize=Ui.prototype.ya;t("ol.tilegrid.WMTS",ez,OPENLAYERS);ez.prototype.getMatrixIds=ez.prototype.k;t("ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet",fz,OPENLAYERS);t("ol.tilegrid.XYZ",Rx,OPENLAYERS);-t("ol.tilegrid.Zoomify",iz,OPENLAYERS);t("ol.style.AtlasManager",lz,OPENLAYERS);t("ol.style.Circle",pl,OPENLAYERS);pl.prototype.getAnchor=pl.prototype.Ab;pl.prototype.getFill=pl.prototype.Gk;pl.prototype.getImage=pl.prototype.Fb;pl.prototype.getOrigin=pl.prototype.Gb;pl.prototype.getRadius=pl.prototype.Hk;pl.prototype.getSize=pl.prototype.kb;pl.prototype.getStroke=pl.prototype.Ik;t("ol.style.Fill",nl,OPENLAYERS);nl.prototype.getColor=nl.prototype.d;nl.prototype.setColor=nl.prototype.e;-t("ol.style.Icon",vj,OPENLAYERS);vj.prototype.getAnchor=vj.prototype.Ab;vj.prototype.getImage=vj.prototype.Fb;vj.prototype.getOrigin=vj.prototype.Gb;vj.prototype.getSrc=vj.prototype.Jk;vj.prototype.getSize=vj.prototype.kb;t("ol.style.Image",uj,OPENLAYERS);uj.prototype.getOpacity=uj.prototype.Nd;uj.prototype.getRotateWithView=uj.prototype.ud;uj.prototype.getRotation=uj.prototype.Od;uj.prototype.getScale=uj.prototype.Pd;uj.prototype.getSnapToPixel=uj.prototype.vd;uj.prototype.getImage=uj.prototype.Fb;-uj.prototype.setRotation=uj.prototype.Qd;uj.prototype.setScale=uj.prototype.Rd;t("ol.style.RegularShape",pz,OPENLAYERS);pz.prototype.getAnchor=pz.prototype.Ab;pz.prototype.getAngle=pz.prototype.Kk;pz.prototype.getFill=pz.prototype.Lk;pz.prototype.getImage=pz.prototype.Fb;pz.prototype.getOrigin=pz.prototype.Gb;pz.prototype.getPoints=pz.prototype.Mk;pz.prototype.getRadius=pz.prototype.Nk;pz.prototype.getRadius2=pz.prototype.Zh;pz.prototype.getSize=pz.prototype.kb;pz.prototype.getStroke=pz.prototype.Ok;-t("ol.style.Stroke",jl,OPENLAYERS);jl.prototype.getColor=jl.prototype.Pk;jl.prototype.getLineCap=jl.prototype.Lh;jl.prototype.getLineDash=jl.prototype.Qk;jl.prototype.getLineJoin=jl.prototype.Mh;jl.prototype.getMiterLimit=jl.prototype.Sh;jl.prototype.getWidth=jl.prototype.Rk;jl.prototype.setColor=jl.prototype.Sk;jl.prototype.setLineCap=jl.prototype.am;jl.prototype.setLineDash=jl.prototype.Tk;jl.prototype.setLineJoin=jl.prototype.bm;jl.prototype.setMiterLimit=jl.prototype.cm;-jl.prototype.setWidth=jl.prototype.jm;t("ol.style.Style",ql,OPENLAYERS);ql.prototype.getGeometry=ql.prototype.V;ql.prototype.getGeometryFunction=ql.prototype.Fh;ql.prototype.getFill=ql.prototype.Uk;ql.prototype.getImage=ql.prototype.Vk;ql.prototype.getStroke=ql.prototype.Wk;ql.prototype.getText=ql.prototype.Xk;ql.prototype.getZIndex=ql.prototype.gi;ql.prototype.setGeometry=ql.prototype.Yf;ql.prototype.setZIndex=ql.prototype.lm;t("ol.style.Text",es,OPENLAYERS);es.prototype.getFont=es.prototype.Dh;-es.prototype.getOffsetX=es.prototype.Th;es.prototype.getOffsetY=es.prototype.Uh;es.prototype.getFill=es.prototype.Yk;es.prototype.getRotation=es.prototype.Zk;es.prototype.getScale=es.prototype.$k;es.prototype.getStroke=es.prototype.al;es.prototype.getText=es.prototype.bl;es.prototype.getTextAlign=es.prototype.ai;es.prototype.getTextBaseline=es.prototype.bi;es.prototype.setFont=es.prototype.$l;es.prototype.setFill=es.prototype.Zl;es.prototype.setRotation=es.prototype.cl;es.prototype.setScale=es.prototype.dl;-es.prototype.setStroke=es.prototype.fm;es.prototype.setText=es.prototype.gm;es.prototype.setTextAlign=es.prototype.hm;es.prototype.setTextBaseline=es.prototype.im;t("ol.Sphere",ue,OPENLAYERS);ue.prototype.geodesicArea=ue.prototype.f;ue.prototype.haversineDistance=ue.prototype.c;t("ol.source.BingMaps",Sx,OPENLAYERS);t("ol.source.BingMaps.TOS_ATTRIBUTION",Tx,OPENLAYERS);t("ol.source.Cluster",Ux,OPENLAYERS);Ux.prototype.getSource=Ux.prototype.L;Y.prototype.readFeatures=Y.prototype.c;-t("ol.source.GeoJSON",uy,OPENLAYERS);t("ol.source.GPX",vy,OPENLAYERS);t("ol.source.IGC",wy,OPENLAYERS);t("ol.source.ImageCanvas",dn,OPENLAYERS);t("ol.source.ImageMapGuide",xy,OPENLAYERS);xy.prototype.getParams=xy.prototype.bk;xy.prototype.getImageLoadFunction=xy.prototype.ak;xy.prototype.updateParams=xy.prototype.ek;xy.prototype.setImageLoadFunction=xy.prototype.dk;t("ol.source.Image",an,OPENLAYERS);t("ol.source.ImageStatic",yy,OPENLAYERS);t("ol.source.ImageVector",rn,OPENLAYERS);-rn.prototype.getSource=rn.prototype.fk;rn.prototype.getStyle=rn.prototype.gk;rn.prototype.getStyleFunction=rn.prototype.hk;rn.prototype.setStyle=rn.prototype.Qf;t("ol.source.ImageWMS",zy,OPENLAYERS);zy.prototype.getGetFeatureInfoUrl=zy.prototype.kk;zy.prototype.getParams=zy.prototype.mk;zy.prototype.getImageLoadFunction=zy.prototype.lk;zy.prototype.getUrl=zy.prototype.nk;zy.prototype.setImageLoadFunction=zy.prototype.ok;zy.prototype.setUrl=zy.prototype.pk;zy.prototype.updateParams=zy.prototype.qk;-t("ol.source.KML",Dy,OPENLAYERS);t("ol.source.MapQuest",Hy,OPENLAYERS);Hy.prototype.getLayer=Hy.prototype.i;t("ol.source.OSM",Fy,OPENLAYERS);t("ol.source.OSM.ATTRIBUTION",Gy,OPENLAYERS);t("ol.source.OSMXML",Ky,OPENLAYERS);t("ol.source.ServerVector",$,OPENLAYERS);$.prototype.clear=$.prototype.clear;$.prototype.readFeatures=$.prototype.c;t("ol.source.Source",Ki,OPENLAYERS);Ki.prototype.getAttributions=Ki.prototype.ba;Ki.prototype.getLogo=Ki.prototype.aa;Ki.prototype.getProjection=Ki.prototype.ca;-Ki.prototype.getState=Ki.prototype.da;t("ol.source.Stamen",Ny,OPENLAYERS);t("ol.source.StaticVector",Z,OPENLAYERS);t("ol.source.TileArcGISRest",Py,OPENLAYERS);Py.prototype.getParams=Py.prototype.rk;Py.prototype.getUrls=Py.prototype.sk;Py.prototype.setUrl=Py.prototype.tk;Py.prototype.setUrls=Py.prototype.Rf;Py.prototype.updateParams=Py.prototype.vk;t("ol.source.TileDebug",Ry,OPENLAYERS);t("ol.source.TileImage",Px,OPENLAYERS);Px.prototype.getTileLoadFunction=Px.prototype.gb;-Px.prototype.getTileUrlFunction=Px.prototype.hb;Px.prototype.setTileLoadFunction=Px.prototype.nb;Px.prototype.setTileUrlFunction=Px.prototype.xa;t("ol.source.TileJSON",Sy,OPENLAYERS);t("ol.source.Tile",cj,OPENLAYERS);cj.prototype.getTileGrid=cj.prototype.Ba;fj.prototype.tile=fj.prototype.tile;t("ol.source.TileUTFGrid",Ty,OPENLAYERS);Ty.prototype.getTemplate=Ty.prototype.$h;Ty.prototype.forDataAtCoordinateAndResolution=Ty.prototype.wh;t("ol.source.TileVector",Yy,OPENLAYERS);-Yy.prototype.getFeatures=Yy.prototype.Ea;Yy.prototype.getFeaturesAtCoordinateAndResolution=Yy.prototype.Ch;t("ol.source.TileWMS",$y,OPENLAYERS);$y.prototype.getGetFeatureInfoUrl=$y.prototype.yk;$y.prototype.getParams=$y.prototype.zk;$y.prototype.getUrls=$y.prototype.Ak;$y.prototype.setUrl=$y.prototype.Bk;$y.prototype.setUrls=$y.prototype.Sf;$y.prototype.updateParams=$y.prototype.Dk;t("ol.source.TopoJSON",dz,OPENLAYERS);t("ol.source.Vector",ln,OPENLAYERS);ln.prototype.addFeature=ln.prototype.Za;-ln.prototype.addFeatures=ln.prototype.Ka;ln.prototype.clear=ln.prototype.clear;ln.prototype.forEachFeature=ln.prototype.eb;ln.prototype.forEachFeatureInExtent=ln.prototype.Aa;ln.prototype.forEachFeatureIntersectingExtent=ln.prototype.Ra;ln.prototype.getFeatures=ln.prototype.Ea;ln.prototype.getFeaturesAtCoordinate=ln.prototype.Ta;ln.prototype.getClosestFeatureToCoordinate=ln.prototype.fb;ln.prototype.getExtent=ln.prototype.N;ln.prototype.getFeatureById=ln.prototype.Sa;ln.prototype.removeFeature=ln.prototype.jb;-on.prototype.feature=on.prototype.feature;t("ol.source.WMTS",gz,OPENLAYERS);gz.prototype.getDimensions=gz.prototype.Ah;gz.prototype.getFormat=gz.prototype.Eh;gz.prototype.getLayer=gz.prototype.Ek;gz.prototype.getMatrixSet=gz.prototype.Qh;gz.prototype.getStyle=gz.prototype.Fk;gz.prototype.getVersion=gz.prototype.di;gz.prototype.updateDimensions=gz.prototype.sm;-t("ol.source.WMTS.optionsFromCapabilities",function(a,b){var d=Ta(a.Contents.Layer,function(a){return a.Identifier==b.layer}),e,f;e=1<d.TileMatrixSetLink.length?Ua(d.TileMatrixSetLink,function(a){return a.TileMatrixSet==b.matrixSet}):m(b.projection)?Ua(d.TileMatrixSetLink,function(a){return a.TileMatrixSet.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3")==b.projection}):0;0>e&&(e=0);f=d.TileMatrixSetLink[e].TileMatrixSet;var g=d.Format[0];m(b.format)&&(g=b.format);e=Ua(d.Style,function(a){return m(b.style)?-a.Title==b.style:a.isDefault});0>e&&(e=0);e=d.Style[e].Identifier;var h={};m(d.Dimension)&&Pa(d.Dimension,function(a){var b=a.Identifier,d=a["default"];m(d)||(d=a.values[0]);h[b]=d});var k=Ta(a.Contents.TileMatrixSet,function(a){return a.Identifier==f}),n=fz(k),k=m(b.projection)?Ae(b.projection):Ae(k.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3")),p=[],q=b.requestEncoding,q=m(q)?q:"";if(a.OperationsMetadata.hasOwnProperty("GetTile")&&0!=q.lastIndexOf("REST",0)){var d=a.OperationsMetadata.GetTile.DCP.HTTP.Get,-r=Ta(d[0].Constraint,function(a){return"GetEncoding"==a.name}).AllowedValues.Value;0<r.length&&Va(r,"KVP")&&(q="KVP",p.push(d[0].href))}else q="REST",Pa(d.ResourceURL,function(a){"tile"==a.resourceType&&(g=a.format,p.push(a.template))});return{urls:p,layer:b.layer,matrixSet:f,format:g,projection:k,requestEncoding:q,tileGrid:n,style:e,dimensions:h}},OPENLAYERS);t("ol.source.XYZ",Ey,OPENLAYERS);Ey.prototype.setTileUrlFunction=Ey.prototype.xa;Ey.prototype.setUrl=Ey.prototype.d;-t("ol.source.Zoomify",jz,OPENLAYERS);Yk.prototype.vectorContext=Yk.prototype.vectorContext;Yk.prototype.frameState=Yk.prototype.frameState;Yk.prototype.context=Yk.prototype.context;Yk.prototype.glContext=Yk.prototype.glContext;ko.prototype.drawAsync=ko.prototype.nc;ko.prototype.drawCircleGeometry=ko.prototype.oc;ko.prototype.drawFeature=ko.prototype.qe;ko.prototype.drawGeometryCollectionGeometry=ko.prototype.jd;ko.prototype.drawPointGeometry=ko.prototype.yb;ko.prototype.drawLineStringGeometry=ko.prototype.Ib;-ko.prototype.drawMultiLineStringGeometry=ko.prototype.pc;ko.prototype.drawMultiPointGeometry=ko.prototype.xb;ko.prototype.drawMultiPolygonGeometry=ko.prototype.qc;ko.prototype.drawPolygonGeometry=ko.prototype.Vb;ko.prototype.drawText=ko.prototype.zb;ko.prototype.setFillStrokeStyle=ko.prototype.Fa;ko.prototype.setImageStyle=ko.prototype.mb;ko.prototype.setTextStyle=ko.prototype.Ga;Sl.prototype.drawAsync=Sl.prototype.nc;Sl.prototype.drawCircleGeometry=Sl.prototype.oc;Sl.prototype.drawFeature=Sl.prototype.qe;-Sl.prototype.drawPointGeometry=Sl.prototype.yb;Sl.prototype.drawMultiPointGeometry=Sl.prototype.xb;Sl.prototype.drawLineStringGeometry=Sl.prototype.Ib;Sl.prototype.drawMultiLineStringGeometry=Sl.prototype.pc;Sl.prototype.drawPolygonGeometry=Sl.prototype.Vb;Sl.prototype.drawMultiPolygonGeometry=Sl.prototype.qc;Sl.prototype.setFillStrokeStyle=Sl.prototype.Fa;Sl.prototype.setImageStyle=Sl.prototype.mb;Sl.prototype.setTextStyle=Sl.prototype.Ga;t("ol.proj.common.add",Rl,OPENLAYERS);-t("ol.proj.METERS_PER_UNIT",we,OPENLAYERS);t("ol.proj.Projection",xe,OPENLAYERS);xe.prototype.getCode=xe.prototype.yh;xe.prototype.getExtent=xe.prototype.N;xe.prototype.getUnits=xe.prototype.Vj;xe.prototype.getMetersPerUnit=xe.prototype.rd;xe.prototype.getWorldExtent=xe.prototype.fi;xe.prototype.isGlobal=xe.prototype.Ti;xe.prototype.setExtent=xe.prototype.Wj;xe.prototype.setWorldExtent=xe.prototype.km;t("ol.proj.addEquivalentProjections",De,OPENLAYERS);t("ol.proj.addProjection",Me,OPENLAYERS);-t("ol.proj.addCoordinateTransforms",Oe,OPENLAYERS);t("ol.proj.get",Ae,OPENLAYERS);t("ol.proj.getTransform",Se,OPENLAYERS);t("ol.proj.transform",function(a,b,d){return Se(b,d)(a,void 0,a.length)},OPENLAYERS);t("ol.proj.transformExtent",Ue,OPENLAYERS);t("ol.layer.Heatmap",X,OPENLAYERS);X.prototype.getBlur=X.prototype.Ia;X.prototype.getGradient=X.prototype.Ja;X.prototype.getRadius=X.prototype.lc;X.prototype.setBlur=X.prototype.Bc;X.prototype.setGradient=X.prototype.Cc;X.prototype.setRadius=X.prototype.mc;-t("ol.layer.Image",H,OPENLAYERS);H.prototype.getSource=H.prototype.c;t("ol.layer.Layer",E,OPENLAYERS);E.prototype.getSource=E.prototype.c;E.prototype.setSource=E.prototype.ja;t("ol.layer.Base",C,OPENLAYERS);C.prototype.getBrightness=C.prototype.e;C.prototype.getContrast=C.prototype.j;C.prototype.getHue=C.prototype.i;C.prototype.getExtent=C.prototype.N;C.prototype.getMaxResolution=C.prototype.k;C.prototype.getMinResolution=C.prototype.l;C.prototype.getOpacity=C.prototype.u;-C.prototype.getSaturation=C.prototype.n;C.prototype.getVisible=C.prototype.d;C.prototype.setBrightness=C.prototype.J;C.prototype.setContrast=C.prototype.L;C.prototype.setHue=C.prototype.R;C.prototype.setExtent=C.prototype.s;C.prototype.setMaxResolution=C.prototype.W;C.prototype.setMinResolution=C.prototype.Z;C.prototype.setOpacity=C.prototype.t;C.prototype.setSaturation=C.prototype.ga;C.prototype.setVisible=C.prototype.ha;t("ol.layer.Group",G,OPENLAYERS);G.prototype.getLayers=G.prototype.dc;-G.prototype.setLayers=G.prototype.v;t("ol.layer.Tile",I,OPENLAYERS);I.prototype.getPreload=I.prototype.v;I.prototype.getSource=I.prototype.c;I.prototype.setPreload=I.prototype.ma;I.prototype.getUseInterimTilesOnError=I.prototype.ia;I.prototype.setUseInterimTilesOnError=I.prototype.oa;t("ol.layer.Vector",J,OPENLAYERS);J.prototype.getSource=J.prototype.c;J.prototype.getStyle=J.prototype.mf;J.prototype.getStyleFunction=J.prototype.of;J.prototype.setStyle=J.prototype.oa;-t("ol.interaction.DoubleClickZoom",Qj,OPENLAYERS);t("ol.interaction.DoubleClickZoom.handleEvent",Rj,OPENLAYERS);t("ol.interaction.DragAndDrop",Nw,OPENLAYERS);t("ol.interaction.DragAndDrop.handleEvent",bd,OPENLAYERS);Ow.prototype.features=Ow.prototype.features;Ow.prototype.file=Ow.prototype.file;Ow.prototype.projection=Ow.prototype.projection;bl.prototype.coordinate=bl.prototype.coordinate;t("ol.interaction.DragBox",cl,OPENLAYERS);cl.prototype.getGeometry=cl.prototype.V;-t("ol.interaction.DragPan",ck,OPENLAYERS);t("ol.interaction.DragRotateAndZoom",Rw,OPENLAYERS);t("ol.interaction.DragRotate",gk,OPENLAYERS);t("ol.interaction.DragZoom",vl,OPENLAYERS);Vw.prototype.feature=Vw.prototype.feature;t("ol.interaction.Draw",Ww,OPENLAYERS);t("ol.interaction.Draw.handleEvent",Yw,OPENLAYERS);Ww.prototype.finishDrawing=Ww.prototype.Z;t("ol.interaction.Interaction",Mj,OPENLAYERS);Mj.prototype.getActive=Mj.prototype.c;Mj.prototype.setActive=Mj.prototype.d;-t("ol.interaction.defaults",Kl,OPENLAYERS);t("ol.interaction.KeyboardPan",wl,OPENLAYERS);t("ol.interaction.KeyboardPan.handleEvent",xl,OPENLAYERS);t("ol.interaction.KeyboardZoom",yl,OPENLAYERS);t("ol.interaction.KeyboardZoom.handleEvent",zl,OPENLAYERS);t("ol.interaction.Modify",ix,OPENLAYERS);t("ol.interaction.Modify.handleEvent",lx,OPENLAYERS);t("ol.interaction.MouseWheelZoom",Al,OPENLAYERS);t("ol.interaction.MouseWheelZoom.handleEvent",Bl,OPENLAYERS);t("ol.interaction.PinchRotate",Cl,OPENLAYERS);-t("ol.interaction.PinchZoom",Gl,OPENLAYERS);t("ol.interaction.Pointer",Zj,OPENLAYERS);t("ol.interaction.Pointer.handleEvent",ak,OPENLAYERS);rx.prototype.selected=rx.prototype.f;rx.prototype.deselected=rx.prototype.c;t("ol.interaction.Select",sx,OPENLAYERS);sx.prototype.getFeatures=sx.prototype.s;t("ol.interaction.Select.handleEvent",tx,OPENLAYERS);sx.prototype.setMap=sx.prototype.setMap;t("ol.geom.Circle",Em,OPENLAYERS);Em.prototype.clone=Em.prototype.clone;Em.prototype.getCenter=Em.prototype.Ce;-Em.prototype.getRadius=Em.prototype.Lf;Em.prototype.getType=Em.prototype.S;Em.prototype.setCenter=Em.prototype.Nj;Em.prototype.setCenterAndRadius=Em.prototype.tg;Em.prototype.setRadius=Em.prototype.Oj;Em.prototype.transform=Em.prototype.transform;t("ol.geom.Geometry",kk,OPENLAYERS);kk.prototype.clone=kk.prototype.clone;kk.prototype.getClosestPoint=kk.prototype.j;kk.prototype.getExtent=kk.prototype.N;kk.prototype.getType=kk.prototype.S;kk.prototype.applyTransform=kk.prototype.ua;-kk.prototype.intersectsExtent=kk.prototype.na;kk.prototype.translate=kk.prototype.Na;kk.prototype.transform=kk.prototype.transform;t("ol.geom.GeometryCollection",Gm,OPENLAYERS);Gm.prototype.clone=Gm.prototype.clone;Gm.prototype.getGeometries=Gm.prototype.rf;Gm.prototype.getType=Gm.prototype.S;Gm.prototype.intersectsExtent=Gm.prototype.na;Gm.prototype.setGeometries=Gm.prototype.ug;Gm.prototype.applyTransform=Gm.prototype.ua;Gm.prototype.translate=Gm.prototype.Na;t("ol.geom.LinearRing",Gk,OPENLAYERS);-Gk.prototype.clone=Gk.prototype.clone;Gk.prototype.getArea=Gk.prototype.Rj;Gk.prototype.getCoordinates=Gk.prototype.U;Gk.prototype.getType=Gk.prototype.S;Gk.prototype.setCoordinates=Gk.prototype.$;t("ol.geom.LineString",Nm,OPENLAYERS);Nm.prototype.appendCoordinate=Nm.prototype.kh;Nm.prototype.clone=Nm.prototype.clone;Nm.prototype.getCoordinateAtM=Nm.prototype.Pj;Nm.prototype.getCoordinates=Nm.prototype.U;Nm.prototype.getLength=Nm.prototype.Qj;Nm.prototype.getType=Nm.prototype.S;-Nm.prototype.intersectsExtent=Nm.prototype.na;Nm.prototype.setCoordinates=Nm.prototype.$;t("ol.geom.MultiLineString",Pm,OPENLAYERS);Pm.prototype.appendLineString=Pm.prototype.lh;Pm.prototype.clone=Pm.prototype.clone;Pm.prototype.getCoordinateAtM=Pm.prototype.Sj;Pm.prototype.getCoordinates=Pm.prototype.U;Pm.prototype.getLineString=Pm.prototype.Nh;Pm.prototype.getLineStrings=Pm.prototype.Pc;Pm.prototype.getType=Pm.prototype.S;Pm.prototype.intersectsExtent=Pm.prototype.na;-Pm.prototype.setCoordinates=Pm.prototype.$;t("ol.geom.MultiPoint",Sm,OPENLAYERS);Sm.prototype.appendPoint=Sm.prototype.nh;Sm.prototype.clone=Sm.prototype.clone;Sm.prototype.getCoordinates=Sm.prototype.U;Sm.prototype.getPoint=Sm.prototype.Xh;Sm.prototype.getPoints=Sm.prototype.Id;Sm.prototype.getType=Sm.prototype.S;Sm.prototype.intersectsExtent=Sm.prototype.na;Sm.prototype.setCoordinates=Sm.prototype.$;t("ol.geom.MultiPolygon",Tm,OPENLAYERS);Tm.prototype.appendPolygon=Tm.prototype.oh;-Tm.prototype.clone=Tm.prototype.clone;Tm.prototype.getArea=Tm.prototype.Tj;Tm.prototype.getCoordinates=Tm.prototype.U;Tm.prototype.getInteriorPoints=Tm.prototype.Kh;Tm.prototype.getPolygon=Tm.prototype.Yh;Tm.prototype.getPolygons=Tm.prototype.td;Tm.prototype.getType=Tm.prototype.S;Tm.prototype.intersectsExtent=Tm.prototype.na;Tm.prototype.setCoordinates=Tm.prototype.$;t("ol.geom.Point",Ik,OPENLAYERS);Ik.prototype.clone=Ik.prototype.clone;Ik.prototype.getCoordinates=Ik.prototype.U;-Ik.prototype.getType=Ik.prototype.S;Ik.prototype.intersectsExtent=Ik.prototype.na;Ik.prototype.setCoordinates=Ik.prototype.$;t("ol.geom.Polygon",F,OPENLAYERS);F.prototype.appendLinearRing=F.prototype.mh;F.prototype.clone=F.prototype.clone;F.prototype.getArea=F.prototype.Uj;F.prototype.getCoordinates=F.prototype.U;F.prototype.getInteriorPoint=F.prototype.Jh;F.prototype.getLinearRingCount=F.prototype.Ph;F.prototype.getLinearRing=F.prototype.Oh;F.prototype.getLinearRings=F.prototype.pd;-F.prototype.getType=F.prototype.S;F.prototype.intersectsExtent=F.prototype.na;F.prototype.setCoordinates=F.prototype.$;t("ol.geom.Polygon.circular",Xk,OPENLAYERS);t("ol.geom.Polygon.fromExtent",function(a){var b=a[0],d=a[1],e=a[2];a=a[3];b=[b,d,b,a,e,a,e,d,b,d];d=new F(null);Uk(d,"XY",b,[b.length]);return d},OPENLAYERS);t("ol.geom.SimpleGeometry",mk,OPENLAYERS);mk.prototype.getFirstCoordinate=mk.prototype.Cb;mk.prototype.getLastCoordinate=mk.prototype.Db;mk.prototype.getLayout=mk.prototype.Eb;-mk.prototype.applyTransform=mk.prototype.ua;mk.prototype.translate=mk.prototype.Na;t("ol.format.Feature",qp,OPENLAYERS);t("ol.format.GeoJSON",Ap,OPENLAYERS);Ap.prototype.readFeature=Ap.prototype.Rb;Ap.prototype.readFeatures=Ap.prototype.qa;Ap.prototype.readGeometry=Ap.prototype.Uc;Ap.prototype.readProjection=Ap.prototype.Oa;Ap.prototype.writeFeature=Ap.prototype.de;Ap.prototype.writeFeatureObject=Ap.prototype.c;Ap.prototype.writeFeatures=Ap.prototype.Ub;Ap.prototype.writeFeaturesObject=Ap.prototype.e;-Ap.prototype.writeGeometry=Ap.prototype.$c;Ap.prototype.writeGeometryObject=Ap.prototype.j;t("ol.format.GPX",Qq,OPENLAYERS);Qq.prototype.readFeature=Qq.prototype.Rb;Qq.prototype.readFeatures=Qq.prototype.qa;Qq.prototype.readProjection=Qq.prototype.Oa;Qq.prototype.writeFeatures=Qq.prototype.Ub;Qq.prototype.writeFeaturesNode=Qq.prototype.c;t("ol.format.IGC",Ar,OPENLAYERS);Ar.prototype.readFeature=Ar.prototype.Rb;Ar.prototype.readFeatures=Ar.prototype.qa;Ar.prototype.readProjection=Ar.prototype.Oa;-t("ol.format.KML",fs,OPENLAYERS);fs.prototype.readFeature=fs.prototype.Rb;fs.prototype.readFeatures=fs.prototype.qa;fs.prototype.readName=fs.prototype.Hl;fs.prototype.readNetworkLinks=fs.prototype.Il;fs.prototype.readProjection=fs.prototype.Oa;fs.prototype.writeFeatures=fs.prototype.Ub;fs.prototype.writeFeaturesNode=fs.prototype.c;t("ol.format.OSMXML",Pt,OPENLAYERS);Pt.prototype.readFeatures=Pt.prototype.qa;Pt.prototype.readProjection=Pt.prototype.Oa;t("ol.format.Polyline",nu,OPENLAYERS);-t("ol.format.Polyline.encodeDeltas",ou,OPENLAYERS);t("ol.format.Polyline.decodeDeltas",qu,OPENLAYERS);t("ol.format.Polyline.encodeFloats",pu,OPENLAYERS);t("ol.format.Polyline.decodeFloats",ru,OPENLAYERS);nu.prototype.readFeature=nu.prototype.Rb;nu.prototype.readFeatures=nu.prototype.qa;nu.prototype.readGeometry=nu.prototype.Uc;nu.prototype.readProjection=nu.prototype.Oa;nu.prototype.writeGeometry=nu.prototype.$c;t("ol.format.TopoJSON",su,OPENLAYERS);su.prototype.readFeatures=su.prototype.qa;-su.prototype.readProjection=su.prototype.Oa;t("ol.format.WFS",yu,OPENLAYERS);yu.prototype.readFeatures=yu.prototype.qa;yu.prototype.readTransactionResponse=yu.prototype.k;yu.prototype.readFeatureCollectionMetadata=yu.prototype.i;yu.prototype.writeGetFeature=yu.prototype.q;yu.prototype.writeTransaction=yu.prototype.u;yu.prototype.readProjection=yu.prototype.Oa;t("ol.format.WKT",Lu,OPENLAYERS);Lu.prototype.readFeature=Lu.prototype.Rb;Lu.prototype.readFeatures=Lu.prototype.qa;-Lu.prototype.readGeometry=Lu.prototype.Uc;Lu.prototype.writeFeature=Lu.prototype.de;Lu.prototype.writeFeatures=Lu.prototype.Ub;Lu.prototype.writeGeometry=Lu.prototype.$c;t("ol.format.WMSCapabilities",cv,OPENLAYERS);cv.prototype.read=cv.prototype.d;t("ol.format.WMSGetFeatureInfo",zv,OPENLAYERS);zv.prototype.readFeatures=zv.prototype.qa;t("ol.format.WMTSCapabilities",Bv,OPENLAYERS);Bv.prototype.read=Bv.prototype.d;t("ol.format.GML2",Pq,OPENLAYERS);t("ol.format.GML3",Gq,OPENLAYERS);-Gq.prototype.writeGeometryNode=Gq.prototype.l;Gq.prototype.writeFeatures=Gq.prototype.Ub;Gq.prototype.writeFeaturesNode=Gq.prototype.c;t("ol.format.GML",Gq,OPENLAYERS);Gq.prototype.writeFeatures=Gq.prototype.Ub;Gq.prototype.writeFeaturesNode=Gq.prototype.c;t("ol.format.GMLBase",uq,OPENLAYERS);uq.prototype.readFeatures=uq.prototype.qa;t("ol.events.condition.altKeyOnly",function(a){a=a.c;return a.f&&!a.k&&!a.e},OPENLAYERS);t("ol.events.condition.altShiftKeysOnly",Sj,OPENLAYERS);-t("ol.events.condition.always",bd,OPENLAYERS);t("ol.events.condition.click",function(a){return a.type==Ai},OPENLAYERS);t("ol.events.condition.never",ad,OPENLAYERS);t("ol.events.condition.pointerMove",Tj,OPENLAYERS);t("ol.events.condition.singleClick",Uj,OPENLAYERS);t("ol.events.condition.noModifierKeys",Vj,OPENLAYERS);t("ol.events.condition.platformModifierKeyOnly",function(a){a=a.c;return!a.f&&a.k&&!a.e},OPENLAYERS);t("ol.events.condition.shiftKeyOnly",Wj,OPENLAYERS);-t("ol.events.condition.targetNotEditable",Xj,OPENLAYERS);t("ol.events.condition.mouseOnly",Yj,OPENLAYERS);t("ol.dom.Input",np,OPENLAYERS);np.prototype.getChecked=np.prototype.c;np.prototype.getValue=np.prototype.d;np.prototype.setValue=np.prototype.j;np.prototype.setChecked=np.prototype.e;t("ol.control.Attribution",Vg,OPENLAYERS);t("ol.control.Attribution.render",Wg,OPENLAYERS);Vg.prototype.getCollapsible=Vg.prototype.Ej;Vg.prototype.setCollapsible=Vg.prototype.Hj;Vg.prototype.setCollapsed=Vg.prototype.Gj;-Vg.prototype.getCollapsed=Vg.prototype.Dj;t("ol.control.Control",Ug,OPENLAYERS);Ug.prototype.getMap=Ug.prototype.j;Ug.prototype.setMap=Ug.prototype.setMap;Ug.prototype.setTarget=Ug.prototype.d;t("ol.control.defaults",ah,OPENLAYERS);t("ol.control.FullScreen",fh,OPENLAYERS);t("ol.control.MousePosition",gh,OPENLAYERS);t("ol.control.MousePosition.render",hh,OPENLAYERS);gh.prototype.getCoordinateFormat=gh.prototype.n;gh.prototype.getProjection=gh.prototype.t;gh.prototype.setMap=gh.prototype.setMap;-gh.prototype.setCoordinateFormat=gh.prototype.J;gh.prototype.setProjection=gh.prototype.v;t("ol.control.OverviewMap",Mo,OPENLAYERS);Mo.prototype.setMap=Mo.prototype.setMap;t("ol.control.OverviewMap.render",No,OPENLAYERS);Mo.prototype.getCollapsible=Mo.prototype.Jj;Mo.prototype.setCollapsible=Mo.prototype.Mj;Mo.prototype.setCollapsed=Mo.prototype.Lj;Mo.prototype.getCollapsed=Mo.prototype.Ij;t("ol.control.Rotate",Yg,OPENLAYERS);t("ol.control.Rotate.render",Zg,OPENLAYERS);-t("ol.control.ScaleLine",So,OPENLAYERS);So.prototype.getUnits=So.prototype.s;t("ol.control.ScaleLine.render",To,OPENLAYERS);So.prototype.setUnits=So.prototype.t;t("ol.control.Zoom",$g,OPENLAYERS);t("ol.control.ZoomSlider",gp,OPENLAYERS);t("ol.control.ZoomSlider.render",ip,OPENLAYERS);t("ol.control.ZoomToExtent",lp,OPENLAYERS);t("ol.color.asArray",qg,OPENLAYERS);t("ol.color.asString",sg,OPENLAYERS);qd.prototype.changed=qd.prototype.p;qd.prototype.getRevision=qd.prototype.C;qd.prototype.on=qd.prototype.A;-qd.prototype.once=qd.prototype.D;qd.prototype.un=qd.prototype.B;qd.prototype.unByKey=qd.prototype.G;lg.prototype.bindTo=lg.prototype.O;lg.prototype.get=lg.prototype.get;lg.prototype.getKeys=lg.prototype.K;lg.prototype.getProperties=lg.prototype.M;lg.prototype.set=lg.prototype.set;lg.prototype.setProperties=lg.prototype.I;lg.prototype.unbind=lg.prototype.P;lg.prototype.unbindAll=lg.prototype.Q;lg.prototype.changed=lg.prototype.p;lg.prototype.getRevision=lg.prototype.C;lg.prototype.on=lg.prototype.A;-lg.prototype.once=lg.prototype.D;lg.prototype.un=lg.prototype.B;lg.prototype.unByKey=lg.prototype.G;mp.prototype.bindTo=mp.prototype.O;mp.prototype.get=mp.prototype.get;mp.prototype.getKeys=mp.prototype.K;mp.prototype.getProperties=mp.prototype.M;mp.prototype.set=mp.prototype.set;mp.prototype.setProperties=mp.prototype.I;mp.prototype.unbind=mp.prototype.P;mp.prototype.unbindAll=mp.prototype.Q;mp.prototype.changed=mp.prototype.p;mp.prototype.getRevision=mp.prototype.C;mp.prototype.on=mp.prototype.A;-mp.prototype.once=mp.prototype.D;mp.prototype.un=mp.prototype.B;mp.prototype.unByKey=mp.prototype.G;N.prototype.bindTo=N.prototype.O;N.prototype.get=N.prototype.get;N.prototype.getKeys=N.prototype.K;N.prototype.getProperties=N.prototype.M;N.prototype.set=N.prototype.set;N.prototype.setProperties=N.prototype.I;N.prototype.unbind=N.prototype.P;N.prototype.unbindAll=N.prototype.Q;N.prototype.changed=N.prototype.p;N.prototype.getRevision=N.prototype.C;N.prototype.on=N.prototype.A;N.prototype.once=N.prototype.D;-N.prototype.un=N.prototype.B;N.prototype.unByKey=N.prototype.G;V.prototype.bindTo=V.prototype.O;V.prototype.get=V.prototype.get;V.prototype.getKeys=V.prototype.K;V.prototype.getProperties=V.prototype.M;V.prototype.set=V.prototype.set;V.prototype.setProperties=V.prototype.I;V.prototype.unbind=V.prototype.P;V.prototype.unbindAll=V.prototype.Q;V.prototype.changed=V.prototype.p;V.prototype.getRevision=V.prototype.C;V.prototype.on=V.prototype.A;V.prototype.once=V.prototype.D;V.prototype.un=V.prototype.B;-V.prototype.unByKey=V.prototype.G;Xv.prototype.state=Xv.prototype.state;Xv.prototype.changed=Xv.prototype.d;Xv.prototype.getTileCoord=Xv.prototype.i;K.prototype.bindTo=K.prototype.O;K.prototype.get=K.prototype.get;K.prototype.getKeys=K.prototype.K;K.prototype.getProperties=K.prototype.M;K.prototype.set=K.prototype.set;K.prototype.setProperties=K.prototype.I;K.prototype.unbind=K.prototype.P;K.prototype.unbindAll=K.prototype.Q;K.prototype.changed=K.prototype.p;K.prototype.getRevision=K.prototype.C;-K.prototype.on=K.prototype.A;K.prototype.once=K.prototype.D;K.prototype.un=K.prototype.B;K.prototype.unByKey=K.prototype.G;wi.prototype.map=wi.prototype.map;wi.prototype.frameState=wi.prototype.frameState;xi.prototype.originalEvent=xi.prototype.originalEvent;xi.prototype.pixel=xi.prototype.pixel;xi.prototype.coordinate=xi.prototype.coordinate;xi.prototype.dragging=xi.prototype.dragging;xi.prototype.preventDefault=xi.prototype.preventDefault;xi.prototype.stopPropagation=xi.prototype.tb;-xi.prototype.map=xi.prototype.map;xi.prototype.frameState=xi.prototype.frameState;L.prototype.bindTo=L.prototype.O;L.prototype.get=L.prototype.get;L.prototype.getKeys=L.prototype.K;L.prototype.getProperties=L.prototype.M;L.prototype.set=L.prototype.set;L.prototype.setProperties=L.prototype.I;L.prototype.unbind=L.prototype.P;L.prototype.unbindAll=L.prototype.Q;L.prototype.changed=L.prototype.p;L.prototype.getRevision=L.prototype.C;L.prototype.on=L.prototype.A;L.prototype.once=L.prototype.D;-L.prototype.un=L.prototype.B;L.prototype.unByKey=L.prototype.G;B.prototype.bindTo=B.prototype.O;B.prototype.get=B.prototype.get;B.prototype.getKeys=B.prototype.K;B.prototype.getProperties=B.prototype.M;B.prototype.set=B.prototype.set;B.prototype.setProperties=B.prototype.I;B.prototype.unbind=B.prototype.P;B.prototype.unbindAll=B.prototype.Q;B.prototype.changed=B.prototype.p;B.prototype.getRevision=B.prototype.C;B.prototype.on=B.prototype.A;B.prototype.once=B.prototype.D;B.prototype.un=B.prototype.B;-B.prototype.unByKey=B.prototype.G;qz.prototype.state=qz.prototype.state;qz.prototype.changed=qz.prototype.d;qz.prototype.getTileCoord=qz.prototype.i;ez.prototype.getMaxZoom=ez.prototype.qd;ez.prototype.getMinZoom=ez.prototype.sd;ez.prototype.getOrigin=ez.prototype.Pb;ez.prototype.getResolution=ez.prototype.ra;ez.prototype.getResolutions=ez.prototype.Sd;ez.prototype.getTileCoordForCoordAndResolution=ez.prototype.$b;ez.prototype.getTileCoordForCoordAndZ=ez.prototype.Qc;ez.prototype.getTileSize=ez.prototype.ya;-Rx.prototype.getMaxZoom=Rx.prototype.qd;Rx.prototype.getMinZoom=Rx.prototype.sd;Rx.prototype.getOrigin=Rx.prototype.Pb;Rx.prototype.getResolution=Rx.prototype.ra;Rx.prototype.getResolutions=Rx.prototype.Sd;Rx.prototype.getTileCoordForCoordAndResolution=Rx.prototype.$b;Rx.prototype.getTileCoordForCoordAndZ=Rx.prototype.Qc;Rx.prototype.getTileSize=Rx.prototype.ya;iz.prototype.getMaxZoom=iz.prototype.qd;iz.prototype.getMinZoom=iz.prototype.sd;iz.prototype.getOrigin=iz.prototype.Pb;-iz.prototype.getResolution=iz.prototype.ra;iz.prototype.getResolutions=iz.prototype.Sd;iz.prototype.getTileCoordForCoordAndResolution=iz.prototype.$b;iz.prototype.getTileCoordForCoordAndZ=iz.prototype.Qc;iz.prototype.getTileSize=iz.prototype.ya;pl.prototype.getOpacity=pl.prototype.Nd;pl.prototype.getRotateWithView=pl.prototype.ud;pl.prototype.getRotation=pl.prototype.Od;pl.prototype.getScale=pl.prototype.Pd;pl.prototype.getSnapToPixel=pl.prototype.vd;pl.prototype.setRotation=pl.prototype.Qd;-pl.prototype.setScale=pl.prototype.Rd;vj.prototype.getOpacity=vj.prototype.Nd;vj.prototype.getRotateWithView=vj.prototype.ud;vj.prototype.getRotation=vj.prototype.Od;vj.prototype.getScale=vj.prototype.Pd;vj.prototype.getSnapToPixel=vj.prototype.vd;vj.prototype.setRotation=vj.prototype.Qd;vj.prototype.setScale=vj.prototype.Rd;pz.prototype.getOpacity=pz.prototype.Nd;pz.prototype.getRotateWithView=pz.prototype.ud;pz.prototype.getRotation=pz.prototype.Od;pz.prototype.getScale=pz.prototype.Pd;-pz.prototype.getSnapToPixel=pz.prototype.vd;pz.prototype.setRotation=pz.prototype.Qd;pz.prototype.setScale=pz.prototype.Rd;Ki.prototype.bindTo=Ki.prototype.O;Ki.prototype.get=Ki.prototype.get;Ki.prototype.getKeys=Ki.prototype.K;Ki.prototype.getProperties=Ki.prototype.M;Ki.prototype.set=Ki.prototype.set;Ki.prototype.setProperties=Ki.prototype.I;Ki.prototype.unbind=Ki.prototype.P;Ki.prototype.unbindAll=Ki.prototype.Q;Ki.prototype.changed=Ki.prototype.p;Ki.prototype.getRevision=Ki.prototype.C;-Ki.prototype.on=Ki.prototype.A;Ki.prototype.once=Ki.prototype.D;Ki.prototype.un=Ki.prototype.B;Ki.prototype.unByKey=Ki.prototype.G;cj.prototype.getAttributions=cj.prototype.ba;cj.prototype.getLogo=cj.prototype.aa;cj.prototype.getProjection=cj.prototype.ca;cj.prototype.getState=cj.prototype.da;cj.prototype.bindTo=cj.prototype.O;cj.prototype.get=cj.prototype.get;cj.prototype.getKeys=cj.prototype.K;cj.prototype.getProperties=cj.prototype.M;cj.prototype.set=cj.prototype.set;-cj.prototype.setProperties=cj.prototype.I;cj.prototype.unbind=cj.prototype.P;cj.prototype.unbindAll=cj.prototype.Q;cj.prototype.changed=cj.prototype.p;cj.prototype.getRevision=cj.prototype.C;cj.prototype.on=cj.prototype.A;cj.prototype.once=cj.prototype.D;cj.prototype.un=cj.prototype.B;cj.prototype.unByKey=cj.prototype.G;Px.prototype.getTileGrid=Px.prototype.Ba;Px.prototype.getAttributions=Px.prototype.ba;Px.prototype.getLogo=Px.prototype.aa;Px.prototype.getProjection=Px.prototype.ca;-Px.prototype.getState=Px.prototype.da;Px.prototype.bindTo=Px.prototype.O;Px.prototype.get=Px.prototype.get;Px.prototype.getKeys=Px.prototype.K;Px.prototype.getProperties=Px.prototype.M;Px.prototype.set=Px.prototype.set;Px.prototype.setProperties=Px.prototype.I;Px.prototype.unbind=Px.prototype.P;Px.prototype.unbindAll=Px.prototype.Q;Px.prototype.changed=Px.prototype.p;Px.prototype.getRevision=Px.prototype.C;Px.prototype.on=Px.prototype.A;Px.prototype.once=Px.prototype.D;Px.prototype.un=Px.prototype.B;-Px.prototype.unByKey=Px.prototype.G;Sx.prototype.getTileLoadFunction=Sx.prototype.gb;Sx.prototype.getTileUrlFunction=Sx.prototype.hb;Sx.prototype.setTileLoadFunction=Sx.prototype.nb;Sx.prototype.setTileUrlFunction=Sx.prototype.xa;Sx.prototype.getTileGrid=Sx.prototype.Ba;Sx.prototype.getAttributions=Sx.prototype.ba;Sx.prototype.getLogo=Sx.prototype.aa;Sx.prototype.getProjection=Sx.prototype.ca;Sx.prototype.getState=Sx.prototype.da;Sx.prototype.bindTo=Sx.prototype.O;Sx.prototype.get=Sx.prototype.get;-Sx.prototype.getKeys=Sx.prototype.K;Sx.prototype.getProperties=Sx.prototype.M;Sx.prototype.set=Sx.prototype.set;Sx.prototype.setProperties=Sx.prototype.I;Sx.prototype.unbind=Sx.prototype.P;Sx.prototype.unbindAll=Sx.prototype.Q;Sx.prototype.changed=Sx.prototype.p;Sx.prototype.getRevision=Sx.prototype.C;Sx.prototype.on=Sx.prototype.A;Sx.prototype.once=Sx.prototype.D;Sx.prototype.un=Sx.prototype.B;Sx.prototype.unByKey=Sx.prototype.G;ln.prototype.getAttributions=ln.prototype.ba;ln.prototype.getLogo=ln.prototype.aa;-ln.prototype.getProjection=ln.prototype.ca;ln.prototype.getState=ln.prototype.da;ln.prototype.bindTo=ln.prototype.O;ln.prototype.get=ln.prototype.get;ln.prototype.getKeys=ln.prototype.K;ln.prototype.getProperties=ln.prototype.M;ln.prototype.set=ln.prototype.set;ln.prototype.setProperties=ln.prototype.I;ln.prototype.unbind=ln.prototype.P;ln.prototype.unbindAll=ln.prototype.Q;ln.prototype.changed=ln.prototype.p;ln.prototype.getRevision=ln.prototype.C;ln.prototype.on=ln.prototype.A;-ln.prototype.once=ln.prototype.D;ln.prototype.un=ln.prototype.B;ln.prototype.unByKey=ln.prototype.G;Ux.prototype.addFeature=Ux.prototype.Za;Ux.prototype.addFeatures=Ux.prototype.Ka;Ux.prototype.clear=Ux.prototype.clear;Ux.prototype.forEachFeature=Ux.prototype.eb;Ux.prototype.forEachFeatureInExtent=Ux.prototype.Aa;Ux.prototype.forEachFeatureIntersectingExtent=Ux.prototype.Ra;Ux.prototype.getFeatures=Ux.prototype.Ea;Ux.prototype.getFeaturesAtCoordinate=Ux.prototype.Ta;-Ux.prototype.getClosestFeatureToCoordinate=Ux.prototype.fb;Ux.prototype.getExtent=Ux.prototype.N;Ux.prototype.getFeatureById=Ux.prototype.Sa;Ux.prototype.removeFeature=Ux.prototype.jb;Ux.prototype.getAttributions=Ux.prototype.ba;Ux.prototype.getLogo=Ux.prototype.aa;Ux.prototype.getProjection=Ux.prototype.ca;Ux.prototype.getState=Ux.prototype.da;Ux.prototype.bindTo=Ux.prototype.O;Ux.prototype.get=Ux.prototype.get;Ux.prototype.getKeys=Ux.prototype.K;Ux.prototype.getProperties=Ux.prototype.M;-Ux.prototype.set=Ux.prototype.set;Ux.prototype.setProperties=Ux.prototype.I;Ux.prototype.unbind=Ux.prototype.P;Ux.prototype.unbindAll=Ux.prototype.Q;Ux.prototype.changed=Ux.prototype.p;Ux.prototype.getRevision=Ux.prototype.C;Ux.prototype.on=Ux.prototype.A;Ux.prototype.once=Ux.prototype.D;Ux.prototype.un=Ux.prototype.B;Ux.prototype.unByKey=Ux.prototype.G;Y.prototype.addFeature=Y.prototype.Za;Y.prototype.addFeatures=Y.prototype.Ka;Y.prototype.clear=Y.prototype.clear;Y.prototype.forEachFeature=Y.prototype.eb;-Y.prototype.forEachFeatureInExtent=Y.prototype.Aa;Y.prototype.forEachFeatureIntersectingExtent=Y.prototype.Ra;Y.prototype.getFeatures=Y.prototype.Ea;Y.prototype.getFeaturesAtCoordinate=Y.prototype.Ta;Y.prototype.getClosestFeatureToCoordinate=Y.prototype.fb;Y.prototype.getExtent=Y.prototype.N;Y.prototype.getFeatureById=Y.prototype.Sa;Y.prototype.removeFeature=Y.prototype.jb;Y.prototype.getAttributions=Y.prototype.ba;Y.prototype.getLogo=Y.prototype.aa;Y.prototype.getProjection=Y.prototype.ca;-Y.prototype.getState=Y.prototype.da;Y.prototype.bindTo=Y.prototype.O;Y.prototype.get=Y.prototype.get;Y.prototype.getKeys=Y.prototype.K;Y.prototype.getProperties=Y.prototype.M;Y.prototype.set=Y.prototype.set;Y.prototype.setProperties=Y.prototype.I;Y.prototype.unbind=Y.prototype.P;Y.prototype.unbindAll=Y.prototype.Q;Y.prototype.changed=Y.prototype.p;Y.prototype.getRevision=Y.prototype.C;Y.prototype.on=Y.prototype.A;Y.prototype.once=Y.prototype.D;Y.prototype.un=Y.prototype.B;Y.prototype.unByKey=Y.prototype.G;-Z.prototype.readFeatures=Z.prototype.c;Z.prototype.addFeature=Z.prototype.Za;Z.prototype.addFeatures=Z.prototype.Ka;Z.prototype.clear=Z.prototype.clear;Z.prototype.forEachFeature=Z.prototype.eb;Z.prototype.forEachFeatureInExtent=Z.prototype.Aa;Z.prototype.forEachFeatureIntersectingExtent=Z.prototype.Ra;Z.prototype.getFeatures=Z.prototype.Ea;Z.prototype.getFeaturesAtCoordinate=Z.prototype.Ta;Z.prototype.getClosestFeatureToCoordinate=Z.prototype.fb;Z.prototype.getExtent=Z.prototype.N;-Z.prototype.getFeatureById=Z.prototype.Sa;Z.prototype.removeFeature=Z.prototype.jb;Z.prototype.getAttributions=Z.prototype.ba;Z.prototype.getLogo=Z.prototype.aa;Z.prototype.getProjection=Z.prototype.ca;Z.prototype.getState=Z.prototype.da;Z.prototype.bindTo=Z.prototype.O;Z.prototype.get=Z.prototype.get;Z.prototype.getKeys=Z.prototype.K;Z.prototype.getProperties=Z.prototype.M;Z.prototype.set=Z.prototype.set;Z.prototype.setProperties=Z.prototype.I;Z.prototype.unbind=Z.prototype.P;-Z.prototype.unbindAll=Z.prototype.Q;Z.prototype.changed=Z.prototype.p;Z.prototype.getRevision=Z.prototype.C;Z.prototype.on=Z.prototype.A;Z.prototype.once=Z.prototype.D;Z.prototype.un=Z.prototype.B;Z.prototype.unByKey=Z.prototype.G;uy.prototype.readFeatures=uy.prototype.c;uy.prototype.addFeature=uy.prototype.Za;uy.prototype.addFeatures=uy.prototype.Ka;uy.prototype.clear=uy.prototype.clear;uy.prototype.forEachFeature=uy.prototype.eb;uy.prototype.forEachFeatureInExtent=uy.prototype.Aa;-uy.prototype.forEachFeatureIntersectingExtent=uy.prototype.Ra;uy.prototype.getFeatures=uy.prototype.Ea;uy.prototype.getFeaturesAtCoordinate=uy.prototype.Ta;uy.prototype.getClosestFeatureToCoordinate=uy.prototype.fb;uy.prototype.getExtent=uy.prototype.N;uy.prototype.getFeatureById=uy.prototype.Sa;uy.prototype.removeFeature=uy.prototype.jb;uy.prototype.getAttributions=uy.prototype.ba;uy.prototype.getLogo=uy.prototype.aa;uy.prototype.getProjection=uy.prototype.ca;uy.prototype.getState=uy.prototype.da;-uy.prototype.bindTo=uy.prototype.O;uy.prototype.get=uy.prototype.get;uy.prototype.getKeys=uy.prototype.K;uy.prototype.getProperties=uy.prototype.M;uy.prototype.set=uy.prototype.set;uy.prototype.setProperties=uy.prototype.I;uy.prototype.unbind=uy.prototype.P;uy.prototype.unbindAll=uy.prototype.Q;uy.prototype.changed=uy.prototype.p;uy.prototype.getRevision=uy.prototype.C;uy.prototype.on=uy.prototype.A;uy.prototype.once=uy.prototype.D;uy.prototype.un=uy.prototype.B;uy.prototype.unByKey=uy.prototype.G;-vy.prototype.readFeatures=vy.prototype.c;vy.prototype.addFeature=vy.prototype.Za;vy.prototype.addFeatures=vy.prototype.Ka;vy.prototype.clear=vy.prototype.clear;vy.prototype.forEachFeature=vy.prototype.eb;vy.prototype.forEachFeatureInExtent=vy.prototype.Aa;vy.prototype.forEachFeatureIntersectingExtent=vy.prototype.Ra;vy.prototype.getFeatures=vy.prototype.Ea;vy.prototype.getFeaturesAtCoordinate=vy.prototype.Ta;vy.prototype.getClosestFeatureToCoordinate=vy.prototype.fb;vy.prototype.getExtent=vy.prototype.N;-vy.prototype.getFeatureById=vy.prototype.Sa;vy.prototype.removeFeature=vy.prototype.jb;vy.prototype.getAttributions=vy.prototype.ba;vy.prototype.getLogo=vy.prototype.aa;vy.prototype.getProjection=vy.prototype.ca;vy.prototype.getState=vy.prototype.da;vy.prototype.bindTo=vy.prototype.O;vy.prototype.get=vy.prototype.get;vy.prototype.getKeys=vy.prototype.K;vy.prototype.getProperties=vy.prototype.M;vy.prototype.set=vy.prototype.set;vy.prototype.setProperties=vy.prototype.I;vy.prototype.unbind=vy.prototype.P;-vy.prototype.unbindAll=vy.prototype.Q;vy.prototype.changed=vy.prototype.p;vy.prototype.getRevision=vy.prototype.C;vy.prototype.on=vy.prototype.A;vy.prototype.once=vy.prototype.D;vy.prototype.un=vy.prototype.B;vy.prototype.unByKey=vy.prototype.G;wy.prototype.readFeatures=wy.prototype.c;wy.prototype.addFeature=wy.prototype.Za;wy.prototype.addFeatures=wy.prototype.Ka;wy.prototype.clear=wy.prototype.clear;wy.prototype.forEachFeature=wy.prototype.eb;wy.prototype.forEachFeatureInExtent=wy.prototype.Aa;-wy.prototype.forEachFeatureIntersectingExtent=wy.prototype.Ra;wy.prototype.getFeatures=wy.prototype.Ea;wy.prototype.getFeaturesAtCoordinate=wy.prototype.Ta;wy.prototype.getClosestFeatureToCoordinate=wy.prototype.fb;wy.prototype.getExtent=wy.prototype.N;wy.prototype.getFeatureById=wy.prototype.Sa;wy.prototype.removeFeature=wy.prototype.jb;wy.prototype.getAttributions=wy.prototype.ba;wy.prototype.getLogo=wy.prototype.aa;wy.prototype.getProjection=wy.prototype.ca;wy.prototype.getState=wy.prototype.da;-wy.prototype.bindTo=wy.prototype.O;wy.prototype.get=wy.prototype.get;wy.prototype.getKeys=wy.prototype.K;wy.prototype.getProperties=wy.prototype.M;wy.prototype.set=wy.prototype.set;wy.prototype.setProperties=wy.prototype.I;wy.prototype.unbind=wy.prototype.P;wy.prototype.unbindAll=wy.prototype.Q;wy.prototype.changed=wy.prototype.p;wy.prototype.getRevision=wy.prototype.C;wy.prototype.on=wy.prototype.A;wy.prototype.once=wy.prototype.D;wy.prototype.un=wy.prototype.B;wy.prototype.unByKey=wy.prototype.G;-an.prototype.getAttributions=an.prototype.ba;an.prototype.getLogo=an.prototype.aa;an.prototype.getProjection=an.prototype.ca;an.prototype.getState=an.prototype.da;an.prototype.bindTo=an.prototype.O;an.prototype.get=an.prototype.get;an.prototype.getKeys=an.prototype.K;an.prototype.getProperties=an.prototype.M;an.prototype.set=an.prototype.set;an.prototype.setProperties=an.prototype.I;an.prototype.unbind=an.prototype.P;an.prototype.unbindAll=an.prototype.Q;an.prototype.changed=an.prototype.p;-an.prototype.getRevision=an.prototype.C;an.prototype.on=an.prototype.A;an.prototype.once=an.prototype.D;an.prototype.un=an.prototype.B;an.prototype.unByKey=an.prototype.G;dn.prototype.getAttributions=dn.prototype.ba;dn.prototype.getLogo=dn.prototype.aa;dn.prototype.getProjection=dn.prototype.ca;dn.prototype.getState=dn.prototype.da;dn.prototype.bindTo=dn.prototype.O;dn.prototype.get=dn.prototype.get;dn.prototype.getKeys=dn.prototype.K;dn.prototype.getProperties=dn.prototype.M;dn.prototype.set=dn.prototype.set;-dn.prototype.setProperties=dn.prototype.I;dn.prototype.unbind=dn.prototype.P;dn.prototype.unbindAll=dn.prototype.Q;dn.prototype.changed=dn.prototype.p;dn.prototype.getRevision=dn.prototype.C;dn.prototype.on=dn.prototype.A;dn.prototype.once=dn.prototype.D;dn.prototype.un=dn.prototype.B;dn.prototype.unByKey=dn.prototype.G;xy.prototype.getAttributions=xy.prototype.ba;xy.prototype.getLogo=xy.prototype.aa;xy.prototype.getProjection=xy.prototype.ca;xy.prototype.getState=xy.prototype.da;-xy.prototype.bindTo=xy.prototype.O;xy.prototype.get=xy.prototype.get;xy.prototype.getKeys=xy.prototype.K;xy.prototype.getProperties=xy.prototype.M;xy.prototype.set=xy.prototype.set;xy.prototype.setProperties=xy.prototype.I;xy.prototype.unbind=xy.prototype.P;xy.prototype.unbindAll=xy.prototype.Q;xy.prototype.changed=xy.prototype.p;xy.prototype.getRevision=xy.prototype.C;xy.prototype.on=xy.prototype.A;xy.prototype.once=xy.prototype.D;xy.prototype.un=xy.prototype.B;xy.prototype.unByKey=xy.prototype.G;-yy.prototype.getAttributions=yy.prototype.ba;yy.prototype.getLogo=yy.prototype.aa;yy.prototype.getProjection=yy.prototype.ca;yy.prototype.getState=yy.prototype.da;yy.prototype.bindTo=yy.prototype.O;yy.prototype.get=yy.prototype.get;yy.prototype.getKeys=yy.prototype.K;yy.prototype.getProperties=yy.prototype.M;yy.prototype.set=yy.prototype.set;yy.prototype.setProperties=yy.prototype.I;yy.prototype.unbind=yy.prototype.P;yy.prototype.unbindAll=yy.prototype.Q;yy.prototype.changed=yy.prototype.p;-yy.prototype.getRevision=yy.prototype.C;yy.prototype.on=yy.prototype.A;yy.prototype.once=yy.prototype.D;yy.prototype.un=yy.prototype.B;yy.prototype.unByKey=yy.prototype.G;rn.prototype.getAttributions=rn.prototype.ba;rn.prototype.getLogo=rn.prototype.aa;rn.prototype.getProjection=rn.prototype.ca;rn.prototype.getState=rn.prototype.da;rn.prototype.bindTo=rn.prototype.O;rn.prototype.get=rn.prototype.get;rn.prototype.getKeys=rn.prototype.K;rn.prototype.getProperties=rn.prototype.M;rn.prototype.set=rn.prototype.set;-rn.prototype.setProperties=rn.prototype.I;rn.prototype.unbind=rn.prototype.P;rn.prototype.unbindAll=rn.prototype.Q;rn.prototype.changed=rn.prototype.p;rn.prototype.getRevision=rn.prototype.C;rn.prototype.on=rn.prototype.A;rn.prototype.once=rn.prototype.D;rn.prototype.un=rn.prototype.B;rn.prototype.unByKey=rn.prototype.G;zy.prototype.getAttributions=zy.prototype.ba;zy.prototype.getLogo=zy.prototype.aa;zy.prototype.getProjection=zy.prototype.ca;zy.prototype.getState=zy.prototype.da;-zy.prototype.bindTo=zy.prototype.O;zy.prototype.get=zy.prototype.get;zy.prototype.getKeys=zy.prototype.K;zy.prototype.getProperties=zy.prototype.M;zy.prototype.set=zy.prototype.set;zy.prototype.setProperties=zy.prototype.I;zy.prototype.unbind=zy.prototype.P;zy.prototype.unbindAll=zy.prototype.Q;zy.prototype.changed=zy.prototype.p;zy.prototype.getRevision=zy.prototype.C;zy.prototype.on=zy.prototype.A;zy.prototype.once=zy.prototype.D;zy.prototype.un=zy.prototype.B;zy.prototype.unByKey=zy.prototype.G;-Dy.prototype.readFeatures=Dy.prototype.c;Dy.prototype.addFeature=Dy.prototype.Za;Dy.prototype.addFeatures=Dy.prototype.Ka;Dy.prototype.clear=Dy.prototype.clear;Dy.prototype.forEachFeature=Dy.prototype.eb;Dy.prototype.forEachFeatureInExtent=Dy.prototype.Aa;Dy.prototype.forEachFeatureIntersectingExtent=Dy.prototype.Ra;Dy.prototype.getFeatures=Dy.prototype.Ea;Dy.prototype.getFeaturesAtCoordinate=Dy.prototype.Ta;Dy.prototype.getClosestFeatureToCoordinate=Dy.prototype.fb;Dy.prototype.getExtent=Dy.prototype.N;-Dy.prototype.getFeatureById=Dy.prototype.Sa;Dy.prototype.removeFeature=Dy.prototype.jb;Dy.prototype.getAttributions=Dy.prototype.ba;Dy.prototype.getLogo=Dy.prototype.aa;Dy.prototype.getProjection=Dy.prototype.ca;Dy.prototype.getState=Dy.prototype.da;Dy.prototype.bindTo=Dy.prototype.O;Dy.prototype.get=Dy.prototype.get;Dy.prototype.getKeys=Dy.prototype.K;Dy.prototype.getProperties=Dy.prototype.M;Dy.prototype.set=Dy.prototype.set;Dy.prototype.setProperties=Dy.prototype.I;Dy.prototype.unbind=Dy.prototype.P;-Dy.prototype.unbindAll=Dy.prototype.Q;Dy.prototype.changed=Dy.prototype.p;Dy.prototype.getRevision=Dy.prototype.C;Dy.prototype.on=Dy.prototype.A;Dy.prototype.once=Dy.prototype.D;Dy.prototype.un=Dy.prototype.B;Dy.prototype.unByKey=Dy.prototype.G;Ey.prototype.getTileLoadFunction=Ey.prototype.gb;Ey.prototype.getTileUrlFunction=Ey.prototype.hb;Ey.prototype.setTileLoadFunction=Ey.prototype.nb;Ey.prototype.getTileGrid=Ey.prototype.Ba;Ey.prototype.getAttributions=Ey.prototype.ba;Ey.prototype.getLogo=Ey.prototype.aa;-Ey.prototype.getProjection=Ey.prototype.ca;Ey.prototype.getState=Ey.prototype.da;Ey.prototype.bindTo=Ey.prototype.O;Ey.prototype.get=Ey.prototype.get;Ey.prototype.getKeys=Ey.prototype.K;Ey.prototype.getProperties=Ey.prototype.M;Ey.prototype.set=Ey.prototype.set;Ey.prototype.setProperties=Ey.prototype.I;Ey.prototype.unbind=Ey.prototype.P;Ey.prototype.unbindAll=Ey.prototype.Q;Ey.prototype.changed=Ey.prototype.p;Ey.prototype.getRevision=Ey.prototype.C;Ey.prototype.on=Ey.prototype.A;-Ey.prototype.once=Ey.prototype.D;Ey.prototype.un=Ey.prototype.B;Ey.prototype.unByKey=Ey.prototype.G;Hy.prototype.setTileUrlFunction=Hy.prototype.xa;Hy.prototype.setUrl=Hy.prototype.d;Hy.prototype.getTileLoadFunction=Hy.prototype.gb;Hy.prototype.getTileUrlFunction=Hy.prototype.hb;Hy.prototype.setTileLoadFunction=Hy.prototype.nb;Hy.prototype.getTileGrid=Hy.prototype.Ba;Hy.prototype.getAttributions=Hy.prototype.ba;Hy.prototype.getLogo=Hy.prototype.aa;Hy.prototype.getProjection=Hy.prototype.ca;-Hy.prototype.getState=Hy.prototype.da;Hy.prototype.bindTo=Hy.prototype.O;Hy.prototype.get=Hy.prototype.get;Hy.prototype.getKeys=Hy.prototype.K;Hy.prototype.getProperties=Hy.prototype.M;Hy.prototype.set=Hy.prototype.set;Hy.prototype.setProperties=Hy.prototype.I;Hy.prototype.unbind=Hy.prototype.P;Hy.prototype.unbindAll=Hy.prototype.Q;Hy.prototype.changed=Hy.prototype.p;Hy.prototype.getRevision=Hy.prototype.C;Hy.prototype.on=Hy.prototype.A;Hy.prototype.once=Hy.prototype.D;Hy.prototype.un=Hy.prototype.B;-Hy.prototype.unByKey=Hy.prototype.G;Fy.prototype.setTileUrlFunction=Fy.prototype.xa;Fy.prototype.setUrl=Fy.prototype.d;Fy.prototype.getTileLoadFunction=Fy.prototype.gb;Fy.prototype.getTileUrlFunction=Fy.prototype.hb;Fy.prototype.setTileLoadFunction=Fy.prototype.nb;Fy.prototype.getTileGrid=Fy.prototype.Ba;Fy.prototype.getAttributions=Fy.prototype.ba;Fy.prototype.getLogo=Fy.prototype.aa;Fy.prototype.getProjection=Fy.prototype.ca;Fy.prototype.getState=Fy.prototype.da;Fy.prototype.bindTo=Fy.prototype.O;-Fy.prototype.get=Fy.prototype.get;Fy.prototype.getKeys=Fy.prototype.K;Fy.prototype.getProperties=Fy.prototype.M;Fy.prototype.set=Fy.prototype.set;Fy.prototype.setProperties=Fy.prototype.I;Fy.prototype.unbind=Fy.prototype.P;Fy.prototype.unbindAll=Fy.prototype.Q;Fy.prototype.changed=Fy.prototype.p;Fy.prototype.getRevision=Fy.prototype.C;Fy.prototype.on=Fy.prototype.A;Fy.prototype.once=Fy.prototype.D;Fy.prototype.un=Fy.prototype.B;Fy.prototype.unByKey=Fy.prototype.G;Ky.prototype.readFeatures=Ky.prototype.c;-Ky.prototype.addFeature=Ky.prototype.Za;Ky.prototype.addFeatures=Ky.prototype.Ka;Ky.prototype.clear=Ky.prototype.clear;Ky.prototype.forEachFeature=Ky.prototype.eb;Ky.prototype.forEachFeatureInExtent=Ky.prototype.Aa;Ky.prototype.forEachFeatureIntersectingExtent=Ky.prototype.Ra;Ky.prototype.getFeatures=Ky.prototype.Ea;Ky.prototype.getFeaturesAtCoordinate=Ky.prototype.Ta;Ky.prototype.getClosestFeatureToCoordinate=Ky.prototype.fb;Ky.prototype.getExtent=Ky.prototype.N;Ky.prototype.getFeatureById=Ky.prototype.Sa;-Ky.prototype.removeFeature=Ky.prototype.jb;Ky.prototype.getAttributions=Ky.prototype.ba;Ky.prototype.getLogo=Ky.prototype.aa;Ky.prototype.getProjection=Ky.prototype.ca;Ky.prototype.getState=Ky.prototype.da;Ky.prototype.bindTo=Ky.prototype.O;Ky.prototype.get=Ky.prototype.get;Ky.prototype.getKeys=Ky.prototype.K;Ky.prototype.getProperties=Ky.prototype.M;Ky.prototype.set=Ky.prototype.set;Ky.prototype.setProperties=Ky.prototype.I;Ky.prototype.unbind=Ky.prototype.P;Ky.prototype.unbindAll=Ky.prototype.Q;-Ky.prototype.changed=Ky.prototype.p;Ky.prototype.getRevision=Ky.prototype.C;Ky.prototype.on=Ky.prototype.A;Ky.prototype.once=Ky.prototype.D;Ky.prototype.un=Ky.prototype.B;Ky.prototype.unByKey=Ky.prototype.G;$.prototype.addFeature=$.prototype.Za;$.prototype.addFeatures=$.prototype.Ka;$.prototype.forEachFeature=$.prototype.eb;$.prototype.forEachFeatureInExtent=$.prototype.Aa;$.prototype.forEachFeatureIntersectingExtent=$.prototype.Ra;$.prototype.getFeatures=$.prototype.Ea;-$.prototype.getFeaturesAtCoordinate=$.prototype.Ta;$.prototype.getClosestFeatureToCoordinate=$.prototype.fb;$.prototype.getExtent=$.prototype.N;$.prototype.getFeatureById=$.prototype.Sa;$.prototype.removeFeature=$.prototype.jb;$.prototype.getAttributions=$.prototype.ba;$.prototype.getLogo=$.prototype.aa;$.prototype.getProjection=$.prototype.ca;$.prototype.getState=$.prototype.da;$.prototype.bindTo=$.prototype.O;$.prototype.get=$.prototype.get;$.prototype.getKeys=$.prototype.K;-$.prototype.getProperties=$.prototype.M;$.prototype.set=$.prototype.set;$.prototype.setProperties=$.prototype.I;$.prototype.unbind=$.prototype.P;$.prototype.unbindAll=$.prototype.Q;$.prototype.changed=$.prototype.p;$.prototype.getRevision=$.prototype.C;$.prototype.on=$.prototype.A;$.prototype.once=$.prototype.D;$.prototype.un=$.prototype.B;$.prototype.unByKey=$.prototype.G;Ny.prototype.setTileUrlFunction=Ny.prototype.xa;Ny.prototype.setUrl=Ny.prototype.d;Ny.prototype.getTileLoadFunction=Ny.prototype.gb;-Ny.prototype.getTileUrlFunction=Ny.prototype.hb;Ny.prototype.setTileLoadFunction=Ny.prototype.nb;Ny.prototype.getTileGrid=Ny.prototype.Ba;Ny.prototype.getAttributions=Ny.prototype.ba;Ny.prototype.getLogo=Ny.prototype.aa;Ny.prototype.getProjection=Ny.prototype.ca;Ny.prototype.getState=Ny.prototype.da;Ny.prototype.bindTo=Ny.prototype.O;Ny.prototype.get=Ny.prototype.get;Ny.prototype.getKeys=Ny.prototype.K;Ny.prototype.getProperties=Ny.prototype.M;Ny.prototype.set=Ny.prototype.set;-Ny.prototype.setProperties=Ny.prototype.I;Ny.prototype.unbind=Ny.prototype.P;Ny.prototype.unbindAll=Ny.prototype.Q;Ny.prototype.changed=Ny.prototype.p;Ny.prototype.getRevision=Ny.prototype.C;Ny.prototype.on=Ny.prototype.A;Ny.prototype.once=Ny.prototype.D;Ny.prototype.un=Ny.prototype.B;Ny.prototype.unByKey=Ny.prototype.G;Py.prototype.getTileLoadFunction=Py.prototype.gb;Py.prototype.getTileUrlFunction=Py.prototype.hb;Py.prototype.setTileLoadFunction=Py.prototype.nb;Py.prototype.setTileUrlFunction=Py.prototype.xa;-Py.prototype.getTileGrid=Py.prototype.Ba;Py.prototype.getAttributions=Py.prototype.ba;Py.prototype.getLogo=Py.prototype.aa;Py.prototype.getProjection=Py.prototype.ca;Py.prototype.getState=Py.prototype.da;Py.prototype.bindTo=Py.prototype.O;Py.prototype.get=Py.prototype.get;Py.prototype.getKeys=Py.prototype.K;Py.prototype.getProperties=Py.prototype.M;Py.prototype.set=Py.prototype.set;Py.prototype.setProperties=Py.prototype.I;Py.prototype.unbind=Py.prototype.P;Py.prototype.unbindAll=Py.prototype.Q;-Py.prototype.changed=Py.prototype.p;Py.prototype.getRevision=Py.prototype.C;Py.prototype.on=Py.prototype.A;Py.prototype.once=Py.prototype.D;Py.prototype.un=Py.prototype.B;Py.prototype.unByKey=Py.prototype.G;Ry.prototype.getTileGrid=Ry.prototype.Ba;Ry.prototype.getAttributions=Ry.prototype.ba;Ry.prototype.getLogo=Ry.prototype.aa;Ry.prototype.getProjection=Ry.prototype.ca;Ry.prototype.getState=Ry.prototype.da;Ry.prototype.bindTo=Ry.prototype.O;Ry.prototype.get=Ry.prototype.get;-Ry.prototype.getKeys=Ry.prototype.K;Ry.prototype.getProperties=Ry.prototype.M;Ry.prototype.set=Ry.prototype.set;Ry.prototype.setProperties=Ry.prototype.I;Ry.prototype.unbind=Ry.prototype.P;Ry.prototype.unbindAll=Ry.prototype.Q;Ry.prototype.changed=Ry.prototype.p;Ry.prototype.getRevision=Ry.prototype.C;Ry.prototype.on=Ry.prototype.A;Ry.prototype.once=Ry.prototype.D;Ry.prototype.un=Ry.prototype.B;Ry.prototype.unByKey=Ry.prototype.G;Sy.prototype.getTileLoadFunction=Sy.prototype.gb;-Sy.prototype.getTileUrlFunction=Sy.prototype.hb;Sy.prototype.setTileLoadFunction=Sy.prototype.nb;Sy.prototype.setTileUrlFunction=Sy.prototype.xa;Sy.prototype.getTileGrid=Sy.prototype.Ba;Sy.prototype.getAttributions=Sy.prototype.ba;Sy.prototype.getLogo=Sy.prototype.aa;Sy.prototype.getProjection=Sy.prototype.ca;Sy.prototype.getState=Sy.prototype.da;Sy.prototype.bindTo=Sy.prototype.O;Sy.prototype.get=Sy.prototype.get;Sy.prototype.getKeys=Sy.prototype.K;Sy.prototype.getProperties=Sy.prototype.M;-Sy.prototype.set=Sy.prototype.set;Sy.prototype.setProperties=Sy.prototype.I;Sy.prototype.unbind=Sy.prototype.P;Sy.prototype.unbindAll=Sy.prototype.Q;Sy.prototype.changed=Sy.prototype.p;Sy.prototype.getRevision=Sy.prototype.C;Sy.prototype.on=Sy.prototype.A;Sy.prototype.once=Sy.prototype.D;Sy.prototype.un=Sy.prototype.B;Sy.prototype.unByKey=Sy.prototype.G;Ty.prototype.getTileGrid=Ty.prototype.Ba;Ty.prototype.getAttributions=Ty.prototype.ba;Ty.prototype.getLogo=Ty.prototype.aa;-Ty.prototype.getProjection=Ty.prototype.ca;Ty.prototype.getState=Ty.prototype.da;Ty.prototype.bindTo=Ty.prototype.O;Ty.prototype.get=Ty.prototype.get;Ty.prototype.getKeys=Ty.prototype.K;Ty.prototype.getProperties=Ty.prototype.M;Ty.prototype.set=Ty.prototype.set;Ty.prototype.setProperties=Ty.prototype.I;Ty.prototype.unbind=Ty.prototype.P;Ty.prototype.unbindAll=Ty.prototype.Q;Ty.prototype.changed=Ty.prototype.p;Ty.prototype.getRevision=Ty.prototype.C;Ty.prototype.on=Ty.prototype.A;-Ty.prototype.once=Ty.prototype.D;Ty.prototype.un=Ty.prototype.B;Ty.prototype.unByKey=Ty.prototype.G;Yy.prototype.readFeatures=Yy.prototype.c;Yy.prototype.forEachFeatureIntersectingExtent=Yy.prototype.Ra;Yy.prototype.getFeaturesAtCoordinate=Yy.prototype.Ta;Yy.prototype.getFeatureById=Yy.prototype.Sa;Yy.prototype.getAttributions=Yy.prototype.ba;Yy.prototype.getLogo=Yy.prototype.aa;Yy.prototype.getProjection=Yy.prototype.ca;Yy.prototype.getState=Yy.prototype.da;Yy.prototype.bindTo=Yy.prototype.O;-Yy.prototype.get=Yy.prototype.get;Yy.prototype.getKeys=Yy.prototype.K;Yy.prototype.getProperties=Yy.prototype.M;Yy.prototype.set=Yy.prototype.set;Yy.prototype.setProperties=Yy.prototype.I;Yy.prototype.unbind=Yy.prototype.P;Yy.prototype.unbindAll=Yy.prototype.Q;Yy.prototype.changed=Yy.prototype.p;Yy.prototype.getRevision=Yy.prototype.C;Yy.prototype.on=Yy.prototype.A;Yy.prototype.once=Yy.prototype.D;Yy.prototype.un=Yy.prototype.B;Yy.prototype.unByKey=Yy.prototype.G;-$y.prototype.getTileLoadFunction=$y.prototype.gb;$y.prototype.getTileUrlFunction=$y.prototype.hb;$y.prototype.setTileLoadFunction=$y.prototype.nb;$y.prototype.setTileUrlFunction=$y.prototype.xa;$y.prototype.getTileGrid=$y.prototype.Ba;$y.prototype.getAttributions=$y.prototype.ba;$y.prototype.getLogo=$y.prototype.aa;$y.prototype.getProjection=$y.prototype.ca;$y.prototype.getState=$y.prototype.da;$y.prototype.bindTo=$y.prototype.O;$y.prototype.get=$y.prototype.get;$y.prototype.getKeys=$y.prototype.K;-$y.prototype.getProperties=$y.prototype.M;$y.prototype.set=$y.prototype.set;$y.prototype.setProperties=$y.prototype.I;$y.prototype.unbind=$y.prototype.P;$y.prototype.unbindAll=$y.prototype.Q;$y.prototype.changed=$y.prototype.p;$y.prototype.getRevision=$y.prototype.C;$y.prototype.on=$y.prototype.A;$y.prototype.once=$y.prototype.D;$y.prototype.un=$y.prototype.B;$y.prototype.unByKey=$y.prototype.G;dz.prototype.readFeatures=dz.prototype.c;dz.prototype.addFeature=dz.prototype.Za;-dz.prototype.addFeatures=dz.prototype.Ka;dz.prototype.clear=dz.prototype.clear;dz.prototype.forEachFeature=dz.prototype.eb;dz.prototype.forEachFeatureInExtent=dz.prototype.Aa;dz.prototype.forEachFeatureIntersectingExtent=dz.prototype.Ra;dz.prototype.getFeatures=dz.prototype.Ea;dz.prototype.getFeaturesAtCoordinate=dz.prototype.Ta;dz.prototype.getClosestFeatureToCoordinate=dz.prototype.fb;dz.prototype.getExtent=dz.prototype.N;dz.prototype.getFeatureById=dz.prototype.Sa;dz.prototype.removeFeature=dz.prototype.jb;-dz.prototype.getAttributions=dz.prototype.ba;dz.prototype.getLogo=dz.prototype.aa;dz.prototype.getProjection=dz.prototype.ca;dz.prototype.getState=dz.prototype.da;dz.prototype.bindTo=dz.prototype.O;dz.prototype.get=dz.prototype.get;dz.prototype.getKeys=dz.prototype.K;dz.prototype.getProperties=dz.prototype.M;dz.prototype.set=dz.prototype.set;dz.prototype.setProperties=dz.prototype.I;dz.prototype.unbind=dz.prototype.P;dz.prototype.unbindAll=dz.prototype.Q;dz.prototype.changed=dz.prototype.p;-dz.prototype.getRevision=dz.prototype.C;dz.prototype.on=dz.prototype.A;dz.prototype.once=dz.prototype.D;dz.prototype.un=dz.prototype.B;dz.prototype.unByKey=dz.prototype.G;gz.prototype.getTileLoadFunction=gz.prototype.gb;gz.prototype.getTileUrlFunction=gz.prototype.hb;gz.prototype.setTileLoadFunction=gz.prototype.nb;gz.prototype.setTileUrlFunction=gz.prototype.xa;gz.prototype.getTileGrid=gz.prototype.Ba;gz.prototype.getAttributions=gz.prototype.ba;gz.prototype.getLogo=gz.prototype.aa;-gz.prototype.getProjection=gz.prototype.ca;gz.prototype.getState=gz.prototype.da;gz.prototype.bindTo=gz.prototype.O;gz.prototype.get=gz.prototype.get;gz.prototype.getKeys=gz.prototype.K;gz.prototype.getProperties=gz.prototype.M;gz.prototype.set=gz.prototype.set;gz.prototype.setProperties=gz.prototype.I;gz.prototype.unbind=gz.prototype.P;gz.prototype.unbindAll=gz.prototype.Q;gz.prototype.changed=gz.prototype.p;gz.prototype.getRevision=gz.prototype.C;gz.prototype.on=gz.prototype.A;-gz.prototype.once=gz.prototype.D;gz.prototype.un=gz.prototype.B;gz.prototype.unByKey=gz.prototype.G;jz.prototype.getTileLoadFunction=jz.prototype.gb;jz.prototype.getTileUrlFunction=jz.prototype.hb;jz.prototype.setTileLoadFunction=jz.prototype.nb;jz.prototype.setTileUrlFunction=jz.prototype.xa;jz.prototype.getTileGrid=jz.prototype.Ba;jz.prototype.getAttributions=jz.prototype.ba;jz.prototype.getLogo=jz.prototype.aa;jz.prototype.getProjection=jz.prototype.ca;jz.prototype.getState=jz.prototype.da;-jz.prototype.bindTo=jz.prototype.O;jz.prototype.get=jz.prototype.get;jz.prototype.getKeys=jz.prototype.K;jz.prototype.getProperties=jz.prototype.M;jz.prototype.set=jz.prototype.set;jz.prototype.setProperties=jz.prototype.I;jz.prototype.unbind=jz.prototype.P;jz.prototype.unbindAll=jz.prototype.Q;jz.prototype.changed=jz.prototype.p;jz.prototype.getRevision=jz.prototype.C;jz.prototype.on=jz.prototype.A;jz.prototype.once=jz.prototype.D;jz.prototype.un=jz.prototype.B;jz.prototype.unByKey=jz.prototype.G;-kj.prototype.changed=kj.prototype.p;kj.prototype.getRevision=kj.prototype.C;kj.prototype.on=kj.prototype.A;kj.prototype.once=kj.prototype.D;kj.prototype.un=kj.prototype.B;kj.prototype.unByKey=kj.prototype.G;so.prototype.changed=so.prototype.p;so.prototype.getRevision=so.prototype.C;so.prototype.on=so.prototype.A;so.prototype.once=so.prototype.D;so.prototype.un=so.prototype.B;so.prototype.unByKey=so.prototype.G;vo.prototype.changed=vo.prototype.p;vo.prototype.getRevision=vo.prototype.C;-vo.prototype.on=vo.prototype.A;vo.prototype.once=vo.prototype.D;vo.prototype.un=vo.prototype.B;vo.prototype.unByKey=vo.prototype.G;Bo.prototype.changed=Bo.prototype.p;Bo.prototype.getRevision=Bo.prototype.C;Bo.prototype.on=Bo.prototype.A;Bo.prototype.once=Bo.prototype.D;Bo.prototype.un=Bo.prototype.B;Bo.prototype.unByKey=Bo.prototype.G;Do.prototype.changed=Do.prototype.p;Do.prototype.getRevision=Do.prototype.C;Do.prototype.on=Do.prototype.A;Do.prototype.once=Do.prototype.D;Do.prototype.un=Do.prototype.B;-Do.prototype.unByKey=Do.prototype.G;yn.prototype.changed=yn.prototype.p;yn.prototype.getRevision=yn.prototype.C;yn.prototype.on=yn.prototype.A;yn.prototype.once=yn.prototype.D;yn.prototype.un=yn.prototype.B;yn.prototype.unByKey=yn.prototype.G;zn.prototype.changed=zn.prototype.p;zn.prototype.getRevision=zn.prototype.C;zn.prototype.on=zn.prototype.A;zn.prototype.once=zn.prototype.D;zn.prototype.un=zn.prototype.B;zn.prototype.unByKey=zn.prototype.G;An.prototype.changed=An.prototype.p;-An.prototype.getRevision=An.prototype.C;An.prototype.on=An.prototype.A;An.prototype.once=An.prototype.D;An.prototype.un=An.prototype.B;An.prototype.unByKey=An.prototype.G;Cn.prototype.changed=Cn.prototype.p;Cn.prototype.getRevision=Cn.prototype.C;Cn.prototype.on=Cn.prototype.A;Cn.prototype.once=Cn.prototype.D;Cn.prototype.un=Cn.prototype.B;Cn.prototype.unByKey=Cn.prototype.G;zm.prototype.changed=zm.prototype.p;zm.prototype.getRevision=zm.prototype.C;zm.prototype.on=zm.prototype.A;-zm.prototype.once=zm.prototype.D;zm.prototype.un=zm.prototype.B;zm.prototype.unByKey=zm.prototype.G;tn.prototype.changed=tn.prototype.p;tn.prototype.getRevision=tn.prototype.C;tn.prototype.on=tn.prototype.A;tn.prototype.once=tn.prototype.D;tn.prototype.un=tn.prototype.B;tn.prototype.unByKey=tn.prototype.G;un.prototype.changed=un.prototype.p;un.prototype.getRevision=un.prototype.C;un.prototype.on=un.prototype.A;un.prototype.once=un.prototype.D;un.prototype.un=un.prototype.B;un.prototype.unByKey=un.prototype.G;-vn.prototype.changed=vn.prototype.p;vn.prototype.getRevision=vn.prototype.C;vn.prototype.on=vn.prototype.A;vn.prototype.once=vn.prototype.D;vn.prototype.un=vn.prototype.B;vn.prototype.unByKey=vn.prototype.G;C.prototype.bindTo=C.prototype.O;C.prototype.get=C.prototype.get;C.prototype.getKeys=C.prototype.K;C.prototype.getProperties=C.prototype.M;C.prototype.set=C.prototype.set;C.prototype.setProperties=C.prototype.I;C.prototype.unbind=C.prototype.P;C.prototype.unbindAll=C.prototype.Q;-C.prototype.changed=C.prototype.p;C.prototype.getRevision=C.prototype.C;C.prototype.on=C.prototype.A;C.prototype.once=C.prototype.D;C.prototype.un=C.prototype.B;C.prototype.unByKey=C.prototype.G;E.prototype.getBrightness=E.prototype.e;E.prototype.getContrast=E.prototype.j;E.prototype.getHue=E.prototype.i;E.prototype.getExtent=E.prototype.N;E.prototype.getMaxResolution=E.prototype.k;E.prototype.getMinResolution=E.prototype.l;E.prototype.getOpacity=E.prototype.u;E.prototype.getSaturation=E.prototype.n;-E.prototype.getVisible=E.prototype.d;E.prototype.setBrightness=E.prototype.J;E.prototype.setContrast=E.prototype.L;E.prototype.setHue=E.prototype.R;E.prototype.setExtent=E.prototype.s;E.prototype.setMaxResolution=E.prototype.W;E.prototype.setMinResolution=E.prototype.Z;E.prototype.setOpacity=E.prototype.t;E.prototype.setSaturation=E.prototype.ga;E.prototype.setVisible=E.prototype.ha;E.prototype.bindTo=E.prototype.O;E.prototype.get=E.prototype.get;E.prototype.getKeys=E.prototype.K;-E.prototype.getProperties=E.prototype.M;E.prototype.set=E.prototype.set;E.prototype.setProperties=E.prototype.I;E.prototype.unbind=E.prototype.P;E.prototype.unbindAll=E.prototype.Q;E.prototype.changed=E.prototype.p;E.prototype.getRevision=E.prototype.C;E.prototype.on=E.prototype.A;E.prototype.once=E.prototype.D;E.prototype.un=E.prototype.B;E.prototype.unByKey=E.prototype.G;J.prototype.setSource=J.prototype.ja;J.prototype.getBrightness=J.prototype.e;J.prototype.getContrast=J.prototype.j;-J.prototype.getHue=J.prototype.i;J.prototype.getExtent=J.prototype.N;J.prototype.getMaxResolution=J.prototype.k;J.prototype.getMinResolution=J.prototype.l;J.prototype.getOpacity=J.prototype.u;J.prototype.getSaturation=J.prototype.n;J.prototype.getVisible=J.prototype.d;J.prototype.setBrightness=J.prototype.J;J.prototype.setContrast=J.prototype.L;J.prototype.setHue=J.prototype.R;J.prototype.setExtent=J.prototype.s;J.prototype.setMaxResolution=J.prototype.W;J.prototype.setMinResolution=J.prototype.Z;-J.prototype.setOpacity=J.prototype.t;J.prototype.setSaturation=J.prototype.ga;J.prototype.setVisible=J.prototype.ha;J.prototype.bindTo=J.prototype.O;J.prototype.get=J.prototype.get;J.prototype.getKeys=J.prototype.K;J.prototype.getProperties=J.prototype.M;J.prototype.set=J.prototype.set;J.prototype.setProperties=J.prototype.I;J.prototype.unbind=J.prototype.P;J.prototype.unbindAll=J.prototype.Q;J.prototype.changed=J.prototype.p;J.prototype.getRevision=J.prototype.C;J.prototype.on=J.prototype.A;-J.prototype.once=J.prototype.D;J.prototype.un=J.prototype.B;J.prototype.unByKey=J.prototype.G;X.prototype.getSource=X.prototype.c;X.prototype.getStyle=X.prototype.mf;X.prototype.getStyleFunction=X.prototype.of;X.prototype.setStyle=X.prototype.oa;X.prototype.setSource=X.prototype.ja;X.prototype.getBrightness=X.prototype.e;X.prototype.getContrast=X.prototype.j;X.prototype.getHue=X.prototype.i;X.prototype.getExtent=X.prototype.N;X.prototype.getMaxResolution=X.prototype.k;-X.prototype.getMinResolution=X.prototype.l;X.prototype.getOpacity=X.prototype.u;X.prototype.getSaturation=X.prototype.n;X.prototype.getVisible=X.prototype.d;X.prototype.setBrightness=X.prototype.J;X.prototype.setContrast=X.prototype.L;X.prototype.setHue=X.prototype.R;X.prototype.setExtent=X.prototype.s;X.prototype.setMaxResolution=X.prototype.W;X.prototype.setMinResolution=X.prototype.Z;X.prototype.setOpacity=X.prototype.t;X.prototype.setSaturation=X.prototype.ga;X.prototype.setVisible=X.prototype.ha;-X.prototype.bindTo=X.prototype.O;X.prototype.get=X.prototype.get;X.prototype.getKeys=X.prototype.K;X.prototype.getProperties=X.prototype.M;X.prototype.set=X.prototype.set;X.prototype.setProperties=X.prototype.I;X.prototype.unbind=X.prototype.P;X.prototype.unbindAll=X.prototype.Q;X.prototype.changed=X.prototype.p;X.prototype.getRevision=X.prototype.C;X.prototype.on=X.prototype.A;X.prototype.once=X.prototype.D;X.prototype.un=X.prototype.B;X.prototype.unByKey=X.prototype.G;H.prototype.setSource=H.prototype.ja;-H.prototype.getBrightness=H.prototype.e;H.prototype.getContrast=H.prototype.j;H.prototype.getHue=H.prototype.i;H.prototype.getExtent=H.prototype.N;H.prototype.getMaxResolution=H.prototype.k;H.prototype.getMinResolution=H.prototype.l;H.prototype.getOpacity=H.prototype.u;H.prototype.getSaturation=H.prototype.n;H.prototype.getVisible=H.prototype.d;H.prototype.setBrightness=H.prototype.J;H.prototype.setContrast=H.prototype.L;H.prototype.setHue=H.prototype.R;H.prototype.setExtent=H.prototype.s;-H.prototype.setMaxResolution=H.prototype.W;H.prototype.setMinResolution=H.prototype.Z;H.prototype.setOpacity=H.prototype.t;H.prototype.setSaturation=H.prototype.ga;H.prototype.setVisible=H.prototype.ha;H.prototype.bindTo=H.prototype.O;H.prototype.get=H.prototype.get;H.prototype.getKeys=H.prototype.K;H.prototype.getProperties=H.prototype.M;H.prototype.set=H.prototype.set;H.prototype.setProperties=H.prototype.I;H.prototype.unbind=H.prototype.P;H.prototype.unbindAll=H.prototype.Q;-H.prototype.changed=H.prototype.p;H.prototype.getRevision=H.prototype.C;H.prototype.on=H.prototype.A;H.prototype.once=H.prototype.D;H.prototype.un=H.prototype.B;H.prototype.unByKey=H.prototype.G;G.prototype.getBrightness=G.prototype.e;G.prototype.getContrast=G.prototype.j;G.prototype.getHue=G.prototype.i;G.prototype.getExtent=G.prototype.N;G.prototype.getMaxResolution=G.prototype.k;G.prototype.getMinResolution=G.prototype.l;G.prototype.getOpacity=G.prototype.u;G.prototype.getSaturation=G.prototype.n;-G.prototype.getVisible=G.prototype.d;G.prototype.setBrightness=G.prototype.J;G.prototype.setContrast=G.prototype.L;G.prototype.setHue=G.prototype.R;G.prototype.setExtent=G.prototype.s;G.prototype.setMaxResolution=G.prototype.W;G.prototype.setMinResolution=G.prototype.Z;G.prototype.setOpacity=G.prototype.t;G.prototype.setSaturation=G.prototype.ga;G.prototype.setVisible=G.prototype.ha;G.prototype.bindTo=G.prototype.O;G.prototype.get=G.prototype.get;G.prototype.getKeys=G.prototype.K;-G.prototype.getProperties=G.prototype.M;G.prototype.set=G.prototype.set;G.prototype.setProperties=G.prototype.I;G.prototype.unbind=G.prototype.P;G.prototype.unbindAll=G.prototype.Q;G.prototype.changed=G.prototype.p;G.prototype.getRevision=G.prototype.C;G.prototype.on=G.prototype.A;G.prototype.once=G.prototype.D;G.prototype.un=G.prototype.B;G.prototype.unByKey=G.prototype.G;I.prototype.setSource=I.prototype.ja;I.prototype.getBrightness=I.prototype.e;I.prototype.getContrast=I.prototype.j;-I.prototype.getHue=I.prototype.i;I.prototype.getExtent=I.prototype.N;I.prototype.getMaxResolution=I.prototype.k;I.prototype.getMinResolution=I.prototype.l;I.prototype.getOpacity=I.prototype.u;I.prototype.getSaturation=I.prototype.n;I.prototype.getVisible=I.prototype.d;I.prototype.setBrightness=I.prototype.J;I.prototype.setContrast=I.prototype.L;I.prototype.setHue=I.prototype.R;I.prototype.setExtent=I.prototype.s;I.prototype.setMaxResolution=I.prototype.W;I.prototype.setMinResolution=I.prototype.Z;-I.prototype.setOpacity=I.prototype.t;I.prototype.setSaturation=I.prototype.ga;I.prototype.setVisible=I.prototype.ha;I.prototype.bindTo=I.prototype.O;I.prototype.get=I.prototype.get;I.prototype.getKeys=I.prototype.K;I.prototype.getProperties=I.prototype.M;I.prototype.set=I.prototype.set;I.prototype.setProperties=I.prototype.I;I.prototype.unbind=I.prototype.P;I.prototype.unbindAll=I.prototype.Q;I.prototype.changed=I.prototype.p;I.prototype.getRevision=I.prototype.C;I.prototype.on=I.prototype.A;-I.prototype.once=I.prototype.D;I.prototype.un=I.prototype.B;I.prototype.unByKey=I.prototype.G;Mj.prototype.bindTo=Mj.prototype.O;Mj.prototype.get=Mj.prototype.get;Mj.prototype.getKeys=Mj.prototype.K;Mj.prototype.getProperties=Mj.prototype.M;Mj.prototype.set=Mj.prototype.set;Mj.prototype.setProperties=Mj.prototype.I;Mj.prototype.unbind=Mj.prototype.P;Mj.prototype.unbindAll=Mj.prototype.Q;Mj.prototype.changed=Mj.prototype.p;Mj.prototype.getRevision=Mj.prototype.C;Mj.prototype.on=Mj.prototype.A;-Mj.prototype.once=Mj.prototype.D;Mj.prototype.un=Mj.prototype.B;Mj.prototype.unByKey=Mj.prototype.G;Qj.prototype.getActive=Qj.prototype.c;Qj.prototype.setActive=Qj.prototype.d;Qj.prototype.bindTo=Qj.prototype.O;Qj.prototype.get=Qj.prototype.get;Qj.prototype.getKeys=Qj.prototype.K;Qj.prototype.getProperties=Qj.prototype.M;Qj.prototype.set=Qj.prototype.set;Qj.prototype.setProperties=Qj.prototype.I;Qj.prototype.unbind=Qj.prototype.P;Qj.prototype.unbindAll=Qj.prototype.Q;Qj.prototype.changed=Qj.prototype.p;-Qj.prototype.getRevision=Qj.prototype.C;Qj.prototype.on=Qj.prototype.A;Qj.prototype.once=Qj.prototype.D;Qj.prototype.un=Qj.prototype.B;Qj.prototype.unByKey=Qj.prototype.G;Nw.prototype.getActive=Nw.prototype.c;Nw.prototype.setActive=Nw.prototype.d;Nw.prototype.bindTo=Nw.prototype.O;Nw.prototype.get=Nw.prototype.get;Nw.prototype.getKeys=Nw.prototype.K;Nw.prototype.getProperties=Nw.prototype.M;Nw.prototype.set=Nw.prototype.set;Nw.prototype.setProperties=Nw.prototype.I;Nw.prototype.unbind=Nw.prototype.P;-Nw.prototype.unbindAll=Nw.prototype.Q;Nw.prototype.changed=Nw.prototype.p;Nw.prototype.getRevision=Nw.prototype.C;Nw.prototype.on=Nw.prototype.A;Nw.prototype.once=Nw.prototype.D;Nw.prototype.un=Nw.prototype.B;Nw.prototype.unByKey=Nw.prototype.G;Zj.prototype.getActive=Zj.prototype.c;Zj.prototype.setActive=Zj.prototype.d;Zj.prototype.bindTo=Zj.prototype.O;Zj.prototype.get=Zj.prototype.get;Zj.prototype.getKeys=Zj.prototype.K;Zj.prototype.getProperties=Zj.prototype.M;Zj.prototype.set=Zj.prototype.set;-Zj.prototype.setProperties=Zj.prototype.I;Zj.prototype.unbind=Zj.prototype.P;Zj.prototype.unbindAll=Zj.prototype.Q;Zj.prototype.changed=Zj.prototype.p;Zj.prototype.getRevision=Zj.prototype.C;Zj.prototype.on=Zj.prototype.A;Zj.prototype.once=Zj.prototype.D;Zj.prototype.un=Zj.prototype.B;Zj.prototype.unByKey=Zj.prototype.G;cl.prototype.getActive=cl.prototype.c;cl.prototype.setActive=cl.prototype.d;cl.prototype.bindTo=cl.prototype.O;cl.prototype.get=cl.prototype.get;cl.prototype.getKeys=cl.prototype.K;-cl.prototype.getProperties=cl.prototype.M;cl.prototype.set=cl.prototype.set;cl.prototype.setProperties=cl.prototype.I;cl.prototype.unbind=cl.prototype.P;cl.prototype.unbindAll=cl.prototype.Q;cl.prototype.changed=cl.prototype.p;cl.prototype.getRevision=cl.prototype.C;cl.prototype.on=cl.prototype.A;cl.prototype.once=cl.prototype.D;cl.prototype.un=cl.prototype.B;cl.prototype.unByKey=cl.prototype.G;ck.prototype.getActive=ck.prototype.c;ck.prototype.setActive=ck.prototype.d;ck.prototype.bindTo=ck.prototype.O;-ck.prototype.get=ck.prototype.get;ck.prototype.getKeys=ck.prototype.K;ck.prototype.getProperties=ck.prototype.M;ck.prototype.set=ck.prototype.set;ck.prototype.setProperties=ck.prototype.I;ck.prototype.unbind=ck.prototype.P;ck.prototype.unbindAll=ck.prototype.Q;ck.prototype.changed=ck.prototype.p;ck.prototype.getRevision=ck.prototype.C;ck.prototype.on=ck.prototype.A;ck.prototype.once=ck.prototype.D;ck.prototype.un=ck.prototype.B;ck.prototype.unByKey=ck.prototype.G;Rw.prototype.getActive=Rw.prototype.c;-Rw.prototype.setActive=Rw.prototype.d;Rw.prototype.bindTo=Rw.prototype.O;Rw.prototype.get=Rw.prototype.get;Rw.prototype.getKeys=Rw.prototype.K;Rw.prototype.getProperties=Rw.prototype.M;Rw.prototype.set=Rw.prototype.set;Rw.prototype.setProperties=Rw.prototype.I;Rw.prototype.unbind=Rw.prototype.P;Rw.prototype.unbindAll=Rw.prototype.Q;Rw.prototype.changed=Rw.prototype.p;Rw.prototype.getRevision=Rw.prototype.C;Rw.prototype.on=Rw.prototype.A;Rw.prototype.once=Rw.prototype.D;Rw.prototype.un=Rw.prototype.B;-Rw.prototype.unByKey=Rw.prototype.G;gk.prototype.getActive=gk.prototype.c;gk.prototype.setActive=gk.prototype.d;gk.prototype.bindTo=gk.prototype.O;gk.prototype.get=gk.prototype.get;gk.prototype.getKeys=gk.prototype.K;gk.prototype.getProperties=gk.prototype.M;gk.prototype.set=gk.prototype.set;gk.prototype.setProperties=gk.prototype.I;gk.prototype.unbind=gk.prototype.P;gk.prototype.unbindAll=gk.prototype.Q;gk.prototype.changed=gk.prototype.p;gk.prototype.getRevision=gk.prototype.C;gk.prototype.on=gk.prototype.A;-gk.prototype.once=gk.prototype.D;gk.prototype.un=gk.prototype.B;gk.prototype.unByKey=gk.prototype.G;vl.prototype.getGeometry=vl.prototype.V;vl.prototype.getActive=vl.prototype.c;vl.prototype.setActive=vl.prototype.d;vl.prototype.bindTo=vl.prototype.O;vl.prototype.get=vl.prototype.get;vl.prototype.getKeys=vl.prototype.K;vl.prototype.getProperties=vl.prototype.M;vl.prototype.set=vl.prototype.set;vl.prototype.setProperties=vl.prototype.I;vl.prototype.unbind=vl.prototype.P;vl.prototype.unbindAll=vl.prototype.Q;-vl.prototype.changed=vl.prototype.p;vl.prototype.getRevision=vl.prototype.C;vl.prototype.on=vl.prototype.A;vl.prototype.once=vl.prototype.D;vl.prototype.un=vl.prototype.B;vl.prototype.unByKey=vl.prototype.G;Ww.prototype.getActive=Ww.prototype.c;Ww.prototype.setActive=Ww.prototype.d;Ww.prototype.bindTo=Ww.prototype.O;Ww.prototype.get=Ww.prototype.get;Ww.prototype.getKeys=Ww.prototype.K;Ww.prototype.getProperties=Ww.prototype.M;Ww.prototype.set=Ww.prototype.set;Ww.prototype.setProperties=Ww.prototype.I;-Ww.prototype.unbind=Ww.prototype.P;Ww.prototype.unbindAll=Ww.prototype.Q;Ww.prototype.changed=Ww.prototype.p;Ww.prototype.getRevision=Ww.prototype.C;Ww.prototype.on=Ww.prototype.A;Ww.prototype.once=Ww.prototype.D;Ww.prototype.un=Ww.prototype.B;Ww.prototype.unByKey=Ww.prototype.G;wl.prototype.getActive=wl.prototype.c;wl.prototype.setActive=wl.prototype.d;wl.prototype.bindTo=wl.prototype.O;wl.prototype.get=wl.prototype.get;wl.prototype.getKeys=wl.prototype.K;wl.prototype.getProperties=wl.prototype.M;-wl.prototype.set=wl.prototype.set;wl.prototype.setProperties=wl.prototype.I;wl.prototype.unbind=wl.prototype.P;wl.prototype.unbindAll=wl.prototype.Q;wl.prototype.changed=wl.prototype.p;wl.prototype.getRevision=wl.prototype.C;wl.prototype.on=wl.prototype.A;wl.prototype.once=wl.prototype.D;wl.prototype.un=wl.prototype.B;wl.prototype.unByKey=wl.prototype.G;yl.prototype.getActive=yl.prototype.c;yl.prototype.setActive=yl.prototype.d;yl.prototype.bindTo=yl.prototype.O;yl.prototype.get=yl.prototype.get;-yl.prototype.getKeys=yl.prototype.K;yl.prototype.getProperties=yl.prototype.M;yl.prototype.set=yl.prototype.set;yl.prototype.setProperties=yl.prototype.I;yl.prototype.unbind=yl.prototype.P;yl.prototype.unbindAll=yl.prototype.Q;yl.prototype.changed=yl.prototype.p;yl.prototype.getRevision=yl.prototype.C;yl.prototype.on=yl.prototype.A;yl.prototype.once=yl.prototype.D;yl.prototype.un=yl.prototype.B;yl.prototype.unByKey=yl.prototype.G;ix.prototype.getActive=ix.prototype.c;ix.prototype.setActive=ix.prototype.d;-ix.prototype.bindTo=ix.prototype.O;ix.prototype.get=ix.prototype.get;ix.prototype.getKeys=ix.prototype.K;ix.prototype.getProperties=ix.prototype.M;ix.prototype.set=ix.prototype.set;ix.prototype.setProperties=ix.prototype.I;ix.prototype.unbind=ix.prototype.P;ix.prototype.unbindAll=ix.prototype.Q;ix.prototype.changed=ix.prototype.p;ix.prototype.getRevision=ix.prototype.C;ix.prototype.on=ix.prototype.A;ix.prototype.once=ix.prototype.D;ix.prototype.un=ix.prototype.B;ix.prototype.unByKey=ix.prototype.G;-Al.prototype.getActive=Al.prototype.c;Al.prototype.setActive=Al.prototype.d;Al.prototype.bindTo=Al.prototype.O;Al.prototype.get=Al.prototype.get;Al.prototype.getKeys=Al.prototype.K;Al.prototype.getProperties=Al.prototype.M;Al.prototype.set=Al.prototype.set;Al.prototype.setProperties=Al.prototype.I;Al.prototype.unbind=Al.prototype.P;Al.prototype.unbindAll=Al.prototype.Q;Al.prototype.changed=Al.prototype.p;Al.prototype.getRevision=Al.prototype.C;Al.prototype.on=Al.prototype.A;Al.prototype.once=Al.prototype.D;-Al.prototype.un=Al.prototype.B;Al.prototype.unByKey=Al.prototype.G;Cl.prototype.getActive=Cl.prototype.c;Cl.prototype.setActive=Cl.prototype.d;Cl.prototype.bindTo=Cl.prototype.O;Cl.prototype.get=Cl.prototype.get;Cl.prototype.getKeys=Cl.prototype.K;Cl.prototype.getProperties=Cl.prototype.M;Cl.prototype.set=Cl.prototype.set;Cl.prototype.setProperties=Cl.prototype.I;Cl.prototype.unbind=Cl.prototype.P;Cl.prototype.unbindAll=Cl.prototype.Q;Cl.prototype.changed=Cl.prototype.p;Cl.prototype.getRevision=Cl.prototype.C;-Cl.prototype.on=Cl.prototype.A;Cl.prototype.once=Cl.prototype.D;Cl.prototype.un=Cl.prototype.B;Cl.prototype.unByKey=Cl.prototype.G;Gl.prototype.getActive=Gl.prototype.c;Gl.prototype.setActive=Gl.prototype.d;Gl.prototype.bindTo=Gl.prototype.O;Gl.prototype.get=Gl.prototype.get;Gl.prototype.getKeys=Gl.prototype.K;Gl.prototype.getProperties=Gl.prototype.M;Gl.prototype.set=Gl.prototype.set;Gl.prototype.setProperties=Gl.prototype.I;Gl.prototype.unbind=Gl.prototype.P;Gl.prototype.unbindAll=Gl.prototype.Q;-Gl.prototype.changed=Gl.prototype.p;Gl.prototype.getRevision=Gl.prototype.C;Gl.prototype.on=Gl.prototype.A;Gl.prototype.once=Gl.prototype.D;Gl.prototype.un=Gl.prototype.B;Gl.prototype.unByKey=Gl.prototype.G;sx.prototype.getActive=sx.prototype.c;sx.prototype.setActive=sx.prototype.d;sx.prototype.bindTo=sx.prototype.O;sx.prototype.get=sx.prototype.get;sx.prototype.getKeys=sx.prototype.K;sx.prototype.getProperties=sx.prototype.M;sx.prototype.set=sx.prototype.set;sx.prototype.setProperties=sx.prototype.I;-sx.prototype.unbind=sx.prototype.P;sx.prototype.unbindAll=sx.prototype.Q;sx.prototype.changed=sx.prototype.p;sx.prototype.getRevision=sx.prototype.C;sx.prototype.on=sx.prototype.A;sx.prototype.once=sx.prototype.D;sx.prototype.un=sx.prototype.B;sx.prototype.unByKey=sx.prototype.G;kk.prototype.changed=kk.prototype.p;kk.prototype.getRevision=kk.prototype.C;kk.prototype.on=kk.prototype.A;kk.prototype.once=kk.prototype.D;kk.prototype.un=kk.prototype.B;kk.prototype.unByKey=kk.prototype.G;-mk.prototype.clone=mk.prototype.clone;mk.prototype.getClosestPoint=mk.prototype.j;mk.prototype.getExtent=mk.prototype.N;mk.prototype.getType=mk.prototype.S;mk.prototype.intersectsExtent=mk.prototype.na;mk.prototype.transform=mk.prototype.transform;mk.prototype.changed=mk.prototype.p;mk.prototype.getRevision=mk.prototype.C;mk.prototype.on=mk.prototype.A;mk.prototype.once=mk.prototype.D;mk.prototype.un=mk.prototype.B;mk.prototype.unByKey=mk.prototype.G;Em.prototype.getFirstCoordinate=Em.prototype.Cb;-Em.prototype.getLastCoordinate=Em.prototype.Db;Em.prototype.getLayout=Em.prototype.Eb;Em.prototype.applyTransform=Em.prototype.ua;Em.prototype.translate=Em.prototype.Na;Em.prototype.getClosestPoint=Em.prototype.j;Em.prototype.getExtent=Em.prototype.N;Em.prototype.intersectsExtent=Em.prototype.na;Em.prototype.changed=Em.prototype.p;Em.prototype.getRevision=Em.prototype.C;Em.prototype.on=Em.prototype.A;Em.prototype.once=Em.prototype.D;Em.prototype.un=Em.prototype.B;Em.prototype.unByKey=Em.prototype.G;-Gm.prototype.getClosestPoint=Gm.prototype.j;Gm.prototype.getExtent=Gm.prototype.N;Gm.prototype.transform=Gm.prototype.transform;Gm.prototype.changed=Gm.prototype.p;Gm.prototype.getRevision=Gm.prototype.C;Gm.prototype.on=Gm.prototype.A;Gm.prototype.once=Gm.prototype.D;Gm.prototype.un=Gm.prototype.B;Gm.prototype.unByKey=Gm.prototype.G;Gk.prototype.getFirstCoordinate=Gk.prototype.Cb;Gk.prototype.getLastCoordinate=Gk.prototype.Db;Gk.prototype.getLayout=Gk.prototype.Eb;Gk.prototype.applyTransform=Gk.prototype.ua;-Gk.prototype.translate=Gk.prototype.Na;Gk.prototype.getClosestPoint=Gk.prototype.j;Gk.prototype.getExtent=Gk.prototype.N;Gk.prototype.intersectsExtent=Gk.prototype.na;Gk.prototype.transform=Gk.prototype.transform;Gk.prototype.changed=Gk.prototype.p;Gk.prototype.getRevision=Gk.prototype.C;Gk.prototype.on=Gk.prototype.A;Gk.prototype.once=Gk.prototype.D;Gk.prototype.un=Gk.prototype.B;Gk.prototype.unByKey=Gk.prototype.G;Nm.prototype.getFirstCoordinate=Nm.prototype.Cb;Nm.prototype.getLastCoordinate=Nm.prototype.Db;-Nm.prototype.getLayout=Nm.prototype.Eb;Nm.prototype.applyTransform=Nm.prototype.ua;Nm.prototype.translate=Nm.prototype.Na;Nm.prototype.getClosestPoint=Nm.prototype.j;Nm.prototype.getExtent=Nm.prototype.N;Nm.prototype.transform=Nm.prototype.transform;Nm.prototype.changed=Nm.prototype.p;Nm.prototype.getRevision=Nm.prototype.C;Nm.prototype.on=Nm.prototype.A;Nm.prototype.once=Nm.prototype.D;Nm.prototype.un=Nm.prototype.B;Nm.prototype.unByKey=Nm.prototype.G;Pm.prototype.getFirstCoordinate=Pm.prototype.Cb;-Pm.prototype.getLastCoordinate=Pm.prototype.Db;Pm.prototype.getLayout=Pm.prototype.Eb;Pm.prototype.applyTransform=Pm.prototype.ua;Pm.prototype.translate=Pm.prototype.Na;Pm.prototype.getClosestPoint=Pm.prototype.j;Pm.prototype.getExtent=Pm.prototype.N;Pm.prototype.transform=Pm.prototype.transform;Pm.prototype.changed=Pm.prototype.p;Pm.prototype.getRevision=Pm.prototype.C;Pm.prototype.on=Pm.prototype.A;Pm.prototype.once=Pm.prototype.D;Pm.prototype.un=Pm.prototype.B;Pm.prototype.unByKey=Pm.prototype.G;-Sm.prototype.getFirstCoordinate=Sm.prototype.Cb;Sm.prototype.getLastCoordinate=Sm.prototype.Db;Sm.prototype.getLayout=Sm.prototype.Eb;Sm.prototype.applyTransform=Sm.prototype.ua;Sm.prototype.translate=Sm.prototype.Na;Sm.prototype.getClosestPoint=Sm.prototype.j;Sm.prototype.getExtent=Sm.prototype.N;Sm.prototype.transform=Sm.prototype.transform;Sm.prototype.changed=Sm.prototype.p;Sm.prototype.getRevision=Sm.prototype.C;Sm.prototype.on=Sm.prototype.A;Sm.prototype.once=Sm.prototype.D;-Sm.prototype.un=Sm.prototype.B;Sm.prototype.unByKey=Sm.prototype.G;Tm.prototype.getFirstCoordinate=Tm.prototype.Cb;Tm.prototype.getLastCoordinate=Tm.prototype.Db;Tm.prototype.getLayout=Tm.prototype.Eb;Tm.prototype.applyTransform=Tm.prototype.ua;Tm.prototype.translate=Tm.prototype.Na;Tm.prototype.getClosestPoint=Tm.prototype.j;Tm.prototype.getExtent=Tm.prototype.N;Tm.prototype.transform=Tm.prototype.transform;Tm.prototype.changed=Tm.prototype.p;Tm.prototype.getRevision=Tm.prototype.C;-Tm.prototype.on=Tm.prototype.A;Tm.prototype.once=Tm.prototype.D;Tm.prototype.un=Tm.prototype.B;Tm.prototype.unByKey=Tm.prototype.G;Ik.prototype.getFirstCoordinate=Ik.prototype.Cb;Ik.prototype.getLastCoordinate=Ik.prototype.Db;Ik.prototype.getLayout=Ik.prototype.Eb;Ik.prototype.applyTransform=Ik.prototype.ua;Ik.prototype.translate=Ik.prototype.Na;Ik.prototype.getClosestPoint=Ik.prototype.j;Ik.prototype.getExtent=Ik.prototype.N;Ik.prototype.transform=Ik.prototype.transform;Ik.prototype.changed=Ik.prototype.p;-Ik.prototype.getRevision=Ik.prototype.C;Ik.prototype.on=Ik.prototype.A;Ik.prototype.once=Ik.prototype.D;Ik.prototype.un=Ik.prototype.B;Ik.prototype.unByKey=Ik.prototype.G;F.prototype.getFirstCoordinate=F.prototype.Cb;F.prototype.getLastCoordinate=F.prototype.Db;F.prototype.getLayout=F.prototype.Eb;F.prototype.applyTransform=F.prototype.ua;F.prototype.translate=F.prototype.Na;F.prototype.getClosestPoint=F.prototype.j;F.prototype.getExtent=F.prototype.N;F.prototype.transform=F.prototype.transform;-F.prototype.changed=F.prototype.p;F.prototype.getRevision=F.prototype.C;F.prototype.on=F.prototype.A;F.prototype.once=F.prototype.D;F.prototype.un=F.prototype.B;F.prototype.unByKey=F.prototype.G;Pq.prototype.readFeatures=Pq.prototype.qa;Gq.prototype.readFeatures=Gq.prototype.qa;Gq.prototype.readFeatures=Gq.prototype.qa;np.prototype.bindTo=np.prototype.O;np.prototype.get=np.prototype.get;np.prototype.getKeys=np.prototype.K;np.prototype.getProperties=np.prototype.M;np.prototype.set=np.prototype.set;-np.prototype.setProperties=np.prototype.I;np.prototype.unbind=np.prototype.P;np.prototype.unbindAll=np.prototype.Q;np.prototype.changed=np.prototype.p;np.prototype.getRevision=np.prototype.C;np.prototype.on=np.prototype.A;np.prototype.once=np.prototype.D;np.prototype.un=np.prototype.B;np.prototype.unByKey=np.prototype.G;Ug.prototype.bindTo=Ug.prototype.O;Ug.prototype.get=Ug.prototype.get;Ug.prototype.getKeys=Ug.prototype.K;Ug.prototype.getProperties=Ug.prototype.M;Ug.prototype.set=Ug.prototype.set;-Ug.prototype.setProperties=Ug.prototype.I;Ug.prototype.unbind=Ug.prototype.P;Ug.prototype.unbindAll=Ug.prototype.Q;Ug.prototype.changed=Ug.prototype.p;Ug.prototype.getRevision=Ug.prototype.C;Ug.prototype.on=Ug.prototype.A;Ug.prototype.once=Ug.prototype.D;Ug.prototype.un=Ug.prototype.B;Ug.prototype.unByKey=Ug.prototype.G;Vg.prototype.getMap=Vg.prototype.j;Vg.prototype.setMap=Vg.prototype.setMap;Vg.prototype.setTarget=Vg.prototype.d;Vg.prototype.bindTo=Vg.prototype.O;Vg.prototype.get=Vg.prototype.get;-Vg.prototype.getKeys=Vg.prototype.K;Vg.prototype.getProperties=Vg.prototype.M;Vg.prototype.set=Vg.prototype.set;Vg.prototype.setProperties=Vg.prototype.I;Vg.prototype.unbind=Vg.prototype.P;Vg.prototype.unbindAll=Vg.prototype.Q;Vg.prototype.changed=Vg.prototype.p;Vg.prototype.getRevision=Vg.prototype.C;Vg.prototype.on=Vg.prototype.A;Vg.prototype.once=Vg.prototype.D;Vg.prototype.un=Vg.prototype.B;Vg.prototype.unByKey=Vg.prototype.G;fh.prototype.getMap=fh.prototype.j;fh.prototype.setMap=fh.prototype.setMap;-fh.prototype.setTarget=fh.prototype.d;fh.prototype.bindTo=fh.prototype.O;fh.prototype.get=fh.prototype.get;fh.prototype.getKeys=fh.prototype.K;fh.prototype.getProperties=fh.prototype.M;fh.prototype.set=fh.prototype.set;fh.prototype.setProperties=fh.prototype.I;fh.prototype.unbind=fh.prototype.P;fh.prototype.unbindAll=fh.prototype.Q;fh.prototype.changed=fh.prototype.p;fh.prototype.getRevision=fh.prototype.C;fh.prototype.on=fh.prototype.A;fh.prototype.once=fh.prototype.D;fh.prototype.un=fh.prototype.B;-fh.prototype.unByKey=fh.prototype.G;gh.prototype.getMap=gh.prototype.j;gh.prototype.setTarget=gh.prototype.d;gh.prototype.bindTo=gh.prototype.O;gh.prototype.get=gh.prototype.get;gh.prototype.getKeys=gh.prototype.K;gh.prototype.getProperties=gh.prototype.M;gh.prototype.set=gh.prototype.set;gh.prototype.setProperties=gh.prototype.I;gh.prototype.unbind=gh.prototype.P;gh.prototype.unbindAll=gh.prototype.Q;gh.prototype.changed=gh.prototype.p;gh.prototype.getRevision=gh.prototype.C;gh.prototype.on=gh.prototype.A;-gh.prototype.once=gh.prototype.D;gh.prototype.un=gh.prototype.B;gh.prototype.unByKey=gh.prototype.G;Mo.prototype.getMap=Mo.prototype.j;Mo.prototype.setTarget=Mo.prototype.d;Mo.prototype.bindTo=Mo.prototype.O;Mo.prototype.get=Mo.prototype.get;Mo.prototype.getKeys=Mo.prototype.K;Mo.prototype.getProperties=Mo.prototype.M;Mo.prototype.set=Mo.prototype.set;Mo.prototype.setProperties=Mo.prototype.I;Mo.prototype.unbind=Mo.prototype.P;Mo.prototype.unbindAll=Mo.prototype.Q;Mo.prototype.changed=Mo.prototype.p;-Mo.prototype.getRevision=Mo.prototype.C;Mo.prototype.on=Mo.prototype.A;Mo.prototype.once=Mo.prototype.D;Mo.prototype.un=Mo.prototype.B;Mo.prototype.unByKey=Mo.prototype.G;Yg.prototype.getMap=Yg.prototype.j;Yg.prototype.setMap=Yg.prototype.setMap;Yg.prototype.setTarget=Yg.prototype.d;Yg.prototype.bindTo=Yg.prototype.O;Yg.prototype.get=Yg.prototype.get;Yg.prototype.getKeys=Yg.prototype.K;Yg.prototype.getProperties=Yg.prototype.M;Yg.prototype.set=Yg.prototype.set;Yg.prototype.setProperties=Yg.prototype.I;-Yg.prototype.unbind=Yg.prototype.P;Yg.prototype.unbindAll=Yg.prototype.Q;Yg.prototype.changed=Yg.prototype.p;Yg.prototype.getRevision=Yg.prototype.C;Yg.prototype.on=Yg.prototype.A;Yg.prototype.once=Yg.prototype.D;Yg.prototype.un=Yg.prototype.B;Yg.prototype.unByKey=Yg.prototype.G;So.prototype.getMap=So.prototype.j;So.prototype.setMap=So.prototype.setMap;So.prototype.setTarget=So.prototype.d;So.prototype.bindTo=So.prototype.O;So.prototype.get=So.prototype.get;So.prototype.getKeys=So.prototype.K;-So.prototype.getProperties=So.prototype.M;So.prototype.set=So.prototype.set;So.prototype.setProperties=So.prototype.I;So.prototype.unbind=So.prototype.P;So.prototype.unbindAll=So.prototype.Q;So.prototype.changed=So.prototype.p;So.prototype.getRevision=So.prototype.C;So.prototype.on=So.prototype.A;So.prototype.once=So.prototype.D;So.prototype.un=So.prototype.B;So.prototype.unByKey=So.prototype.G;$g.prototype.getMap=$g.prototype.j;$g.prototype.setMap=$g.prototype.setMap;$g.prototype.setTarget=$g.prototype.d;-$g.prototype.bindTo=$g.prototype.O;$g.prototype.get=$g.prototype.get;$g.prototype.getKeys=$g.prototype.K;$g.prototype.getProperties=$g.prototype.M;$g.prototype.set=$g.prototype.set;$g.prototype.setProperties=$g.prototype.I;$g.prototype.unbind=$g.prototype.P;$g.prototype.unbindAll=$g.prototype.Q;$g.prototype.changed=$g.prototype.p;$g.prototype.getRevision=$g.prototype.C;$g.prototype.on=$g.prototype.A;$g.prototype.once=$g.prototype.D;$g.prototype.un=$g.prototype.B;$g.prototype.unByKey=$g.prototype.G;-gp.prototype.getMap=gp.prototype.j;gp.prototype.setTarget=gp.prototype.d;gp.prototype.bindTo=gp.prototype.O;gp.prototype.get=gp.prototype.get;gp.prototype.getKeys=gp.prototype.K;gp.prototype.getProperties=gp.prototype.M;gp.prototype.set=gp.prototype.set;gp.prototype.setProperties=gp.prototype.I;gp.prototype.unbind=gp.prototype.P;gp.prototype.unbindAll=gp.prototype.Q;gp.prototype.changed=gp.prototype.p;gp.prototype.getRevision=gp.prototype.C;gp.prototype.on=gp.prototype.A;gp.prototype.once=gp.prototype.D;-gp.prototype.un=gp.prototype.B;gp.prototype.unByKey=gp.prototype.G;lp.prototype.getMap=lp.prototype.j;lp.prototype.setMap=lp.prototype.setMap;lp.prototype.setTarget=lp.prototype.d;lp.prototype.bindTo=lp.prototype.O;lp.prototype.get=lp.prototype.get;lp.prototype.getKeys=lp.prototype.K;lp.prototype.getProperties=lp.prototype.M;lp.prototype.set=lp.prototype.set;lp.prototype.setProperties=lp.prototype.I;lp.prototype.unbind=lp.prototype.P;lp.prototype.unbindAll=lp.prototype.Q;lp.prototype.changed=lp.prototype.p;-lp.prototype.getRevision=lp.prototype.C;lp.prototype.on=lp.prototype.A;lp.prototype.once=lp.prototype.D;lp.prototype.un=lp.prototype.B;lp.prototype.unByKey=lp.prototype.G;- return OPENLAYERS.ol;-}));-diff --git a/web/ext/map/openlayers-3.3.0.wv1/ol-debug.js b/web/ext/map/openlayers-3.4.0.wv1/ol-debug.jssimilarity index 99%rename from web/ext/map/openlayers-3.3.0.wv1/ol-debug.jsrename to web/ext/map/openlayers-3.4.0.wv1/ol-debug.jsindex d8488de03..4e3a79738 100644--- a/web/ext/map/openlayers-3.3.0.wv1/ol-debug.js+++ b/web/ext/map/openlayers-3.4.0.wv1/ol-debug.js@@ -8202,12 +8202,6 @@ goog.provide('ol');ol.ASSUME_TOUCH = false;-/**- * @define {boolean} Replace unused entries with NaNs.- */-ol.BUFFER_REPLACE_UNUSED_ENTRIES_WITH_NANS = goog.DEBUG;--/*** TODO: rename this to something having to do with tile grids* see https://github.com/openlayers/ol3/issues/2076@@ -18740,12 +18734,54 @@ ol.proj.Projection = function(options) {*/this.global_ = goog.isDef(options.global) ? options.global : false;+ /**+ * @private+ * @type {function(number, ol.Coordinate):number}+ */+ this.getPointResolutionFunc_ = goog.isDef(options.getPointResolution) ?+ options.getPointResolution : this.getPointResolution_;+/*** @private* @type {ol.tilegrid.TileGrid}*/this.defaultTileGrid_ = null;+ if (ol.ENABLE_PROJ4JS && typeof proj4 == 'function') {+ var code = options.code;+ var def = proj4.defs(code);+ if (goog.isDef(def)) {+ if (goog.isDef(def.axis) && !goog.isDef(options.axisOrientation)) {+ this.axisOrientation_ = def.axis;+ }+ if (!goog.isDef(options.units)) {+ var units = def.units;+ if (!goog.isDef(units)) {+ if (goog.isDef(def.to_meter)) {+ units = def.to_meter.toString();+ ol.proj.METERS_PER_UNIT[units] = def.to_meter;+ }+ }+ this.units_ = units;+ }+ var projections = ol.proj.projections_;+ var currentCode, currentDef, currentProj, proj4Transform;+ for (currentCode in projections) {+ currentDef = proj4.defs(currentCode);+ if (goog.isDef(currentDef)) {+ currentProj = ol.proj.get(currentCode);+ if (currentDef === def) {+ ol.proj.addEquivalentProjections([currentProj, this]);+ } else {+ proj4Transform = proj4(currentCode, code);+ ol.proj.addCoordinateTransforms(currentProj, this,+ proj4Transform.forward, proj4Transform.inverse);+ }+ }+ }+ }+ }+};@@ -18825,6 +18861,16 @@ ol.proj.Projection.prototype.isGlobal = function() {};+/**+* Set if the projection is a global projection which spans the whole world+* @param {boolean} global Whether the projection is global.+* @api stable+*/+ol.proj.Projection.prototype.setGlobal = function(global) {+ this.global_ = global;+};++/*** @return {ol.tilegrid.TileGrid} The default tile grid.*/@@ -18863,16 +18909,29 @@ ol.proj.Projection.prototype.setWorldExtent = function(worldExtent) {/**- * Get the resolution of the point in degrees. For projections with degrees as- * the unit this will simply return the provided resolution. For other- * projections the point resolution is estimated by transforming the center- * pixel to EPSG:4326, measuring its width and height on the normal sphere,- * and taking the average of the width and height.- * @param {number} resolution Resolution.- * @param {ol.Coordinate} point Point.- * @return {number} Point resolution.- */-ol.proj.Projection.prototype.getPointResolution = function(resolution, point) {+* Set the getPointResolution function for this projection.+* @param {function(number, ol.Coordinate):number} func Function+* @api+*/+ol.proj.Projection.prototype.setGetPointResolution = function(func) {+ this.getPointResolutionFunc_ = func;+};+++/**+* Default version.+* Get the resolution of the point in degrees or distance units.+* For projections with degrees as the unit this will simply return the+* provided resolution. For other projections the point resolution is+* estimated by transforming the 'point' pixel to EPSG:4326,+* measuring its width and height on the normal sphere,+* and taking the average of the width and height.+* @param {number} resolution Nominal resolution in projection units.+* @param {ol.Coordinate} point Point to find adjusted resolution at.+* @return {number} Point resolution at point in projection units.+* @private+*/+ol.proj.Projection.prototype.getPointResolution_ = function(resolution, point) {var units = this.getUnits();if (units == ol.proj.Units.DEGREES) {return resolution;@@ -18903,6 +18962,26 @@ ol.proj.Projection.prototype.getPointResolution = function(resolution, point) {};+/**+ * Get the resolution of the point in degrees or distance units.+ * For projections with degrees as the unit this will simply return the+ * provided resolution. The default for other projections is to estimate+ * the point resolution by transforming the 'point' pixel to EPSG:4326,+ * measuring its width and height on the normal sphere,+ * and taking the average of the width and height.+ * An alternative implementation may be given when constructing a+ * projection. For many local projections,+ * such a custom function will return the resolution unchanged.+ * @param {number} resolution Resolution in projection units.+ * @param {ol.Coordinate} point Point.+ * @return {number} Point resolution in projection units.+ * @api+ */+ol.proj.Projection.prototype.getPointResolution = function(resolution, point) {+ return this.getPointResolutionFunc_(resolution, point);+};++/*** @private* @type {Object.<string, ol.proj.Projection>}@@ -18961,7 +19040,8 @@ ol.proj.addEquivalentTransforms =/**- * Add a Projection object to the list of supported projections.+ * Add a Projection object to the list of supported projections that can be+ * looked up by their code.** @param {ol.proj.Projection} projection Projection instance.* @api stable@@ -19131,43 +19211,11 @@ ol.proj.get = function(projectionLike) {projection = projectionLike;} else if (goog.isString(projectionLike)) {var code = projectionLike;- var projections = ol.proj.projections_;- projection = projections[code];+ projection = ol.proj.projections_[code];if (ol.ENABLE_PROJ4JS && !goog.isDef(projection) &&- typeof proj4 == 'function') {- var def = proj4.defs(code);- if (goog.isDef(def)) {- var units = def.units;- if (!goog.isDef(units)) {- if (goog.isDef(def.to_meter)) {- units = def.to_meter.toString();- ol.proj.METERS_PER_UNIT[units] = def.to_meter;- }- }- projection = new ol.proj.Projection({- code: code,- units: units,- axisOrientation: def.axis- });- ol.proj.addProjection(projection);- var currentCode, currentDef, currentProj, proj4Transform;- for (currentCode in projections) {- currentDef = proj4.defs(currentCode);- if (goog.isDef(currentDef)) {- currentProj = ol.proj.get(currentCode);- if (currentDef === def) {- ol.proj.addEquivalentProjections([currentProj, projection]);- } else {- proj4Transform = proj4(currentCode, code);- ol.proj.addCoordinateTransforms(currentProj, projection,- proj4Transform.forward, proj4Transform.inverse);- }- }- }- } else {- goog.asserts.assert(goog.isDef(projection));- projection = null;- }+ typeof proj4 == 'function' && goog.isDef(proj4.defs(code))) {+ projection = new ol.proj.Projection({code: code});+ ol.proj.addProjection(projection);}} else {projection = null;@@ -20416,6 +20464,7 @@ goog.provide('ol.tilecoord');goog.require('goog.array');goog.require('goog.asserts');+goog.require('goog.math');/**@@ -20551,6 +20600,38 @@ ol.tilecoord.toString = function(tileCoord) {return ol.tilecoord.getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);};++/**+ * @param {ol.TileCoord} tileCoord Tile coordinate.+ * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.+ * @param {ol.proj.Projection} projection Projection.+ * @return {ol.TileCoord} Tile coordinate.+ */+ol.tilecoord.wrapX = function(tileCoord, tileGrid, projection) {+ var z = tileCoord[0];+ var x = tileCoord[1];+ var tileRange = tileGrid.getTileRange(z, projection);+ if (x < tileRange.minX || x > tileRange.maxX) {+ x = goog.math.modulo(x, tileRange.getWidth());+ return [z, x, tileCoord[2]];+ }+ return tileCoord;+};+++/**+ * @param {ol.TileCoord} tileCoord Tile coordinate.+ * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.+ * @param {ol.proj.Projection} projection Projection.+ * @return {ol.TileCoord} Tile coordinate.+ */+ol.tilecoord.clipX = function(tileCoord, tileGrid, projection) {+ var z = tileCoord[0];+ var x = tileCoord[1];+ var tileRange = tileGrid.getTileRange(z, projection);+ return (x < tileRange.minX || x > tileRange.maxX) ? null : tileCoord;+};+goog.provide('ol.TileRange');goog.require('goog.asserts');@@ -20738,6 +20819,8 @@ ol.TileRange.prototype.intersects = function(tileRange) {goog.provide('ol.Attribution');+goog.require('goog.asserts');+goog.require('goog.math');goog.require('ol.TileRange');@@ -20792,22 +20875,43 @@ ol.Attribution.prototype.getHTML = function() {/*** @param {Object.<string, ol.TileRange>} tileRanges Tile ranges.+ * @param {!ol.tilegrid.TileGrid} tileGrid Tile grid.+ * @param {!ol.proj.Projection} projection Projection.* @return {boolean} Intersects any tile range.*/-ol.Attribution.prototype.intersectsAnyTileRange = function(tileRanges) {+ol.Attribution.prototype.intersectsAnyTileRange =+ function(tileRanges, tileGrid, projection) {if (goog.isNull(this.tileRanges_)) {return true;}- var i, ii, tileRange, z;- for (z in tileRanges) {- if (!(z in this.tileRanges_)) {+ var i, ii, tileRange, zKey;+ for (zKey in tileRanges) {+ if (!(zKey in this.tileRanges_)) {continue;}- tileRange = tileRanges[z];- for (i = 0, ii = this.tileRanges_[z].length; i < ii; ++i) {- if (this.tileRanges_[z][i].intersects(tileRange)) {+ tileRange = tileRanges[zKey];+ var testTileRange;+ for (i = 0, ii = this.tileRanges_[zKey].length; i < ii; ++i) {+ testTileRange = this.tileRanges_[zKey][i];+ if (testTileRange.intersects(tileRange)) {return true;}+ var extentTileRange = tileGrid.getTileRange(+ parseInt(zKey, 10), projection);+ var width = extentTileRange.getWidth();+ if (tileRange.minX < extentTileRange.minX ||+ tileRange.maxX > extentTileRange.maxX) {+ if (testTileRange.intersects(new ol.TileRange(+ goog.math.modulo(tileRange.minX, width),+ goog.math.modulo(tileRange.maxX, width),+ tileRange.minY, tileRange.maxY))) {+ return true;+ }+ if (tileRange.getWidth() > width &&+ testTileRange.intersects(extentTileRange)) {+ return true;+ }+ }}}return false;@@ -33812,2061 +33916,2235 @@ ol.css.CLASS_UNSUPPORTED = 'ol-unsupported';*/ol.css.CLASS_CONTROL = 'ol-control';-// FIXME handle date line wrap--goog.provide('ol.control.Attribution');+goog.provide('ol.structs.LRUCache');-goog.require('goog.dom');-goog.require('goog.dom.TagName');-goog.require('goog.dom.classlist');-goog.require('goog.events');-goog.require('goog.events.EventType');+goog.require('goog.asserts');goog.require('goog.object');-goog.require('goog.style');-goog.require('ol.Attribution');-goog.require('ol.control.Control');-goog.require('ol.css');/**- * @classdesc- * Control to show all the attributions associated with the layer sources- * in the map. This control is one of the default controls included in maps.- * By default it will show in the bottom right portion of the map, but this can- * be changed by using a css selector for `.ol-attribution`.- *+ * Implements a Least-Recently-Used cache where the keys do not conflict with+ * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring+ * items from the cache is the responsibility of the user.* @constructor- * @extends {ol.control.Control}- * @param {olx.control.AttributionOptions=} opt_options Attribution options.- * @api stable+ * @struct+ * @template T*/-ol.control.Attribution = function(opt_options) {-- var options = goog.isDef(opt_options) ? opt_options : {};-- /**- * @private- * @type {Element}- */- this.ulElement_ = goog.dom.createElement(goog.dom.TagName.UL);-- /**- * @private- * @type {Element}- */- this.logoLi_ = goog.dom.createElement(goog.dom.TagName.LI);-- goog.dom.appendChild(this.ulElement_, this.logoLi_);- goog.style.setElementShown(this.logoLi_, false);-- /**- * @private- * @type {boolean}- */- this.collapsed_ = goog.isDef(options.collapsed) ? options.collapsed : true;-- /**- * @private- * @type {boolean}- */- this.collapsible_ = goog.isDef(options.collapsible) ?- options.collapsible : true;-- if (!this.collapsible_) {- this.collapsed_ = false;- }-- var className = goog.isDef(options.className) ?- options.className : 'ol-attribution';-- var tipLabel = goog.isDef(options.tipLabel) ?- options.tipLabel : 'Attributions';-- var collapseLabel = goog.isDef(options.collapseLabel) ?- options.collapseLabel : '\u00BB';-- /**- * @private- * @type {Node}- */- this.collapseLabel_ = /** @type {Node} */ (goog.isString(collapseLabel) ?- goog.dom.createDom(goog.dom.TagName.SPAN, {}, collapseLabel) :- collapseLabel);-- var label = goog.isDef(options.label) ? options.label : 'i';-- /**- * @private- * @type {Node}- */- this.label_ = /** @type {Node} */ (goog.isString(label) ?- goog.dom.createDom(goog.dom.TagName.SPAN, {}, label) :- label);-- var activeLabel = (this.collapsible_ && !this.collapsed_) ?- this.collapseLabel_ : this.label_;- var button = goog.dom.createDom(goog.dom.TagName.BUTTON, {- 'type': 'button',- 'title': tipLabel- }, activeLabel);-- goog.events.listen(button, goog.events.EventType.CLICK,- this.handleClick_, false, this);-- goog.events.listen(button, [- goog.events.EventType.MOUSEOUT,- goog.events.EventType.FOCUSOUT- ], function() {- this.blur();- }, false);-- var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +- ol.css.CLASS_CONTROL +- (this.collapsed_ && this.collapsible_ ? ' ol-collapsed' : '') +- (this.collapsible_ ? '' : ' ol-uncollapsible');- var element = goog.dom.createDom(goog.dom.TagName.DIV,- cssClasses, this.ulElement_, button);-- var render = goog.isDef(options.render) ?- options.render : ol.control.Attribution.render;-- goog.base(this, {- element: element,- render: render,- target: options.target- });+ol.structs.LRUCache = function() {/*** @private- * @type {boolean}+ * @type {number}*/- this.renderedVisible_ = true;+ this.count_ = 0;/*** @private- * @type {Object.<string, Element>}+ * @type {Object.<string, ol.structs.LRUCacheEntry>}*/- this.attributionElements_ = {};+ this.entries_ = {};/*** @private- * @type {Object.<string, boolean>}+ * @type {?ol.structs.LRUCacheEntry}*/- this.attributionElementRenderedVisible_ = {};+ this.oldest_ = null;/*** @private- * @type {Object.<string, Element>}+ * @type {?ol.structs.LRUCacheEntry}*/- this.logoElements_ = {};+ this.newest_ = null;};-goog.inherits(ol.control.Attribution, ol.control.Control);/**- * @param {?olx.FrameState} frameState Frame state.- * @return {Array.<Object.<string, ol.Attribution>>} Attributions.+ * FIXME empty description for jsdoc*/-ol.control.Attribution.prototype.getSourceAttributions = function(frameState) {- var i, ii, j, jj, tileRanges, source, sourceAttribution,- sourceAttributionKey, sourceAttributions, sourceKey;- var layerStatesArray = frameState.layerStatesArray;- /** @type {Object.<string, ol.Attribution>} */- var attributions = goog.object.clone(frameState.attributions);- /** @type {Object.<string, ol.Attribution>} */- var hiddenAttributions = {};- for (i = 0, ii = layerStatesArray.length; i < ii; i++) {- source = layerStatesArray[i].layer.getSource();- if (goog.isNull(source)) {- continue;- }- sourceKey = goog.getUid(source).toString();- sourceAttributions = source.getAttributions();- if (goog.isNull(sourceAttributions)) {- continue;+ol.structs.LRUCache.prototype.assertValid = function() {+ if (this.count_ === 0) {+ goog.asserts.assert(goog.object.isEmpty(this.entries_));+ goog.asserts.assert(goog.isNull(this.oldest_));+ goog.asserts.assert(goog.isNull(this.newest_));+ } else {+ goog.asserts.assert(goog.object.getCount(this.entries_) == this.count_);+ goog.asserts.assert(!goog.isNull(this.oldest_));+ goog.asserts.assert(goog.isNull(this.oldest_.older));+ goog.asserts.assert(!goog.isNull(this.newest_));+ goog.asserts.assert(goog.isNull(this.newest_.newer));+ var i, entry;+ var older = null;+ i = 0;+ for (entry = this.oldest_; !goog.isNull(entry); entry = entry.newer) {+ goog.asserts.assert(entry.older === older);+ older = entry;+ ++i;}- for (j = 0, jj = sourceAttributions.length; j < jj; j++) {- sourceAttribution = sourceAttributions[j];- sourceAttributionKey = goog.getUid(sourceAttribution).toString();- if (sourceAttributionKey in attributions) {- continue;- }- tileRanges = frameState.usedTiles[sourceKey];- if (goog.isDef(tileRanges) &&- sourceAttribution.intersectsAnyTileRange(tileRanges)) {- if (sourceAttributionKey in hiddenAttributions) {- delete hiddenAttributions[sourceAttributionKey];- }- attributions[sourceAttributionKey] = sourceAttribution;- }- else {- hiddenAttributions[sourceAttributionKey] = sourceAttribution;- }+ goog.asserts.assert(i == this.count_);+ var newer = null;+ i = 0;+ for (entry = this.newest_; !goog.isNull(entry); entry = entry.older) {+ goog.asserts.assert(entry.newer === newer);+ newer = entry;+ ++i;}+ goog.asserts.assert(i == this.count_);}- return [attributions, hiddenAttributions];};/**- * @param {ol.MapEvent} mapEvent Map event.- * @this {ol.control.Attribution}- * @api+ * FIXME empty description for jsdoc*/-ol.control.Attribution.render = function(mapEvent) {- this.updateElement_(mapEvent.frameState);+ol.structs.LRUCache.prototype.clear = function() {+ this.count_ = 0;+ this.entries_ = {};+ this.oldest_ = null;+ this.newest_ = null;};/**- * @private- * @param {?olx.FrameState} frameState Frame state.+ * @param {string} key Key.+ * @return {boolean} Contains key.*/-ol.control.Attribution.prototype.updateElement_ = function(frameState) {-- if (goog.isNull(frameState)) {- if (this.renderedVisible_) {- goog.style.setElementShown(this.element, false);- this.renderedVisible_ = false;- }- return;- }-- var attributions = this.getSourceAttributions(frameState);- /** @type {Object.<string, ol.Attribution>} */- var visibleAttributions = attributions[0];- /** @type {Object.<string, ol.Attribution>} */- var hiddenAttributions = attributions[1];+ol.structs.LRUCache.prototype.containsKey = function(key) {+ return this.entries_.hasOwnProperty(key);+};- var attributionElement, attributionKey;- for (attributionKey in this.attributionElements_) {- if (attributionKey in visibleAttributions) {- if (!this.attributionElementRenderedVisible_[attributionKey]) {- goog.style.setElementShown(- this.attributionElements_[attributionKey], true);- this.attributionElementRenderedVisible_[attributionKey] = true;- }- delete visibleAttributions[attributionKey];- }- else if (attributionKey in hiddenAttributions) {- if (this.attributionElementRenderedVisible_[attributionKey]) {- goog.style.setElementShown(- this.attributionElements_[attributionKey], false);- delete this.attributionElementRenderedVisible_[attributionKey];- }- delete hiddenAttributions[attributionKey];- }- else {- goog.dom.removeNode(this.attributionElements_[attributionKey]);- delete this.attributionElements_[attributionKey];- delete this.attributionElementRenderedVisible_[attributionKey];- }- }- for (attributionKey in visibleAttributions) {- attributionElement = goog.dom.createElement(goog.dom.TagName.LI);- attributionElement.innerHTML =- visibleAttributions[attributionKey].getHTML();- goog.dom.appendChild(this.ulElement_, attributionElement);- this.attributionElements_[attributionKey] = attributionElement;- this.attributionElementRenderedVisible_[attributionKey] = true;- }- for (attributionKey in hiddenAttributions) {- attributionElement = goog.dom.createElement(goog.dom.TagName.LI);- attributionElement.innerHTML =- hiddenAttributions[attributionKey].getHTML();- goog.style.setElementShown(attributionElement, false);- goog.dom.appendChild(this.ulElement_, attributionElement);- this.attributionElements_[attributionKey] = attributionElement;- }- var renderVisible =- !goog.object.isEmpty(this.attributionElementRenderedVisible_) ||- !goog.object.isEmpty(frameState.logos);- if (this.renderedVisible_ != renderVisible) {- goog.style.setElementShown(this.element, renderVisible);- this.renderedVisible_ = renderVisible;- }- if (renderVisible &&- goog.object.isEmpty(this.attributionElementRenderedVisible_)) {- goog.dom.classlist.add(this.element, 'ol-logo-only');- } else {- goog.dom.classlist.remove(this.element, 'ol-logo-only');+/**+ * @param {function(this: S, T, string, ol.structs.LRUCache): ?} f The function+ * to call for every entry from the oldest to the newer. This function takes+ * 3 arguments (the entry value, the entry key and the LRUCache object).+ * The return value is ignored.+ * @param {S=} opt_this The object to use as `this` in `f`.+ * @template S+ */+ol.structs.LRUCache.prototype.forEach = function(f, opt_this) {+ var entry = this.oldest_;+ while (!goog.isNull(entry)) {+ f.call(opt_this, entry.value_, entry.key_, this);+ entry = entry.newer;}-- this.insertLogos_(frameState);-};/**- * @param {?olx.FrameState} frameState Frame state.- * @private+ * @param {string} key Key.+ * @return {T} Value.*/-ol.control.Attribution.prototype.insertLogos_ = function(frameState) {-- var logo;- var logos = frameState.logos;- var logoElements = this.logoElements_;-- for (logo in logoElements) {- if (!(logo in logos)) {- goog.dom.removeNode(logoElements[logo]);- delete logoElements[logo];- }- }-- var image, logoElement, logoKey;- for (logoKey in logos) {- if (!(logoKey in logoElements)) {- image = new Image();- image.src = logoKey;- var logoValue = logos[logoKey];- if (logoValue === '') {- logoElement = image;- } else {- logoElement = goog.dom.createDom(goog.dom.TagName.A, {- 'href': logoValue- });- logoElement.appendChild(image);- }- goog.dom.appendChild(this.logoLi_, logoElement);- logoElements[logoKey] = logoElement;- }+ol.structs.LRUCache.prototype.get = function(key) {+ var entry = this.entries_[key];+ goog.asserts.assert(goog.isDef(entry));+ if (entry === this.newest_) {+ return entry.value_;+ } else if (entry === this.oldest_) {+ this.oldest_ = this.oldest_.newer;+ this.oldest_.older = null;+ } else {+ entry.newer.older = entry.older;+ entry.older.newer = entry.newer;}+ entry.newer = null;+ entry.older = this.newest_;+ this.newest_.newer = entry;+ this.newest_ = entry;+ return entry.value_;+};- goog.style.setElementShown(this.logoLi_, !goog.object.isEmpty(logos));+/**+ * @return {number} Count.+ */+ol.structs.LRUCache.prototype.getCount = function() {+ return this.count_;};/**- * @param {goog.events.BrowserEvent} event The event to handle- * @private+ * @return {Array.<string>} Keys.*/-ol.control.Attribution.prototype.handleClick_ = function(event) {- event.preventDefault();- this.handleToggle_();+ol.structs.LRUCache.prototype.getKeys = function() {+ var keys = new Array(this.count_);+ var i = 0;+ var entry;+ for (entry = this.newest_; !goog.isNull(entry); entry = entry.older) {+ keys[i++] = entry.key_;+ }+ goog.asserts.assert(i == this.count_);+ return keys;};/**- * @private+ * @return {Array.<T>} Values.*/-ol.control.Attribution.prototype.handleToggle_ = function() {- goog.dom.classlist.toggle(this.element, 'ol-collapsed');- if (this.collapsed_) {- goog.dom.replaceNode(this.collapseLabel_, this.label_);- } else {- goog.dom.replaceNode(this.label_, this.collapseLabel_);+ol.structs.LRUCache.prototype.getValues = function() {+ var values = new Array(this.count_);+ var i = 0;+ var entry;+ for (entry = this.newest_; !goog.isNull(entry); entry = entry.older) {+ values[i++] = entry.value_;}- this.collapsed_ = !this.collapsed_;+ goog.asserts.assert(i == this.count_);+ return values;};/**- * @return {boolean} True if the widget is collapsible.- * @api stable+ * @return {T} Last value.*/-ol.control.Attribution.prototype.getCollapsible = function() {- return this.collapsible_;+ol.structs.LRUCache.prototype.peekLast = function() {+ goog.asserts.assert(!goog.isNull(this.oldest_));+ return this.oldest_.value_;};/**- * @param {boolean} collapsible True if the widget is collapsible.- * @api stable+ * @return {string} Last key.*/-ol.control.Attribution.prototype.setCollapsible = function(collapsible) {- if (this.collapsible_ === collapsible) {- return;- }- this.collapsible_ = collapsible;- goog.dom.classlist.toggle(this.element, 'ol-uncollapsible');- if (!collapsible && this.collapsed_) {- this.handleToggle_();- }+ol.structs.LRUCache.prototype.peekLastKey = function() {+ goog.asserts.assert(!goog.isNull(this.oldest_));+ return this.oldest_.key_;};/**- * @param {boolean} collapsed True if the widget is collapsed.- * @api stable+ * @return {T} value Value.*/-ol.control.Attribution.prototype.setCollapsed = function(collapsed) {- if (!this.collapsible_ || this.collapsed_ === collapsed) {- return;+ol.structs.LRUCache.prototype.pop = function() {+ goog.asserts.assert(!goog.isNull(this.oldest_));+ goog.asserts.assert(!goog.isNull(this.newest_));+ var entry = this.oldest_;+ goog.asserts.assert(entry.key_ in this.entries_);+ delete this.entries_[entry.key_];+ if (!goog.isNull(entry.newer)) {+ entry.newer.older = null;}- this.handleToggle_();+ this.oldest_ = entry.newer;+ if (goog.isNull(this.oldest_)) {+ this.newest_ = null;+ }+ --this.count_;+ return entry.value_;};/**- * @return {boolean} True if the widget is collapsed.- * @api stable+ * @param {string} key Key.+ * @param {T} value Value.*/-ol.control.Attribution.prototype.getCollapsed = function() {- return this.collapsed_;+ol.structs.LRUCache.prototype.set = function(key, value) {+ goog.asserts.assert(!(key in {}));+ goog.asserts.assert(!(key in this.entries_));+ var entry = {+ key_: key,+ newer: null,+ older: this.newest_,+ value_: value+ };+ if (goog.isNull(this.newest_)) {+ this.oldest_ = entry;+ } else {+ this.newest_.newer = entry;+ }+ this.newest_ = entry;+ this.entries_[key] = entry;+ ++this.count_;};-goog.provide('ol.control.Rotate');--goog.require('goog.dom');-goog.require('goog.dom.TagName');-goog.require('goog.dom.classlist');-goog.require('goog.events');-goog.require('goog.events.EventType');-goog.require('goog.math');-goog.require('ol.animation');-goog.require('ol.control.Control');-goog.require('ol.css');-goog.require('ol.easing');--/**- * @classdesc- * A button control to reset rotation to 0.- * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css- * selector is added to the button when the rotation is 0.- *- * @constructor- * @extends {ol.control.Control}- * @param {olx.control.RotateOptions=} opt_options Rotate options.- * @api stable+ * @typedef {{key_: string,+ * newer: ol.structs.LRUCacheEntry,+ * older: ol.structs.LRUCacheEntry,+ * value_: *}}*/-ol.control.Rotate = function(opt_options) {-- var options = goog.isDef(opt_options) ? opt_options : {};-- var className = goog.isDef(options.className) ?- options.className : 'ol-rotate';-- var label = goog.isDef(options.label) ?- options.label : '\u21E7';-- /**- * @type {Node}- * @private- */- this.label_ = null;-- if (goog.isString(label)) {- this.label_ = goog.dom.createDom(goog.dom.TagName.SPAN,- 'ol-compass', label);- } else {- this.label_ = label;- goog.dom.classlist.add(this.label_, 'ol-compass');- }-- var tipLabel = goog.isDef(options.tipLabel) ?- options.tipLabel : 'Reset rotation';-- var button = goog.dom.createDom(goog.dom.TagName.BUTTON, {- 'class': className + '-reset',- 'type' : 'button',- 'title': tipLabel- }, this.label_);-- goog.events.listen(button, goog.events.EventType.CLICK,- ol.control.Rotate.prototype.handleClick_, false, this);+ol.structs.LRUCacheEntry;- goog.events.listen(button, [- goog.events.EventType.MOUSEOUT,- goog.events.EventType.FOCUSOUT- ], function() {- this.blur();- }, false);+goog.provide('ol.TileCache');- var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +- ol.css.CLASS_CONTROL;- var element = goog.dom.createDom(goog.dom.TagName.DIV, cssClasses, button);+goog.require('ol');+goog.require('ol.TileRange');+goog.require('ol.structs.LRUCache');+goog.require('ol.tilecoord');- var render = goog.isDef(options.render) ?- options.render : ol.control.Rotate.render;- goog.base(this, {- element: element,- render: render,- target: options.target- });- /**- * @type {number}- * @private- */- this.duration_ = goog.isDef(options.duration) ? options.duration : 250;+/**+ * @constructor+ * @extends {ol.structs.LRUCache.<ol.Tile>}+ * @param {number=} opt_highWaterMark High water mark.+ * @struct+ */+ol.TileCache = function(opt_highWaterMark) {- /**- * @type {boolean}- * @private- */- this.autoHide_ = goog.isDef(options.autoHide) ? options.autoHide : true;+ goog.base(this);/*** @private- * @type {number|undefined}+ * @type {number}*/- this.rotation_ = undefined;-- if (this.autoHide_) {- goog.dom.classlist.add(this.element, ol.css.CLASS_HIDDEN);- }+ this.highWaterMark_ = goog.isDef(opt_highWaterMark) ?+ opt_highWaterMark : ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK;};-goog.inherits(ol.control.Rotate, ol.control.Control);+goog.inherits(ol.TileCache, ol.structs.LRUCache);/**- * @param {goog.events.BrowserEvent} event The event to handle- * @private+ * @return {boolean} Can expire cache.*/-ol.control.Rotate.prototype.handleClick_ = function(event) {- event.preventDefault();- this.resetNorth_();+ol.TileCache.prototype.canExpireCache = function() {+ return this.getCount() > this.highWaterMark_;};/**- * @private+ * @param {Object.<string, ol.TileRange>} usedTiles Used tiles.*/-ol.control.Rotate.prototype.resetNorth_ = function() {- var map = this.getMap();- var view = map.getView();- if (goog.isNull(view)) {- // the map does not have a view, so we can't act- // upon it- return;- }- var currentRotation = view.getRotation();- while (currentRotation < -Math.PI) {- currentRotation += 2 * Math.PI;- }- while (currentRotation > Math.PI) {- currentRotation -= 2 * Math.PI;- }- if (goog.isDef(currentRotation)) {- if (this.duration_ > 0) {- map.beforeRender(ol.animation.rotate({- rotation: currentRotation,- duration: this.duration_,- easing: ol.easing.easeOut- }));+ol.TileCache.prototype.expireCache = function(usedTiles) {+ var tile, zKey;+ while (this.canExpireCache()) {+ tile = /** @type {ol.Tile} */ (this.peekLast());+ zKey = tile.tileCoord[0].toString();+ if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {+ break;+ } else {+ this.pop().dispose();}- view.setRotation(0);}};/**- * @param {ol.MapEvent} mapEvent Map event.- * @this {ol.control.Rotate}- * @api+ * Remove a tile range from the cache, e.g. to invalidate tiles.+ * @param {ol.TileRange} tileRange The tile range to prune.*/-ol.control.Rotate.render = function(mapEvent) {- var frameState = mapEvent.frameState;- if (goog.isNull(frameState)) {- return;- }- var rotation = frameState.viewState.rotation;- if (rotation != this.rotation_) {- var transform = 'rotate(' + goog.math.toDegrees(rotation) + 'deg)';- if (this.autoHide_) {- goog.dom.classlist.enable(- this.element, ol.css.CLASS_HIDDEN, rotation === 0);+ol.TileCache.prototype.pruneTileRange = function(tileRange) {+ var i = this.getCount(),+ key;+ while (i--) {+ key = this.peekLastKey();+ if (tileRange.contains(ol.tilecoord.createFromString(key))) {+ this.pop().dispose();+ } else {+ this.get(key);}- this.label_.style.msTransform = transform;- this.label_.style.webkitTransform = transform;- this.label_.style.transform = transform;}- this.rotation_ = rotation;};-goog.provide('ol.control.Zoom');+goog.provide('ol.Tile');+goog.provide('ol.TileState');-goog.require('goog.dom');-goog.require('goog.dom.TagName');goog.require('goog.events');+goog.require('goog.events.EventTarget');goog.require('goog.events.EventType');-goog.require('ol.animation');-goog.require('ol.control.Control');-goog.require('ol.css');-goog.require('ol.easing');+goog.require('ol.TileCoord');+++/**+ * @enum {number}+ * @api+ */+ol.TileState = {+ IDLE: 0,+ LOADING: 1,+ LOADED: 2,+ ERROR: 3,+ EMPTY: 4+};/*** @classdesc- * A control with 2 buttons, one for zoom in and one for zoom out.- * This control is one of the default controls of a map. To style this control- * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.+ * Base class for tiles.** @constructor- * @extends {ol.control.Control}- * @param {olx.control.ZoomOptions=} opt_options Zoom options.- * @api stable+ * @extends {goog.events.EventTarget}+ * @param {ol.TileCoord} tileCoord Tile coordinate.+ * @param {ol.TileState} state State.+ * @api*/-ol.control.Zoom = function(opt_options) {-- var options = goog.isDef(opt_options) ? opt_options : {};+ol.Tile = function(tileCoord, state) {- var className = goog.isDef(options.className) ? options.className : 'ol-zoom';+ goog.base(this);- var delta = goog.isDef(options.delta) ? options.delta : 1;+ /**+ * @type {ol.TileCoord}+ */+ this.tileCoord = tileCoord;- var zoomInLabel = goog.isDef(options.zoomInLabel) ?- options.zoomInLabel : '+';- var zoomOutLabel = goog.isDef(options.zoomOutLabel) ?- options.zoomOutLabel : '\u2212';+ /**+ * @api+ * @type {ol.TileState}+ */+ this.state = state;- var zoomInTipLabel = goog.isDef(options.zoomInTipLabel) ?- options.zoomInTipLabel : 'Zoom in';- var zoomOutTipLabel = goog.isDef(options.zoomOutTipLabel) ?- options.zoomOutTipLabel : 'Zoom out';+};+goog.inherits(ol.Tile, goog.events.EventTarget);- var inElement = goog.dom.createDom(goog.dom.TagName.BUTTON, {- 'class': className + '-in',- 'type' : 'button',- 'title': zoomInTipLabel- }, zoomInLabel);- goog.events.listen(inElement,- goog.events.EventType.CLICK, goog.partial(- ol.control.Zoom.prototype.handleClick_, delta), false, this);+/**+ * @api+ */+ol.Tile.prototype.changed = function() {+ this.dispatchEvent(goog.events.EventType.CHANGE);+};- goog.events.listen(inElement, [- goog.events.EventType.MOUSEOUT,- goog.events.EventType.FOCUSOUT- ], function() {- this.blur();- }, false);- var outElement = goog.dom.createDom(goog.dom.TagName.BUTTON, {- 'class': className + '-out',- 'type' : 'button',- 'title': zoomOutTipLabel- }, zoomOutLabel);+/**+ * @function+ * @param {Object=} opt_context Object.+ * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.+ */+ol.Tile.prototype.getImage = goog.abstractMethod;- goog.events.listen(outElement,- goog.events.EventType.CLICK, goog.partial(- ol.control.Zoom.prototype.handleClick_, -delta), false, this);- goog.events.listen(outElement, [- goog.events.EventType.MOUSEOUT,- goog.events.EventType.FOCUSOUT- ], function() {- this.blur();- }, false);+/**+ * @return {string} Key.+ */+ol.Tile.prototype.getKey = function() {+ return goog.getUid(this).toString();+};- var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +- ol.css.CLASS_CONTROL;- var element = goog.dom.createDom(goog.dom.TagName.DIV, cssClasses, inElement,- outElement);- goog.base(this, {- element: element,- target: options.target- });+/**+ * @return {ol.TileCoord}+ * @api+ */+ol.Tile.prototype.getTileCoord = function() {+ return this.tileCoord;+};- /**- * @type {number}- * @private- */- this.duration_ = goog.isDef(options.duration) ? options.duration : 250;+/**+ * @return {ol.TileState} State.+ */+ol.Tile.prototype.getState = function() {+ return this.state;};-goog.inherits(ol.control.Zoom, ol.control.Control);/**- * @param {number} delta Zoom delta.- * @param {goog.events.BrowserEvent} event The event to handle- * @private+ * FIXME empty description for jsdoc*/-ol.control.Zoom.prototype.handleClick_ = function(delta, event) {- event.preventDefault();- this.zoomByDelta_(delta);-};+ol.Tile.prototype.load = goog.abstractMethod;++goog.provide('ol.source.Source');+goog.provide('ol.source.State');++goog.require('goog.events.EventType');+goog.require('ol.Attribution');+goog.require('ol.Object');+goog.require('ol.proj');/**- * @param {number} delta Zoom delta.- * @private+ * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.+ * @enum {string}+ * @api*/-ol.control.Zoom.prototype.zoomByDelta_ = function(delta) {- var map = this.getMap();- var view = map.getView();- if (goog.isNull(view)) {- // the map does not have a view, so we can't act- // upon it- return;- }- var currentResolution = view.getResolution();- if (goog.isDef(currentResolution)) {- if (this.duration_ > 0) {- map.beforeRender(ol.animation.zoom({- resolution: currentResolution,- duration: this.duration_,- easing: ol.easing.easeOut- }));- }- var newResolution = view.constrainResolution(currentResolution, delta);- view.setResolution(newResolution);- }+ol.source.State = {+ UNDEFINED: 'undefined',+ LOADING: 'loading',+ READY: 'ready',+ ERROR: 'error'};-goog.provide('ol.control');-goog.require('ol.Collection');-goog.require('ol.control.Attribution');-goog.require('ol.control.Rotate');-goog.require('ol.control.Zoom');+/**+ * @typedef {{attributions: (Array.<ol.Attribution>|undefined),+ * logo: (string|olx.LogoOptions|undefined),+ * projection: ol.proj.ProjectionLike,+ * state: (ol.source.State|undefined)}}+ */+ol.source.SourceOptions;+/**- * Set of controls included in maps by default. Unless configured otherwise,- * this returns a collection containing an instance of each of the following- * controls:- * * {@link ol.control.Zoom}- * * {@link ol.control.Rotate}- * * {@link ol.control.Attribution}+ * @classdesc+ * Abstract base class; normally only used for creating subclasses and not+ * instantiated in apps.+ * Base class for {@link ol.layer.Layer} sources.*- * @param {olx.control.DefaultsOptions=} opt_options Defaults options.- * @return {ol.Collection.<ol.control.Control>} Controls.+ * @constructor+ * @extends {ol.Object}+ * @fires change Triggered when the state of the source changes.+ * @param {ol.source.SourceOptions} options Source options.* @api stable*/-ol.control.defaults = function(opt_options) {-- var options = goog.isDef(opt_options) ? opt_options : {};+ol.source.Source = function(options) {- var controls = new ol.Collection();+ goog.base(this);- var zoomControl = goog.isDef(options.zoom) ?- options.zoom : true;- if (zoomControl) {- controls.push(new ol.control.Zoom(options.zoomOptions));- }+ /**+ * @private+ * @type {ol.proj.Projection}+ */+ this.projection_ = ol.proj.get(options.projection);- var rotateControl = goog.isDef(options.rotate) ?- options.rotate : true;- if (rotateControl) {- controls.push(new ol.control.Rotate(options.rotateOptions));- }+ /**+ * @private+ * @type {Array.<ol.Attribution>}+ */+ this.attributions_ = goog.isDef(options.attributions) ?+ options.attributions : null;- var attributionControl = goog.isDef(options.attribution) ?- options.attribution : true;- if (attributionControl) {- controls.push(new ol.control.Attribution(options.attributionOptions));- }+ /**+ * @private+ * @type {string|olx.LogoOptions|undefined}+ */+ this.logo_ = options.logo;- return controls;+ /**+ * @private+ * @type {ol.source.State}+ */+ this.state_ = goog.isDef(options.state) ?+ options.state : ol.source.State.READY;};+goog.inherits(ol.source.Source, ol.Object);-// Copyright 2012 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License./**- * @fileoverview Functions for managing full screen status of the DOM.- *+ * @param {ol.Coordinate} coordinate Coordinate.+ * @param {number} resolution Resolution.+ * @param {number} rotation Rotation.+ * @param {Object.<string, boolean>} skippedFeatureUids Skipped feature uids.+ * @param {function(ol.Feature): T} callback Feature callback.+ * @return {T|undefined} Callback result.+ * @template T*/+ol.source.Source.prototype.forEachFeatureAtCoordinate =+ goog.nullFunction;-goog.provide('goog.dom.fullscreen');-goog.provide('goog.dom.fullscreen.EventType');-goog.require('goog.dom');-goog.require('goog.userAgent');+/**+ * @return {Array.<ol.Attribution>} Attributions.+ * @api stable+ */+ol.source.Source.prototype.getAttributions = function() {+ return this.attributions_;+};/**- * Event types for full screen.- * @enum {string}+ * @return {string|olx.LogoOptions|undefined} Logo.+ * @api stable*/-goog.dom.fullscreen.EventType = {- /** Dispatched by the Document when the fullscreen status changes. */- CHANGE: (function() {- if (goog.userAgent.WEBKIT) {- return 'webkitfullscreenchange';- }- if (goog.userAgent.GECKO) {- return 'mozfullscreenchange';- }- if (goog.userAgent.IE) {- return 'MSFullscreenChange';- }- // Opera 12-14, and W3C standard (Draft):- // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html- return 'fullscreenchange';- })()+ol.source.Source.prototype.getLogo = function() {+ return this.logo_;};/**- * Determines if full screen is supported.- * @param {!goog.dom.DomHelper=} opt_domHelper The DomHelper for the DOM being- * queried. If not provided, use the current DOM.- * @return {boolean} True iff full screen is supported.+ * @return {ol.proj.Projection} Projection.+ * @api*/-goog.dom.fullscreen.isSupported = function(opt_domHelper) {- var doc = goog.dom.fullscreen.getDocument_(opt_domHelper);- var body = doc.body;- return !!(body.webkitRequestFullscreen ||- (body.mozRequestFullScreen && doc.mozFullScreenEnabled) ||- (body.msRequestFullscreen && doc.msFullscreenEnabled) ||- (body.requestFullscreen && doc.fullscreenEnabled));+ol.source.Source.prototype.getProjection = function() {+ return this.projection_;};/**- * Requests putting the element in full screen.- * @param {!Element} element The element to put full screen.+ * @return {Array.<number>|undefined} Resolutions.*/-goog.dom.fullscreen.requestFullScreen = function(element) {- if (element.webkitRequestFullscreen) {- element.webkitRequestFullscreen();- } else if (element.mozRequestFullScreen) {- element.mozRequestFullScreen();- } else if (element.msRequestFullscreen) {- element.msRequestFullscreen();- } else if (element.requestFullscreen) {- element.requestFullscreen();- }+ol.source.Source.prototype.getResolutions = goog.abstractMethod;+++/**+ * @return {ol.source.State} State.+ * @api+ */+ol.source.Source.prototype.getState = function() {+ return this.state_;};/**- * Requests putting the element in full screen with full keyboard access.- * @param {!Element} element The element to put full screen.+ * @param {Array.<ol.Attribution>} attributions Attributions.*/-goog.dom.fullscreen.requestFullScreenWithKeys = function(- element) {- if (element.mozRequestFullScreenWithKeys) {- element.mozRequestFullScreenWithKeys();- } else if (element.webkitRequestFullscreen) {- element.webkitRequestFullscreen();- } else {- goog.dom.fullscreen.requestFullScreen(element);- }+ol.source.Source.prototype.setAttributions = function(attributions) {+ this.attributions_ = attributions;};/**- * Exits full screen.- * @param {!goog.dom.DomHelper=} opt_domHelper The DomHelper for the DOM being- * queried. If not provided, use the current DOM.+ * @param {string|olx.LogoOptions|undefined} logo Logo.*/-goog.dom.fullscreen.exitFullScreen = function(opt_domHelper) {- var doc = goog.dom.fullscreen.getDocument_(opt_domHelper);- if (doc.webkitCancelFullScreen) {- doc.webkitCancelFullScreen();- } else if (doc.mozCancelFullScreen) {- doc.mozCancelFullScreen();- } else if (doc.msExitFullscreen) {- doc.msExitFullscreen();- } else if (doc.exitFullscreen) {- doc.exitFullscreen();- }+ol.source.Source.prototype.setLogo = function(logo) {+ this.logo_ = logo;};/**- * Determines if the document is full screen.- * @param {!goog.dom.DomHelper=} opt_domHelper The DomHelper for the DOM being- * queried. If not provided, use the current DOM.- * @return {boolean} Whether the document is full screen.+ * @param {ol.source.State} state State.+ * @protected*/-goog.dom.fullscreen.isFullScreen = function(opt_domHelper) {- var doc = goog.dom.fullscreen.getDocument_(opt_domHelper);- // IE 11 doesn't have similar boolean property, so check whether- // document.msFullscreenElement is null instead.- return !!(doc.webkitIsFullScreen || doc.mozFullScreen ||- doc.msFullscreenElement || doc.fullscreenElement);+ol.source.Source.prototype.setState = function(state) {+ this.state_ = state;+ this.changed();};/**- * Gets the document object of the dom.- * @param {!goog.dom.DomHelper=} opt_domHelper The DomHelper for the DOM being- * queried. If not provided, use the current DOM.- * @return {!Document} The dom document.- * @private+ * @param {ol.proj.Projection} projection Projetion.*/-goog.dom.fullscreen.getDocument_ = function(opt_domHelper) {- return opt_domHelper ?- opt_domHelper.getDocument() :- goog.dom.getDomHelper().getDocument();+ol.source.Source.prototype.setProjection = function(projection) {+ this.projection_ = projection;};-goog.provide('ol.control.FullScreen');+goog.provide('ol.tilegrid.TileGrid');+goog.require('goog.array');goog.require('goog.asserts');-goog.require('goog.dom');-goog.require('goog.dom.TagName');-goog.require('goog.dom.fullscreen');-goog.require('goog.dom.fullscreen.EventType');-goog.require('goog.events');-goog.require('goog.events.EventType');-goog.require('ol.control.Control');-goog.require('ol.css');+goog.require('goog.functions');+goog.require('goog.math');+goog.require('ol');+goog.require('ol.Coordinate');+goog.require('ol.TileCoord');+goog.require('ol.TileRange');+goog.require('ol.array');+goog.require('ol.extent');+goog.require('ol.extent.Corner');+goog.require('ol.proj');+goog.require('ol.proj.METERS_PER_UNIT');+goog.require('ol.proj.Projection');+goog.require('ol.proj.Units');+goog.require('ol.tilecoord');/*** @classdesc- * Provides a button that when clicked fills up the full screen with the map.- * When in full screen mode, a close button is shown to exit full screen mode.- * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to- * toggle the map in full screen mode.- *+ * Base class for setting the grid pattern for sources accessing tiled-image+ * servers.** @constructor- * @extends {ol.control.Control}- * @param {olx.control.FullScreenOptions=} opt_options Options.+ * @param {olx.tilegrid.TileGridOptions} options Tile grid options.+ * @struct* @api stable*/-ol.control.FullScreen = function(opt_options) {+ol.tilegrid.TileGrid = function(options) {- var options = goog.isDef(opt_options) ? opt_options : {};+ /**+ * @protected+ * @type {number}+ */+ this.minZoom = goog.isDef(options.minZoom) ? options.minZoom : 0;/*** @private- * @type {string}+ * @type {!Array.<number>}*/- this.cssClassName_ = goog.isDef(options.className) ?- options.className : 'ol-full-screen';+ this.resolutions_ = options.resolutions;+ goog.asserts.assert(goog.array.isSorted(this.resolutions_, function(a, b) {+ return b - a;+ }, true));- var label = goog.isDef(options.label) ? options.label : '\u2194';+ /**+ * @protected+ * @type {number}+ */+ this.maxZoom = this.resolutions_.length - 1;/*** @private- * @type {Node}+ * @type {ol.Coordinate}*/- this.labelNode_ = /** @type {Node} */ (goog.isString(label) ?- goog.dom.createTextNode(label) : label);-- var labelActive = goog.isDef(options.labelActive) ?- options.labelActive : '\u00d7';+ this.origin_ = goog.isDef(options.origin) ? options.origin : null;/*** @private- * @type {Node}+ * @type {Array.<ol.Coordinate>}*/- this.labelActiveNode_ = /** @type {Node} */ (goog.isString(labelActive) ?- goog.dom.createTextNode(labelActive) : labelActive);-- var tipLabel = goog.isDef(options.tipLabel) ?- options.tipLabel : 'Toggle full-screen';- var button = goog.dom.createDom(goog.dom.TagName.BUTTON, {- 'class': this.cssClassName_ + '-' + goog.dom.fullscreen.isFullScreen(),- 'type': 'button',- 'title': tipLabel- }, this.labelNode_);-- goog.events.listen(button, goog.events.EventType.CLICK,- this.handleClick_, false, this);-- goog.events.listen(button, [- goog.events.EventType.MOUSEOUT,- goog.events.EventType.FOCUSOUT- ], function() {- this.blur();- }, false);-- goog.events.listen(goog.global.document,- goog.dom.fullscreen.EventType.CHANGE,- this.handleFullScreenChange_, false, this);+ this.origins_ = null;+ if (goog.isDef(options.origins)) {+ this.origins_ = options.origins;+ goog.asserts.assert(this.origins_.length == this.resolutions_.length);+ }+ goog.asserts.assert(+ (goog.isNull(this.origin_) && !goog.isNull(this.origins_)) ||+ (!goog.isNull(this.origin_) && goog.isNull(this.origins_)));- var cssClasses = this.cssClassName_ + ' ' + ol.css.CLASS_UNSELECTABLE +- ' ' + ol.css.CLASS_CONTROL + ' ' +- (!goog.dom.fullscreen.isSupported() ? ol.css.CLASS_UNSUPPORTED : '');- var element = goog.dom.createDom(goog.dom.TagName.DIV, cssClasses, button);+ /**+ * @private+ * @type {Array.<number>}+ */+ this.tileSizes_ = null;+ if (goog.isDef(options.tileSizes)) {+ this.tileSizes_ = options.tileSizes;+ goog.asserts.assert(this.tileSizes_.length == this.resolutions_.length);+ }- goog.base(this, {- element: element,- target: options.target- });+ /**+ * @private+ * @type {number|undefined}+ */+ this.tileSize_ = goog.isDef(options.tileSize) ?+ options.tileSize :+ goog.isNull(this.tileSizes_) ? ol.DEFAULT_TILE_SIZE : undefined;+ goog.asserts.assert(+ (!goog.isDef(this.tileSize_) && !goog.isNull(this.tileSizes_)) ||+ (goog.isDef(this.tileSize_) && goog.isNull(this.tileSizes_)));/*** @private- * @type {boolean}+ * @type {Array.<number>}*/- this.keys_ = goog.isDef(options.keys) ? options.keys : false;+ this.widths_ = null;+ if (goog.isDef(options.widths)) {+ this.widths_ = options.widths;+ goog.asserts.assert(this.widths_.length == this.resolutions_.length);+ }};-goog.inherits(ol.control.FullScreen, ol.control.Control);/**- * @param {goog.events.BrowserEvent} event The event to handle* @private+ * @type {ol.TileCoord}*/-ol.control.FullScreen.prototype.handleClick_ = function(event) {- event.preventDefault();- this.handleFullScreen_();-};+ol.tilegrid.TileGrid.tmpTileCoord_ = [0, 0, 0];/**- * @private+ * Returns the identity function. May be overridden in subclasses.+ * @param {{extent: (ol.Extent|undefined)}=} opt_options Options.+ * @return {function(ol.TileCoord, ol.proj.Projection, ol.TileCoord=):+ * ol.TileCoord} Tile coordinate transform.*/-ol.control.FullScreen.prototype.handleFullScreen_ = function() {- if (!goog.dom.fullscreen.isSupported()) {- return;- }- var map = this.getMap();- if (goog.isNull(map)) {- return;- }- if (goog.dom.fullscreen.isFullScreen()) {- goog.dom.fullscreen.exitFullScreen();- } else {- var target = map.getTarget();- goog.asserts.assert(goog.isDefAndNotNull(target));- var element = goog.dom.getElement(target);- goog.asserts.assert(goog.isDefAndNotNull(element));- if (this.keys_) {- goog.dom.fullscreen.requestFullScreenWithKeys(element);- } else {- goog.dom.fullscreen.requestFullScreen(element);- }- }+ol.tilegrid.TileGrid.prototype.createTileCoordTransform =+ function(opt_options) {+ return goog.functions.identity;};/**- * @private+ * @param {ol.TileCoord} tileCoord Tile coordinate.+ * @param {function(this: T, number, ol.TileRange): boolean} callback Callback.+ * @param {T=} opt_this The object to use as `this` in `callback`.+ * @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.+ * @param {ol.Extent=} opt_extent Temporary ol.Extent object.+ * @return {boolean} Callback succeeded.+ * @template T*/-ol.control.FullScreen.prototype.handleFullScreenChange_ = function() {- var map = this.getMap();- if (goog.dom.fullscreen.isFullScreen()) {- goog.dom.replaceNode(this.labelActiveNode_, this.labelNode_);- } else {- goog.dom.replaceNode(this.labelNode_, this.labelActiveNode_);- }- if (!goog.isNull(map)) {- map.updateSize();+ol.tilegrid.TileGrid.prototype.forEachTileCoordParentTileRange =+ function(tileCoord, callback, opt_this, opt_tileRange, opt_extent) {+ var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);+ var z = tileCoord[0] - 1;+ while (z >= this.minZoom) {+ if (callback.call(opt_this, z,+ this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange))) {+ return true;+ }+ --z;}+ return false;};-goog.provide('ol.Pixel');---/**- * An array with two elements, representing a pixel. The first element is the- * x-coordinate, the second the y-coordinate of the pixel.- * @typedef {Array.<number>}- * @api stable- */-ol.Pixel;--// FIXME should listen on appropriate pane, once it is defined--goog.provide('ol.control.MousePosition');--goog.require('goog.dom');-goog.require('goog.dom.TagName');-goog.require('goog.events');-goog.require('goog.events.EventType');-goog.require('ol.CoordinateFormatType');-goog.require('ol.Object');-goog.require('ol.Pixel');-goog.require('ol.TransformFunction');-goog.require('ol.control.Control');-goog.require('ol.proj');-goog.require('ol.proj.Projection');-/**- * @enum {string}+ * @return {number} Max zoom.+ * @api*/-ol.control.MousePositionProperty = {- PROJECTION: 'projection',- COORDINATE_FORMAT: 'coordinateFormat'+ol.tilegrid.TileGrid.prototype.getMaxZoom = function() {+ return this.maxZoom;};-/**- * @classdesc- * A control to show the 2D coordinates of the mouse cursor. By default, these- * are in the view projection, but can be in any supported projection.- * By default the control is shown in the top right corner of the map, but this- * can be changed by using the css selector `.ol-mouse-position`.- *- * @constructor- * @extends {ol.control.Control}- * @param {olx.control.MousePositionOptions=} opt_options Mouse position- * options.- * @api stable+ * @return {number} Min zoom.+ * @api*/-ol.control.MousePosition = function(opt_options) {-- var options = goog.isDef(opt_options) ? opt_options : {};-- var className = goog.isDef(options.className) ?- options.className : 'ol-mouse-position';-- var element = goog.dom.createDom(goog.dom.TagName.DIV, className);-- var render = goog.isDef(options.render) ?- options.render : ol.control.MousePosition.render;-- goog.base(this, {- element: element,- render: render,- target: options.target- });-- goog.events.listen(this,- ol.Object.getChangeEventType(ol.control.MousePositionProperty.PROJECTION),- this.handleProjectionChanged_, false, this);-- if (goog.isDef(options.coordinateFormat)) {- this.setCoordinateFormat(options.coordinateFormat);- }- if (goog.isDef(options.projection)) {- this.setProjection(ol.proj.get(options.projection));- }-- /**- * @private- * @type {string}- */- this.undefinedHTML_ = goog.isDef(options.undefinedHTML) ?- options.undefinedHTML : '';-- /**- * @private- * @type {string}- */- this.renderedHTML_ = element.innerHTML;-- /**- * @private- * @type {ol.proj.Projection}- */- this.mapProjection_ = null;-- /**- * @private- * @type {?ol.TransformFunction}- */- this.transform_ = null;-- /**- * @private- * @type {ol.Pixel}- */- this.lastMouseMovePixel_ = null;-+ol.tilegrid.TileGrid.prototype.getMinZoom = function() {+ return this.minZoom;};-goog.inherits(ol.control.MousePosition, ol.control.Control);/**- * @param {ol.MapEvent} mapEvent Map event.- * @this {ol.control.MousePosition}- * @api+ * @param {number} z Z.+ * @return {ol.Coordinate} Origin.+ * @api stable*/-ol.control.MousePosition.render = function(mapEvent) {- var frameState = mapEvent.frameState;- if (goog.isNull(frameState)) {- this.mapProjection_ = null;+ol.tilegrid.TileGrid.prototype.getOrigin = function(z) {+ if (!goog.isNull(this.origin_)) {+ return this.origin_;} else {- if (this.mapProjection_ != frameState.viewState.projection) {- this.mapProjection_ = frameState.viewState.projection;- this.transform_ = null;- }+ goog.asserts.assert(!goog.isNull(this.origins_));+ goog.asserts.assert(this.minZoom <= z && z <= this.maxZoom);+ return this.origins_[z];}- this.updateHTML_(this.lastMouseMovePixel_);};/**- * @private+ * @param {number} z Z.+ * @return {number} Resolution.+ * @api stable*/-ol.control.MousePosition.prototype.handleProjectionChanged_ = function() {- this.transform_ = null;+ol.tilegrid.TileGrid.prototype.getResolution = function(z) {+ goog.asserts.assert(this.minZoom <= z && z <= this.maxZoom);+ return this.resolutions_[z];};/**- * @return {ol.CoordinateFormatType|undefined} The format to render the current- * position in.- * @observable+ * @return {Array.<number>} Resolutions.* @api stable*/-ol.control.MousePosition.prototype.getCoordinateFormat = function() {- return /** @type {ol.CoordinateFormatType|undefined} */ (- this.get(ol.control.MousePositionProperty.COORDINATE_FORMAT));+ol.tilegrid.TileGrid.prototype.getResolutions = function() {+ return this.resolutions_;};-goog.exportProperty(- ol.control.MousePosition.prototype,- 'getCoordinateFormat',- ol.control.MousePosition.prototype.getCoordinateFormat);/**- * @return {ol.proj.Projection|undefined} The projection to report mouse- * position in.- * @observable- * @api stable+ * @param {ol.TileCoord} tileCoord Tile coordinate.+ * @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.+ * @param {ol.Extent=} opt_extent Temporary ol.Extent object.+ * @return {ol.TileRange} Tile range.*/-ol.control.MousePosition.prototype.getProjection = function() {- return /** @type {ol.proj.Projection|undefined} */ (- this.get(ol.control.MousePositionProperty.PROJECTION));+ol.tilegrid.TileGrid.prototype.getTileCoordChildTileRange =+ function(tileCoord, opt_tileRange, opt_extent) {+ if (tileCoord[0] < this.maxZoom) {+ var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);+ return this.getTileRangeForExtentAndZ(+ tileCoordExtent, tileCoord[0] + 1, opt_tileRange);+ } else {+ return null;+ }};-goog.exportProperty(- ol.control.MousePosition.prototype,- 'getProjection',- ol.control.MousePosition.prototype.getProjection);/**- * @param {goog.events.BrowserEvent} browserEvent Browser event.- * @protected+ * @param {number} z Z.+ * @param {ol.TileRange} tileRange Tile range.+ * @param {ol.Extent=} opt_extent Temporary ol.Extent object.+ * @return {ol.Extent} Extent.*/-ol.control.MousePosition.prototype.handleMouseMove = function(browserEvent) {- var map = this.getMap();- this.lastMouseMovePixel_ = map.getEventPixel(browserEvent.getBrowserEvent());- this.updateHTML_(this.lastMouseMovePixel_);+ol.tilegrid.TileGrid.prototype.getTileRangeExtent =+ function(z, tileRange, opt_extent) {+ var origin = this.getOrigin(z);+ var resolution = this.getResolution(z);+ var tileSize = this.getTileSize(z);+ var minX = origin[0] + tileRange.minX * tileSize * resolution;+ var maxX = origin[0] + (tileRange.maxX + 1) * tileSize * resolution;+ var minY = origin[1] + tileRange.minY * tileSize * resolution;+ var maxY = origin[1] + (tileRange.maxY + 1) * tileSize * resolution;+ return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);};/**- * @param {goog.events.BrowserEvent} browserEvent Browser event.- * @protected- */-ol.control.MousePosition.prototype.handleMouseOut = function(browserEvent) {- this.updateHTML_(null);- this.lastMouseMovePixel_ = null;+ * @param {ol.Extent} extent Extent.+ * @param {number} resolution Resolution.+ * @param {ol.TileRange=} opt_tileRange Temporary tile range object.+ * @return {ol.TileRange} Tile range.+ */+ol.tilegrid.TileGrid.prototype.getTileRangeForExtentAndResolution =+ function(extent, resolution, opt_tileRange) {+ var tileCoord = ol.tilegrid.TileGrid.tmpTileCoord_;+ this.getTileCoordForXYAndResolution_(+ extent[0], extent[1], resolution, false, tileCoord);+ var minX = tileCoord[1];+ var minY = tileCoord[2];+ this.getTileCoordForXYAndResolution_(+ extent[2], extent[3], resolution, true, tileCoord);+ return ol.TileRange.createOrUpdate(+ minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);};/**- * @inheritDoc- * @api stable+ * @param {ol.Extent} extent Extent.+ * @param {number} z Z.+ * @param {ol.TileRange=} opt_tileRange Temporary tile range object.+ * @return {ol.TileRange} Tile range.*/-ol.control.MousePosition.prototype.setMap = function(map) {- goog.base(this, 'setMap', map);- if (!goog.isNull(map)) {- var viewport = map.getViewport();- this.listenerKeys.push(- goog.events.listen(viewport, goog.events.EventType.MOUSEMOVE,- this.handleMouseMove, false, this),- goog.events.listen(viewport, goog.events.EventType.MOUSEOUT,- this.handleMouseOut, false, this)- );- }+ol.tilegrid.TileGrid.prototype.getTileRangeForExtentAndZ =+ function(extent, z, opt_tileRange) {+ var resolution = this.getResolution(z);+ return this.getTileRangeForExtentAndResolution(+ extent, resolution, opt_tileRange);};/**- * @param {ol.CoordinateFormatType} format The format to render the current- * position in.- * @observable- * @api stable+ * @param {ol.TileCoord} tileCoord Tile coordinate.+ * @return {ol.Coordinate} Tile center.*/-ol.control.MousePosition.prototype.setCoordinateFormat = function(format) {- this.set(ol.control.MousePositionProperty.COORDINATE_FORMAT, format);+ol.tilegrid.TileGrid.prototype.getTileCoordCenter = function(tileCoord) {+ var origin = this.getOrigin(tileCoord[0]);+ var resolution = this.getResolution(tileCoord[0]);+ var tileSize = this.getTileSize(tileCoord[0]);+ return [+ origin[0] + (tileCoord[1] + 0.5) * tileSize * resolution,+ origin[1] + (tileCoord[2] + 0.5) * tileSize * resolution+ ];};-goog.exportProperty(- ol.control.MousePosition.prototype,- 'setCoordinateFormat',- ol.control.MousePosition.prototype.setCoordinateFormat);/**- * @param {ol.proj.Projection} projection The projection to report mouse- * position in.- * @observable- * @api stable+ * @param {ol.TileCoord} tileCoord Tile coordinate.+ * @param {ol.Extent=} opt_extent Temporary extent object.+ * @return {ol.Extent} Extent.*/-ol.control.MousePosition.prototype.setProjection = function(projection) {- this.set(ol.control.MousePositionProperty.PROJECTION, projection);+ol.tilegrid.TileGrid.prototype.getTileCoordExtent =+ function(tileCoord, opt_extent) {+ var origin = this.getOrigin(tileCoord[0]);+ var resolution = this.getResolution(tileCoord[0]);+ var tileSize = this.getTileSize(tileCoord[0]);+ var minX = origin[0] + tileCoord[1] * tileSize * resolution;+ var minY = origin[1] + tileCoord[2] * tileSize * resolution;+ var maxX = minX + tileSize * resolution;+ var maxY = minY + tileSize * resolution;+ return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);};-goog.exportProperty(- ol.control.MousePosition.prototype,- 'setProjection',- ol.control.MousePosition.prototype.setProjection);/**- * @param {?ol.Pixel} pixel Pixel.- * @private+ * Get the tile coordinate for the given map coordinate and resolution. This+ * method considers that coordinates that intersect tile boundaries should be+ * assigned the higher tile coordinate.+ *+ * @param {ol.Coordinate} coordinate Coordinate.+ * @param {number} resolution Resolution.+ * @param {ol.TileCoord=} opt_tileCoord Destination ol.TileCoord object.+ * @return {ol.TileCoord} Tile coordinate.+ * @api*/-ol.control.MousePosition.prototype.updateHTML_ = function(pixel) {- var html = this.undefinedHTML_;- if (!goog.isNull(pixel) && !goog.isNull(this.mapProjection_)) {- if (goog.isNull(this.transform_)) {- var projection = this.getProjection();- if (goog.isDef(projection)) {- this.transform_ = ol.proj.getTransformFromProjections(- this.mapProjection_, projection);- } else {- this.transform_ = ol.proj.identityTransform;- }- }- var map = this.getMap();- var coordinate = map.getCoordinateFromPixel(pixel);- if (!goog.isNull(coordinate)) {- this.transform_(coordinate, coordinate);- var coordinateFormat = this.getCoordinateFormat();- if (goog.isDef(coordinateFormat)) {- html = coordinateFormat(coordinate);- } else {- html = coordinate.toString();- }- }- }- if (!goog.isDef(this.renderedHTML_) || html != this.renderedHTML_) {- this.element.innerHTML = html;- this.renderedHTML_ = html;- }+ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndResolution = function(+ coordinate, resolution, opt_tileCoord) {+ return this.getTileCoordForXYAndResolution_(+ coordinate[0], coordinate[1], resolution, false, opt_tileCoord);};-// Copyright 2012 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License./**- * @fileoverview A delayed callback that pegs to the next animation frame- * instead of a user-configurable timeout.- *- * @author [email protected] (Nick Santos)+ * @param {number} x X.+ * @param {number} y Y.+ * @param {number} resolution Resolution.+ * @param {boolean} reverseIntersectionPolicy Instead of letting edge+ * intersections go to the higher tile coordinate, let edge intersections+ * go to the lower tile coordinate.+ * @param {ol.TileCoord=} opt_tileCoord Temporary ol.TileCoord object.+ * @return {ol.TileCoord} Tile coordinate.+ * @private*/+ol.tilegrid.TileGrid.prototype.getTileCoordForXYAndResolution_ = function(+ x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {+ var z = this.getZForResolution(resolution);+ var scale = resolution / this.getResolution(z);+ var origin = this.getOrigin(z);+ var tileSize = this.getTileSize(z);-goog.provide('goog.async.AnimationDelay');--goog.require('goog.Disposable');-goog.require('goog.events');-goog.require('goog.functions');--+ var tileCoordX = scale * (x - origin[0]) / (resolution * tileSize);+ var tileCoordY = scale * (y - origin[1]) / (resolution * tileSize);-// TODO(nicksantos): Should we factor out the common code between this and-// goog.async.Delay? I'm not sure if there's enough code for this to really-// make sense. Subclassing seems like the wrong approach for a variety of-// reasons. Maybe there should be a common interface?+ if (reverseIntersectionPolicy) {+ tileCoordX = Math.ceil(tileCoordX) - 1;+ tileCoordY = Math.ceil(tileCoordY) - 1;+ } else {+ tileCoordX = Math.floor(tileCoordX);+ tileCoordY = Math.floor(tileCoordY);+ }+ return ol.tilecoord.createOrUpdate(z, tileCoordX, tileCoordY, opt_tileCoord);+};/**- * A delayed callback that pegs to the next animation frame- * instead of a user configurable timeout. By design, this should have- * the same interface as goog.async.Delay.- *- * Uses requestAnimationFrame and friends when available, but falls- * back to a timeout of goog.async.AnimationDelay.TIMEOUT.- *- * For more on requestAnimationFrame and how you can use it to create smoother- * animations, see:- * @see http://paulirish.com/2011/requestanimationframe-for-smart-animating/- *- * @param {function(number)} listener Function to call when the delay completes.- * Will be passed the timestamp when it's called, in unix ms.- * @param {Window=} opt_window The window object to execute the delay in.- * Defaults to the global object.- * @param {Object=} opt_handler The object scope to invoke the function in.- * @constructor- * @extends {goog.Disposable}- * @final+ * @param {ol.Coordinate} coordinate Coordinate.+ * @param {number} z Z.+ * @param {ol.TileCoord=} opt_tileCoord Destination ol.TileCoord object.+ * @return {ol.TileCoord} Tile coordinate.+ * @api*/-goog.async.AnimationDelay = function(listener, opt_window, opt_handler) {- goog.async.AnimationDelay.base(this, 'constructor');-- /**- * The function that will be invoked after a delay.- * @type {function(number)}- * @private- */- this.listener_ = listener;-- /**- * The object context to invoke the callback in.- * @type {Object|undefined}- * @private- */- this.handler_ = opt_handler;-- /**- * @type {Window}- * @private- */- this.win_ = opt_window || window;-- /**- * Cached callback function invoked when the delay finishes.- * @type {function()}- * @private- */- this.callback_ = goog.bind(this.doAction_, this);+ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndZ =+ function(coordinate, z, opt_tileCoord) {+ var resolution = this.getResolution(z);+ return this.getTileCoordForXYAndResolution_(+ coordinate[0], coordinate[1], resolution, false, opt_tileCoord);};-goog.inherits(goog.async.AnimationDelay, goog.Disposable);/**- * Identifier of the active delay timeout, or event listener,- * or null when inactive.- * @type {goog.events.Key|number|null}- * @private+ * @param {ol.TileCoord} tileCoord Tile coordinate.+ * @return {number} Tile resolution.*/-goog.async.AnimationDelay.prototype.id_ = null;+ol.tilegrid.TileGrid.prototype.getTileCoordResolution = function(tileCoord) {+ goog.asserts.assert(+ this.minZoom <= tileCoord[0] && tileCoord[0] <= this.maxZoom);+ return this.resolutions_[tileCoord[0]];+};/**- * If we're using dom listeners.- * @type {?boolean}- * @private+ * @param {number} z Zoom level.+ * @param {ol.proj.Projection} projection Projection.+ * @param {ol.TileRange=} opt_tileRange Tile range.+ * @return {ol.TileRange} Tile range.*/-goog.async.AnimationDelay.prototype.usingListeners_ = false;+ol.tilegrid.TileGrid.prototype.getTileRange =+ function(z, projection, opt_tileRange) {+ var projectionExtentTileRange = this.getTileRangeForExtentAndZ(+ ol.tilegrid.extentFromProjection(projection), z);+ var width = this.getWidth(z);+ if (!goog.isDef(width)) {+ width = projectionExtentTileRange.getWidth();+ }+ return ol.TileRange.createOrUpdate(+ 0, width - 1, 0, projectionExtentTileRange.getHeight(), opt_tileRange);+};/**- * Default wait timeout for animations (in milliseconds). Only used for timed- * animation, which uses a timer (setTimeout) to schedule animation.- *- * @type {number}- * @const+ * @param {number} z Z.+ * @return {number} Tile size.+ * @api stable*/-goog.async.AnimationDelay.TIMEOUT = 20;+ol.tilegrid.TileGrid.prototype.getTileSize = function(z) {+ if (goog.isDef(this.tileSize_)) {+ return this.tileSize_;+ } else {+ goog.asserts.assert(!goog.isNull(this.tileSizes_));+ goog.asserts.assert(this.minZoom <= z && z <= this.maxZoom);+ return this.tileSizes_[z];+ }+};/**- * Name of event received from the requestAnimationFrame in Firefox.- *- * @type {string}- * @const- * @private+ * @param {number} z Zoom level.+ * @return {number|undefined} Width for the specified zoom level or `undefined`+ * if unknown.*/-goog.async.AnimationDelay.MOZ_BEFORE_PAINT_EVENT_ = 'MozBeforePaint';+ol.tilegrid.TileGrid.prototype.getWidth = function(z) {+ if (!goog.isNull(this.widths_)) {+ goog.asserts.assert(this.minZoom <= z && z <= this.maxZoom);+ return this.widths_[z];+ }+};/**- * Starts the delay timer. The provided listener function will be called- * before the next animation frame.+ * @param {number} resolution Resolution.+ * @return {number} Z.*/-goog.async.AnimationDelay.prototype.start = function() {- this.stop();- this.usingListeners_ = false;+ol.tilegrid.TileGrid.prototype.getZForResolution = function(resolution) {+ var z = ol.array.linearFindNearest(this.resolutions_, resolution, 0);+ return goog.math.clamp(z, this.minZoom, this.maxZoom);+};- var raf = this.getRaf_();- var cancelRaf = this.getCancelRaf_();- if (raf && !cancelRaf && this.win_.mozRequestAnimationFrame) {- // Because Firefox (Gecko) runs animation in separate threads, it also saves- // time by running the requestAnimationFrame callbacks in that same thread.- // Sadly this breaks the assumption of implicit thread-safety in JS, and can- // thus create thread-based inconsistencies on counters etc.- //- // Calling cycleAnimations_ using the MozBeforePaint event instead of as- // callback fixes this.- //- // Trigger this condition only if the mozRequestAnimationFrame is available,- // but not the W3C requestAnimationFrame function (as in draft) or the- // equivalent cancel functions.- this.id_ = goog.events.listen(- this.win_,- goog.async.AnimationDelay.MOZ_BEFORE_PAINT_EVENT_,- this.callback_);- this.win_.mozRequestAnimationFrame(null);- this.usingListeners_ = true;- } else if (raf && cancelRaf) {- this.id_ = raf.call(this.win_, this.callback_);++/**+ * @param {number} z Zoom level.+ * @param {ol.proj.Projection} projection Projection.+ * @return {boolean} Whether the tile grid is defined for the whole globe when+ * used with the provided `projection` at zoom level `z`.+ */+ol.tilegrid.TileGrid.prototype.isGlobal = function(z, projection) {+ var width = this.getWidth(z);+ if (goog.isDef(width)) {+ var projTileGrid = ol.tilegrid.getForProjection(projection);+ var projExtent = projection.getExtent();+ return this.getTileSize(z) * width ==+ projTileGrid.getTileSize(z) *+ projTileGrid.getTileRangeForExtentAndZ(projExtent, z).getWidth();} else {- this.id_ = this.win_.setTimeout(- // Prior to Firefox 13, Gecko passed a non-standard parameter- // to the callback that we want to ignore.- goog.functions.lock(this.callback_),- goog.async.AnimationDelay.TIMEOUT);+ return projection.isGlobal();}};/**- * Stops the delay timer if it is active. No action is taken if the timer is not- * in use.+ * @param {ol.proj.Projection} projection Projection.+ * @return {ol.tilegrid.TileGrid} Default tile grid for the passed projection.*/-goog.async.AnimationDelay.prototype.stop = function() {- if (this.isActive()) {- var raf = this.getRaf_();- var cancelRaf = this.getCancelRaf_();- if (raf && !cancelRaf && this.win_.mozRequestAnimationFrame) {- goog.events.unlistenByKey(this.id_);- } else if (raf && cancelRaf) {- cancelRaf.call(this.win_, /** @type {number} */ (this.id_));- } else {- this.win_.clearTimeout(/** @type {number} */ (this.id_));- }+ol.tilegrid.getForProjection = function(projection) {+ var tileGrid = projection.getDefaultTileGrid();+ if (goog.isNull(tileGrid)) {+ tileGrid = ol.tilegrid.createForProjection(projection);+ projection.setDefaultTileGrid(tileGrid);}- this.id_ = null;+ return tileGrid;};/**- * Fires delay's action even if timer has already gone off or has not been- * started yet; guarantees action firing. Stops the delay timer.+ * @param {ol.Extent} extent Extent.+ * @param {number=} opt_maxZoom Maximum zoom level (default is+ * ol.DEFAULT_MAX_ZOOM).+ * @param {number=} opt_tileSize Tile size (default uses ol.DEFAULT_TILE_SIZE).+ * @param {ol.extent.Corner=} opt_corner Extent corner (default is+ * ol.extent.Corner.BOTTOM_LEFT).+ * @return {ol.tilegrid.TileGrid} TileGrid instance.*/-goog.async.AnimationDelay.prototype.fire = function() {- this.stop();- this.doAction_();+ol.tilegrid.createForExtent =+ function(extent, opt_maxZoom, opt_tileSize, opt_corner) {+ var tileSize = goog.isDef(opt_tileSize) ?+ opt_tileSize : ol.DEFAULT_TILE_SIZE;++ var corner = goog.isDef(opt_corner) ?+ opt_corner : ol.extent.Corner.BOTTOM_LEFT;++ var resolutions = ol.tilegrid.resolutionsFromExtent(+ extent, opt_maxZoom, tileSize);++ var widths = new Array(resolutions.length);+ var extentWidth = ol.extent.getWidth(extent);+ for (var z = resolutions.length - 1; z >= 0; --z) {+ widths[z] = extentWidth / tileSize / resolutions[z];+ }++ return new ol.tilegrid.TileGrid({+ origin: ol.extent.getCorner(extent, corner),+ resolutions: resolutions,+ tileSize: tileSize,+ widths: widths+ });};/**- * Fires delay's action only if timer is currently active. Stops the delay- * timer.+ * Create a resolutions array from an extent. A zoom factor of 2 is assumed.+ * @param {ol.Extent} extent Extent.+ * @param {number=} opt_maxZoom Maximum zoom level (default is+ * ol.DEFAULT_MAX_ZOOM).+ * @param {number=} opt_tileSize Tile size (default uses ol.DEFAULT_TILE_SIZE).+ * @return {!Array.<number>} Resolutions array.*/-goog.async.AnimationDelay.prototype.fireIfActive = function() {- if (this.isActive()) {- this.fire();+ol.tilegrid.resolutionsFromExtent =+ function(extent, opt_maxZoom, opt_tileSize) {+ var maxZoom = goog.isDef(opt_maxZoom) ?+ opt_maxZoom : ol.DEFAULT_MAX_ZOOM;++ var height = ol.extent.getHeight(extent);+ var width = ol.extent.getWidth(extent);++ var tileSize = goog.isDef(opt_tileSize) ?+ opt_tileSize : ol.DEFAULT_TILE_SIZE;+ var maxResolution = Math.max(+ width / tileSize, height / tileSize);++ var length = maxZoom + 1;+ var resolutions = new Array(length);+ for (var z = 0; z < length; ++z) {+ resolutions[z] = maxResolution / Math.pow(2, z);}+ return resolutions;};/**- * @return {boolean} True if the delay is currently active, false otherwise.+ * @param {ol.proj.ProjectionLike} projection Projection.+ * @param {number=} opt_maxZoom Maximum zoom level (default is+ * ol.DEFAULT_MAX_ZOOM).+ * @param {number=} opt_tileSize Tile size (default uses ol.DEFAULT_TILE_SIZE).+ * @param {ol.extent.Corner=} opt_corner Extent corner (default is+ * ol.extent.Corner.BOTTOM_LEFT).+ * @return {ol.tilegrid.TileGrid} TileGrid instance.*/-goog.async.AnimationDelay.prototype.isActive = function() {- return this.id_ != null;+ol.tilegrid.createForProjection =+ function(projection, opt_maxZoom, opt_tileSize, opt_corner) {+ var extent = ol.tilegrid.extentFromProjection(projection);+ return ol.tilegrid.createForExtent(+ extent, opt_maxZoom, opt_tileSize, opt_corner);};/**- * Invokes the callback function after the delay successfully completes.- * @private+ * Generate a tile grid extent from a projection. If the projection has an+ * extent, it is used. If not, a global extent is assumed.+ * @param {ol.proj.ProjectionLike} projection Projection.+ * @return {ol.Extent} Extent.*/-goog.async.AnimationDelay.prototype.doAction_ = function() {- if (this.usingListeners_ && this.id_) {- goog.events.unlistenByKey(this.id_);+ol.tilegrid.extentFromProjection = function(projection) {+ projection = ol.proj.get(projection);+ var extent = projection.getExtent();+ if (goog.isNull(extent)) {+ var half = 180 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /+ projection.getMetersPerUnit();+ extent = ol.extent.createOrUpdate(-half, -half, half, half);}- this.id_ = null;-- // We are not using the timestamp returned by requestAnimationFrame- // because it may be either a Date.now-style time or a- // high-resolution time (depending on browser implementation). Using- // goog.now() will ensure that the timestamp used is consistent and- // compatible with goog.fx.Animation.- this.listener_.call(this.handler_, goog.now());+ return extent;};+goog.provide('ol.source.Tile');+goog.provide('ol.source.TileOptions');-/** @override */-goog.async.AnimationDelay.prototype.disposeInternal = function() {- this.stop();- goog.async.AnimationDelay.base(this, 'disposeInternal');-};+goog.require('goog.events.Event');+goog.require('ol.Attribution');+goog.require('ol.Extent');+goog.require('ol.TileCache');+goog.require('ol.TileRange');+goog.require('ol.TileState');+goog.require('ol.source.Source');+goog.require('ol.tilecoord');+goog.require('ol.tilegrid.TileGrid');/**- * @return {?function(function(number)): number} The requestAnimationFrame- * function, or null if not available on this browser.- * @private+ * @typedef {{attributions: (Array.<ol.Attribution>|undefined),+ * extent: (ol.Extent|undefined),+ * logo: (string|olx.LogoOptions|undefined),+ * opaque: (boolean|undefined),+ * tilePixelRatio: (number|undefined),+ * projection: ol.proj.ProjectionLike,+ * state: (ol.source.State|undefined),+ * tileGrid: (ol.tilegrid.TileGrid|undefined),+ * wrapX: (boolean|undefined)}}*/-goog.async.AnimationDelay.prototype.getRaf_ = function() {- var win = this.win_;- return win.requestAnimationFrame ||- win.webkitRequestAnimationFrame ||- win.mozRequestAnimationFrame ||- win.oRequestAnimationFrame ||- win.msRequestAnimationFrame ||- null;-};+ol.source.TileOptions;+/**- * @return {?function(number): number} The cancelAnimationFrame function,- * or null if not available on this browser.- * @private+ * @classdesc+ * Abstract base class; normally only used for creating subclasses and not+ * instantiated in apps.+ * Base class for sources providing images divided into a tile grid.+ *+ * @constructor+ * @extends {ol.source.Source}+ * @param {ol.source.TileOptions} options Tile source options.+ * @api*/-goog.async.AnimationDelay.prototype.getCancelRaf_ = function() {- var win = this.win_;- return win.cancelAnimationFrame ||- win.cancelRequestAnimationFrame ||- win.webkitCancelRequestAnimationFrame ||- win.mozCancelRequestAnimationFrame ||- win.oCancelRequestAnimationFrame ||- win.msCancelRequestAnimationFrame ||- null;-};+ol.source.Tile = function(options) {-// Copyright 2013 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License.+ goog.base(this, {+ attributions: options.attributions,+ extent: options.extent,+ logo: options.logo,+ projection: options.projection,+ state: options.state+ });-/**- * @fileoverview Provides a function to schedule running a function as soon- * as possible after the current JS execution stops and yields to the event- * loop.- *- */+ /**+ * @private+ * @type {boolean}+ */+ this.opaque_ = goog.isDef(options.opaque) ? options.opaque : false;-goog.provide('goog.async.nextTick');-goog.provide('goog.async.throwException');+ /**+ * @private+ * @type {number}+ */+ this.tilePixelRatio_ = goog.isDef(options.tilePixelRatio) ?+ options.tilePixelRatio : 1;-goog.require('goog.debug.entryPointRegistry');-goog.require('goog.functions');-goog.require('goog.labs.userAgent.browser');+ /**+ * @protected+ * @type {ol.tilegrid.TileGrid}+ */+ this.tileGrid = goog.isDef(options.tileGrid) ? options.tileGrid : null;+ /**+ * @protected+ * @type {ol.TileCache}+ */+ this.tileCache = new ol.TileCache();++ /**+ * @private+ * @type {boolean|undefined}+ */+ this.wrapX_ = options.wrapX;-/**- * Throw an item without interrupting the current execution context. For- * example, if processing a group of items in a loop, sometimes it is useful- * to report an error while still allowing the rest of the batch to be- * processed.- * @param {*} exception- */-goog.async.throwException = function(exception) {- // Each throw needs to be in its own context.- goog.global.setTimeout(function() { throw exception; }, 0);};+goog.inherits(ol.source.Tile, ol.source.Source);/**- * Fires the provided callbacks as soon as possible after the current JS- * execution context. setTimeout(…, 0) takes at least 4ms when called from- * within another setTimeout(…, 0) for legacy reasons.- *- * This will not schedule the callback as a microtask (i.e. a task that can- * preempt user input or networking callbacks). It is meant to emulate what- * setTimeout(_, 0) would do if it were not throttled. If you desire microtask- * behavior, use {@see goog.Promise} instead.- *- * @param {function(this:SCOPE)} callback Callback function to fire as soon as- * possible.- * @param {SCOPE=} opt_context Object in whose scope to call the listener.- * @param {boolean=} opt_useSetImmediate Avoid the IE workaround that- * ensures correctness at the cost of speed. See comments for details.- * @template SCOPE+ * @return {boolean} Can expire cache.*/-goog.async.nextTick = function(callback, opt_context, opt_useSetImmediate) {- var cb = callback;- if (opt_context) {- cb = goog.bind(callback, opt_context);- }- cb = goog.async.nextTick.wrapCallback_(cb);- // window.setImmediate was introduced and currently only supported by IE10+,- // but due to a bug in the implementation it is not guaranteed that- // setImmediate is faster than setTimeout nor that setImmediate N is before- // setImmediate N+1. That is why we do not use the native version if- // available. We do, however, call setImmediate if it is a normal function- // because that indicates that it has been replaced by goog.testing.MockClock- // which we do want to support.- // See- // http://connect.microsoft.com/IE/feedback/details/801823/setimmediate-and-messagechannel-are-broken-in-ie10- //- // Note we do allow callers to also request setImmediate if they are willing- // to accept the possible tradeoffs of incorrectness in exchange for speed.- // The IE fallback of readystate change is much slower.- if (goog.isFunction(goog.global.setImmediate) &&- (opt_useSetImmediate || !goog.global.Window ||- goog.global.Window.prototype.setImmediate != goog.global.setImmediate)) {- goog.global.setImmediate(cb);- return;- }-- // Look for and cache the custom fallback version of setImmediate.- if (!goog.async.nextTick.setImmediate_) {- goog.async.nextTick.setImmediate_ =- goog.async.nextTick.getSetImmediateEmulator_();- }- goog.async.nextTick.setImmediate_(cb);+ol.source.Tile.prototype.canExpireCache = function() {+ return this.tileCache.canExpireCache();};/**- * Cache for the setImmediate implementation.- * @type {function(function())}- * @private+ * @param {Object.<string, ol.TileRange>} usedTiles Used tiles.*/-goog.async.nextTick.setImmediate_;+ol.source.Tile.prototype.expireCache = function(usedTiles) {+ this.tileCache.expireCache(usedTiles);+};/**- * Determines the best possible implementation to run a function as soon as- * the JS event loop is idle.- * @return {function(function())} The "setImmediate" implementation.- * @private+ * @param {number} z Zoom level.+ * @param {ol.TileRange} tileRange Tile range.+ * @param {function(ol.Tile):(boolean|undefined)} callback Called with each+ * loaded tile. If the callback returns `false`, the tile will not be+ * considered loaded.+ * @return {boolean} The tile range is fully covered with loaded tiles.*/-goog.async.nextTick.getSetImmediateEmulator_ = function() {- // Create a private message channel and use it to postMessage empty messages- // to ourselves.- var Channel = goog.global['MessageChannel'];- // If MessageChannel is not available and we are in a browser, implement- // an iframe based polyfill in browsers that have postMessage and- // document.addEventListener. The latter excludes IE8 because it has a- // synchronous postMessage implementation.- if (typeof Channel === 'undefined' && typeof window !== 'undefined' &&- window.postMessage && window.addEventListener) {- /** @constructor */- Channel = function() {- // Make an empty, invisible iframe.- var iframe = document.createElement('iframe');- iframe.style.display = 'none';- iframe.src = '';- document.documentElement.appendChild(iframe);- var win = iframe.contentWindow;- var doc = win.document;- doc.open();- doc.write('');- doc.close();- // Do not post anything sensitive over this channel, as the workaround for- // pages with file: origin could allow that information to be modified or- // intercepted.- var message = 'callImmediate' + Math.random();- // The same origin policy rejects attempts to postMessage from file: urls- // unless the origin is '*'.- // TODO(b/16335441): Use '*' origin for data: and other similar protocols.- var origin = win.location.protocol == 'file:' ?- '*' : win.location.protocol + '//' + win.location.host;- var onmessage = goog.bind(function(e) {- // Validate origin and message to make sure that this message was- // intended for us. If the origin is set to '*' (see above) only the- // message needs to match since, for example, '*' != 'file://'. Allowing- // the wildcard is ok, as we are not concerned with security here.- if ((origin != '*' && e.origin != origin) || e.data != message) {- return;- }- this['port1'].onmessage();- }, this);- win.addEventListener('message', onmessage, false);- this['port1'] = {};- this['port2'] = {- postMessage: function() {- win.postMessage(message, origin);+ol.source.Tile.prototype.forEachLoadedTile = function(z, tileRange, callback) {+ var covered = true;+ var tile, tileCoordKey, loaded;+ for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {+ for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {+ tileCoordKey = this.getKeyZXY(z, x, y);+ loaded = false;+ if (this.tileCache.containsKey(tileCoordKey)) {+ tile = /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));+ loaded = tile.getState() === ol.TileState.LOADED;+ if (loaded) {+ loaded = (callback(tile) !== false);}- };- };- }- if (typeof Channel !== 'undefined' &&- (!goog.labs.userAgent.browser.isIE())) {- // Exclude all of IE due to- // http://codeforhire.com/2013/09/21/setimmediate-and-messagechannel-broken-on-internet-explorer-10/- // which allows starving postMessage with a busy setTimeout loop.- // This currently affects IE10 and IE11 which would otherwise be able- // to use the postMessage based fallbacks.- var channel = new Channel();- // Use a fifo linked list to call callbacks in the right order.- var head = {};- var tail = head;- channel['port1'].onmessage = function() {- if (goog.isDef(head.next)) {- head = head.next;- var cb = head.cb;- head.cb = null;- cb();}- };- return function(cb) {- tail.next = {- cb: cb- };- tail = tail.next;- channel['port2'].postMessage(0);- };- }- // Implementation for IE6+: Script elements fire an asynchronous- // onreadystatechange event when inserted into the DOM.- if (typeof document !== 'undefined' && 'onreadystatechange' in- document.createElement('script')) {- return function(cb) {- var script = document.createElement('script');- script.onreadystatechange = function() {- // Clean up and call the callback.- script.onreadystatechange = null;- script.parentNode.removeChild(script);- script = null;- cb();- cb = null;- };- document.documentElement.appendChild(script);- };+ if (!loaded) {+ covered = false;+ }+ }}- // Fall back to setTimeout with 0. In browsers this creates a delay of 5ms- // or more.- return function(cb) {- goog.global.setTimeout(cb, 0);- };+ return covered;};/**- * Helper function that is overrided to protect callbacks with entry point- * monitor if the application monitors entry points.- * @param {function()} callback Callback function to fire as soon as possible.- * @return {function()} The wrapped callback.- * @private+ * @return {number} Gutter.*/-goog.async.nextTick.wrapCallback_ = goog.functions.identity;---// Register the callback function as an entry point, so that it can be-// monitored for exception handling, etc. This has to be done in this file-// since it requires special code to handle all browsers.-goog.debug.entryPointRegistry.register(- /**- * @param {function(!Function): !Function} transformer The transforming- * function.- */- function(transformer) {- goog.async.nextTick.wrapCallback_ = transformer;- });+ol.source.Tile.prototype.getGutter = function() {+ return 0;+};-// Copyright 2014 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License./**- * @fileoverview The SafeScript type and its builders.- *- * TODO(user): Link to document stating type contract.+ * @param {number} z Z.+ * @param {number} x X.+ * @param {number} y Y.+ * @return {string} Key.+ * @protected*/+ol.source.Tile.prototype.getKeyZXY = ol.tilecoord.getKeyZXY;-goog.provide('goog.html.SafeScript');--goog.require('goog.asserts');-goog.require('goog.string.Const');-goog.require('goog.string.TypedString');+/**+ * @return {boolean} Opaque.+ */+ol.source.Tile.prototype.getOpaque = function() {+ return this.opaque_;+};/**- * A string-like object which represents JavaScript code and that carries the- * security type contract that its value, as a string, will not cause execution- * of unconstrained attacker controlled code (XSS) when evaluated as JavaScript- * in a browser.- *- * Instances of this type must be created via the factory method- * {@code goog.html.SafeScript.fromConstant} and not by invoking its- * constructor. The constructor intentionally takes no parameters and the type- * is immutable; hence only a default instance corresponding to the empty string- * can be obtained via constructor invocation.- *- * A SafeScript's string representation can safely be interpolated as the- * content of a script element within HTML. The SafeScript string should not be- * escaped before interpolation.- *- * Note that the SafeScript might contain text that is attacker-controlled but- * that text should have been interpolated with appropriate escaping,- * sanitization and/or validation into the right location in the script, such- * that it is highly constrained in its effect (for example, it had to match a- * set of whitelisted words).- *- * A SafeScript can be constructed via security-reviewed unchecked- * conversions. In this case producers of SafeScript must ensure themselves that- * the SafeScript does not contain unsafe script. Note in particular that- * {@code <} is dangerous, even when inside JavaScript strings, and so should- * always be forbidden or JavaScript escaped in user controlled input. For- * example, if {@code </script><script>evil</script>"} were- * interpolated inside a JavaScript string, it would break out of the context- * of the original script element and {@code evil} would execute. Also note- * that within an HTML script (raw text) element, HTML character references,- * such as "<" are not allowed. See- * http://www.w3.org/TR/html5/scripting-1.html#restrictions-for-contents-of-script-elements.- *- * @see goog.html.SafeScript#fromConstant- * @constructor- * @final- * @struct- * @implements {goog.string.TypedString}+ * @inheritDoc*/-goog.html.SafeScript = function() {- /**- * The contained value of this SafeScript. The field has a purposely- * ugly name to make (non-compiled) code that attempts to directly access this- * field stand out.- * @private {string}- */- this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = '';-- /**- * A type marker used to implement additional run-time type checking.- * @see goog.html.SafeScript#unwrap- * @const- * @private- */- this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ =- goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;+ol.source.Tile.prototype.getResolutions = function() {+ return this.tileGrid.getResolutions();};/**- * @override- * @const+ * @param {number} z Tile coordinate z.+ * @param {number} x Tile coordinate x.+ * @param {number} y Tile coordinate y.+ * @param {number} pixelRatio Pixel ratio.+ * @param {ol.proj.Projection=} opt_projection Projection.+ * @return {!ol.Tile} Tile.*/-goog.html.SafeScript.prototype.implementsGoogStringTypedString = true;+ol.source.Tile.prototype.getTile = goog.abstractMethod;/**- * Type marker for the SafeScript type, used to implement additional- * run-time type checking.- * @const- * @private+ * @return {ol.tilegrid.TileGrid} Tile grid.+ * @api stable*/-goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};+ol.source.Tile.prototype.getTileGrid = function() {+ return this.tileGrid;+};/**- * Creates a SafeScript object from a compile-time constant string.- *- * @param {!goog.string.Const} script A compile-time-constant string from which- * to create a SafeScript.- * @return {!goog.html.SafeScript} A SafeScript object initialized to- * {@code script}.+ * @param {ol.proj.Projection} projection Projection.+ * @return {ol.tilegrid.TileGrid} Tile grid.*/-goog.html.SafeScript.fromConstant = function(script) {- var scriptString = goog.string.Const.unwrap(script);- if (scriptString.length === 0) {- return goog.html.SafeScript.EMPTY;+ol.source.Tile.prototype.getTileGridForProjection = function(projection) {+ if (goog.isNull(this.tileGrid)) {+ return ol.tilegrid.getForProjection(projection);+ } else {+ return this.tileGrid;}- return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(- scriptString);};/**- * Returns this SafeScript's value as a string.- *- * IMPORTANT: In code where it is security relevant that an object's type is- * indeed {@code SafeScript}, use {@code goog.html.SafeScript.unwrap} instead of- * this method. If in doubt, assume that it's security relevant. In particular,- * note that goog.html functions which return a goog.html type do not guarantee- * the returned instance is of the right type. For example:- *- * <pre>- * var fakeSafeHtml = new String('fake');- * fakeSafeHtml.__proto__ = goog.html.SafeHtml.prototype;- * var newSafeHtml = goog.html.SafeHtml.htmlEscape(fakeSafeHtml);- * // newSafeHtml is just an alias for fakeSafeHtml, it's passed through by- * // goog.html.SafeHtml.htmlEscape() as fakeSafeHtml- * // instanceof goog.html.SafeHtml.- * </pre>- *- * @see goog.html.SafeScript#unwrap- * @override+ * @param {number} z Z.+ * @param {number} pixelRatio Pixel ratio.+ * @param {ol.proj.Projection} projection Projection.+ * @return {number} Tile size.*/-goog.html.SafeScript.prototype.getTypedStringValue = function() {- return this.privateDoNotAccessOrElseSafeScriptWrappedValue_;+ol.source.Tile.prototype.getTilePixelSize =+ function(z, pixelRatio, projection) {+ var tileGrid = this.getTileGridForProjection(projection);+ return tileGrid.getTileSize(z) * this.tilePixelRatio_;};-if (goog.DEBUG) {- /**- * Returns a debug string-representation of this value.- *- * To obtain the actual string value wrapped in a SafeScript, use- * {@code goog.html.SafeScript.unwrap}.- *- * @see goog.html.SafeScript#unwrap- * @override- */- goog.html.SafeScript.prototype.toString = function() {- return 'SafeScript{' +- this.privateDoNotAccessOrElseSafeScriptWrappedValue_ + '}';- };-}--/**- * Performs a runtime check that the provided object is indeed a- * SafeScript object, and returns its value.- *- * @param {!goog.html.SafeScript} safeScript The object to extract from.- * @return {string} The safeScript object's contained string, unless- * the run-time type check fails. In that case, {@code unwrap} returns an- * innocuous string, or, if assertions are enabled, throws- * {@code goog.asserts.AssertionError}.+ * Handles x-axis wrapping. When `this.wrapX_` is undefined or the projection+ * is not a global projection, `tileCoord` will be returned unaltered. When+ * `this.wrapX_` is true, the tile coordinate will be wrapped horizontally.+ * When `this.wrapX_` is `false`, `null` will be returned for tiles that are+ * outside the projection extent.+ * @param {ol.TileCoord} tileCoord Tile coordinate.+ * @param {ol.proj.Projection=} opt_projection Projection.+ * @return {ol.TileCoord} Tile coordinate.*/-goog.html.SafeScript.unwrap = function(safeScript) {- // Perform additional Run-time type-checking to ensure that- // safeScript is indeed an instance of the expected type. This- // provides some additional protection against security bugs due to- // application code that disables type checks.- // Specifically, the following checks are performed:- // 1. The object is an instance of the expected type.- // 2. The object is not an instance of a subclass.- // 3. The object carries a type marker for the expected type. "Faking" an- // object requires a reference to the type marker, which has names intended- // to stand out in code reviews.- if (safeScript instanceof goog.html.SafeScript &&- safeScript.constructor === goog.html.SafeScript &&- safeScript.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ ===- goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {- return safeScript.privateDoNotAccessOrElseSafeScriptWrappedValue_;+ol.source.Tile.prototype.getWrapXTileCoord =+ function(tileCoord, opt_projection) {+ var projection = goog.isDef(opt_projection) ?+ opt_projection : this.getProjection();+ var tileGrid = this.getTileGridForProjection(projection);+ if (goog.isDef(this.wrapX_) && tileGrid.isGlobal(tileCoord[0], projection)) {+ return this.wrapX_ ?+ ol.tilecoord.wrapX(tileCoord, tileGrid, projection) :+ ol.tilecoord.clipX(tileCoord, tileGrid, projection);} else {- goog.asserts.fail(- 'expected object of type SafeScript, got \'' + safeScript + '\'');- return 'type_error:SafeScript';+ return tileCoord;}};/**- * Package-internal utility method to create SafeScript instances.- *- * @param {string} script The string to initialize the SafeScript object with.- * @return {!goog.html.SafeScript} The initialized SafeScript object.- * @package+ * Marks a tile coord as being used, without triggering a load.+ * @param {number} z Tile coordinate z.+ * @param {number} x Tile coordinate x.+ * @param {number} y Tile coordinate y.*/-goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse =- function(script) {- var safeScript = new goog.html.SafeScript();- safeScript.privateDoNotAccessOrElseSafeScriptWrappedValue_ = script;- return safeScript;-};+ol.source.Tile.prototype.useTile = goog.nullFunction;+/**- * A SafeScript instance corresponding to the empty string.- * @const {!goog.html.SafeScript}+ * @classdesc+ * Events emitted by {@link ol.source.Tile} instances are instances of this+ * type.+ *+ * @constructor+ * @extends {goog.events.Event}+ * @implements {oli.source.TileEvent}+ * @param {string} type Type.+ * @param {ol.Tile} tile The tile.*/-goog.html.SafeScript.EMPTY =- goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse('');+ol.source.TileEvent = function(type, tile) {-// Copyright 2013 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");+ goog.base(this, type);++ /**+ * The tile related to the event.+ * @type {ol.Tile}+ * @api+ */+ this.tile = tile;++};+goog.inherits(ol.source.TileEvent, goog.events.Event);+++/**+ * @enum {string}+ */+ol.source.TileEventType = {++ /**+ * Triggered when a tile starts loading.+ * @event ol.source.TileEvent#tileloadstart+ * @api+ */+ TILELOADSTART: 'tileloadstart',++ /**+ * Triggered when a tile finishes loading.+ * @event ol.source.TileEvent#tileloadend+ * @api+ */+ TILELOADEND: 'tileloadend',++ /**+ * Triggered if tile loading results in an error.+ * @event ol.source.TileEvent#tileloaderror+ * @api+ */+ TILELOADERROR: 'tileloaderror'++};++// FIXME handle date line wrap++goog.provide('ol.control.Attribution');++goog.require('goog.asserts');+goog.require('goog.dom');+goog.require('goog.dom.TagName');+goog.require('goog.dom.classlist');+goog.require('goog.events');+goog.require('goog.events.EventType');+goog.require('goog.object');+goog.require('goog.style');+goog.require('ol.Attribution');+goog.require('ol.control.Control');+goog.require('ol.css');+goog.require('ol.source.Tile');++++/**+ * @classdesc+ * Control to show all the attributions associated with the layer sources+ * in the map. This control is one of the default controls included in maps.+ * By default it will show in the bottom right portion of the map, but this can+ * be changed by using a css selector for `.ol-attribution`.+ *+ * @constructor+ * @extends {ol.control.Control}+ * @param {olx.control.AttributionOptions=} opt_options Attribution options.+ * @api stable+ */+ol.control.Attribution = function(opt_options) {++ var options = goog.isDef(opt_options) ? opt_options : {};++ /**+ * @private+ * @type {Element}+ */+ this.ulElement_ = goog.dom.createElement(goog.dom.TagName.UL);++ /**+ * @private+ * @type {Element}+ */+ this.logoLi_ = goog.dom.createElement(goog.dom.TagName.LI);++ goog.dom.appendChild(this.ulElement_, this.logoLi_);+ goog.style.setElementShown(this.logoLi_, false);++ /**+ * @private+ * @type {boolean}+ */+ this.collapsed_ = goog.isDef(options.collapsed) ? options.collapsed : true;++ /**+ * @private+ * @type {boolean}+ */+ this.collapsible_ = goog.isDef(options.collapsible) ?+ options.collapsible : true;++ if (!this.collapsible_) {+ this.collapsed_ = false;+ }++ var className = goog.isDef(options.className) ?+ options.className : 'ol-attribution';++ var tipLabel = goog.isDef(options.tipLabel) ?+ options.tipLabel : 'Attributions';++ var collapseLabel = goog.isDef(options.collapseLabel) ?+ options.collapseLabel : '\u00BB';++ /**+ * @private+ * @type {Node}+ */+ this.collapseLabel_ = /** @type {Node} */ (goog.isString(collapseLabel) ?+ goog.dom.createDom(goog.dom.TagName.SPAN, {}, collapseLabel) :+ collapseLabel);++ var label = goog.isDef(options.label) ? options.label : 'i';++ /**+ * @private+ * @type {Node}+ */+ this.label_ = /** @type {Node} */ (goog.isString(label) ?+ goog.dom.createDom(goog.dom.TagName.SPAN, {}, label) :+ label);++ var activeLabel = (this.collapsible_ && !this.collapsed_) ?+ this.collapseLabel_ : this.label_;+ var button = goog.dom.createDom(goog.dom.TagName.BUTTON, {+ 'type': 'button',+ 'title': tipLabel+ }, activeLabel);++ goog.events.listen(button, goog.events.EventType.CLICK,+ this.handleClick_, false, this);++ goog.events.listen(button, [+ goog.events.EventType.MOUSEOUT,+ goog.events.EventType.FOCUSOUT+ ], function() {+ this.blur();+ }, false);++ var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' ++ ol.css.CLASS_CONTROL ++ (this.collapsed_ && this.collapsible_ ? ' ol-collapsed' : '') ++ (this.collapsible_ ? '' : ' ol-uncollapsible');+ var element = goog.dom.createDom(goog.dom.TagName.DIV,+ cssClasses, this.ulElement_, button);++ var render = goog.isDef(options.render) ?+ options.render : ol.control.Attribution.render;++ goog.base(this, {+ element: element,+ render: render,+ target: options.target+ });++ /**+ * @private+ * @type {boolean}+ */+ this.renderedVisible_ = true;++ /**+ * @private+ * @type {Object.<string, Element>}+ */+ this.attributionElements_ = {};++ /**+ * @private+ * @type {Object.<string, boolean>}+ */+ this.attributionElementRenderedVisible_ = {};++ /**+ * @private+ * @type {Object.<string, Element>}+ */+ this.logoElements_ = {};++};+goog.inherits(ol.control.Attribution, ol.control.Control);+++/**+ * @param {?olx.FrameState} frameState Frame state.+ * @return {Array.<Object.<string, ol.Attribution>>} Attributions.+ */+ol.control.Attribution.prototype.getSourceAttributions = function(frameState) {+ var i, ii, j, jj, tileRanges, source, sourceAttribution,+ sourceAttributionKey, sourceAttributions, sourceKey;+ var intersectsTileRange;+ var layerStatesArray = frameState.layerStatesArray;+ /** @type {Object.<string, ol.Attribution>} */+ var attributions = goog.object.clone(frameState.attributions);+ /** @type {Object.<string, ol.Attribution>} */+ var hiddenAttributions = {};+ var projection = frameState.viewState.projection;+ goog.asserts.assert(!goog.isNull(projection));+ for (i = 0, ii = layerStatesArray.length; i < ii; i++) {+ source = layerStatesArray[i].layer.getSource();+ if (goog.isNull(source)) {+ continue;+ }+ sourceKey = goog.getUid(source).toString();+ sourceAttributions = source.getAttributions();+ if (goog.isNull(sourceAttributions)) {+ continue;+ }+ for (j = 0, jj = sourceAttributions.length; j < jj; j++) {+ sourceAttribution = sourceAttributions[j];+ sourceAttributionKey = goog.getUid(sourceAttribution).toString();+ if (sourceAttributionKey in attributions) {+ continue;+ }+ tileRanges = frameState.usedTiles[sourceKey];+ if (goog.isDef(tileRanges)) {+ goog.asserts.assertInstanceof(source, ol.source.Tile);+ var tileGrid = source.getTileGridForProjection(projection);+ goog.asserts.assert(!goog.isNull(tileGrid));+ intersectsTileRange = sourceAttribution.intersectsAnyTileRange(+ tileRanges, tileGrid, projection);+ } else {+ intersectsTileRange = false;+ }+ if (intersectsTileRange) {+ if (sourceAttributionKey in hiddenAttributions) {+ delete hiddenAttributions[sourceAttributionKey];+ }+ attributions[sourceAttributionKey] = sourceAttribution;+ } else {+ hiddenAttributions[sourceAttributionKey] = sourceAttribution;+ }+ }+ }+ return [attributions, hiddenAttributions];+};+++/**+ * @param {ol.MapEvent} mapEvent Map event.+ * @this {ol.control.Attribution}+ * @api+ */+ol.control.Attribution.render = function(mapEvent) {+ this.updateElement_(mapEvent.frameState);+};+++/**+ * @private+ * @param {?olx.FrameState} frameState Frame state.+ */+ol.control.Attribution.prototype.updateElement_ = function(frameState) {++ if (goog.isNull(frameState)) {+ if (this.renderedVisible_) {+ goog.style.setElementShown(this.element, false);+ this.renderedVisible_ = false;+ }+ return;+ }++ var attributions = this.getSourceAttributions(frameState);+ /** @type {Object.<string, ol.Attribution>} */+ var visibleAttributions = attributions[0];+ /** @type {Object.<string, ol.Attribution>} */+ var hiddenAttributions = attributions[1];++ var attributionElement, attributionKey;+ for (attributionKey in this.attributionElements_) {+ if (attributionKey in visibleAttributions) {+ if (!this.attributionElementRenderedVisible_[attributionKey]) {+ goog.style.setElementShown(+ this.attributionElements_[attributionKey], true);+ this.attributionElementRenderedVisible_[attributionKey] = true;+ }+ delete visibleAttributions[attributionKey];+ }+ else if (attributionKey in hiddenAttributions) {+ if (this.attributionElementRenderedVisible_[attributionKey]) {+ goog.style.setElementShown(+ this.attributionElements_[attributionKey], false);+ delete this.attributionElementRenderedVisible_[attributionKey];+ }+ delete hiddenAttributions[attributionKey];+ }+ else {+ goog.dom.removeNode(this.attributionElements_[attributionKey]);+ delete this.attributionElements_[attributionKey];+ delete this.attributionElementRenderedVisible_[attributionKey];+ }+ }+ for (attributionKey in visibleAttributions) {+ attributionElement = goog.dom.createElement(goog.dom.TagName.LI);+ attributionElement.innerHTML =+ visibleAttributions[attributionKey].getHTML();+ goog.dom.appendChild(this.ulElement_, attributionElement);+ this.attributionElements_[attributionKey] = attributionElement;+ this.attributionElementRenderedVisible_[attributionKey] = true;+ }+ for (attributionKey in hiddenAttributions) {+ attributionElement = goog.dom.createElement(goog.dom.TagName.LI);+ attributionElement.innerHTML =+ hiddenAttributions[attributionKey].getHTML();+ goog.style.setElementShown(attributionElement, false);+ goog.dom.appendChild(this.ulElement_, attributionElement);+ this.attributionElements_[attributionKey] = attributionElement;+ }++ var renderVisible =+ !goog.object.isEmpty(this.attributionElementRenderedVisible_) ||+ !goog.object.isEmpty(frameState.logos);+ if (this.renderedVisible_ != renderVisible) {+ goog.style.setElementShown(this.element, renderVisible);+ this.renderedVisible_ = renderVisible;+ }+ if (renderVisible &&+ goog.object.isEmpty(this.attributionElementRenderedVisible_)) {+ goog.dom.classlist.add(this.element, 'ol-logo-only');+ } else {+ goog.dom.classlist.remove(this.element, 'ol-logo-only');+ }++ this.insertLogos_(frameState);++};+++/**+ * @param {?olx.FrameState} frameState Frame state.+ * @private+ */+ol.control.Attribution.prototype.insertLogos_ = function(frameState) {++ var logo;+ var logos = frameState.logos;+ var logoElements = this.logoElements_;++ for (logo in logoElements) {+ if (!(logo in logos)) {+ goog.dom.removeNode(logoElements[logo]);+ delete logoElements[logo];+ }+ }++ var image, logoElement, logoKey;+ for (logoKey in logos) {+ if (!(logoKey in logoElements)) {+ image = new Image();+ image.src = logoKey;+ var logoValue = logos[logoKey];+ if (logoValue === '') {+ logoElement = image;+ } else {+ logoElement = goog.dom.createDom(goog.dom.TagName.A, {+ 'href': logoValue+ });+ logoElement.appendChild(image);+ }+ goog.dom.appendChild(this.logoLi_, logoElement);+ logoElements[logoKey] = logoElement;+ }+ }++ goog.style.setElementShown(this.logoLi_, !goog.object.isEmpty(logos));++};+++/**+ * @param {goog.events.BrowserEvent} event The event to handle+ * @private+ */+ol.control.Attribution.prototype.handleClick_ = function(event) {+ event.preventDefault();+ this.handleToggle_();+};+++/**+ * @private+ */+ol.control.Attribution.prototype.handleToggle_ = function() {+ goog.dom.classlist.toggle(this.element, 'ol-collapsed');+ if (this.collapsed_) {+ goog.dom.replaceNode(this.collapseLabel_, this.label_);+ } else {+ goog.dom.replaceNode(this.label_, this.collapseLabel_);+ }+ this.collapsed_ = !this.collapsed_;+};+++/**+ * @return {boolean} True if the widget is collapsible.+ * @api stable+ */+ol.control.Attribution.prototype.getCollapsible = function() {+ return this.collapsible_;+};+++/**+ * @param {boolean} collapsible True if the widget is collapsible.+ * @api stable+ */+ol.control.Attribution.prototype.setCollapsible = function(collapsible) {+ if (this.collapsible_ === collapsible) {+ return;+ }+ this.collapsible_ = collapsible;+ goog.dom.classlist.toggle(this.element, 'ol-uncollapsible');+ if (!collapsible && this.collapsed_) {+ this.handleToggle_();+ }+};+++/**+ * @param {boolean} collapsed True if the widget is collapsed.+ * @api stable+ */+ol.control.Attribution.prototype.setCollapsed = function(collapsed) {+ if (!this.collapsible_ || this.collapsed_ === collapsed) {+ return;+ }+ this.handleToggle_();+};+++/**+ * @return {boolean} True if the widget is collapsed.+ * @api stable+ */+ol.control.Attribution.prototype.getCollapsed = function() {+ return this.collapsed_;+};++goog.provide('ol.control.Rotate');++goog.require('goog.dom');+goog.require('goog.dom.TagName');+goog.require('goog.dom.classlist');+goog.require('goog.events');+goog.require('goog.events.EventType');+goog.require('goog.math');+goog.require('ol.animation');+goog.require('ol.control.Control');+goog.require('ol.css');+goog.require('ol.easing');++++/**+ * @classdesc+ * A button control to reset rotation to 0.+ * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css+ * selector is added to the button when the rotation is 0.+ *+ * @constructor+ * @extends {ol.control.Control}+ * @param {olx.control.RotateOptions=} opt_options Rotate options.+ * @api stable+ */+ol.control.Rotate = function(opt_options) {++ var options = goog.isDef(opt_options) ? opt_options : {};++ var className = goog.isDef(options.className) ?+ options.className : 'ol-rotate';++ var label = goog.isDef(options.label) ?+ options.label : '\u21E7';++ /**+ * @type {Node}+ * @private+ */+ this.label_ = null;++ if (goog.isString(label)) {+ this.label_ = goog.dom.createDom(goog.dom.TagName.SPAN,+ 'ol-compass', label);+ } else {+ this.label_ = label;+ goog.dom.classlist.add(this.label_, 'ol-compass');+ }++ var tipLabel = goog.isDef(options.tipLabel) ?+ options.tipLabel : 'Reset rotation';++ var button = goog.dom.createDom(goog.dom.TagName.BUTTON, {+ 'class': className + '-reset',+ 'type' : 'button',+ 'title': tipLabel+ }, this.label_);++ goog.events.listen(button, goog.events.EventType.CLICK,+ ol.control.Rotate.prototype.handleClick_, false, this);++ goog.events.listen(button, [+ goog.events.EventType.MOUSEOUT,+ goog.events.EventType.FOCUSOUT+ ], function() {+ this.blur();+ }, false);++ var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' ++ ol.css.CLASS_CONTROL;+ var element = goog.dom.createDom(goog.dom.TagName.DIV, cssClasses, button);++ var render = goog.isDef(options.render) ?+ options.render : ol.control.Rotate.render;++ goog.base(this, {+ element: element,+ render: render,+ target: options.target+ });++ /**+ * @type {number}+ * @private+ */+ this.duration_ = goog.isDef(options.duration) ? options.duration : 250;++ /**+ * @type {boolean}+ * @private+ */+ this.autoHide_ = goog.isDef(options.autoHide) ? options.autoHide : true;++ /**+ * @private+ * @type {number|undefined}+ */+ this.rotation_ = undefined;++ if (this.autoHide_) {+ goog.dom.classlist.add(this.element, ol.css.CLASS_HIDDEN);+ }++};+goog.inherits(ol.control.Rotate, ol.control.Control);+++/**+ * @param {goog.events.BrowserEvent} event The event to handle+ * @private+ */+ol.control.Rotate.prototype.handleClick_ = function(event) {+ event.preventDefault();+ this.resetNorth_();+};+++/**+ * @private+ */+ol.control.Rotate.prototype.resetNorth_ = function() {+ var map = this.getMap();+ var view = map.getView();+ if (goog.isNull(view)) {+ // the map does not have a view, so we can't act+ // upon it+ return;+ }+ var currentRotation = view.getRotation();+ while (currentRotation < -Math.PI) {+ currentRotation += 2 * Math.PI;+ }+ while (currentRotation > Math.PI) {+ currentRotation -= 2 * Math.PI;+ }+ if (goog.isDef(currentRotation)) {+ if (this.duration_ > 0) {+ map.beforeRender(ol.animation.rotate({+ rotation: currentRotation,+ duration: this.duration_,+ easing: ol.easing.easeOut+ }));+ }+ view.setRotation(0);+ }+};+++/**+ * @param {ol.MapEvent} mapEvent Map event.+ * @this {ol.control.Rotate}+ * @api+ */+ol.control.Rotate.render = function(mapEvent) {+ var frameState = mapEvent.frameState;+ if (goog.isNull(frameState)) {+ return;+ }+ var rotation = frameState.viewState.rotation;+ if (rotation != this.rotation_) {+ var transform = 'rotate(' + goog.math.toDegrees(rotation) + 'deg)';+ if (this.autoHide_) {+ goog.dom.classlist.enable(+ this.element, ol.css.CLASS_HIDDEN, rotation === 0);+ }+ this.label_.style.msTransform = transform;+ this.label_.style.webkitTransform = transform;+ this.label_.style.transform = transform;+ }+ this.rotation_ = rotation;+};++goog.provide('ol.control.Zoom');++goog.require('goog.dom');+goog.require('goog.dom.TagName');+goog.require('goog.events');+goog.require('goog.events.EventType');+goog.require('ol.animation');+goog.require('ol.control.Control');+goog.require('ol.css');+goog.require('ol.easing');++++/**+ * @classdesc+ * A control with 2 buttons, one for zoom in and one for zoom out.+ * This control is one of the default controls of a map. To style this control+ * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.+ *+ * @constructor+ * @extends {ol.control.Control}+ * @param {olx.control.ZoomOptions=} opt_options Zoom options.+ * @api stable+ */+ol.control.Zoom = function(opt_options) {++ var options = goog.isDef(opt_options) ? opt_options : {};++ var className = goog.isDef(options.className) ? options.className : 'ol-zoom';++ var delta = goog.isDef(options.delta) ? options.delta : 1;++ var zoomInLabel = goog.isDef(options.zoomInLabel) ?+ options.zoomInLabel : '+';+ var zoomOutLabel = goog.isDef(options.zoomOutLabel) ?+ options.zoomOutLabel : '\u2212';++ var zoomInTipLabel = goog.isDef(options.zoomInTipLabel) ?+ options.zoomInTipLabel : 'Zoom in';+ var zoomOutTipLabel = goog.isDef(options.zoomOutTipLabel) ?+ options.zoomOutTipLabel : 'Zoom out';++ var inElement = goog.dom.createDom(goog.dom.TagName.BUTTON, {+ 'class': className + '-in',+ 'type' : 'button',+ 'title': zoomInTipLabel+ }, zoomInLabel);++ goog.events.listen(inElement,+ goog.events.EventType.CLICK, goog.partial(+ ol.control.Zoom.prototype.handleClick_, delta), false, this);++ goog.events.listen(inElement, [+ goog.events.EventType.MOUSEOUT,+ goog.events.EventType.FOCUSOUT+ ], function() {+ this.blur();+ }, false);++ var outElement = goog.dom.createDom(goog.dom.TagName.BUTTON, {+ 'class': className + '-out',+ 'type' : 'button',+ 'title': zoomOutTipLabel+ }, zoomOutLabel);++ goog.events.listen(outElement,+ goog.events.EventType.CLICK, goog.partial(+ ol.control.Zoom.prototype.handleClick_, -delta), false, this);++ goog.events.listen(outElement, [+ goog.events.EventType.MOUSEOUT,+ goog.events.EventType.FOCUSOUT+ ], function() {+ this.blur();+ }, false);++ var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' ++ ol.css.CLASS_CONTROL;+ var element = goog.dom.createDom(goog.dom.TagName.DIV, cssClasses, inElement,+ outElement);++ goog.base(this, {+ element: element,+ target: options.target+ });++ /**+ * @type {number}+ * @private+ */+ this.duration_ = goog.isDef(options.duration) ? options.duration : 250;++};+goog.inherits(ol.control.Zoom, ol.control.Control);+++/**+ * @param {number} delta Zoom delta.+ * @param {goog.events.BrowserEvent} event The event to handle+ * @private+ */+ol.control.Zoom.prototype.handleClick_ = function(delta, event) {+ event.preventDefault();+ this.zoomByDelta_(delta);+};+++/**+ * @param {number} delta Zoom delta.+ * @private+ */+ol.control.Zoom.prototype.zoomByDelta_ = function(delta) {+ var map = this.getMap();+ var view = map.getView();+ if (goog.isNull(view)) {+ // the map does not have a view, so we can't act+ // upon it+ return;+ }+ var currentResolution = view.getResolution();+ if (goog.isDef(currentResolution)) {+ if (this.duration_ > 0) {+ map.beforeRender(ol.animation.zoom({+ resolution: currentResolution,+ duration: this.duration_,+ easing: ol.easing.easeOut+ }));+ }+ var newResolution = view.constrainResolution(currentResolution, delta);+ view.setResolution(newResolution);+ }+};++goog.provide('ol.control');++goog.require('ol.Collection');+goog.require('ol.control.Attribution');+goog.require('ol.control.Rotate');+goog.require('ol.control.Zoom');+++/**+ * Set of controls included in maps by default. Unless configured otherwise,+ * this returns a collection containing an instance of each of the following+ * controls:+ * * {@link ol.control.Zoom}+ * * {@link ol.control.Rotate}+ * * {@link ol.control.Attribution}+ *+ * @param {olx.control.DefaultsOptions=} opt_options Defaults options.+ * @return {ol.Collection.<ol.control.Control>} Controls.+ * @api stable+ */+ol.control.defaults = function(opt_options) {++ var options = goog.isDef(opt_options) ? opt_options : {};++ var controls = new ol.Collection();++ var zoomControl = goog.isDef(options.zoom) ?+ options.zoom : true;+ if (zoomControl) {+ controls.push(new ol.control.Zoom(options.zoomOptions));+ }++ var rotateControl = goog.isDef(options.rotate) ?+ options.rotate : true;+ if (rotateControl) {+ controls.push(new ol.control.Rotate(options.rotateOptions));+ }++ var attributionControl = goog.isDef(options.attribution) ?+ options.attribution : true;+ if (attributionControl) {+ controls.push(new ol.control.Attribution(options.attributionOptions));+ }++ return controls;++};++// Copyright 2012 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.// You may obtain a copy of the License at//@@ -35879,636 +36157,571 @@ goog.html.SafeScript.EMPTY =// limitations under the License./**- * @fileoverview Unchecked conversions to create values of goog.html types from- * plain strings. Use of these functions could potentially result in instances- * of goog.html types that violate their type contracts, and hence result in- * security vulnerabilties.- *- * Therefore, all uses of the methods herein must be carefully security- * reviewed. Avoid use of the methods in this file whenever possible; instead- * prefer to create instances of goog.html types using inherently safe builders- * or template systems.- *+ * @fileoverview Functions for managing full screen status of the DOM.*- * @visibility {//closure/goog/html:approved_for_unchecked_conversion}- * @visibility {//closure/goog/bin/sizetests:__pkg__}*/+goog.provide('goog.dom.fullscreen');+goog.provide('goog.dom.fullscreen.EventType');-goog.provide('goog.html.uncheckedconversions');+goog.require('goog.dom');+goog.require('goog.userAgent');-goog.require('goog.asserts');-goog.require('goog.html.SafeHtml');-goog.require('goog.html.SafeScript');-goog.require('goog.html.SafeStyle');-goog.require('goog.html.SafeStyleSheet');-goog.require('goog.html.SafeUrl');-goog.require('goog.html.TrustedResourceUrl');-goog.require('goog.string');-goog.require('goog.string.Const');++/**+ * Event types for full screen.+ * @enum {string}+ */+goog.dom.fullscreen.EventType = {+ /** Dispatched by the Document when the fullscreen status changes. */+ CHANGE: (function() {+ if (goog.userAgent.WEBKIT) {+ return 'webkitfullscreenchange';+ }+ if (goog.userAgent.GECKO) {+ return 'mozfullscreenchange';+ }+ if (goog.userAgent.IE) {+ return 'MSFullscreenChange';+ }+ // Opera 12-14, and W3C standard (Draft):+ // https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html+ return 'fullscreenchange';+ })()+};/**- * Performs an "unchecked conversion" to SafeHtml from a plain string that is- * known to satisfy the SafeHtml type contract.- *- * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure- * that the value of {@code html} satisfies the SafeHtml type contract in all- * possible program states.- *- *- * @param {!goog.string.Const} justification A constant string explaining why- * this use of this method is safe. May include a security review ticket- * number.- * @param {string} html A string that is claimed to adhere to the SafeHtml- * contract.- * @param {?goog.i18n.bidi.Dir=} opt_dir The optional directionality of the- * SafeHtml to be constructed. A null or undefined value signifies an- * unknown directionality.- * @return {!goog.html.SafeHtml} The value of html, wrapped in a SafeHtml- * object.- * @suppress {visibility} For access to SafeHtml.create... Note that this- * use is appropriate since this method is intended to be "package private"- * withing goog.html. DO NOT call SafeHtml.create... from outside this- * package; use appropriate wrappers instead.+ * Determines if full screen is supported.+ * @param {!goog.dom.DomHelper=} opt_domHelper The DomHelper for the DOM being+ * queried. If not provided, use the current DOM.+ * @return {boolean} True iff full screen is supported.*/-goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract =- function(justification, html, opt_dir) {- // unwrap() called inside an assert so that justification can be optimized- // away in production code.- goog.asserts.assertString(goog.string.Const.unwrap(justification),- 'must provide justification');- goog.asserts.assert(- !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),- 'must provide non-empty justification');- return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(- html, opt_dir || null);+goog.dom.fullscreen.isSupported = function(opt_domHelper) {+ var doc = goog.dom.fullscreen.getDocument_(opt_domHelper);+ var body = doc.body;+ return !!(body.webkitRequestFullscreen ||+ (body.mozRequestFullScreen && doc.mozFullScreenEnabled) ||+ (body.msRequestFullscreen && doc.msFullscreenEnabled) ||+ (body.requestFullscreen && doc.fullscreenEnabled));};/**- * Performs an "unchecked conversion" to SafeScript from a plain string that is- * known to satisfy the SafeScript type contract.- *- * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure- * that the value of {@code script} satisfies the SafeScript type contract in- * all possible program states.- *- *- * @param {!goog.string.Const} justification A constant string explaining why- * this use of this method is safe. May include a security review ticket- * number.- * @param {string} script The string to wrap as a SafeScript.- * @return {!goog.html.SafeScript} The value of {@code script}, wrapped in a- * SafeScript object.+ * Requests putting the element in full screen.+ * @param {!Element} element The element to put full screen.*/-goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract =- function(justification, script) {- // unwrap() called inside an assert so that justification can be optimized- // away in production code.- goog.asserts.assertString(goog.string.Const.unwrap(justification),- 'must provide justification');- goog.asserts.assert(- !goog.string.isEmpty(goog.string.Const.unwrap(justification)),- 'must provide non-empty justification');- return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(- script);+goog.dom.fullscreen.requestFullScreen = function(element) {+ if (element.webkitRequestFullscreen) {+ element.webkitRequestFullscreen();+ } else if (element.mozRequestFullScreen) {+ element.mozRequestFullScreen();+ } else if (element.msRequestFullscreen) {+ element.msRequestFullscreen();+ } else if (element.requestFullscreen) {+ element.requestFullscreen();+ }};/**- * Performs an "unchecked conversion" to SafeStyle from a plain string that is- * known to satisfy the SafeStyle type contract.- *- * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure- * that the value of {@code style} satisfies the SafeUrl type contract in all- * possible program states.- *- *- * @param {!goog.string.Const} justification A constant string explaining why- * this use of this method is safe. May include a security review ticket- * number.- * @param {string} style The string to wrap as a SafeStyle.- * @return {!goog.html.SafeStyle} The value of {@code style}, wrapped in a- * SafeStyle object.+ * Requests putting the element in full screen with full keyboard access.+ * @param {!Element} element The element to put full screen.*/-goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract =- function(justification, style) {- // unwrap() called inside an assert so that justification can be optimized- // away in production code.- goog.asserts.assertString(goog.string.Const.unwrap(justification),- 'must provide justification');- goog.asserts.assert(- !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),- 'must provide non-empty justification');- return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(- style);+goog.dom.fullscreen.requestFullScreenWithKeys = function(+ element) {+ if (element.mozRequestFullScreenWithKeys) {+ element.mozRequestFullScreenWithKeys();+ } else if (element.webkitRequestFullscreen) {+ element.webkitRequestFullscreen();+ } else {+ goog.dom.fullscreen.requestFullScreen(element);+ }};/**- * Performs an "unchecked conversion" to SafeStyleSheet from a plain string- * that is known to satisfy the SafeStyleSheet type contract.- *- * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure- * that the value of {@code styleSheet} satisfies the SafeUrl type contract in- * all possible program states.- *- *- * @param {!goog.string.Const} justification A constant string explaining why- * this use of this method is safe. May include a security review ticket- * number.- * @param {string} styleSheet The string to wrap as a SafeStyleSheet.- * @return {!goog.html.SafeStyleSheet} The value of {@code styleSheet}, wrapped- * in a SafeStyleSheet object.+ * Exits full screen.+ * @param {!goog.dom.DomHelper=} opt_domHelper The DomHelper for the DOM being+ * queried. If not provided, use the current DOM.*/-goog.html.uncheckedconversions.- safeStyleSheetFromStringKnownToSatisfyTypeContract =- function(justification, styleSheet) {- // unwrap() called inside an assert so that justification can be optimized- // away in production code.- goog.asserts.assertString(goog.string.Const.unwrap(justification),- 'must provide justification');- goog.asserts.assert(- !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),- 'must provide non-empty justification');- return goog.html.SafeStyleSheet.- createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);+goog.dom.fullscreen.exitFullScreen = function(opt_domHelper) {+ var doc = goog.dom.fullscreen.getDocument_(opt_domHelper);+ if (doc.webkitCancelFullScreen) {+ doc.webkitCancelFullScreen();+ } else if (doc.mozCancelFullScreen) {+ doc.mozCancelFullScreen();+ } else if (doc.msExitFullscreen) {+ doc.msExitFullscreen();+ } else if (doc.exitFullscreen) {+ doc.exitFullscreen();+ }};/**- * Performs an "unchecked conversion" to SafeUrl from a plain string that is- * known to satisfy the SafeUrl type contract.- *- * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure- * that the value of {@code url} satisfies the SafeUrl type contract in all- * possible program states.- *- *- * @param {!goog.string.Const} justification A constant string explaining why- * this use of this method is safe. May include a security review ticket- * number.- * @param {string} url The string to wrap as a SafeUrl.- * @return {!goog.html.SafeUrl} The value of {@code url}, wrapped in a SafeUrl- * object.+ * Determines if the document is full screen.+ * @param {!goog.dom.DomHelper=} opt_domHelper The DomHelper for the DOM being+ * queried. If not provided, use the current DOM.+ * @return {boolean} Whether the document is full screen.*/-goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract =- function(justification, url) {- // unwrap() called inside an assert so that justification can be optimized- // away in production code.- goog.asserts.assertString(goog.string.Const.unwrap(justification),- 'must provide justification');- goog.asserts.assert(- !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),- 'must provide non-empty justification');- return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);+goog.dom.fullscreen.isFullScreen = function(opt_domHelper) {+ var doc = goog.dom.fullscreen.getDocument_(opt_domHelper);+ // IE 11 doesn't have similar boolean property, so check whether+ // document.msFullscreenElement is null instead.+ return !!(doc.webkitIsFullScreen || doc.mozFullScreen ||+ doc.msFullscreenElement || doc.fullscreenElement);};/**- * Performs an "unchecked conversion" to TrustedResourceUrl from a plain string- * that is known to satisfy the TrustedResourceUrl type contract.- *- * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure- * that the value of {@code url} satisfies the TrustedResourceUrl type contract- * in all possible program states.- *- *- * @param {!goog.string.Const} justification A constant string explaining why- * this use of this method is safe. May include a security review ticket- * number.- * @param {string} url The string to wrap as a TrustedResourceUrl.- * @return {!goog.html.TrustedResourceUrl} The value of {@code url}, wrapped in- * a TrustedResourceUrl object.+ * Gets the document object of the dom.+ * @param {!goog.dom.DomHelper=} opt_domHelper The DomHelper for the DOM being+ * queried. If not provided, use the current DOM.+ * @return {!Document} The dom document.+ * @private*/-goog.html.uncheckedconversions.- trustedResourceUrlFromStringKnownToSatisfyTypeContract =- function(justification, url) {- // unwrap() called inside an assert so that justification can be optimized- // away in production code.- goog.asserts.assertString(goog.string.Const.unwrap(justification),- 'must provide justification');- goog.asserts.assert(- !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),- 'must provide non-empty justification');- return goog.html.TrustedResourceUrl.- createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);+goog.dom.fullscreen.getDocument_ = function(opt_domHelper) {+ return opt_domHelper ?+ opt_domHelper.getDocument() :+ goog.dom.getDomHelper().getDocument();};-// Copyright 2006 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License.+goog.provide('ol.control.FullScreen');++goog.require('goog.asserts');+goog.require('goog.dom');+goog.require('goog.dom.TagName');+goog.require('goog.dom.classlist');+goog.require('goog.dom.fullscreen');+goog.require('goog.dom.fullscreen.EventType');+goog.require('goog.events');+goog.require('goog.events.EventType');+goog.require('ol.control.Control');+goog.require('ol.css');++/**- * @fileoverview Generics method for collection-like classes and objects.+ * @classdesc+ * Provides a button that when clicked fills up the full screen with the map.+ * When in full screen mode, a close button is shown to exit full screen mode.+ * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to+ * toggle the map in full screen mode.*- * @author [email protected] (Erik Arvidsson)*- * This file contains functions to work with collections. It supports using- * Map, Set, Array and Object and other classes that implement collection-like- * methods.+ * @constructor+ * @extends {ol.control.Control}+ * @param {olx.control.FullScreenOptions=} opt_options Options.+ * @api stable*/+ol.control.FullScreen = function(opt_options) {++ var options = goog.isDef(opt_options) ? opt_options : {};+ /**+ * @private+ * @type {string}+ */+ this.cssClassName_ = goog.isDef(options.className) ?+ options.className : 'ol-full-screen';-goog.provide('goog.structs');+ var label = goog.isDef(options.label) ? options.label : '\u2194';++ /**+ * @private+ * @type {Node}+ */+ this.labelNode_ = /** @type {Node} */ (goog.isString(label) ?+ goog.dom.createTextNode(label) : label);++ var labelActive = goog.isDef(options.labelActive) ?+ options.labelActive : '\u00d7';++ /**+ * @private+ * @type {Node}+ */+ this.labelActiveNode_ = /** @type {Node} */ (goog.isString(labelActive) ?+ goog.dom.createTextNode(labelActive) : labelActive);++ var tipLabel = goog.isDef(options.tipLabel) ?+ options.tipLabel : 'Toggle full-screen';+ var button = goog.dom.createDom(goog.dom.TagName.BUTTON, {+ 'class': this.cssClassName_ + '-' + goog.dom.fullscreen.isFullScreen(),+ 'type': 'button',+ 'title': tipLabel+ }, this.labelNode_);++ goog.events.listen(button, goog.events.EventType.CLICK,+ this.handleClick_, false, this);++ goog.events.listen(button, [+ goog.events.EventType.MOUSEOUT,+ goog.events.EventType.FOCUSOUT+ ], function() {+ this.blur();+ }, false);-goog.require('goog.array');-goog.require('goog.object');+ goog.events.listen(goog.global.document,+ goog.dom.fullscreen.EventType.CHANGE,+ this.handleFullScreenChange_, false, this);+ var cssClasses = this.cssClassName_ + ' ' + ol.css.CLASS_UNSELECTABLE ++ ' ' + ol.css.CLASS_CONTROL + ' ' ++ (!goog.dom.fullscreen.isSupported() ? ol.css.CLASS_UNSUPPORTED : '');+ var element = goog.dom.createDom(goog.dom.TagName.DIV, cssClasses, button);-// We treat an object as a dictionary if it has getKeys or it is an object that-// isn't arrayLike.+ goog.base(this, {+ element: element,+ target: options.target+ });+ /**+ * @private+ * @type {boolean}+ */+ this.keys_ = goog.isDef(options.keys) ? options.keys : false;-/**- * Returns the number of values in the collection-like object.- * @param {Object} col The collection-like object.- * @return {number} The number of values in the collection-like object.- */-goog.structs.getCount = function(col) {- if (typeof col.getCount == 'function') {- return col.getCount();- }- if (goog.isArrayLike(col) || goog.isString(col)) {- return col.length;- }- return goog.object.getCount(col);};+goog.inherits(ol.control.FullScreen, ol.control.Control);/**- * Returns the values of the collection-like object.- * @param {Object} col The collection-like object.- * @return {!Array<?>} The values in the collection-like object.+ * @param {goog.events.BrowserEvent} event The event to handle+ * @private*/-goog.structs.getValues = function(col) {- if (typeof col.getValues == 'function') {- return col.getValues();- }- if (goog.isString(col)) {- return col.split('');- }- if (goog.isArrayLike(col)) {- var rv = [];- var l = col.length;- for (var i = 0; i < l; i++) {- rv.push(col[i]);- }- return rv;- }- return goog.object.getValues(col);+ol.control.FullScreen.prototype.handleClick_ = function(event) {+ event.preventDefault();+ this.handleFullScreen_();};/**- * Returns the keys of the collection. Some collections have no notion of- * keys/indexes and this function will return undefined in those cases.- * @param {Object} col The collection-like object.- * @return {!Array|undefined} The keys in the collection.+ * @private*/-goog.structs.getKeys = function(col) {- if (typeof col.getKeys == 'function') {- return col.getKeys();+ol.control.FullScreen.prototype.handleFullScreen_ = function() {+ if (!goog.dom.fullscreen.isSupported()) {+ return;}- // if we have getValues but no getKeys we know this is a key-less collection- if (typeof col.getValues == 'function') {- return undefined;+ var map = this.getMap();+ if (goog.isNull(map)) {+ return;}- if (goog.isArrayLike(col) || goog.isString(col)) {- var rv = [];- var l = col.length;- for (var i = 0; i < l; i++) {- rv.push(i);+ if (goog.dom.fullscreen.isFullScreen()) {+ goog.dom.fullscreen.exitFullScreen();+ } else {+ var target = map.getTarget();+ goog.asserts.assert(goog.isDefAndNotNull(target));+ var element = goog.dom.getElement(target);+ goog.asserts.assert(goog.isDefAndNotNull(element));+ if (this.keys_) {+ goog.dom.fullscreen.requestFullScreenWithKeys(element);+ } else {+ goog.dom.fullscreen.requestFullScreen(element);}- return rv;}-- return goog.object.getKeys(col);};/**- * Whether the collection contains the given value. This is O(n) and uses- * equals (==) to test the existence.- * @param {Object} col The collection-like object.- * @param {*} val The value to check for.- * @return {boolean} True if the map contains the value.+ * @private*/-goog.structs.contains = function(col, val) {- if (typeof col.contains == 'function') {- return col.contains(val);- }- if (typeof col.containsValue == 'function') {- return col.containsValue(val);+ol.control.FullScreen.prototype.handleFullScreenChange_ = function() {+ var opened = this.cssClassName_ + '-true';+ var closed = this.cssClassName_ + '-false';+ var button = goog.dom.getFirstElementChild(this.element);+ var map = this.getMap();+ if (goog.dom.fullscreen.isFullScreen()) {+ goog.dom.classlist.swap(button, closed, opened);+ goog.dom.replaceNode(this.labelActiveNode_, this.labelNode_);+ } else {+ goog.dom.classlist.swap(button, opened, closed);+ goog.dom.replaceNode(this.labelNode_, this.labelActiveNode_);}- if (goog.isArrayLike(col) || goog.isString(col)) {- return goog.array.contains(/** @type {!Array<?>} */ (col), val);+ if (!goog.isNull(map)) {+ map.updateSize();}- return goog.object.containsValue(col, val);};+goog.provide('ol.Pixel');+/**- * Whether the collection is empty.- * @param {Object} col The collection-like object.- * @return {boolean} True if empty.+ * An array with two elements, representing a pixel. The first element is the+ * x-coordinate, the second the y-coordinate of the pixel.+ * @typedef {Array.<number>}+ * @api stable*/-goog.structs.isEmpty = function(col) {- if (typeof col.isEmpty == 'function') {- return col.isEmpty();- }+ol.Pixel;- // We do not use goog.string.isEmptyOrWhitespace because here we treat the string as- // collection and as such even whitespace matters+// FIXME should listen on appropriate pane, once it is defined- if (goog.isArrayLike(col) || goog.isString(col)) {- return goog.array.isEmpty(/** @type {!Array<?>} */ (col));- }- return goog.object.isEmpty(col);-};+goog.provide('ol.control.MousePosition');++goog.require('goog.dom');+goog.require('goog.dom.TagName');+goog.require('goog.events');+goog.require('goog.events.EventType');+goog.require('ol.CoordinateFormatType');+goog.require('ol.Object');+goog.require('ol.Pixel');+goog.require('ol.TransformFunction');+goog.require('ol.control.Control');+goog.require('ol.proj');+goog.require('ol.proj.Projection');/**- * Removes all the elements from the collection.- * @param {Object} col The collection-like object.+ * @enum {string}*/-goog.structs.clear = function(col) {- // NOTE(arv): This should not contain strings because strings are immutable- if (typeof col.clear == 'function') {- col.clear();- } else if (goog.isArrayLike(col)) {- goog.array.clear(/** @type {goog.array.ArrayLike} */ (col));- } else {- goog.object.clear(col);- }+ol.control.MousePositionProperty = {+ PROJECTION: 'projection',+ COORDINATE_FORMAT: 'coordinateFormat'};+/**- * Calls a function for each value in a collection. The function takes- * three arguments; the value, the key and the collection.- *- * NOTE: This will be deprecated soon! Please use a more specific method if- * possible, e.g. goog.array.forEach, goog.object.forEach, etc.+ * @classdesc+ * A control to show the 2D coordinates of the mouse cursor. By default, these+ * are in the view projection, but can be in any supported projection.+ * By default the control is shown in the top right corner of the map, but this+ * can be changed by using the css selector `.ol-mouse-position`.*- * @param {S} col The collection-like object.- * @param {function(this:T,?,?,S):?} f The function to call for every value.- * This function takes- * 3 arguments (the value, the key or undefined if the collection has no- * notion of keys, and the collection) and the return value is irrelevant.- * @param {T=} opt_obj The object to be used as the value of 'this'- * within {@code f}.- * @template T,S+ * @constructor+ * @extends {ol.control.Control}+ * @param {olx.control.MousePositionOptions=} opt_options Mouse position+ * options.+ * @api stable*/-goog.structs.forEach = function(col, f, opt_obj) {- if (typeof col.forEach == 'function') {- col.forEach(f, opt_obj);- } else if (goog.isArrayLike(col) || goog.isString(col)) {- goog.array.forEach(/** @type {!Array<?>} */ (col), f, opt_obj);- } else {- var keys = goog.structs.getKeys(col);- var values = goog.structs.getValues(col);- var l = values.length;- for (var i = 0; i < l; i++) {- f.call(opt_obj, values[i], keys && keys[i], col);- }- }-};+ol.control.MousePosition = function(opt_options) {+ var options = goog.isDef(opt_options) ? opt_options : {};-/**- * Calls a function for every value in the collection. When a call returns true,- * adds the value to a new collection (Array is returned by default).- *- * @param {S} col The collection-like object.- * @param {function(this:T,?,?,S):boolean} f The function to call for every- * value. This function takes- * 3 arguments (the value, the key or undefined if the collection has no- * notion of keys, and the collection) and should return a Boolean. If the- * return value is true the value is added to the result collection. If it- * is false the value is not included.- * @param {T=} opt_obj The object to be used as the value of 'this'- * within {@code f}.- * @return {!Object|!Array<?>} A new collection where the passed values are- * present. If col is a key-less collection an array is returned. If col- * has keys and values a plain old JS object is returned.- * @template T,S- */-goog.structs.filter = function(col, f, opt_obj) {- if (typeof col.filter == 'function') {- return col.filter(f, opt_obj);+ var className = goog.isDef(options.className) ?+ options.className : 'ol-mouse-position';++ var element = goog.dom.createDom(goog.dom.TagName.DIV, className);++ var render = goog.isDef(options.render) ?+ options.render : ol.control.MousePosition.render;++ goog.base(this, {+ element: element,+ render: render,+ target: options.target+ });++ goog.events.listen(this,+ ol.Object.getChangeEventType(ol.control.MousePositionProperty.PROJECTION),+ this.handleProjectionChanged_, false, this);++ if (goog.isDef(options.coordinateFormat)) {+ this.setCoordinateFormat(options.coordinateFormat);}- if (goog.isArrayLike(col) || goog.isString(col)) {- return goog.array.filter(/** @type {!Array<?>} */ (col), f, opt_obj);+ if (goog.isDef(options.projection)) {+ this.setProjection(ol.proj.get(options.projection));}- var rv;- var keys = goog.structs.getKeys(col);- var values = goog.structs.getValues(col);- var l = values.length;- if (keys) {- rv = {};- for (var i = 0; i < l; i++) {- if (f.call(opt_obj, values[i], keys[i], col)) {- rv[keys[i]] = values[i];- }- }- } else {- // We should not use goog.array.filter here since we want to make sure that- // the index is undefined as well as make sure that col is passed to the- // function.- rv = [];- for (var i = 0; i < l; i++) {- if (f.call(opt_obj, values[i], undefined, col)) {- rv.push(values[i]);- }- }- }- return rv;+ /**+ * @private+ * @type {string}+ */+ this.undefinedHTML_ = goog.isDef(options.undefinedHTML) ?+ options.undefinedHTML : '';++ /**+ * @private+ * @type {string}+ */+ this.renderedHTML_ = element.innerHTML;++ /**+ * @private+ * @type {ol.proj.Projection}+ */+ this.mapProjection_ = null;++ /**+ * @private+ * @type {?ol.TransformFunction}+ */+ this.transform_ = null;++ /**+ * @private+ * @type {ol.Pixel}+ */+ this.lastMouseMovePixel_ = null;+};+goog.inherits(ol.control.MousePosition, ol.control.Control);/**- * Calls a function for every value in the collection and adds the result into a- * new collection (defaults to creating a new Array).- *- * @param {S} col The collection-like object.- * @param {function(this:T,?,?,S):V} f The function to call for every value.- * This function takes 3 arguments (the value, the key or undefined if the- * collection has no notion of keys, and the collection) and should return- * something. The result will be used as the value in the new collection.- * @param {T=} opt_obj The object to be used as the value of 'this'- * within {@code f}.- * @return {!Object<V>|!Array<V>} A new collection with the new values. If- * col is a key-less collection an array is returned. If col has keys and- * values a plain old JS object is returned.- * @template T,S,V+ * @param {ol.MapEvent} mapEvent Map event.+ * @this {ol.control.MousePosition}+ * @api*/-goog.structs.map = function(col, f, opt_obj) {- if (typeof col.map == 'function') {- return col.map(f, opt_obj);- }- if (goog.isArrayLike(col) || goog.isString(col)) {- return goog.array.map(/** @type {!Array<?>} */ (col), f, opt_obj);- }-- var rv;- var keys = goog.structs.getKeys(col);- var values = goog.structs.getValues(col);- var l = values.length;- if (keys) {- rv = {};- for (var i = 0; i < l; i++) {- rv[keys[i]] = f.call(opt_obj, values[i], keys[i], col);- }+ol.control.MousePosition.render = function(mapEvent) {+ var frameState = mapEvent.frameState;+ if (goog.isNull(frameState)) {+ this.mapProjection_ = null;} else {- // We should not use goog.array.map here since we want to make sure that- // the index is undefined as well as make sure that col is passed to the- // function.- rv = [];- for (var i = 0; i < l; i++) {- rv[i] = f.call(opt_obj, values[i], undefined, col);+ if (this.mapProjection_ != frameState.viewState.projection) {+ this.mapProjection_ = frameState.viewState.projection;+ this.transform_ = null;}}- return rv;+ this.updateHTML_(this.lastMouseMovePixel_);};/**- * Calls f for each value in a collection. If any call returns true this returns- * true (without checking the rest). If all returns false this returns false.- *- * @param {S} col The collection-like object.- * @param {function(this:T,?,?,S):boolean} f The function to call for every- * value. This function takes 3 arguments (the value, the key or undefined- * if the collection has no notion of keys, and the collection) and should- * return a boolean.- * @param {T=} opt_obj The object to be used as the value of 'this'- * within {@code f}.- * @return {boolean} True if any value passes the test.- * @template T,S+ * @private*/-goog.structs.some = function(col, f, opt_obj) {- if (typeof col.some == 'function') {- return col.some(f, opt_obj);- }- if (goog.isArrayLike(col) || goog.isString(col)) {- return goog.array.some(/** @type {!Array<?>} */ (col), f, opt_obj);- }- var keys = goog.structs.getKeys(col);- var values = goog.structs.getValues(col);- var l = values.length;- for (var i = 0; i < l; i++) {- if (f.call(opt_obj, values[i], keys && keys[i], col)) {- return true;- }- }- return false;+ol.control.MousePosition.prototype.handleProjectionChanged_ = function() {+ this.transform_ = null;};/**- * Calls f for each value in a collection. If all calls return true this return- * true this returns true. If any returns false this returns false at this point- * and does not continue to check the remaining values.- *- * @param {S} col The collection-like object.- * @param {function(this:T,?,?,S):boolean} f The function to call for every- * value. This function takes 3 arguments (the value, the key or- * undefined if the collection has no notion of keys, and the collection)- * and should return a boolean.- * @param {T=} opt_obj The object to be used as the value of 'this'- * within {@code f}.- * @return {boolean} True if all key-value pairs pass the test.- * @template T,S+ * @return {ol.CoordinateFormatType|undefined} The format to render the current+ * position in.+ * @observable+ * @api stable*/-goog.structs.every = function(col, f, opt_obj) {- if (typeof col.every == 'function') {- return col.every(f, opt_obj);- }- if (goog.isArrayLike(col) || goog.isString(col)) {- return goog.array.every(/** @type {!Array<?>} */ (col), f, opt_obj);- }- var keys = goog.structs.getKeys(col);- var values = goog.structs.getValues(col);- var l = values.length;- for (var i = 0; i < l; i++) {- if (!f.call(opt_obj, values[i], keys && keys[i], col)) {- return false;- }- }- return true;+ol.control.MousePosition.prototype.getCoordinateFormat = function() {+ return /** @type {ol.CoordinateFormatType|undefined} */ (+ this.get(ol.control.MousePositionProperty.COORDINATE_FORMAT));};+goog.exportProperty(+ ol.control.MousePosition.prototype,+ 'getCoordinateFormat',+ ol.control.MousePosition.prototype.getCoordinateFormat);-// Copyright 2011 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License./**- * @fileoverview Defines the collection interface.- *- * @author [email protected] (Nathan Naze)+ * @return {ol.proj.Projection|undefined} The projection to report mouse+ * position in.+ * @observable+ * @api stable*/+ol.control.MousePosition.prototype.getProjection = function() {+ return /** @type {ol.proj.Projection|undefined} */ (+ this.get(ol.control.MousePositionProperty.PROJECTION));+};+goog.exportProperty(+ ol.control.MousePosition.prototype,+ 'getProjection',+ ol.control.MousePosition.prototype.getProjection);-goog.provide('goog.structs.Collection');+/**+ * @param {goog.events.BrowserEvent} browserEvent Browser event.+ * @protected+ */+ol.control.MousePosition.prototype.handleMouseMove = function(browserEvent) {+ var map = this.getMap();+ this.lastMouseMovePixel_ = map.getEventPixel(browserEvent.getBrowserEvent());+ this.updateHTML_(this.lastMouseMovePixel_);+};/**- * An interface for a collection of values.- * @interface- * @template T+ * @param {goog.events.BrowserEvent} browserEvent Browser event.+ * @protected*/-goog.structs.Collection = function() {};+ol.control.MousePosition.prototype.handleMouseOut = function(browserEvent) {+ this.updateHTML_(null);+ this.lastMouseMovePixel_ = null;+};/**- * @param {T} value Value to add to the collection.+ * @inheritDoc+ * @api stable*/-goog.structs.Collection.prototype.add;+ol.control.MousePosition.prototype.setMap = function(map) {+ goog.base(this, 'setMap', map);+ if (!goog.isNull(map)) {+ var viewport = map.getViewport();+ this.listenerKeys.push(+ goog.events.listen(viewport, goog.events.EventType.MOUSEMOVE,+ this.handleMouseMove, false, this),+ goog.events.listen(viewport, goog.events.EventType.MOUSEOUT,+ this.handleMouseOut, false, this)+ );+ }+};/**- * @param {T} value Value to remove from the collection.+ * @param {ol.CoordinateFormatType} format The format to render the current+ * position in.+ * @observable+ * @api stable*/-goog.structs.Collection.prototype.remove;+ol.control.MousePosition.prototype.setCoordinateFormat = function(format) {+ this.set(ol.control.MousePositionProperty.COORDINATE_FORMAT, format);+};+goog.exportProperty(+ ol.control.MousePosition.prototype,+ 'setCoordinateFormat',+ ol.control.MousePosition.prototype.setCoordinateFormat);/**- * @param {T} value Value to find in the collection.- * @return {boolean} Whether the collection contains the specified value.+ * @param {ol.proj.Projection} projection The projection to report mouse+ * position in.+ * @observable+ * @api stable*/-goog.structs.Collection.prototype.contains;+ol.control.MousePosition.prototype.setProjection = function(projection) {+ this.set(ol.control.MousePositionProperty.PROJECTION, projection);+};+goog.exportProperty(+ ol.control.MousePosition.prototype,+ 'setProjection',+ ol.control.MousePosition.prototype.setProjection);/**- * @return {number} The number of values stored in the collection.+ * @param {?ol.Pixel} pixel Pixel.+ * @private*/-goog.structs.Collection.prototype.getCount;-+ol.control.MousePosition.prototype.updateHTML_ = function(pixel) {+ var html = this.undefinedHTML_;+ if (!goog.isNull(pixel) && !goog.isNull(this.mapProjection_)) {+ if (goog.isNull(this.transform_)) {+ var projection = this.getProjection();+ if (goog.isDef(projection)) {+ this.transform_ = ol.proj.getTransformFromProjections(+ this.mapProjection_, projection);+ } else {+ this.transform_ = ol.proj.identityTransform;+ }+ }+ var map = this.getMap();+ var coordinate = map.getCoordinateFromPixel(pixel);+ if (!goog.isNull(coordinate)) {+ this.transform_(coordinate, coordinate);+ var coordinateFormat = this.getCoordinateFormat();+ if (goog.isDef(coordinateFormat)) {+ html = coordinateFormat(coordinate);+ } else {+ html = coordinate.toString();+ }+ }+ }+ if (!goog.isDef(this.renderedHTML_) || html != this.renderedHTML_) {+ this.element.innerHTML = html;+ this.renderedHTML_ = html;+ }+};-// Copyright 2007 The Closure Library Authors. All Rights Reserved.+// Copyright 2012 The Closure Library Authors. All Rights Reserved.//// Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.@@ -36523,1298 +36736,1306 @@ goog.structs.Collection.prototype.getCount;// limitations under the License./**- * @fileoverview Python style iteration utilities.- * @author [email protected] (Erik Arvidsson)+ * @fileoverview A delayed callback that pegs to the next animation frame+ * instead of a user-configurable timeout.+ *+ * @author [email protected] (Nick Santos)*/+goog.provide('goog.async.AnimationDelay');-goog.provide('goog.iter');-goog.provide('goog.iter.Iterable');-goog.provide('goog.iter.Iterator');-goog.provide('goog.iter.StopIteration');--goog.require('goog.array');-goog.require('goog.asserts');+goog.require('goog.Disposable');+goog.require('goog.events');goog.require('goog.functions');-goog.require('goog.math');--/**- * @typedef {goog.iter.Iterator|{length:number}|{__iterator__}}- */-goog.iter.Iterable;-/**- * Singleton Error object that is used to terminate iterations.- * @const {!Error}- */-goog.iter.StopIteration = ('StopIteration' in goog.global) ?- // For script engines that support legacy iterators.- goog.global['StopIteration'] :- Error('StopIteration');+// TODO(nicksantos): Should we factor out the common code between this and+// goog.async.Delay? I'm not sure if there's enough code for this to really+// make sense. Subclassing seems like the wrong approach for a variety of+// reasons. Maybe there should be a common interface?/**- * Class/interface for iterators. An iterator needs to implement a {@code next}- * method and it needs to throw a {@code goog.iter.StopIteration} when the- * iteration passes beyond the end. Iterators have no {@code hasNext} method.- * It is recommended to always use the helper functions to iterate over the- * iterator or in case you are only targeting JavaScript 1.7 for in loops.+ * A delayed callback that pegs to the next animation frame+ * instead of a user configurable timeout. By design, this should have+ * the same interface as goog.async.Delay.+ *+ * Uses requestAnimationFrame and friends when available, but falls+ * back to a timeout of goog.async.AnimationDelay.TIMEOUT.+ *+ * For more on requestAnimationFrame and how you can use it to create smoother+ * animations, see:+ * @see http://paulirish.com/2011/requestanimationframe-for-smart-animating/+ *+ * @param {function(number)} listener Function to call when the delay completes.+ * Will be passed the timestamp when it's called, in unix ms.+ * @param {Window=} opt_window The window object to execute the delay in.+ * Defaults to the global object.+ * @param {Object=} opt_handler The object scope to invoke the function in.* @constructor- * @template VALUE- */-goog.iter.Iterator = function() {};---/**- * Returns the next value of the iteration. This will throw the object- * {@see goog.iter#StopIteration} when the iteration passes the end.- * @return {VALUE} Any object or value.- */-goog.iter.Iterator.prototype.next = function() {- throw goog.iter.StopIteration;-};---/**- * Returns the {@code Iterator} object itself. This is used to implement- * the iterator protocol in JavaScript 1.7- * @param {boolean=} opt_keys Whether to return the keys or values. Default is- * to only return the values. This is being used by the for-in loop (true)- * and the for-each-in loop (false). Even though the param gives a hint- * about what the iterator will return there is no guarantee that it will- * return the keys when true is passed.- * @return {!goog.iter.Iterator<VALUE>} The object itself.+ * @extends {goog.Disposable}+ * @final*/-goog.iter.Iterator.prototype.__iterator__ = function(opt_keys) {- return this;-};+goog.async.AnimationDelay = function(listener, opt_window, opt_handler) {+ goog.async.AnimationDelay.base(this, 'constructor');+ /**+ * The function that will be invoked after a delay.+ * @type {function(number)}+ * @private+ */+ this.listener_ = listener;-/**- * Returns an iterator that knows how to iterate over the values in the object.- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable If the- * object is an iterator it will be returned as is. If the object has an- * {@code __iterator__} method that will be called to get the value- * iterator. If the object is an array-like object we create an iterator- * for that.- * @return {!goog.iter.Iterator<VALUE>} An iterator that knows how to iterate- * over the values in {@code iterable}.- * @template VALUE- */-goog.iter.toIterator = function(iterable) {- if (iterable instanceof goog.iter.Iterator) {- return iterable;- }- if (typeof iterable.__iterator__ == 'function') {- return iterable.__iterator__(false);- }- if (goog.isArrayLike(iterable)) {- var i = 0;- var newIter = new goog.iter.Iterator;- newIter.next = function() {- while (true) {- if (i >= iterable.length) {- throw goog.iter.StopIteration;- }- // Don't include deleted elements.- if (!(i in iterable)) {- i++;- continue;- }- return iterable[i++];- }- };- return newIter;- }+ /**+ * The object context to invoke the callback in.+ * @type {Object|undefined}+ * @private+ */+ this.handler_ = opt_handler;+ /**+ * @type {Window}+ * @private+ */+ this.win_ = opt_window || window;- // TODO(arv): Should we fall back on goog.structs.getValues()?- throw Error('Not implemented');+ /**+ * Cached callback function invoked when the delay finishes.+ * @type {function()}+ * @private+ */+ this.callback_ = goog.bind(this.doAction_, this);};+goog.inherits(goog.async.AnimationDelay, goog.Disposable);/**- * Calls a function for each element in the iterator with the element of the- * iterator passed as argument.- *- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * to iterate over. If the iterable is an object {@code toIterator} will be- * called on it.- * @param {function(this:THIS,VALUE,?,!goog.iter.Iterator<VALUE>)} f- * The function to call for every element. This function takes 3 arguments- * (the element, undefined, and the iterator) and the return value is- * irrelevant. The reason for passing undefined as the second argument is- * so that the same function can be used in {@see goog.array#forEach} as- * well as others. The third parameter is of type "number" for- * arraylike objects, undefined, otherwise.- * @param {THIS=} opt_obj The object to be used as the value of 'this' within- * {@code f}.- * @template THIS, VALUE+ * Identifier of the active delay timeout, or event listener,+ * or null when inactive.+ * @type {goog.events.Key|number|null}+ * @private*/-goog.iter.forEach = function(iterable, f, opt_obj) {- if (goog.isArrayLike(iterable)) {- /** @preserveTry */- try {- // NOTES: this passes the index number to the second parameter- // of the callback contrary to the documentation above.- goog.array.forEach(/** @type {goog.array.ArrayLike} */(iterable), f,- opt_obj);- } catch (ex) {- if (ex !== goog.iter.StopIteration) {- throw ex;- }- }- } else {- iterable = goog.iter.toIterator(iterable);- /** @preserveTry */- try {- while (true) {- f.call(opt_obj, iterable.next(), undefined, iterable);- }- } catch (ex) {- if (ex !== goog.iter.StopIteration) {- throw ex;- }- }- }-};+goog.async.AnimationDelay.prototype.id_ = null;/**- * Calls a function for every element in the iterator, and if the function- * returns true adds the element to a new iterator.- *- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * to iterate over.- * @param {- * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f- * The function to call for every element. This function takes 3 arguments- * (the element, undefined, and the iterator) and should return a boolean.- * If the return value is true the element will be included in the returned- * iterator. If it is false the element is not included.- * @param {THIS=} opt_obj The object to be used as the value of 'this' within- * {@code f}.- * @return {!goog.iter.Iterator<VALUE>} A new iterator in which only elements- * that passed the test are present.- * @template THIS, VALUE+ * If we're using dom listeners.+ * @type {?boolean}+ * @private*/-goog.iter.filter = function(iterable, f, opt_obj) {- var iterator = goog.iter.toIterator(iterable);- var newIter = new goog.iter.Iterator;- newIter.next = function() {- while (true) {- var val = iterator.next();- if (f.call(opt_obj, val, undefined, iterator)) {- return val;- }- }- };- return newIter;-};+goog.async.AnimationDelay.prototype.usingListeners_ = false;/**- * Calls a function for every element in the iterator, and if the function- * returns false adds the element to a new iterator.+ * Default wait timeout for animations (in milliseconds). Only used for timed+ * animation, which uses a timer (setTimeout) to schedule animation.*- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * to iterate over.- * @param {- * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f- * The function to call for every element. This function takes 3 arguments- * (the element, undefined, and the iterator) and should return a boolean.- * If the return value is false the element will be included in the returned- * iterator. If it is true the element is not included.- * @param {THIS=} opt_obj The object to be used as the value of 'this' within- * {@code f}.- * @return {!goog.iter.Iterator<VALUE>} A new iterator in which only elements- * that did not pass the test are present.- * @template THIS, VALUE+ * @type {number}+ * @const*/-goog.iter.filterFalse = function(iterable, f, opt_obj) {- return goog.iter.filter(iterable, goog.functions.not(f), opt_obj);-};+goog.async.AnimationDelay.TIMEOUT = 20;/**- * Creates a new iterator that returns the values in a range. This function- * can take 1, 2 or 3 arguments:- * <pre>- * range(5) same as range(0, 5, 1)- * range(2, 5) same as range(2, 5, 1)- * </pre>+ * Name of event received from the requestAnimationFrame in Firefox.*- * @param {number} startOrStop The stop value if only one argument is provided.- * The start value if 2 or more arguments are provided. If only one- * argument is used the start value is 0.- * @param {number=} opt_stop The stop value. If left out then the first- * argument is used as the stop value.- * @param {number=} opt_step The number to increment with between each call to- * next. This can be negative.- * @return {!goog.iter.Iterator<number>} A new iterator that returns the values- * in the range.+ * @type {string}+ * @const+ * @private*/-goog.iter.range = function(startOrStop, opt_stop, opt_step) {- var start = 0;- var stop = startOrStop;- var step = opt_step || 1;- if (arguments.length > 1) {- start = startOrStop;- stop = opt_stop;- }- if (step == 0) {- throw Error('Range step argument must not be zero');- }-- var newIter = new goog.iter.Iterator;- newIter.next = function() {- if (step > 0 && start >= stop || step < 0 && start <= stop) {- throw goog.iter.StopIteration;- }- var rv = start;- start += step;- return rv;- };- return newIter;-};+goog.async.AnimationDelay.MOZ_BEFORE_PAINT_EVENT_ = 'MozBeforePaint';/**- * Joins the values in a iterator with a delimiter.- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * to get the values from.- * @param {string} deliminator The text to put between the values.- * @return {string} The joined value string.- * @template VALUE+ * Starts the delay timer. The provided listener function will be called+ * before the next animation frame.*/-goog.iter.join = function(iterable, deliminator) {- return goog.iter.toArray(iterable).join(deliminator);-};-+goog.async.AnimationDelay.prototype.start = function() {+ this.stop();+ this.usingListeners_ = false;-/**- * For every element in the iterator call a function and return a new iterator- * with that value.- *- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterator to iterate over.- * @param {- * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):RESULT} f- * The function to call for every element. This function takes 3 arguments- * (the element, undefined, and the iterator) and should return a new value.- * @param {THIS=} opt_obj The object to be used as the value of 'this' within- * {@code f}.- * @return {!goog.iter.Iterator<RESULT>} A new iterator that returns the- * results of applying the function to each element in the original- * iterator.- * @template THIS, VALUE, RESULT- */-goog.iter.map = function(iterable, f, opt_obj) {- var iterator = goog.iter.toIterator(iterable);- var newIter = new goog.iter.Iterator;- newIter.next = function() {- var val = iterator.next();- return f.call(opt_obj, val, undefined, iterator);- };- return newIter;+ var raf = this.getRaf_();+ var cancelRaf = this.getCancelRaf_();+ if (raf && !cancelRaf && this.win_.mozRequestAnimationFrame) {+ // Because Firefox (Gecko) runs animation in separate threads, it also saves+ // time by running the requestAnimationFrame callbacks in that same thread.+ // Sadly this breaks the assumption of implicit thread-safety in JS, and can+ // thus create thread-based inconsistencies on counters etc.+ //+ // Calling cycleAnimations_ using the MozBeforePaint event instead of as+ // callback fixes this.+ //+ // Trigger this condition only if the mozRequestAnimationFrame is available,+ // but not the W3C requestAnimationFrame function (as in draft) or the+ // equivalent cancel functions.+ this.id_ = goog.events.listen(+ this.win_,+ goog.async.AnimationDelay.MOZ_BEFORE_PAINT_EVENT_,+ this.callback_);+ this.win_.mozRequestAnimationFrame(null);+ this.usingListeners_ = true;+ } else if (raf && cancelRaf) {+ this.id_ = raf.call(this.win_, this.callback_);+ } else {+ this.id_ = this.win_.setTimeout(+ // Prior to Firefox 13, Gecko passed a non-standard parameter+ // to the callback that we want to ignore.+ goog.functions.lock(this.callback_),+ goog.async.AnimationDelay.TIMEOUT);+ }};/**- * Passes every element of an iterator into a function and accumulates the- * result.- *- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * to iterate over.- * @param {function(this:THIS,VALUE,VALUE):VALUE} f The function to call for- * every element. This function takes 2 arguments (the function's previous- * result or the initial value, and the value of the current element).- * function(previousValue, currentElement) : newValue.- * @param {VALUE} val The initial value to pass into the function on the first- * call.- * @param {THIS=} opt_obj The object to be used as the value of 'this' within- * f.- * @return {VALUE} Result of evaluating f repeatedly across the values of- * the iterator.- * @template THIS, VALUE+ * Stops the delay timer if it is active. No action is taken if the timer is not+ * in use.*/-goog.iter.reduce = function(iterable, f, val, opt_obj) {- var rval = val;- goog.iter.forEach(iterable, function(val) {- rval = f.call(opt_obj, rval, val);- });- return rval;+goog.async.AnimationDelay.prototype.stop = function() {+ if (this.isActive()) {+ var raf = this.getRaf_();+ var cancelRaf = this.getCancelRaf_();+ if (raf && !cancelRaf && this.win_.mozRequestAnimationFrame) {+ goog.events.unlistenByKey(this.id_);+ } else if (raf && cancelRaf) {+ cancelRaf.call(this.win_, /** @type {number} */ (this.id_));+ } else {+ this.win_.clearTimeout(/** @type {number} */ (this.id_));+ }+ }+ this.id_ = null;};/**- * Goes through the values in the iterator. Calls f for each of these, and if- * any of them returns true, this returns true (without checking the rest). If- * all return false this will return false.- *- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * object.- * @param {- * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f- * The function to call for every value. This function takes 3 arguments- * (the value, undefined, and the iterator) and should return a boolean.- * @param {THIS=} opt_obj The object to be used as the value of 'this' within- * {@code f}.- * @return {boolean} true if any value passes the test.- * @template THIS, VALUE+ * Fires delay's action even if timer has already gone off or has not been+ * started yet; guarantees action firing. Stops the delay timer.*/-goog.iter.some = function(iterable, f, opt_obj) {- iterable = goog.iter.toIterator(iterable);- /** @preserveTry */- try {- while (true) {- if (f.call(opt_obj, iterable.next(), undefined, iterable)) {- return true;- }- }- } catch (ex) {- if (ex !== goog.iter.StopIteration) {- throw ex;- }- }- return false;+goog.async.AnimationDelay.prototype.fire = function() {+ this.stop();+ this.doAction_();};/**- * Goes through the values in the iterator. Calls f for each of these and if any- * of them returns false this returns false (without checking the rest). If all- * return true this will return true.- *- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * object.- * @param {- * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f- * The function to call for every value. This function takes 3 arguments- * (the value, undefined, and the iterator) and should return a boolean.- * @param {THIS=} opt_obj The object to be used as the value of 'this' within- * {@code f}.- * @return {boolean} true if every value passes the test.- * @template THIS, VALUE+ * Fires delay's action only if timer is currently active. Stops the delay+ * timer.*/-goog.iter.every = function(iterable, f, opt_obj) {- iterable = goog.iter.toIterator(iterable);- /** @preserveTry */- try {- while (true) {- if (!f.call(opt_obj, iterable.next(), undefined, iterable)) {- return false;- }- }- } catch (ex) {- if (ex !== goog.iter.StopIteration) {- throw ex;- }+goog.async.AnimationDelay.prototype.fireIfActive = function() {+ if (this.isActive()) {+ this.fire();}- return true;};/**- * Takes zero or more iterables and returns one iterator that will iterate over- * them in the order chained.- * @param {...!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} var_args Any- * number of iterable objects.- * @return {!goog.iter.Iterator<VALUE>} Returns a new iterator that will- * iterate over all the given iterables' contents.- * @template VALUE+ * @return {boolean} True if the delay is currently active, false otherwise.*/-goog.iter.chain = function(var_args) {- return goog.iter.chainFromIterable(arguments);+goog.async.AnimationDelay.prototype.isActive = function() {+ return this.id_ != null;};/**- * Takes a single iterable containing zero or more iterables and returns one- * iterator that will iterate over each one in the order given.- * @see http://docs.python.org/2/library/itertools.html#itertools.chain.from_iterable- * @param {goog.iter.Iterable} iterable The iterable of iterables to chain.- * @return {!goog.iter.Iterator<VALUE>} Returns a new iterator that will- * iterate over all the contents of the iterables contained within- * {@code iterable}.- * @template VALUE+ * Invokes the callback function after the delay successfully completes.+ * @private*/-goog.iter.chainFromIterable = function(iterable) {- var iterator = goog.iter.toIterator(iterable);- var iter = new goog.iter.Iterator();- var current = null;+goog.async.AnimationDelay.prototype.doAction_ = function() {+ if (this.usingListeners_ && this.id_) {+ goog.events.unlistenByKey(this.id_);+ }+ this.id_ = null;- iter.next = function() {- while (true) {- if (current == null) {- var it = iterator.next();- current = goog.iter.toIterator(it);- }- try {- return current.next();- } catch (ex) {- if (ex !== goog.iter.StopIteration) {- throw ex;- }- current = null;- }- }- };+ // We are not using the timestamp returned by requestAnimationFrame+ // because it may be either a Date.now-style time or a+ // high-resolution time (depending on browser implementation). Using+ // goog.now() will ensure that the timestamp used is consistent and+ // compatible with goog.fx.Animation.+ this.listener_.call(this.handler_, goog.now());+};- return iter;++/** @override */+goog.async.AnimationDelay.prototype.disposeInternal = function() {+ this.stop();+ goog.async.AnimationDelay.base(this, 'disposeInternal');};/**- * Builds a new iterator that iterates over the original, but skips elements as- * long as a supplied function returns true.- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * object.- * @param {- * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f- * The function to call for every value. This function takes 3 arguments- * (the value, undefined, and the iterator) and should return a boolean.- * @param {THIS=} opt_obj The object to be used as the value of 'this' within- * {@code f}.- * @return {!goog.iter.Iterator<VALUE>} A new iterator that drops elements from- * the original iterator as long as {@code f} is true.- * @template THIS, VALUE+ * @return {?function(function(number)): number} The requestAnimationFrame+ * function, or null if not available on this browser.+ * @private*/-goog.iter.dropWhile = function(iterable, f, opt_obj) {- var iterator = goog.iter.toIterator(iterable);- var newIter = new goog.iter.Iterator;- var dropping = true;- newIter.next = function() {- while (true) {- var val = iterator.next();- if (dropping && f.call(opt_obj, val, undefined, iterator)) {- continue;- } else {- dropping = false;- }- return val;- }- };- return newIter;+goog.async.AnimationDelay.prototype.getRaf_ = function() {+ var win = this.win_;+ return win.requestAnimationFrame ||+ win.webkitRequestAnimationFrame ||+ win.mozRequestAnimationFrame ||+ win.oRequestAnimationFrame ||+ win.msRequestAnimationFrame ||+ null;};/**- * Builds a new iterator that iterates over the original, but only as long as a- * supplied function returns true.- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * object.- * @param {- * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f- * The function to call for every value. This function takes 3 arguments- * (the value, undefined, and the iterator) and should return a boolean.- * @param {THIS=} opt_obj This is used as the 'this' object in f when called.- * @return {!goog.iter.Iterator<VALUE>} A new iterator that keeps elements in- * the original iterator as long as the function is true.- * @template THIS, VALUE+ * @return {?function(number): number} The cancelAnimationFrame function,+ * or null if not available on this browser.+ * @private*/-goog.iter.takeWhile = function(iterable, f, opt_obj) {- var iterator = goog.iter.toIterator(iterable);- var iter = new goog.iter.Iterator();- iter.next = function() {- var val = iterator.next();- if (f.call(opt_obj, val, undefined, iterator)) {- return val;- }- throw goog.iter.StopIteration;- };- return iter;+goog.async.AnimationDelay.prototype.getCancelRaf_ = function() {+ var win = this.win_;+ return win.cancelAnimationFrame ||+ win.cancelRequestAnimationFrame ||+ win.webkitCancelRequestAnimationFrame ||+ win.mozCancelRequestAnimationFrame ||+ win.oCancelRequestAnimationFrame ||+ win.msCancelRequestAnimationFrame ||+ null;};+// Copyright 2013 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * Converts the iterator to an array- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator- * to convert to an array.- * @return {!Array<VALUE>} An array of the elements the iterator iterates over.- * @template VALUE+ * @fileoverview Provides a function to schedule running a function as soon+ * as possible after the current JS execution stops and yields to the event+ * loop.+ **/-goog.iter.toArray = function(iterable) {- // Fast path for array-like.- if (goog.isArrayLike(iterable)) {- return goog.array.toArray(/** @type {!goog.array.ArrayLike} */(iterable));- }- iterable = goog.iter.toIterator(iterable);- var array = [];- goog.iter.forEach(iterable, function(val) {- array.push(val);- });- return array;-};++goog.provide('goog.async.nextTick');+goog.provide('goog.async.throwException');++goog.require('goog.debug.entryPointRegistry');+goog.require('goog.functions');+goog.require('goog.labs.userAgent.browser');/**- * Iterates over two iterables and returns true if they contain the same- * sequence of elements and have the same length.- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable1 The first- * iterable object.- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable2 The second- * iterable object.- * @param {function(VALUE,VALUE):boolean=} opt_equalsFn Optional comparison- * function.- * Should take two arguments to compare, and return true if the arguments- * are equal. Defaults to {@link goog.array.defaultCompareEquality} which- * compares the elements using the built-in '===' operator.- * @return {boolean} true if the iterables contain the same sequence of elements- * and have the same length.- * @template VALUE+ * Throw an item without interrupting the current execution context. For+ * example, if processing a group of items in a loop, sometimes it is useful+ * to report an error while still allowing the rest of the batch to be+ * processed.+ * @param {*} exception*/-goog.iter.equals = function(iterable1, iterable2, opt_equalsFn) {- var fillValue = {};- var pairs = goog.iter.zipLongest(fillValue, iterable1, iterable2);- var equalsFn = opt_equalsFn || goog.array.defaultCompareEquality;- return goog.iter.every(pairs, function(pair) {- return equalsFn(pair[0], pair[1]);- });+goog.async.throwException = function(exception) {+ // Each throw needs to be in its own context.+ goog.global.setTimeout(function() { throw exception; }, 0);};/**- * Advances the iterator to the next position, returning the given default value- * instead of throwing an exception if the iterator has no more entries.- * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterable- * object.- * @param {VALUE} defaultValue The value to return if the iterator is empty.- * @return {VALUE} The next item in the iteration, or defaultValue if the- * iterator was empty.- * @template VALUE+ * Fires the provided callbacks as soon as possible after the current JS+ * execution context. setTimeout(…, 0) takes at least 4ms when called from+ * within another setTimeout(…, 0) for legacy reasons.+ *+ * This will not schedule the callback as a microtask (i.e. a task that can+ * preempt user input or networking callbacks). It is meant to emulate what+ * setTimeout(_, 0) would do if it were not throttled. If you desire microtask+ * behavior, use {@see goog.Promise} instead.+ *+ * @param {function(this:SCOPE)} callback Callback function to fire as soon as+ * possible.+ * @param {SCOPE=} opt_context Object in whose scope to call the listener.+ * @param {boolean=} opt_useSetImmediate Avoid the IE workaround that+ * ensures correctness at the cost of speed. See comments for details.+ * @template SCOPE*/-goog.iter.nextOrValue = function(iterable, defaultValue) {- try {- return goog.iter.toIterator(iterable).next();- } catch (e) {- if (e != goog.iter.StopIteration) {- throw e;- }- return defaultValue;+goog.async.nextTick = function(callback, opt_context, opt_useSetImmediate) {+ var cb = callback;+ if (opt_context) {+ cb = goog.bind(callback, opt_context);+ }+ cb = goog.async.nextTick.wrapCallback_(cb);+ // window.setImmediate was introduced and currently only supported by IE10+,+ // but due to a bug in the implementation it is not guaranteed that+ // setImmediate is faster than setTimeout nor that setImmediate N is before+ // setImmediate N+1. That is why we do not use the native version if+ // available. We do, however, call setImmediate if it is a normal function+ // because that indicates that it has been replaced by goog.testing.MockClock+ // which we do want to support.+ // See+ // http://connect.microsoft.com/IE/feedback/details/801823/setimmediate-and-messagechannel-are-broken-in-ie10+ //+ // Note we do allow callers to also request setImmediate if they are willing+ // to accept the possible tradeoffs of incorrectness in exchange for speed.+ // The IE fallback of readystate change is much slower.+ if (goog.isFunction(goog.global.setImmediate) &&+ (opt_useSetImmediate || !goog.global.Window ||+ goog.global.Window.prototype.setImmediate != goog.global.setImmediate)) {+ goog.global.setImmediate(cb);+ return;+ }++ // Look for and cache the custom fallback version of setImmediate.+ if (!goog.async.nextTick.setImmediate_) {+ goog.async.nextTick.setImmediate_ =+ goog.async.nextTick.getSetImmediateEmulator_();}+ goog.async.nextTick.setImmediate_(cb);};/**- * Cartesian product of zero or more sets. Gives an iterator that gives every- * combination of one element chosen from each set. For example,- * ([1, 2], [3, 4]) gives ([1, 3], [1, 4], [2, 3], [2, 4]).- * @see http://docs.python.org/library/itertools.html#itertools.product- * @param {...!goog.array.ArrayLike<VALUE>} var_args Zero or more sets, as- * arrays.- * @return {!goog.iter.Iterator<!Array<VALUE>>} An iterator that gives each- * n-tuple (as an array).- * @template VALUE+ * Cache for the setImmediate implementation.+ * @type {function(function())}+ * @private*/-goog.iter.product = function(var_args) {- var someArrayEmpty = goog.array.some(arguments, function(arr) {- return !arr.length;- });+goog.async.nextTick.setImmediate_;- // An empty set in a cartesian product gives an empty set.- if (someArrayEmpty || !arguments.length) {- return new goog.iter.Iterator();++/**+ * Determines the best possible implementation to run a function as soon as+ * the JS event loop is idle.+ * @return {function(function())} The "setImmediate" implementation.+ * @private+ */+goog.async.nextTick.getSetImmediateEmulator_ = function() {+ // Create a private message channel and use it to postMessage empty messages+ // to ourselves.+ var Channel = goog.global['MessageChannel'];+ // If MessageChannel is not available and we are in a browser, implement+ // an iframe based polyfill in browsers that have postMessage and+ // document.addEventListener. The latter excludes IE8 because it has a+ // synchronous postMessage implementation.+ if (typeof Channel === 'undefined' && typeof window !== 'undefined' &&+ window.postMessage && window.addEventListener) {+ /** @constructor */+ Channel = function() {+ // Make an empty, invisible iframe.+ var iframe = document.createElement('iframe');+ iframe.style.display = 'none';+ iframe.src = '';+ document.documentElement.appendChild(iframe);+ var win = iframe.contentWindow;+ var doc = win.document;+ doc.open();+ doc.write('');+ doc.close();+ // Do not post anything sensitive over this channel, as the workaround for+ // pages with file: origin could allow that information to be modified or+ // intercepted.+ var message = 'callImmediate' + Math.random();+ // The same origin policy rejects attempts to postMessage from file: urls+ // unless the origin is '*'.+ // TODO(b/16335441): Use '*' origin for data: and other similar protocols.+ var origin = win.location.protocol == 'file:' ?+ '*' : win.location.protocol + '//' + win.location.host;+ var onmessage = goog.bind(function(e) {+ // Validate origin and message to make sure that this message was+ // intended for us. If the origin is set to '*' (see above) only the+ // message needs to match since, for example, '*' != 'file://'. Allowing+ // the wildcard is ok, as we are not concerned with security here.+ if ((origin != '*' && e.origin != origin) || e.data != message) {+ return;+ }+ this['port1'].onmessage();+ }, this);+ win.addEventListener('message', onmessage, false);+ this['port1'] = {};+ this['port2'] = {+ postMessage: function() {+ win.postMessage(message, origin);+ }+ };+ };+ }+ if (typeof Channel !== 'undefined' &&+ (!goog.labs.userAgent.browser.isIE())) {+ // Exclude all of IE due to+ // http://codeforhire.com/2013/09/21/setimmediate-and-messagechannel-broken-on-internet-explorer-10/+ // which allows starving postMessage with a busy setTimeout loop.+ // This currently affects IE10 and IE11 which would otherwise be able+ // to use the postMessage based fallbacks.+ var channel = new Channel();+ // Use a fifo linked list to call callbacks in the right order.+ var head = {};+ var tail = head;+ channel['port1'].onmessage = function() {+ if (goog.isDef(head.next)) {+ head = head.next;+ var cb = head.cb;+ head.cb = null;+ cb();+ }+ };+ return function(cb) {+ tail.next = {+ cb: cb+ };+ tail = tail.next;+ channel['port2'].postMessage(0);+ };+ }+ // Implementation for IE6+: Script elements fire an asynchronous+ // onreadystatechange event when inserted into the DOM.+ if (typeof document !== 'undefined' && 'onreadystatechange' in+ document.createElement('script')) {+ return function(cb) {+ var script = document.createElement('script');+ script.onreadystatechange = function() {+ // Clean up and call the callback.+ script.onreadystatechange = null;+ script.parentNode.removeChild(script);+ script = null;+ cb();+ cb = null;+ };+ document.documentElement.appendChild(script);+ };}+ // Fall back to setTimeout with 0. In browsers this creates a delay of 5ms+ // or more.+ return function(cb) {+ goog.global.setTimeout(cb, 0);+ };+};- var iter = new goog.iter.Iterator();- var arrays = arguments;- // The first indices are [0, 0, ...]- var indicies = goog.array.repeat(0, arrays.length);+/**+ * Helper function that is overrided to protect callbacks with entry point+ * monitor if the application monitors entry points.+ * @param {function()} callback Callback function to fire as soon as possible.+ * @return {function()} The wrapped callback.+ * @private+ */+goog.async.nextTick.wrapCallback_ = goog.functions.identity;- iter.next = function() {- if (indicies) {- var retVal = goog.array.map(indicies, function(valueIndex, arrayIndex) {- return arrays[arrayIndex][valueIndex];- });+// Register the callback function as an entry point, so that it can be+// monitored for exception handling, etc. This has to be done in this file+// since it requires special code to handle all browsers.+goog.debug.entryPointRegistry.register(+ /**+ * @param {function(!Function): !Function} transformer The transforming+ * function.+ */+ function(transformer) {+ goog.async.nextTick.wrapCallback_ = transformer;+ });- // Generate the next-largest indices for the next call.- // Increase the rightmost index. If it goes over, increase the next- // rightmost (like carry-over addition).- for (var i = indicies.length - 1; i >= 0; i--) {- // Assertion prevents compiler warning below.- goog.asserts.assert(indicies);- if (indicies[i] < arrays[i].length - 1) {- indicies[i]++;- break;- }+// Copyright 2014 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.- // We're at the last indices (the last element of every array), so- // the iteration is over on the next call.- if (i == 0) {- indicies = null;- break;- }- // Reset the index in this column and loop back to increment the- // next one.- indicies[i] = 0;- }- return retVal;- }+/**+ * @fileoverview The SafeScript type and its builders.+ *+ * TODO(user): Link to document stating type contract.+ */- throw goog.iter.StopIteration;- };+goog.provide('goog.html.SafeScript');++goog.require('goog.asserts');+goog.require('goog.string.Const');+goog.require('goog.string.TypedString');++++/**+ * A string-like object which represents JavaScript code and that carries the+ * security type contract that its value, as a string, will not cause execution+ * of unconstrained attacker controlled code (XSS) when evaluated as JavaScript+ * in a browser.+ *+ * Instances of this type must be created via the factory method+ * {@code goog.html.SafeScript.fromConstant} and not by invoking its+ * constructor. The constructor intentionally takes no parameters and the type+ * is immutable; hence only a default instance corresponding to the empty string+ * can be obtained via constructor invocation.+ *+ * A SafeScript's string representation can safely be interpolated as the+ * content of a script element within HTML. The SafeScript string should not be+ * escaped before interpolation.+ *+ * Note that the SafeScript might contain text that is attacker-controlled but+ * that text should have been interpolated with appropriate escaping,+ * sanitization and/or validation into the right location in the script, such+ * that it is highly constrained in its effect (for example, it had to match a+ * set of whitelisted words).+ *+ * A SafeScript can be constructed via security-reviewed unchecked+ * conversions. In this case producers of SafeScript must ensure themselves that+ * the SafeScript does not contain unsafe script. Note in particular that+ * {@code <} is dangerous, even when inside JavaScript strings, and so should+ * always be forbidden or JavaScript escaped in user controlled input. For+ * example, if {@code </script><script>evil</script>"} were+ * interpolated inside a JavaScript string, it would break out of the context+ * of the original script element and {@code evil} would execute. Also note+ * that within an HTML script (raw text) element, HTML character references,+ * such as "<" are not allowed. See+ * http://www.w3.org/TR/html5/scripting-1.html#restrictions-for-contents-of-script-elements.+ *+ * @see goog.html.SafeScript#fromConstant+ * @constructor+ * @final+ * @struct+ * @implements {goog.string.TypedString}+ */+goog.html.SafeScript = function() {+ /**+ * The contained value of this SafeScript. The field has a purposely+ * ugly name to make (non-compiled) code that attempts to directly access this+ * field stand out.+ * @private {string}+ */+ this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = '';- return iter;+ /**+ * A type marker used to implement additional run-time type checking.+ * @see goog.html.SafeScript#unwrap+ * @const+ * @private+ */+ this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ =+ goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;};/**- * Create an iterator to cycle over the iterable's elements indefinitely.- * For example, ([1, 2, 3]) would return : 1, 2, 3, 1, 2, 3, ...- * @see: http://docs.python.org/library/itertools.html#itertools.cycle.- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable object.- * @return {!goog.iter.Iterator<VALUE>} An iterator that iterates indefinitely- * over the values in {@code iterable}.- * @template VALUE+ * @override+ * @const*/-goog.iter.cycle = function(iterable) {- var baseIterator = goog.iter.toIterator(iterable);-- // We maintain a cache to store the iterable elements as we iterate- // over them. The cache is used to return elements once we have- // iterated over the iterable once.- var cache = [];- var cacheIndex = 0;-- var iter = new goog.iter.Iterator();-- // This flag is set after the iterable is iterated over once- var useCache = false;-- iter.next = function() {- var returnElement = null;+goog.html.SafeScript.prototype.implementsGoogStringTypedString = true;- // Pull elements off the original iterator if not using cache- if (!useCache) {- try {- // Return the element from the iterable- returnElement = baseIterator.next();- cache.push(returnElement);- return returnElement;- } catch (e) {- // If an exception other than StopIteration is thrown- // or if there are no elements to iterate over (the iterable was empty)- // throw an exception- if (e != goog.iter.StopIteration || goog.array.isEmpty(cache)) {- throw e;- }- // set useCache to true after we know that a 'StopIteration' exception- // was thrown and the cache is not empty (to handle the 'empty iterable'- // use case)- useCache = true;- }- }- returnElement = cache[cacheIndex];- cacheIndex = (cacheIndex + 1) % cache.length;+/**+ * Type marker for the SafeScript type, used to implement additional+ * run-time type checking.+ * @const+ * @private+ */+goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};- return returnElement;- };- return iter;+/**+ * Creates a SafeScript object from a compile-time constant string.+ *+ * @param {!goog.string.Const} script A compile-time-constant string from which+ * to create a SafeScript.+ * @return {!goog.html.SafeScript} A SafeScript object initialized to+ * {@code script}.+ */+goog.html.SafeScript.fromConstant = function(script) {+ var scriptString = goog.string.Const.unwrap(script);+ if (scriptString.length === 0) {+ return goog.html.SafeScript.EMPTY;+ }+ return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(+ scriptString);};/**- * Creates an iterator that counts indefinitely from a starting value.- * @see http://docs.python.org/2/library/itertools.html#itertools.count- * @param {number=} opt_start The starting value. Default is 0.- * @param {number=} opt_step The number to increment with between each call to- * next. Negative and floating point numbers are allowed. Default is 1.- * @return {!goog.iter.Iterator<number>} A new iterator that returns the values- * in the series.+ * Returns this SafeScript's value as a string.+ *+ * IMPORTANT: In code where it is security relevant that an object's type is+ * indeed {@code SafeScript}, use {@code goog.html.SafeScript.unwrap} instead of+ * this method. If in doubt, assume that it's security relevant. In particular,+ * note that goog.html functions which return a goog.html type do not guarantee+ * the returned instance is of the right type. For example:+ *+ * <pre>+ * var fakeSafeHtml = new String('fake');+ * fakeSafeHtml.__proto__ = goog.html.SafeHtml.prototype;+ * var newSafeHtml = goog.html.SafeHtml.htmlEscape(fakeSafeHtml);+ * // newSafeHtml is just an alias for fakeSafeHtml, it's passed through by+ * // goog.html.SafeHtml.htmlEscape() as fakeSafeHtml+ * // instanceof goog.html.SafeHtml.+ * </pre>+ *+ * @see goog.html.SafeScript#unwrap+ * @override*/-goog.iter.count = function(opt_start, opt_step) {- var counter = opt_start || 0;- var step = goog.isDef(opt_step) ? opt_step : 1;- var iter = new goog.iter.Iterator();+goog.html.SafeScript.prototype.getTypedStringValue = function() {+ return this.privateDoNotAccessOrElseSafeScriptWrappedValue_;+};- iter.next = function() {- var returnValue = counter;- counter += step;- return returnValue;- };- return iter;-};+if (goog.DEBUG) {+ /**+ * Returns a debug string-representation of this value.+ *+ * To obtain the actual string value wrapped in a SafeScript, use+ * {@code goog.html.SafeScript.unwrap}.+ *+ * @see goog.html.SafeScript#unwrap+ * @override+ */+ goog.html.SafeScript.prototype.toString = function() {+ return 'SafeScript{' ++ this.privateDoNotAccessOrElseSafeScriptWrappedValue_ + '}';+ };+}/**- * Creates an iterator that returns the same object or value repeatedly.- * @param {VALUE} value Any object or value to repeat.- * @return {!goog.iter.Iterator<VALUE>} A new iterator that returns the- * repeated value.- * @template VALUE+ * Performs a runtime check that the provided object is indeed a+ * SafeScript object, and returns its value.+ *+ * @param {!goog.html.SafeScript} safeScript The object to extract from.+ * @return {string} The safeScript object's contained string, unless+ * the run-time type check fails. In that case, {@code unwrap} returns an+ * innocuous string, or, if assertions are enabled, throws+ * {@code goog.asserts.AssertionError}.*/-goog.iter.repeat = function(value) {- var iter = new goog.iter.Iterator();-- iter.next = goog.functions.constant(value);-- return iter;+goog.html.SafeScript.unwrap = function(safeScript) {+ // Perform additional Run-time type-checking to ensure that+ // safeScript is indeed an instance of the expected type. This+ // provides some additional protection against security bugs due to+ // application code that disables type checks.+ // Specifically, the following checks are performed:+ // 1. The object is an instance of the expected type.+ // 2. The object is not an instance of a subclass.+ // 3. The object carries a type marker for the expected type. "Faking" an+ // object requires a reference to the type marker, which has names intended+ // to stand out in code reviews.+ if (safeScript instanceof goog.html.SafeScript &&+ safeScript.constructor === goog.html.SafeScript &&+ safeScript.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ ===+ goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {+ return safeScript.privateDoNotAccessOrElseSafeScriptWrappedValue_;+ } else {+ goog.asserts.fail(+ 'expected object of type SafeScript, got \'' + safeScript + '\'');+ return 'type_error:SafeScript';+ }};/**- * Creates an iterator that returns running totals from the numbers in- * {@code iterable}. For example, the array {@code [1, 2, 3, 4, 5]} yields- * {@code 1 -> 3 -> 6 -> 10 -> 15}.- * @see http://docs.python.org/3.2/library/itertools.html#itertools.accumulate- * @param {!goog.iter.Iterable<number>} iterable The iterable of numbers to- * accumulate.- * @return {!goog.iter.Iterator<number>} A new iterator that returns the- * numbers in the series.+ * Package-internal utility method to create SafeScript instances.+ *+ * @param {string} script The string to initialize the SafeScript object with.+ * @return {!goog.html.SafeScript} The initialized SafeScript object.+ * @package*/-goog.iter.accumulate = function(iterable) {- var iterator = goog.iter.toIterator(iterable);- var total = 0;- var iter = new goog.iter.Iterator();-- iter.next = function() {- total += iterator.next();- return total;- };-- return iter;+goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse =+ function(script) {+ var safeScript = new goog.html.SafeScript();+ safeScript.privateDoNotAccessOrElseSafeScriptWrappedValue_ = script;+ return safeScript;};/**- * Creates an iterator that returns arrays containing the ith elements from the- * provided iterables. The returned arrays will be the same size as the number- * of iterables given in {@code var_args}. Once the shortest iterable is- * exhausted, subsequent calls to {@code next()} will throw- * {@code goog.iter.StopIteration}.- * @see http://docs.python.org/2/library/itertools.html#itertools.izip- * @param {...!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} var_args Any- * number of iterable objects.- * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator that returns- * arrays of elements from the provided iterables.- * @template VALUE+ * A SafeScript instance corresponding to the empty string.+ * @const {!goog.html.SafeScript}*/-goog.iter.zip = function(var_args) {- var args = arguments;- var iter = new goog.iter.Iterator();-- if (args.length > 0) {- var iterators = goog.array.map(args, goog.iter.toIterator);- iter.next = function() {- var arr = goog.array.map(iterators, function(it) {- return it.next();- });- return arr;- };- }-- return iter;-};+goog.html.SafeScript.EMPTY =+ goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse('');+// Copyright 2013 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * Creates an iterator that returns arrays containing the ith elements from the- * provided iterables. The returned arrays will be the same size as the number- * of iterables given in {@code var_args}. Shorter iterables will be extended- * with {@code fillValue}. Once the longest iterable is exhausted, subsequent- * calls to {@code next()} will throw {@code goog.iter.StopIteration}.- * @see http://docs.python.org/2/library/itertools.html#itertools.izip_longest- * @param {VALUE} fillValue The object or value used to fill shorter iterables.- * @param {...!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} var_args Any- * number of iterable objects.- * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator that returns- * arrays of elements from the provided iterables.- * @template VALUE+ * @fileoverview Unchecked conversions to create values of goog.html types from+ * plain strings. Use of these functions could potentially result in instances+ * of goog.html types that violate their type contracts, and hence result in+ * security vulnerabilties.+ *+ * Therefore, all uses of the methods herein must be carefully security+ * reviewed. Avoid use of the methods in this file whenever possible; instead+ * prefer to create instances of goog.html types using inherently safe builders+ * or template systems.+ *+ *+ * @visibility {//closure/goog/html:approved_for_unchecked_conversion}+ * @visibility {//closure/goog/bin/sizetests:__pkg__}*/-goog.iter.zipLongest = function(fillValue, var_args) {- var args = goog.array.slice(arguments, 1);- var iter = new goog.iter.Iterator();- if (args.length > 0) {- var iterators = goog.array.map(args, goog.iter.toIterator);-- iter.next = function() {- var iteratorsHaveValues = false; // false when all iterators are empty.- var arr = goog.array.map(iterators, function(it) {- var returnValue;- try {- returnValue = it.next();- // Iterator had a value, so we've not exhausted the iterators.- // Set flag accordingly.- iteratorsHaveValues = true;- } catch (ex) {- if (ex !== goog.iter.StopIteration) {- throw ex;- }- returnValue = fillValue;- }- return returnValue;- });- if (!iteratorsHaveValues) {- throw goog.iter.StopIteration;- }- return arr;- };- }+goog.provide('goog.html.uncheckedconversions');- return iter;-};+goog.require('goog.asserts');+goog.require('goog.html.SafeHtml');+goog.require('goog.html.SafeScript');+goog.require('goog.html.SafeStyle');+goog.require('goog.html.SafeStyleSheet');+goog.require('goog.html.SafeUrl');+goog.require('goog.html.TrustedResourceUrl');+goog.require('goog.string');+goog.require('goog.string.Const');/**- * Creates an iterator that filters {@code iterable} based on a series of- * {@code selectors}. On each call to {@code next()}, one item is taken from- * both the {@code iterable} and {@code selectors} iterators. If the item from- * {@code selectors} evaluates to true, the item from {@code iterable} is given.- * Otherwise, it is skipped. Once either {@code iterable} or {@code selectors}- * is exhausted, subsequent calls to {@code next()} will throw- * {@code goog.iter.StopIteration}.- * @see http://docs.python.org/2/library/itertools.html#itertools.compress- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable to filter.- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} selectors An- * iterable of items to be evaluated in a boolean context to determine if- * the corresponding element in {@code iterable} should be included in the- * result.- * @return {!goog.iter.Iterator<VALUE>} A new iterator that returns the- * filtered values.- * @template VALUE+ * Performs an "unchecked conversion" to SafeHtml from a plain string that is+ * known to satisfy the SafeHtml type contract.+ *+ * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure+ * that the value of {@code html} satisfies the SafeHtml type contract in all+ * possible program states.+ *+ *+ * @param {!goog.string.Const} justification A constant string explaining why+ * this use of this method is safe. May include a security review ticket+ * number.+ * @param {string} html A string that is claimed to adhere to the SafeHtml+ * contract.+ * @param {?goog.i18n.bidi.Dir=} opt_dir The optional directionality of the+ * SafeHtml to be constructed. A null or undefined value signifies an+ * unknown directionality.+ * @return {!goog.html.SafeHtml} The value of html, wrapped in a SafeHtml+ * object.+ * @suppress {visibility} For access to SafeHtml.create... Note that this+ * use is appropriate since this method is intended to be "package private"+ * withing goog.html. DO NOT call SafeHtml.create... from outside this+ * package; use appropriate wrappers instead.*/-goog.iter.compress = function(iterable, selectors) {- var selectorIterator = goog.iter.toIterator(selectors);-- return goog.iter.filter(iterable, function() {- return !!selectorIterator.next();- });+goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract =+ function(justification, html, opt_dir) {+ // unwrap() called inside an assert so that justification can be optimized+ // away in production code.+ goog.asserts.assertString(goog.string.Const.unwrap(justification),+ 'must provide justification');+ goog.asserts.assert(+ !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),+ 'must provide non-empty justification');+ return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(+ html, opt_dir || null);};-/**- * Implements the {@code goog.iter.groupBy} iterator.- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable to group.- * @param {function(...VALUE): KEY=} opt_keyFunc Optional function for- * determining the key value for each group in the {@code iterable}. Default- * is the identity function.- * @constructor- * @extends {goog.iter.Iterator<!Array<?>>}- * @template KEY, VALUE- * @private+ * Performs an "unchecked conversion" to SafeScript from a plain string that is+ * known to satisfy the SafeScript type contract.+ *+ * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure+ * that the value of {@code script} satisfies the SafeScript type contract in+ * all possible program states.+ *+ *+ * @param {!goog.string.Const} justification A constant string explaining why+ * this use of this method is safe. May include a security review ticket+ * number.+ * @param {string} script The string to wrap as a SafeScript.+ * @return {!goog.html.SafeScript} The value of {@code script}, wrapped in a+ * SafeScript object.*/-goog.iter.GroupByIterator_ = function(iterable, opt_keyFunc) {-- /**- * The iterable to group, coerced to an iterator.- * @type {!goog.iter.Iterator}- */- this.iterator = goog.iter.toIterator(iterable);-- /**- * A function for determining the key value for each element in the iterable.- * If no function is provided, the identity function is used and returns the- * element unchanged.- * @type {function(...VALUE): KEY}- */- this.keyFunc = opt_keyFunc || goog.functions.identity;-- /**- * The target key for determining the start of a group.- * @type {KEY}- */- this.targetKey;+goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract =+ function(justification, script) {+ // unwrap() called inside an assert so that justification can be optimized+ // away in production code.+ goog.asserts.assertString(goog.string.Const.unwrap(justification),+ 'must provide justification');+ goog.asserts.assert(+ !goog.string.isEmpty(goog.string.Const.unwrap(justification)),+ 'must provide non-empty justification');+ return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(+ script);+};- /**- * The current key visited during iteration.- * @type {KEY}- */- this.currentKey;- /**- * The current value being added to the group.- * @type {VALUE}- */- this.currentValue;+/**+ * Performs an "unchecked conversion" to SafeStyle from a plain string that is+ * known to satisfy the SafeStyle type contract.+ *+ * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure+ * that the value of {@code style} satisfies the SafeUrl type contract in all+ * possible program states.+ *+ *+ * @param {!goog.string.Const} justification A constant string explaining why+ * this use of this method is safe. May include a security review ticket+ * number.+ * @param {string} style The string to wrap as a SafeStyle.+ * @return {!goog.html.SafeStyle} The value of {@code style}, wrapped in a+ * SafeStyle object.+ */+goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract =+ function(justification, style) {+ // unwrap() called inside an assert so that justification can be optimized+ // away in production code.+ goog.asserts.assertString(goog.string.Const.unwrap(justification),+ 'must provide justification');+ goog.asserts.assert(+ !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),+ 'must provide non-empty justification');+ return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(+ style);};-goog.inherits(goog.iter.GroupByIterator_, goog.iter.Iterator);-/** @override */-goog.iter.GroupByIterator_.prototype.next = function() {- while (this.currentKey == this.targetKey) {- this.currentValue = this.iterator.next(); // Exits on StopIteration- this.currentKey = this.keyFunc(this.currentValue);- }- this.targetKey = this.currentKey;- return [this.currentKey, this.groupItems_(this.targetKey)];+/**+ * Performs an "unchecked conversion" to SafeStyleSheet from a plain string+ * that is known to satisfy the SafeStyleSheet type contract.+ *+ * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure+ * that the value of {@code styleSheet} satisfies the SafeUrl type contract in+ * all possible program states.+ *+ *+ * @param {!goog.string.Const} justification A constant string explaining why+ * this use of this method is safe. May include a security review ticket+ * number.+ * @param {string} styleSheet The string to wrap as a SafeStyleSheet.+ * @return {!goog.html.SafeStyleSheet} The value of {@code styleSheet}, wrapped+ * in a SafeStyleSheet object.+ */+goog.html.uncheckedconversions.+ safeStyleSheetFromStringKnownToSatisfyTypeContract =+ function(justification, styleSheet) {+ // unwrap() called inside an assert so that justification can be optimized+ // away in production code.+ goog.asserts.assertString(goog.string.Const.unwrap(justification),+ 'must provide justification');+ goog.asserts.assert(+ !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),+ 'must provide non-empty justification');+ return goog.html.SafeStyleSheet.+ createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);};/**- * Performs the grouping of objects using the given key.- * @param {KEY} targetKey The target key object for the group.- * @return {!Array<VALUE>} An array of grouped objects.- * @private+ * Performs an "unchecked conversion" to SafeUrl from a plain string that is+ * known to satisfy the SafeUrl type contract.+ *+ * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure+ * that the value of {@code url} satisfies the SafeUrl type contract in all+ * possible program states.+ *+ *+ * @param {!goog.string.Const} justification A constant string explaining why+ * this use of this method is safe. May include a security review ticket+ * number.+ * @param {string} url The string to wrap as a SafeUrl.+ * @return {!goog.html.SafeUrl} The value of {@code url}, wrapped in a SafeUrl+ * object.*/-goog.iter.GroupByIterator_.prototype.groupItems_ = function(targetKey) {- var arr = [];- while (this.currentKey == targetKey) {- arr.push(this.currentValue);- try {- this.currentValue = this.iterator.next();- } catch (ex) {- if (ex !== goog.iter.StopIteration) {- throw ex;- }- break;- }- this.currentKey = this.keyFunc(this.currentValue);- }- return arr;+goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract =+ function(justification, url) {+ // unwrap() called inside an assert so that justification can be optimized+ // away in production code.+ goog.asserts.assertString(goog.string.Const.unwrap(justification),+ 'must provide justification');+ goog.asserts.assert(+ !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),+ 'must provide non-empty justification');+ return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);};/**- * Creates an iterator that returns arrays containing elements from the- * {@code iterable} grouped by a key value. For iterables with repeated- * elements (i.e. sorted according to a particular key function), this function- * has a {@code uniq}-like effect. For example, grouping the array:- * {@code [A, B, B, C, C, A]} produces- * {@code [A, [A]], [B, [B, B]], [C, [C, C]], [A, [A]]}.- * @see http://docs.python.org/2/library/itertools.html#itertools.groupby- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable to group.- * @param {function(...VALUE): KEY=} opt_keyFunc Optional function for- * determining the key value for each group in the {@code iterable}. Default- * is the identity function.- * @return {!goog.iter.Iterator<!Array<?>>} A new iterator that returns- * arrays of consecutive key and groups.- * @template KEY, VALUE+ * Performs an "unchecked conversion" to TrustedResourceUrl from a plain string+ * that is known to satisfy the TrustedResourceUrl type contract.+ *+ * IMPORTANT: Uses of this method must be carefully security-reviewed to ensure+ * that the value of {@code url} satisfies the TrustedResourceUrl type contract+ * in all possible program states.+ *+ *+ * @param {!goog.string.Const} justification A constant string explaining why+ * this use of this method is safe. May include a security review ticket+ * number.+ * @param {string} url The string to wrap as a TrustedResourceUrl.+ * @return {!goog.html.TrustedResourceUrl} The value of {@code url}, wrapped in+ * a TrustedResourceUrl object.*/-goog.iter.groupBy = function(iterable, opt_keyFunc) {- return new goog.iter.GroupByIterator_(iterable, opt_keyFunc);+goog.html.uncheckedconversions.+ trustedResourceUrlFromStringKnownToSatisfyTypeContract =+ function(justification, url) {+ // unwrap() called inside an assert so that justification can be optimized+ // away in production code.+ goog.asserts.assertString(goog.string.Const.unwrap(justification),+ 'must provide justification');+ goog.asserts.assert(+ !goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)),+ 'must provide non-empty justification');+ return goog.html.TrustedResourceUrl.+ createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);};+// Copyright 2006 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * Gives an iterator that gives the result of calling the given function- * <code>f</code> with the arguments taken from the next element from- * <code>iterable</code> (the elements are expected to also be iterables).+ * @fileoverview Generics method for collection-like classes and objects.*- * Similar to {@see goog.iter#map} but allows the function to accept multiple- * arguments from the iterable.+ * @author [email protected] (Erik Arvidsson)*- * @param {!goog.iter.Iterable<!goog.iter.Iterable>} iterable The iterable of- * iterables to iterate over.- * @param {function(this:THIS,...*):RESULT} f The function to call for every- * element. This function takes N+2 arguments, where N represents the- * number of items from the next element of the iterable. The two- * additional arguments passed to the function are undefined and the- * iterator itself. The function should return a new value.- * @param {THIS=} opt_obj The object to be used as the value of 'this' within- * {@code f}.- * @return {!goog.iter.Iterator<RESULT>} A new iterator that returns the- * results of applying the function to each element in the original- * iterator.- * @template THIS, RESULT+ * This file contains functions to work with collections. It supports using+ * Map, Set, Array and Object and other classes that implement collection-like+ * methods.*/-goog.iter.starMap = function(iterable, f, opt_obj) {- var iterator = goog.iter.toIterator(iterable);- var iter = new goog.iter.Iterator();-- iter.next = function() {- var args = goog.iter.toArray(iterator.next());- return f.apply(opt_obj, goog.array.concat(args, undefined, iterator));- };- return iter;-};+goog.provide('goog.structs');-/**- * Returns an array of iterators each of which can iterate over the values in- * {@code iterable} without advancing the others.- * @see http://docs.python.org/2/library/itertools.html#itertools.tee- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable to tee.- * @param {number=} opt_num The number of iterators to create. Default is 2.- * @return {!Array<goog.iter.Iterator<VALUE>>} An array of iterators.- * @template VALUE- */-goog.iter.tee = function(iterable, opt_num) {- var iterator = goog.iter.toIterator(iterable);- var num = goog.isNumber(opt_num) ? opt_num : 2;- var buffers = goog.array.map(goog.array.range(num), function() {- return [];- });-- var addNextIteratorValueToBuffers = function() {- var val = iterator.next();- goog.array.forEach(buffers, function(buffer) {- buffer.push(val);- });- };+goog.require('goog.array');+goog.require('goog.object');- var createIterator = function(buffer) {- // Each tee'd iterator has an associated buffer (initially empty). When a- // tee'd iterator's buffer is empty, it calls- // addNextIteratorValueToBuffers(), adding the next value to all tee'd- // iterators' buffers, and then returns that value. This allows each- // iterator to be advanced independently.- var iter = new goog.iter.Iterator();- iter.next = function() {- if (goog.array.isEmpty(buffer)) {- addNextIteratorValueToBuffers();- }- goog.asserts.assert(!goog.array.isEmpty(buffer));- return buffer.shift();- };+// We treat an object as a dictionary if it has getKeys or it is an object that+// isn't arrayLike.- return iter;- };- return goog.array.map(buffers, createIterator);+/**+ * Returns the number of values in the collection-like object.+ * @param {Object} col The collection-like object.+ * @return {number} The number of values in the collection-like object.+ */+goog.structs.getCount = function(col) {+ if (typeof col.getCount == 'function') {+ return col.getCount();+ }+ if (goog.isArrayLike(col) || goog.isString(col)) {+ return col.length;+ }+ return goog.object.getCount(col);};/**- * Creates an iterator that returns arrays containing a count and an element- * obtained from the given {@code iterable}.- * @see http://docs.python.org/2/library/functions.html#enumerate- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable to enumerate.- * @param {number=} opt_start Optional starting value. Default is 0.- * @return {!goog.iter.Iterator<!Array<?>>} A new iterator containing- * count/item pairs.- * @template VALUE+ * Returns the values of the collection-like object.+ * @param {Object} col The collection-like object.+ * @return {!Array<?>} The values in the collection-like object.*/-goog.iter.enumerate = function(iterable, opt_start) {- return goog.iter.zip(goog.iter.count(opt_start), iterable);+goog.structs.getValues = function(col) {+ if (typeof col.getValues == 'function') {+ return col.getValues();+ }+ if (goog.isString(col)) {+ return col.split('');+ }+ if (goog.isArrayLike(col)) {+ var rv = [];+ var l = col.length;+ for (var i = 0; i < l; i++) {+ rv.push(col[i]);+ }+ return rv;+ }+ return goog.object.getValues(col);};/**- * Creates an iterator that returns the first {@code limitSize} elements from an- * iterable. If this number is greater than the number of elements in the- * iterable, all the elements are returned.- * @see http://goo.gl/V0sihp Inspired by the limit iterator in Guava.- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable to limit.- * @param {number} limitSize The maximum number of elements to return.- * @return {!goog.iter.Iterator<VALUE>} A new iterator containing- * {@code limitSize} elements.- * @template VALUE+ * Returns the keys of the collection. Some collections have no notion of+ * keys/indexes and this function will return undefined in those cases.+ * @param {Object} col The collection-like object.+ * @return {!Array|undefined} The keys in the collection.*/-goog.iter.limit = function(iterable, limitSize) {- goog.asserts.assert(goog.math.isInt(limitSize) && limitSize >= 0);-- var iterator = goog.iter.toIterator(iterable);-- var iter = new goog.iter.Iterator();- var remaining = limitSize;-- iter.next = function() {- if (remaining-- > 0) {- return iterator.next();+goog.structs.getKeys = function(col) {+ if (typeof col.getKeys == 'function') {+ return col.getKeys();+ }+ // if we have getValues but no getKeys we know this is a key-less collection+ if (typeof col.getValues == 'function') {+ return undefined;+ }+ if (goog.isArrayLike(col) || goog.isString(col)) {+ var rv = [];+ var l = col.length;+ for (var i = 0; i < l; i++) {+ rv.push(i);}- throw goog.iter.StopIteration;- };+ return rv;+ }- return iter;+ return goog.object.getKeys(col);};/**- * Creates an iterator that is advanced {@code count} steps ahead. Consumed- * values are silently discarded. If {@code count} is greater than the number- * of elements in {@code iterable}, an empty iterator is returned. Subsequent- * calls to {@code next()} will throw {@code goog.iter.StopIteration}.- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable to consume.- * @param {number} count The number of elements to consume from the iterator.- * @return {!goog.iter.Iterator<VALUE>} An iterator advanced zero or more steps- * ahead.- * @template VALUE+ * Whether the collection contains the given value. This is O(n) and uses+ * equals (==) to test the existence.+ * @param {Object} col The collection-like object.+ * @param {*} val The value to check for.+ * @return {boolean} True if the map contains the value.*/-goog.iter.consume = function(iterable, count) {- goog.asserts.assert(goog.math.isInt(count) && count >= 0);-- var iterator = goog.iter.toIterator(iterable);-- while (count-- > 0) {- goog.iter.nextOrValue(iterator, null);+goog.structs.contains = function(col, val) {+ if (typeof col.contains == 'function') {+ return col.contains(val);}-- return iterator;+ if (typeof col.containsValue == 'function') {+ return col.containsValue(val);+ }+ if (goog.isArrayLike(col) || goog.isString(col)) {+ return goog.array.contains(/** @type {!Array<?>} */ (col), val);+ }+ return goog.object.containsValue(col, val);};/**- * Creates an iterator that returns a range of elements from an iterable.- * Similar to {@see goog.array#slice} but does not support negative indexes.- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable to slice.- * @param {number} start The index of the first element to return.- * @param {number=} opt_end The index after the last element to return. If- * defined, must be greater than or equal to {@code start}.- * @return {!goog.iter.Iterator<VALUE>} A new iterator containing a slice of- * the original.- * @template VALUE+ * Whether the collection is empty.+ * @param {Object} col The collection-like object.+ * @return {boolean} True if empty.*/-goog.iter.slice = function(iterable, start, opt_end) {- goog.asserts.assert(goog.math.isInt(start) && start >= 0);+goog.structs.isEmpty = function(col) {+ if (typeof col.isEmpty == 'function') {+ return col.isEmpty();+ }- var iterator = goog.iter.consume(iterable, start);+ // We do not use goog.string.isEmptyOrWhitespace because here we treat the string as+ // collection and as such even whitespace matters- if (goog.isNumber(opt_end)) {- goog.asserts.assert(- goog.math.isInt(/** @type {number} */ (opt_end)) && opt_end >= start);- iterator = goog.iter.limit(iterator, opt_end - start /* limitSize */);+ if (goog.isArrayLike(col) || goog.isString(col)) {+ return goog.array.isEmpty(/** @type {!Array<?>} */ (col));}-- return iterator;+ return goog.object.isEmpty(col);};/**- * Checks an array for duplicate elements.- * @param {Array<VALUE>|goog.array.ArrayLike} arr The array to check for- * duplicates.- * @return {boolean} True, if the array contains duplicates, false otherwise.- * @private- * @template VALUE+ * Removes all the elements from the collection.+ * @param {Object} col The collection-like object.*/-// TODO(user): Consider moving this into goog.array as a public function.-goog.iter.hasDuplicates_ = function(arr) {- var deduped = [];- goog.array.removeDuplicates(arr, deduped);- return arr.length != deduped.length;+goog.structs.clear = function(col) {+ // NOTE(arv): This should not contain strings because strings are immutable+ if (typeof col.clear == 'function') {+ col.clear();+ } else if (goog.isArrayLike(col)) {+ goog.array.clear(/** @type {goog.array.ArrayLike} */ (col));+ } else {+ goog.object.clear(col);+ }};/**- * Creates an iterator that returns permutations of elements in- * {@code iterable}.+ * Calls a function for each value in a collection. The function takes+ * three arguments; the value, the key and the collection.*- * Permutations are obtained by taking the Cartesian product of- * {@code opt_length} iterables and filtering out those with repeated- * elements. For example, the permutations of {@code [1,2,3]} are- * {@code [[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]}.- * @see http://docs.python.org/2/library/itertools.html#itertools.permutations- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable from which to generate permutations.- * @param {number=} opt_length Length of each permutation. If omitted, defaults- * to the length of {@code iterable}.- * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator containing the- * permutations of {@code iterable}.- * @template VALUE+ * NOTE: This will be deprecated soon! Please use a more specific method if+ * possible, e.g. goog.array.forEach, goog.object.forEach, etc.+ *+ * @param {S} col The collection-like object.+ * @param {function(this:T,?,?,S):?} f The function to call for every value.+ * This function takes+ * 3 arguments (the value, the key or undefined if the collection has no+ * notion of keys, and the collection) and the return value is irrelevant.+ * @param {T=} opt_obj The object to be used as the value of 'this'+ * within {@code f}.+ * @template T,S*/-goog.iter.permutations = function(iterable, opt_length) {- var elements = goog.iter.toArray(iterable);- var length = goog.isNumber(opt_length) ? opt_length : elements.length;+goog.structs.forEach = function(col, f, opt_obj) {+ if (typeof col.forEach == 'function') {+ col.forEach(f, opt_obj);+ } else if (goog.isArrayLike(col) || goog.isString(col)) {+ goog.array.forEach(/** @type {!Array<?>} */ (col), f, opt_obj);+ } else {+ var keys = goog.structs.getKeys(col);+ var values = goog.structs.getValues(col);+ var l = values.length;+ for (var i = 0; i < l; i++) {+ f.call(opt_obj, values[i], keys && keys[i], col);+ }+ }+};- var sets = goog.array.repeat(elements, length);- var product = goog.iter.product.apply(undefined, sets);- return goog.iter.filter(product, function(arr) {- return !goog.iter.hasDuplicates_(arr);- });+/**+ * Calls a function for every value in the collection. When a call returns true,+ * adds the value to a new collection (Array is returned by default).+ *+ * @param {S} col The collection-like object.+ * @param {function(this:T,?,?,S):boolean} f The function to call for every+ * value. This function takes+ * 3 arguments (the value, the key or undefined if the collection has no+ * notion of keys, and the collection) and should return a Boolean. If the+ * return value is true the value is added to the result collection. If it+ * is false the value is not included.+ * @param {T=} opt_obj The object to be used as the value of 'this'+ * within {@code f}.+ * @return {!Object|!Array<?>} A new collection where the passed values are+ * present. If col is a key-less collection an array is returned. If col+ * has keys and values a plain old JS object is returned.+ * @template T,S+ */+goog.structs.filter = function(col, f, opt_obj) {+ if (typeof col.filter == 'function') {+ return col.filter(f, opt_obj);+ }+ if (goog.isArrayLike(col) || goog.isString(col)) {+ return goog.array.filter(/** @type {!Array<?>} */ (col), f, opt_obj);+ }++ var rv;+ var keys = goog.structs.getKeys(col);+ var values = goog.structs.getValues(col);+ var l = values.length;+ if (keys) {+ rv = {};+ for (var i = 0; i < l; i++) {+ if (f.call(opt_obj, values[i], keys[i], col)) {+ rv[keys[i]] = values[i];+ }+ }+ } else {+ // We should not use goog.array.filter here since we want to make sure that+ // the index is undefined as well as make sure that col is passed to the+ // function.+ rv = [];+ for (var i = 0; i < l; i++) {+ if (f.call(opt_obj, values[i], undefined, col)) {+ rv.push(values[i]);+ }+ }+ }+ return rv;};/**- * Creates an iterator that returns combinations of elements from- * {@code iterable}.+ * Calls a function for every value in the collection and adds the result into a+ * new collection (defaults to creating a new Array).*- * Combinations are obtained by taking the {@see goog.iter#permutations} of- * {@code iterable} and filtering those whose elements appear in the order they- * are encountered in {@code iterable}. For example, the 3-length combinations- * of {@code [0,1,2,3]} are {@code [[0,1,2], [0,1,3], [0,2,3], [1,2,3]]}.- * @see http://docs.python.org/2/library/itertools.html#itertools.combinations- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable from which to generate combinations.- * @param {number} length The length of each combination.- * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator containing- * combinations from the {@code iterable}.- * @template VALUE+ * @param {S} col The collection-like object.+ * @param {function(this:T,?,?,S):V} f The function to call for every value.+ * This function takes 3 arguments (the value, the key or undefined if the+ * collection has no notion of keys, and the collection) and should return+ * something. The result will be used as the value in the new collection.+ * @param {T=} opt_obj The object to be used as the value of 'this'+ * within {@code f}.+ * @return {!Object<V>|!Array<V>} A new collection with the new values. If+ * col is a key-less collection an array is returned. If col has keys and+ * values a plain old JS object is returned.+ * @template T,S,V*/-goog.iter.combinations = function(iterable, length) {- var elements = goog.iter.toArray(iterable);- var indexes = goog.iter.range(elements.length);- var indexIterator = goog.iter.permutations(indexes, length);- // sortedIndexIterator will now give arrays of with the given length that- // indicate what indexes into "elements" should be returned on each iteration.- var sortedIndexIterator = goog.iter.filter(indexIterator, function(arr) {- return goog.array.isSorted(arr);- });-- var iter = new goog.iter.Iterator();+goog.structs.map = function(col, f, opt_obj) {+ if (typeof col.map == 'function') {+ return col.map(f, opt_obj);+ }+ if (goog.isArrayLike(col) || goog.isString(col)) {+ return goog.array.map(/** @type {!Array<?>} */ (col), f, opt_obj);+ }- function getIndexFromElements(index) {- return elements[index];+ var rv;+ var keys = goog.structs.getKeys(col);+ var values = goog.structs.getValues(col);+ var l = values.length;+ if (keys) {+ rv = {};+ for (var i = 0; i < l; i++) {+ rv[keys[i]] = f.call(opt_obj, values[i], keys[i], col);+ }+ } else {+ // We should not use goog.array.map here since we want to make sure that+ // the index is undefined as well as make sure that col is passed to the+ // function.+ rv = [];+ for (var i = 0; i < l; i++) {+ rv[i] = f.call(opt_obj, values[i], undefined, col);+ }}-- iter.next = function() {- return goog.array.map(- /** @type {!Array<number>} */- (sortedIndexIterator.next()), getIndexFromElements);- };-- return iter;+ return rv;};/**- * Creates an iterator that returns combinations of elements from- * {@code iterable}, with repeated elements possible.+ * Calls f for each value in a collection. If any call returns true this returns+ * true (without checking the rest). If all returns false this returns false.*- * Combinations are obtained by taking the Cartesian product of {@code length}- * iterables and filtering those whose elements appear in the order they are- * encountered in {@code iterable}. For example, the 2-length combinations of- * {@code [1,2,3]} are {@code [[1,1], [1,2], [1,3], [2,2], [2,3], [3,3]]}.- * @see http://docs.python.org/2/library/itertools.html#itertools.combinations_with_replacement- * @see http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition- * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The- * iterable to combine.- * @param {number} length The length of each combination.- * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator containing- * combinations from the {@code iterable}.- * @template VALUE+ * @param {S} col The collection-like object.+ * @param {function(this:T,?,?,S):boolean} f The function to call for every+ * value. This function takes 3 arguments (the value, the key or undefined+ * if the collection has no notion of keys, and the collection) and should+ * return a boolean.+ * @param {T=} opt_obj The object to be used as the value of 'this'+ * within {@code f}.+ * @return {boolean} True if any value passes the test.+ * @template T,S*/-goog.iter.combinationsWithReplacement = function(iterable, length) {- var elements = goog.iter.toArray(iterable);- var indexes = goog.array.range(elements.length);- var sets = goog.array.repeat(indexes, length);- var indexIterator = goog.iter.product.apply(undefined, sets);- // sortedIndexIterator will now give arrays of with the given length that- // indicate what indexes into "elements" should be returned on each iteration.- var sortedIndexIterator = goog.iter.filter(indexIterator, function(arr) {- return goog.array.isSorted(arr);- });-- var iter = new goog.iter.Iterator();-- function getIndexFromElements(index) {- return elements[index];+goog.structs.some = function(col, f, opt_obj) {+ if (typeof col.some == 'function') {+ return col.some(f, opt_obj);+ }+ if (goog.isArrayLike(col) || goog.isString(col)) {+ return goog.array.some(/** @type {!Array<?>} */ (col), f, opt_obj);+ }+ var keys = goog.structs.getKeys(col);+ var values = goog.structs.getValues(col);+ var l = values.length;+ for (var i = 0; i < l; i++) {+ if (f.call(opt_obj, values[i], keys && keys[i], col)) {+ return true;+ }}+ return false;+};- iter.next = function() {- return goog.array.map(- /** @type {!Array<number>} */- (sortedIndexIterator.next()), getIndexFromElements);- };- return iter;+/**+ * Calls f for each value in a collection. If all calls return true this return+ * true this returns true. If any returns false this returns false at this point+ * and does not continue to check the remaining values.+ *+ * @param {S} col The collection-like object.+ * @param {function(this:T,?,?,S):boolean} f The function to call for every+ * value. This function takes 3 arguments (the value, the key or+ * undefined if the collection has no notion of keys, and the collection)+ * and should return a boolean.+ * @param {T=} opt_obj The object to be used as the value of 'this'+ * within {@code f}.+ * @return {boolean} True if all key-value pairs pass the test.+ * @template T,S+ */+goog.structs.every = function(col, f, opt_obj) {+ if (typeof col.every == 'function') {+ return col.every(f, opt_obj);+ }+ if (goog.isArrayLike(col) || goog.isString(col)) {+ return goog.array.every(/** @type {!Array<?>} */ (col), f, opt_obj);+ }+ var keys = goog.structs.getKeys(col);+ var values = goog.structs.getValues(col);+ var l = values.length;+ for (var i = 0; i < l; i++) {+ if (!f.call(opt_obj, values[i], keys && keys[i], col)) {+ return false;+ }+ }+ return true;};-// Copyright 2006 The Closure Library Authors. All Rights Reserved.+// Copyright 2011 The Closure Library Authors. All Rights Reserved.//// Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.@@ -37829,1364 +38050,1353 @@ goog.iter.combinationsWithReplacement = function(iterable, length) {// limitations under the License./**- * @fileoverview Datastructure: Hash Map.- *- * @author [email protected] (Erik Arvidsson)+ * @fileoverview Defines the collection interface.*- * This file contains an implementation of a Map structure. It implements a lot- * of the methods used in goog.structs so those functions work on hashes. This- * is best suited for complex key types. For simple keys such as numbers and- * strings, and where special names like __proto__ are not a concern, consider- * using the lighter-weight utilities in goog.object.+ * @author [email protected] (Nathan Naze)*/--goog.provide('goog.structs.Map');--goog.require('goog.iter.Iterator');-goog.require('goog.iter.StopIteration');-goog.require('goog.object');+goog.provide('goog.structs.Collection');/**- * Class for Hash Map datastructure.- * @param {*=} opt_map Map or Object to initialize the map with.- * @param {...*} var_args If 2 or more arguments are present then they- * will be used as key-value pairs.- * @constructor- * @template K, V+ * An interface for a collection of values.+ * @interface+ * @template T*/-goog.structs.Map = function(opt_map, var_args) {-- /**- * Underlying JS object used to implement the map.- * @private {!Object}- */- this.map_ = {};-- /**- * An array of keys. This is necessary for two reasons:- * 1. Iterating the keys using for (var key in this.map_) allocates an- * object for every key in IE which is really bad for IE6 GC perf.- * 2. Without a side data structure, we would need to escape all the keys- * as that would be the only way we could tell during iteration if the- * key was an internal key or a property of the object.- *- * This array can contain deleted keys so it's necessary to check the map- * as well to see if the key is still in the map (this doesn't require a- * memory allocation in IE).- * @private {!Array<string>}- */- this.keys_ = [];+goog.structs.Collection = function() {};- /**- * The number of key value pairs in the map.- * @private {number}- */- this.count_ = 0;- /**- * Version used to detect changes while iterating.- * @private {number}- */- this.version_ = 0;+/**+ * @param {T} value Value to add to the collection.+ */+goog.structs.Collection.prototype.add;- var argLength = arguments.length;- if (argLength > 1) {- if (argLength % 2) {- throw Error('Uneven number of arguments');- }- for (var i = 0; i < argLength; i += 2) {- this.set(arguments[i], arguments[i + 1]);- }- } else if (opt_map) {- this.addAll(/** @type {Object} */ (opt_map));- }-};+/**+ * @param {T} value Value to remove from the collection.+ */+goog.structs.Collection.prototype.remove;/**- * @return {number} The number of key-value pairs in the map.+ * @param {T} value Value to find in the collection.+ * @return {boolean} Whether the collection contains the specified value.*/-goog.structs.Map.prototype.getCount = function() {- return this.count_;-};+goog.structs.Collection.prototype.contains;/**- * Returns the values of the map.- * @return {!Array<V>} The values in the map.+ * @return {number} The number of values stored in the collection.*/-goog.structs.Map.prototype.getValues = function() {- this.cleanupKeysArray_();+goog.structs.Collection.prototype.getCount;- var rv = [];- for (var i = 0; i < this.keys_.length; i++) {- var key = this.keys_[i];- rv.push(this.map_[key]);- }- return rv;-};+// Copyright 2007 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * Returns the keys of the map.- * @return {!Array<string>} Array of string values.+ * @fileoverview Python style iteration utilities.+ * @author [email protected] (Erik Arvidsson)*/-goog.structs.Map.prototype.getKeys = function() {- this.cleanupKeysArray_();- return /** @type {!Array<string>} */ (this.keys_.concat());-};-/**- * Whether the map contains the given key.- * @param {*} key The key to check for.- * @return {boolean} Whether the map contains the key.- */-goog.structs.Map.prototype.containsKey = function(key) {- return goog.structs.Map.hasKey_(this.map_, key);-};+goog.provide('goog.iter');+goog.provide('goog.iter.Iterable');+goog.provide('goog.iter.Iterator');+goog.provide('goog.iter.StopIteration');++goog.require('goog.array');+goog.require('goog.asserts');+goog.require('goog.functions');+goog.require('goog.math');/**- * Whether the map contains the given value. This is O(n).- * @param {V} val The value to check for.- * @return {boolean} Whether the map contains the value.+ * @typedef {goog.iter.Iterator|{length:number}|{__iterator__}}*/-goog.structs.Map.prototype.containsValue = function(val) {- for (var i = 0; i < this.keys_.length; i++) {- var key = this.keys_[i];- if (goog.structs.Map.hasKey_(this.map_, key) && this.map_[key] == val) {- return true;- }- }- return false;-};+goog.iter.Iterable;/**- * Whether this map is equal to the argument map.- * @param {goog.structs.Map} otherMap The map against which to test equality.- * @param {function(V, V): boolean=} opt_equalityFn Optional equality function- * to test equality of values. If not specified, this will test whether- * the values contained in each map are identical objects.- * @return {boolean} Whether the maps are equal.+ * Singleton Error object that is used to terminate iterations.+ * @const {!Error}*/-goog.structs.Map.prototype.equals = function(otherMap, opt_equalityFn) {- if (this === otherMap) {- return true;- }-- if (this.count_ != otherMap.getCount()) {- return false;- }-- var equalityFn = opt_equalityFn || goog.structs.Map.defaultEquals;-- this.cleanupKeysArray_();- for (var key, i = 0; key = this.keys_[i]; i++) {- if (!equalityFn(this.get(key), otherMap.get(key))) {- return false;- }- }+goog.iter.StopIteration = ('StopIteration' in goog.global) ?+ // For script engines that support legacy iterators.+ goog.global['StopIteration'] :+ Error('StopIteration');- return true;-};/**- * Default equality test for values.- * @param {*} a The first value.- * @param {*} b The second value.- * @return {boolean} Whether a and b reference the same object.+ * Class/interface for iterators. An iterator needs to implement a {@code next}+ * method and it needs to throw a {@code goog.iter.StopIteration} when the+ * iteration passes beyond the end. Iterators have no {@code hasNext} method.+ * It is recommended to always use the helper functions to iterate over the+ * iterator or in case you are only targeting JavaScript 1.7 for in loops.+ * @constructor+ * @template VALUE*/-goog.structs.Map.defaultEquals = function(a, b) {- return a === b;-};+goog.iter.Iterator = function() {};/**- * @return {boolean} Whether the map is empty.+ * Returns the next value of the iteration. This will throw the object+ * {@see goog.iter#StopIteration} when the iteration passes the end.+ * @return {VALUE} Any object or value.*/-goog.structs.Map.prototype.isEmpty = function() {- return this.count_ == 0;+goog.iter.Iterator.prototype.next = function() {+ throw goog.iter.StopIteration;};/**- * Removes all key-value pairs from the map.+ * Returns the {@code Iterator} object itself. This is used to implement+ * the iterator protocol in JavaScript 1.7+ * @param {boolean=} opt_keys Whether to return the keys or values. Default is+ * to only return the values. This is being used by the for-in loop (true)+ * and the for-each-in loop (false). Even though the param gives a hint+ * about what the iterator will return there is no guarantee that it will+ * return the keys when true is passed.+ * @return {!goog.iter.Iterator<VALUE>} The object itself.*/-goog.structs.Map.prototype.clear = function() {- this.map_ = {};- this.keys_.length = 0;- this.count_ = 0;- this.version_ = 0;+goog.iter.Iterator.prototype.__iterator__ = function(opt_keys) {+ return this;};/**- * Removes a key-value pair based on the key. This is O(logN) amortized due to- * updating the keys array whenever the count becomes half the size of the keys- * in the keys array.- * @param {*} key The key to remove.- * @return {boolean} Whether object was removed.+ * Returns an iterator that knows how to iterate over the values in the object.+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable If the+ * object is an iterator it will be returned as is. If the object has an+ * {@code __iterator__} method that will be called to get the value+ * iterator. If the object is an array-like object we create an iterator+ * for that.+ * @return {!goog.iter.Iterator<VALUE>} An iterator that knows how to iterate+ * over the values in {@code iterable}.+ * @template VALUE*/-goog.structs.Map.prototype.remove = function(key) {- if (goog.structs.Map.hasKey_(this.map_, key)) {- delete this.map_[key];- this.count_--;- this.version_++;+goog.iter.toIterator = function(iterable) {+ if (iterable instanceof goog.iter.Iterator) {+ return iterable;+ }+ if (typeof iterable.__iterator__ == 'function') {+ return iterable.__iterator__(false);+ }+ if (goog.isArrayLike(iterable)) {+ var i = 0;+ var newIter = new goog.iter.Iterator;+ newIter.next = function() {+ while (true) {+ if (i >= iterable.length) {+ throw goog.iter.StopIteration;+ }+ // Don't include deleted elements.+ if (!(i in iterable)) {+ i++;+ continue;+ }+ return iterable[i++];+ }+ };+ return newIter;+ }- // clean up the keys array if the threshhold is hit- if (this.keys_.length > 2 * this.count_) {- this.cleanupKeysArray_();- }- return true;- }- return false;+ // TODO(arv): Should we fall back on goog.structs.getValues()?+ throw Error('Not implemented');};/**- * Cleans up the temp keys array by removing entries that are no longer in the- * map.- * @private+ * Calls a function for each element in the iterator with the element of the+ * iterator passed as argument.+ *+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * to iterate over. If the iterable is an object {@code toIterator} will be+ * called on it.+ * @param {function(this:THIS,VALUE,?,!goog.iter.Iterator<VALUE>)} f+ * The function to call for every element. This function takes 3 arguments+ * (the element, undefined, and the iterator) and the return value is+ * irrelevant. The reason for passing undefined as the second argument is+ * so that the same function can be used in {@see goog.array#forEach} as+ * well as others. The third parameter is of type "number" for+ * arraylike objects, undefined, otherwise.+ * @param {THIS=} opt_obj The object to be used as the value of 'this' within+ * {@code f}.+ * @template THIS, VALUE*/-goog.structs.Map.prototype.cleanupKeysArray_ = function() {- if (this.count_ != this.keys_.length) {- // First remove keys that are no longer in the map.- var srcIndex = 0;- var destIndex = 0;- while (srcIndex < this.keys_.length) {- var key = this.keys_[srcIndex];- if (goog.structs.Map.hasKey_(this.map_, key)) {- this.keys_[destIndex++] = key;+goog.iter.forEach = function(iterable, f, opt_obj) {+ if (goog.isArrayLike(iterable)) {+ /** @preserveTry */+ try {+ // NOTES: this passes the index number to the second parameter+ // of the callback contrary to the documentation above.+ goog.array.forEach(/** @type {goog.array.ArrayLike} */(iterable), f,+ opt_obj);+ } catch (ex) {+ if (ex !== goog.iter.StopIteration) {+ throw ex;}- srcIndex++;}- this.keys_.length = destIndex;- }-- if (this.count_ != this.keys_.length) {- // If the count still isn't correct, that means we have duplicates. This can- // happen when the same key is added and removed multiple times. Now we have- // to allocate one extra Object to remove the duplicates. This could have- // been done in the first pass, but in the common case, we can avoid- // allocating an extra object by only doing this when necessary.- var seen = {};- var srcIndex = 0;- var destIndex = 0;- while (srcIndex < this.keys_.length) {- var key = this.keys_[srcIndex];- if (!(goog.structs.Map.hasKey_(seen, key))) {- this.keys_[destIndex++] = key;- seen[key] = 1;+ } else {+ iterable = goog.iter.toIterator(iterable);+ /** @preserveTry */+ try {+ while (true) {+ f.call(opt_obj, iterable.next(), undefined, iterable);+ }+ } catch (ex) {+ if (ex !== goog.iter.StopIteration) {+ throw ex;}- srcIndex++;}- this.keys_.length = destIndex;}};/**- * Returns the value for the given key. If the key is not found and the default- * value is not given this will return {@code undefined}.- * @param {*} key The key to get the value for.- * @param {DEFAULT=} opt_val The value to return if no item is found for the- * given key, defaults to undefined.- * @return {V|DEFAULT} The value for the given key.- * @template DEFAULT+ * Calls a function for every element in the iterator, and if the function+ * returns true adds the element to a new iterator.+ *+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * to iterate over.+ * @param {+ * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f+ * The function to call for every element. This function takes 3 arguments+ * (the element, undefined, and the iterator) and should return a boolean.+ * If the return value is true the element will be included in the returned+ * iterator. If it is false the element is not included.+ * @param {THIS=} opt_obj The object to be used as the value of 'this' within+ * {@code f}.+ * @return {!goog.iter.Iterator<VALUE>} A new iterator in which only elements+ * that passed the test are present.+ * @template THIS, VALUE*/-goog.structs.Map.prototype.get = function(key, opt_val) {- if (goog.structs.Map.hasKey_(this.map_, key)) {- return this.map_[key];- }- return opt_val;+goog.iter.filter = function(iterable, f, opt_obj) {+ var iterator = goog.iter.toIterator(iterable);+ var newIter = new goog.iter.Iterator;+ newIter.next = function() {+ while (true) {+ var val = iterator.next();+ if (f.call(opt_obj, val, undefined, iterator)) {+ return val;+ }+ }+ };+ return newIter;};/**- * Adds a key-value pair to the map.- * @param {*} key The key.- * @param {V} value The value to add.- * @return {*} Some subclasses return a value.- */-goog.structs.Map.prototype.set = function(key, value) {- if (!(goog.structs.Map.hasKey_(this.map_, key))) {- this.count_++;- this.keys_.push(key);- // Only change the version if we add a new key.- this.version_++;- }- this.map_[key] = value;+ * Calls a function for every element in the iterator, and if the function+ * returns false adds the element to a new iterator.+ *+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * to iterate over.+ * @param {+ * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f+ * The function to call for every element. This function takes 3 arguments+ * (the element, undefined, and the iterator) and should return a boolean.+ * If the return value is false the element will be included in the returned+ * iterator. If it is true the element is not included.+ * @param {THIS=} opt_obj The object to be used as the value of 'this' within+ * {@code f}.+ * @return {!goog.iter.Iterator<VALUE>} A new iterator in which only elements+ * that did not pass the test are present.+ * @template THIS, VALUE+ */+goog.iter.filterFalse = function(iterable, f, opt_obj) {+ return goog.iter.filter(iterable, goog.functions.not(f), opt_obj);};/**- * Adds multiple key-value pairs from another goog.structs.Map or Object.- * @param {Object} map Object containing the data to add.+ * Creates a new iterator that returns the values in a range. This function+ * can take 1, 2 or 3 arguments:+ * <pre>+ * range(5) same as range(0, 5, 1)+ * range(2, 5) same as range(2, 5, 1)+ * </pre>+ *+ * @param {number} startOrStop The stop value if only one argument is provided.+ * The start value if 2 or more arguments are provided. If only one+ * argument is used the start value is 0.+ * @param {number=} opt_stop The stop value. If left out then the first+ * argument is used as the stop value.+ * @param {number=} opt_step The number to increment with between each call to+ * next. This can be negative.+ * @return {!goog.iter.Iterator<number>} A new iterator that returns the values+ * in the range.*/-goog.structs.Map.prototype.addAll = function(map) {- var keys, values;- if (map instanceof goog.structs.Map) {- keys = map.getKeys();- values = map.getValues();- } else {- keys = goog.object.getKeys(map);- values = goog.object.getValues(map);+goog.iter.range = function(startOrStop, opt_stop, opt_step) {+ var start = 0;+ var stop = startOrStop;+ var step = opt_step || 1;+ if (arguments.length > 1) {+ start = startOrStop;+ stop = opt_stop;}- // we could use goog.array.forEach here but I don't want to introduce that- // dependency just for this.- for (var i = 0; i < keys.length; i++) {- this.set(keys[i], values[i]);+ if (step == 0) {+ throw Error('Range step argument must not be zero');}++ var newIter = new goog.iter.Iterator;+ newIter.next = function() {+ if (step > 0 && start >= stop || step < 0 && start <= stop) {+ throw goog.iter.StopIteration;+ }+ var rv = start;+ start += step;+ return rv;+ };+ return newIter;};/**- * Calls the given function on each entry in the map.- * @param {function(this:T, V, K, goog.structs.Map<K,V>)} f- * @param {T=} opt_obj The value of "this" inside f.- * @template T+ * Joins the values in a iterator with a delimiter.+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * to get the values from.+ * @param {string} deliminator The text to put between the values.+ * @return {string} The joined value string.+ * @template VALUE*/-goog.structs.Map.prototype.forEach = function(f, opt_obj) {- var keys = this.getKeys();- for (var i = 0; i < keys.length; i++) {- var key = keys[i];- var value = this.get(key);- f.call(opt_obj, value, key, this);- }+goog.iter.join = function(iterable, deliminator) {+ return goog.iter.toArray(iterable).join(deliminator);};/**- * Clones a map and returns a new map.- * @return {!goog.structs.Map} A new map with the same key-value pairs.+ * For every element in the iterator call a function and return a new iterator+ * with that value.+ *+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterator to iterate over.+ * @param {+ * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):RESULT} f+ * The function to call for every element. This function takes 3 arguments+ * (the element, undefined, and the iterator) and should return a new value.+ * @param {THIS=} opt_obj The object to be used as the value of 'this' within+ * {@code f}.+ * @return {!goog.iter.Iterator<RESULT>} A new iterator that returns the+ * results of applying the function to each element in the original+ * iterator.+ * @template THIS, VALUE, RESULT*/-goog.structs.Map.prototype.clone = function() {- return new goog.structs.Map(this);+goog.iter.map = function(iterable, f, opt_obj) {+ var iterator = goog.iter.toIterator(iterable);+ var newIter = new goog.iter.Iterator;+ newIter.next = function() {+ var val = iterator.next();+ return f.call(opt_obj, val, undefined, iterator);+ };+ return newIter;};/**- * Returns a new map in which all the keys and values are interchanged- * (keys become values and values become keys). If multiple keys map to the- * same value, the chosen transposed value is implementation-dependent.- *- * It acts very similarly to {goog.object.transpose(Object)}.+ * Passes every element of an iterator into a function and accumulates the+ * result.*- * @return {!goog.structs.Map} The transposed map.+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * to iterate over.+ * @param {function(this:THIS,VALUE,VALUE):VALUE} f The function to call for+ * every element. This function takes 2 arguments (the function's previous+ * result or the initial value, and the value of the current element).+ * function(previousValue, currentElement) : newValue.+ * @param {VALUE} val The initial value to pass into the function on the first+ * call.+ * @param {THIS=} opt_obj The object to be used as the value of 'this' within+ * f.+ * @return {VALUE} Result of evaluating f repeatedly across the values of+ * the iterator.+ * @template THIS, VALUE*/-goog.structs.Map.prototype.transpose = function() {- var transposed = new goog.structs.Map();- for (var i = 0; i < this.keys_.length; i++) {- var key = this.keys_[i];- var value = this.map_[key];- transposed.set(value, key);- }-- return transposed;+goog.iter.reduce = function(iterable, f, val, opt_obj) {+ var rval = val;+ goog.iter.forEach(iterable, function(val) {+ rval = f.call(opt_obj, rval, val);+ });+ return rval;};/**- * @return {!Object} Object representation of the map.+ * Goes through the values in the iterator. Calls f for each of these, and if+ * any of them returns true, this returns true (without checking the rest). If+ * all return false this will return false.+ *+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * object.+ * @param {+ * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f+ * The function to call for every value. This function takes 3 arguments+ * (the value, undefined, and the iterator) and should return a boolean.+ * @param {THIS=} opt_obj The object to be used as the value of 'this' within+ * {@code f}.+ * @return {boolean} true if any value passes the test.+ * @template THIS, VALUE*/-goog.structs.Map.prototype.toObject = function() {- this.cleanupKeysArray_();- var obj = {};- for (var i = 0; i < this.keys_.length; i++) {- var key = this.keys_[i];- obj[key] = this.map_[key];+goog.iter.some = function(iterable, f, opt_obj) {+ iterable = goog.iter.toIterator(iterable);+ /** @preserveTry */+ try {+ while (true) {+ if (f.call(opt_obj, iterable.next(), undefined, iterable)) {+ return true;+ }+ }+ } catch (ex) {+ if (ex !== goog.iter.StopIteration) {+ throw ex;+ }}- return obj;+ return false;};/**- * Returns an iterator that iterates over the keys in the map. Removal of keys- * while iterating might have undesired side effects.- * @return {!goog.iter.Iterator} An iterator over the keys in the map.+ * Goes through the values in the iterator. Calls f for each of these and if any+ * of them returns false this returns false (without checking the rest). If all+ * return true this will return true.+ *+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * object.+ * @param {+ * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f+ * The function to call for every value. This function takes 3 arguments+ * (the value, undefined, and the iterator) and should return a boolean.+ * @param {THIS=} opt_obj The object to be used as the value of 'this' within+ * {@code f}.+ * @return {boolean} true if every value passes the test.+ * @template THIS, VALUE*/-goog.structs.Map.prototype.getKeyIterator = function() {- return this.__iterator__(true);+goog.iter.every = function(iterable, f, opt_obj) {+ iterable = goog.iter.toIterator(iterable);+ /** @preserveTry */+ try {+ while (true) {+ if (!f.call(opt_obj, iterable.next(), undefined, iterable)) {+ return false;+ }+ }+ } catch (ex) {+ if (ex !== goog.iter.StopIteration) {+ throw ex;+ }+ }+ return true;};/**- * Returns an iterator that iterates over the values in the map. Removal of- * keys while iterating might have undesired side effects.- * @return {!goog.iter.Iterator} An iterator over the values in the map.+ * Takes zero or more iterables and returns one iterator that will iterate over+ * them in the order chained.+ * @param {...!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} var_args Any+ * number of iterable objects.+ * @return {!goog.iter.Iterator<VALUE>} Returns a new iterator that will+ * iterate over all the given iterables' contents.+ * @template VALUE*/-goog.structs.Map.prototype.getValueIterator = function() {- return this.__iterator__(false);+goog.iter.chain = function(var_args) {+ return goog.iter.chainFromIterable(arguments);};/**- * Returns an iterator that iterates over the values or the keys in the map.- * This throws an exception if the map was mutated since the iterator was- * created.- * @param {boolean=} opt_keys True to iterate over the keys. False to iterate- * over the values. The default value is false.- * @return {!goog.iter.Iterator} An iterator over the values or keys in the map.+ * Takes a single iterable containing zero or more iterables and returns one+ * iterator that will iterate over each one in the order given.+ * @see http://docs.python.org/2/library/itertools.html#itertools.chain.from_iterable+ * @param {goog.iter.Iterable} iterable The iterable of iterables to chain.+ * @return {!goog.iter.Iterator<VALUE>} Returns a new iterator that will+ * iterate over all the contents of the iterables contained within+ * {@code iterable}.+ * @template VALUE*/-goog.structs.Map.prototype.__iterator__ = function(opt_keys) {- // Clean up keys to minimize the risk of iterating over dead keys.- this.cleanupKeysArray_();-- var i = 0;- var keys = this.keys_;- var map = this.map_;- var version = this.version_;- var selfObj = this;+goog.iter.chainFromIterable = function(iterable) {+ var iterator = goog.iter.toIterator(iterable);+ var iter = new goog.iter.Iterator();+ var current = null;- var newIter = new goog.iter.Iterator;- newIter.next = function() {+ iter.next = function() {while (true) {- if (version != selfObj.version_) {- throw Error('The map has changed since the iterator was created');+ if (current == null) {+ var it = iterator.next();+ current = goog.iter.toIterator(it);}- if (i >= keys.length) {- throw goog.iter.StopIteration;+ try {+ return current.next();+ } catch (ex) {+ if (ex !== goog.iter.StopIteration) {+ throw ex;+ }+ current = null;}- var key = keys[i++];- return opt_keys ? key : map[key];}};- return newIter;-};--/**- * Safe way to test for hasOwnProperty. It even allows testing for- * 'hasOwnProperty'.- * @param {Object} obj The object to test for presence of the given key.- * @param {*} key The key to check for.- * @return {boolean} Whether the object has the key.- * @private- */-goog.structs.Map.hasKey_ = function(obj, key) {- return Object.prototype.hasOwnProperty.call(obj, key);+ return iter;};-// Copyright 2006 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License./**- * @fileoverview Datastructure: Set.- *- * @author [email protected] (Erik Arvidsson)- *- * This class implements a set data structure. Adding and removing is O(1). It- * supports both object and primitive values. Be careful because you can add- * both 1 and new Number(1), because these are not the same. You can even add- * multiple new Number(1) because these are not equal.+ * Builds a new iterator that iterates over the original, but skips elements as+ * long as a supplied function returns true.+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * object.+ * @param {+ * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f+ * The function to call for every value. This function takes 3 arguments+ * (the value, undefined, and the iterator) and should return a boolean.+ * @param {THIS=} opt_obj The object to be used as the value of 'this' within+ * {@code f}.+ * @return {!goog.iter.Iterator<VALUE>} A new iterator that drops elements from+ * the original iterator as long as {@code f} is true.+ * @template THIS, VALUE*/---goog.provide('goog.structs.Set');--goog.require('goog.structs');-goog.require('goog.structs.Collection');-goog.require('goog.structs.Map');-+goog.iter.dropWhile = function(iterable, f, opt_obj) {+ var iterator = goog.iter.toIterator(iterable);+ var newIter = new goog.iter.Iterator;+ var dropping = true;+ newIter.next = function() {+ while (true) {+ var val = iterator.next();+ if (dropping && f.call(opt_obj, val, undefined, iterator)) {+ continue;+ } else {+ dropping = false;+ }+ return val;+ }+ };+ return newIter;+};/**- * A set that can contain both primitives and objects. Adding and removing- * elements is O(1). Primitives are treated as identical if they have the same- * type and convert to the same string. Objects are treated as identical only- * if they are references to the same object. WARNING: A goog.structs.Set can- * contain both 1 and (new Number(1)), because they are not the same. WARNING:- * Adding (new Number(1)) twice will yield two distinct elements, because they- * are two different objects. WARNING: Any object that is added to a- * goog.structs.Set will be modified! Because goog.getUid() is used to- * identify objects, every object in the set will be mutated.- * @param {Array<T>|Object<?,T>=} opt_values Initial values to start with.- * @constructor- * @implements {goog.structs.Collection<T>}- * @final- * @template T+ * Builds a new iterator that iterates over the original, but only as long as a+ * supplied function returns true.+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * object.+ * @param {+ * function(this:THIS,VALUE,undefined,!goog.iter.Iterator<VALUE>):boolean} f+ * The function to call for every value. This function takes 3 arguments+ * (the value, undefined, and the iterator) and should return a boolean.+ * @param {THIS=} opt_obj This is used as the 'this' object in f when called.+ * @return {!goog.iter.Iterator<VALUE>} A new iterator that keeps elements in+ * the original iterator as long as the function is true.+ * @template THIS, VALUE*/-goog.structs.Set = function(opt_values) {- this.map_ = new goog.structs.Map;- if (opt_values) {- this.addAll(opt_values);- }+goog.iter.takeWhile = function(iterable, f, opt_obj) {+ var iterator = goog.iter.toIterator(iterable);+ var iter = new goog.iter.Iterator();+ iter.next = function() {+ var val = iterator.next();+ if (f.call(opt_obj, val, undefined, iterator)) {+ return val;+ }+ throw goog.iter.StopIteration;+ };+ return iter;};/**- * Obtains a unique key for an element of the set. Primitives will yield the- * same key if they have the same type and convert to the same string. Object- * references will yield the same key only if they refer to the same object.- * @param {*} val Object or primitive value to get a key for.- * @return {string} A unique key for this value/object.- * @private+ * Converts the iterator to an array+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterator+ * to convert to an array.+ * @return {!Array<VALUE>} An array of the elements the iterator iterates over.+ * @template VALUE*/-goog.structs.Set.getKey_ = function(val) {- var type = typeof val;- if (type == 'object' && val || type == 'function') {- return 'o' + goog.getUid(/** @type {Object} */ (val));- } else {- return type.substr(0, 1) + val;+goog.iter.toArray = function(iterable) {+ // Fast path for array-like.+ if (goog.isArrayLike(iterable)) {+ return goog.array.toArray(/** @type {!goog.array.ArrayLike} */(iterable));}+ iterable = goog.iter.toIterator(iterable);+ var array = [];+ goog.iter.forEach(iterable, function(val) {+ array.push(val);+ });+ return array;};/**- * @return {number} The number of elements in the set.- * @override+ * Iterates over two iterables and returns true if they contain the same+ * sequence of elements and have the same length.+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable1 The first+ * iterable object.+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable2 The second+ * iterable object.+ * @param {function(VALUE,VALUE):boolean=} opt_equalsFn Optional comparison+ * function.+ * Should take two arguments to compare, and return true if the arguments+ * are equal. Defaults to {@link goog.array.defaultCompareEquality} which+ * compares the elements using the built-in '===' operator.+ * @return {boolean} true if the iterables contain the same sequence of elements+ * and have the same length.+ * @template VALUE*/-goog.structs.Set.prototype.getCount = function() {- return this.map_.getCount();+goog.iter.equals = function(iterable1, iterable2, opt_equalsFn) {+ var fillValue = {};+ var pairs = goog.iter.zipLongest(fillValue, iterable1, iterable2);+ var equalsFn = opt_equalsFn || goog.array.defaultCompareEquality;+ return goog.iter.every(pairs, function(pair) {+ return equalsFn(pair[0], pair[1]);+ });};/**- * Add a primitive or an object to the set.- * @param {T} element The primitive or object to add.- * @override+ * Advances the iterator to the next position, returning the given default value+ * instead of throwing an exception if the iterator has no more entries.+ * @param {goog.iter.Iterator<VALUE>|goog.iter.Iterable} iterable The iterable+ * object.+ * @param {VALUE} defaultValue The value to return if the iterator is empty.+ * @return {VALUE} The next item in the iteration, or defaultValue if the+ * iterator was empty.+ * @template VALUE*/-goog.structs.Set.prototype.add = function(element) {- this.map_.set(goog.structs.Set.getKey_(element), element);+goog.iter.nextOrValue = function(iterable, defaultValue) {+ try {+ return goog.iter.toIterator(iterable).next();+ } catch (e) {+ if (e != goog.iter.StopIteration) {+ throw e;+ }+ return defaultValue;+ }};/**- * Adds all the values in the given collection to this set.- * @param {Array<T>|goog.structs.Collection<T>|Object<?,T>} col A collection- * containing the elements to add.+ * Cartesian product of zero or more sets. Gives an iterator that gives every+ * combination of one element chosen from each set. For example,+ * ([1, 2], [3, 4]) gives ([1, 3], [1, 4], [2, 3], [2, 4]).+ * @see http://docs.python.org/library/itertools.html#itertools.product+ * @param {...!goog.array.ArrayLike<VALUE>} var_args Zero or more sets, as+ * arrays.+ * @return {!goog.iter.Iterator<!Array<VALUE>>} An iterator that gives each+ * n-tuple (as an array).+ * @template VALUE*/-goog.structs.Set.prototype.addAll = function(col) {- var values = goog.structs.getValues(col);- var l = values.length;- for (var i = 0; i < l; i++) {- this.add(values[i]);+goog.iter.product = function(var_args) {+ var someArrayEmpty = goog.array.some(arguments, function(arr) {+ return !arr.length;+ });++ // An empty set in a cartesian product gives an empty set.+ if (someArrayEmpty || !arguments.length) {+ return new goog.iter.Iterator();}-};+ var iter = new goog.iter.Iterator();+ var arrays = arguments;++ // The first indices are [0, 0, ...]+ var indicies = goog.array.repeat(0, arrays.length);++ iter.next = function() {++ if (indicies) {+ var retVal = goog.array.map(indicies, function(valueIndex, arrayIndex) {+ return arrays[arrayIndex][valueIndex];+ });++ // Generate the next-largest indices for the next call.+ // Increase the rightmost index. If it goes over, increase the next+ // rightmost (like carry-over addition).+ for (var i = indicies.length - 1; i >= 0; i--) {+ // Assertion prevents compiler warning below.+ goog.asserts.assert(indicies);+ if (indicies[i] < arrays[i].length - 1) {+ indicies[i]++;+ break;+ }++ // We're at the last indices (the last element of every array), so+ // the iteration is over on the next call.+ if (i == 0) {+ indicies = null;+ break;+ }+ // Reset the index in this column and loop back to increment the+ // next one.+ indicies[i] = 0;+ }+ return retVal;+ }++ throw goog.iter.StopIteration;+ };-/**- * Removes all values in the given collection from this set.- * @param {Array<T>|goog.structs.Collection<T>|Object<?,T>} col A collection- * containing the elements to remove.- */-goog.structs.Set.prototype.removeAll = function(col) {- var values = goog.structs.getValues(col);- var l = values.length;- for (var i = 0; i < l; i++) {- this.remove(values[i]);- }+ return iter;};/**- * Removes the given element from this set.- * @param {T} element The primitive or object to remove.- * @return {boolean} Whether the element was found and removed.- * @override+ * Create an iterator to cycle over the iterable's elements indefinitely.+ * For example, ([1, 2, 3]) would return : 1, 2, 3, 1, 2, 3, ...+ * @see: http://docs.python.org/library/itertools.html#itertools.cycle.+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable object.+ * @return {!goog.iter.Iterator<VALUE>} An iterator that iterates indefinitely+ * over the values in {@code iterable}.+ * @template VALUE*/-goog.structs.Set.prototype.remove = function(element) {- return this.map_.remove(goog.structs.Set.getKey_(element));-};+goog.iter.cycle = function(iterable) {+ var baseIterator = goog.iter.toIterator(iterable);+ // We maintain a cache to store the iterable elements as we iterate+ // over them. The cache is used to return elements once we have+ // iterated over the iterable once.+ var cache = [];+ var cacheIndex = 0;-/**- * Removes all elements from this set.- */-goog.structs.Set.prototype.clear = function() {- this.map_.clear();-};+ var iter = new goog.iter.Iterator();+ // This flag is set after the iterable is iterated over once+ var useCache = false;-/**- * Tests whether this set is empty.- * @return {boolean} True if there are no elements in this set.- */-goog.structs.Set.prototype.isEmpty = function() {- return this.map_.isEmpty();-};+ iter.next = function() {+ var returnElement = null;+ // Pull elements off the original iterator if not using cache+ if (!useCache) {+ try {+ // Return the element from the iterable+ returnElement = baseIterator.next();+ cache.push(returnElement);+ return returnElement;+ } catch (e) {+ // If an exception other than StopIteration is thrown+ // or if there are no elements to iterate over (the iterable was empty)+ // throw an exception+ if (e != goog.iter.StopIteration || goog.array.isEmpty(cache)) {+ throw e;+ }+ // set useCache to true after we know that a 'StopIteration' exception+ // was thrown and the cache is not empty (to handle the 'empty iterable'+ // use case)+ useCache = true;+ }+ }-/**- * Tests whether this set contains the given element.- * @param {T} element The primitive or object to test for.- * @return {boolean} True if this set contains the given element.- * @override- */-goog.structs.Set.prototype.contains = function(element) {- return this.map_.containsKey(goog.structs.Set.getKey_(element));-};+ returnElement = cache[cacheIndex];+ cacheIndex = (cacheIndex + 1) % cache.length;+ return returnElement;+ };-/**- * Tests whether this set contains all the values in a given collection.- * Repeated elements in the collection are ignored, e.g. (new- * goog.structs.Set([1, 2])).containsAll([1, 1]) is True.- * @param {goog.structs.Collection<T>|Object} col A collection-like object.- * @return {boolean} True if the set contains all elements.- */-goog.structs.Set.prototype.containsAll = function(col) {- return goog.structs.every(col, this.contains, this);+ return iter;};/**- * Finds all values that are present in both this set and the given collection.- * @param {Array<S>|Object<?,S>} col A collection.- * @return {!goog.structs.Set<T|S>} A new set containing all the values- * (primitives or objects) present in both this set and the given- * collection.- * @template S+ * Creates an iterator that counts indefinitely from a starting value.+ * @see http://docs.python.org/2/library/itertools.html#itertools.count+ * @param {number=} opt_start The starting value. Default is 0.+ * @param {number=} opt_step The number to increment with between each call to+ * next. Negative and floating point numbers are allowed. Default is 1.+ * @return {!goog.iter.Iterator<number>} A new iterator that returns the values+ * in the series.*/-goog.structs.Set.prototype.intersection = function(col) {- var result = new goog.structs.Set();+goog.iter.count = function(opt_start, opt_step) {+ var counter = opt_start || 0;+ var step = goog.isDef(opt_step) ? opt_step : 1;+ var iter = new goog.iter.Iterator();- var values = goog.structs.getValues(col);- for (var i = 0; i < values.length; i++) {- var value = values[i];- if (this.contains(value)) {- result.add(value);- }- }+ iter.next = function() {+ var returnValue = counter;+ counter += step;+ return returnValue;+ };- return result;+ return iter;};/**- * Finds all values that are present in this set and not in the given- * collection.- * @param {Array<T>|goog.structs.Collection<T>|Object<?,T>} col A collection.- * @return {!goog.structs.Set} A new set containing all the values- * (primitives or objects) present in this set but not in the given- * collection.+ * Creates an iterator that returns the same object or value repeatedly.+ * @param {VALUE} value Any object or value to repeat.+ * @return {!goog.iter.Iterator<VALUE>} A new iterator that returns the+ * repeated value.+ * @template VALUE*/-goog.structs.Set.prototype.difference = function(col) {- var result = this.clone();- result.removeAll(col);- return result;-};+goog.iter.repeat = function(value) {+ var iter = new goog.iter.Iterator();+ iter.next = goog.functions.constant(value);-/**- * Returns an array containing all the elements in this set.- * @return {!Array<T>} An array containing all the elements in this set.- */-goog.structs.Set.prototype.getValues = function() {- return this.map_.getValues();+ return iter;};/**- * Creates a shallow clone of this set.- * @return {!goog.structs.Set<T>} A new set containing all the same elements as- * this set.+ * Creates an iterator that returns running totals from the numbers in+ * {@code iterable}. For example, the array {@code [1, 2, 3, 4, 5]} yields+ * {@code 1 -> 3 -> 6 -> 10 -> 15}.+ * @see http://docs.python.org/3.2/library/itertools.html#itertools.accumulate+ * @param {!goog.iter.Iterable<number>} iterable The iterable of numbers to+ * accumulate.+ * @return {!goog.iter.Iterator<number>} A new iterator that returns the+ * numbers in the series.*/-goog.structs.Set.prototype.clone = function() {- return new goog.structs.Set(this);-};+goog.iter.accumulate = function(iterable) {+ var iterator = goog.iter.toIterator(iterable);+ var total = 0;+ var iter = new goog.iter.Iterator();+ iter.next = function() {+ total += iterator.next();+ return total;+ };-/**- * Tests whether the given collection consists of the same elements as this set,- * regardless of order, without repetition. Primitives are treated as equal if- * they have the same type and convert to the same string; objects are treated- * as equal if they are references to the same object. This operation is O(n).- * @param {goog.structs.Collection<T>|Object} col A collection.- * @return {boolean} True if the given collection consists of the same elements- * as this set, regardless of order, without repetition.- */-goog.structs.Set.prototype.equals = function(col) {- return this.getCount() == goog.structs.getCount(col) && this.isSubsetOf(col);+ return iter;};/**- * Tests whether the given collection contains all the elements in this set.- * Primitives are treated as equal if they have the same type and convert to the- * same string; objects are treated as equal if they are references to the same- * object. This operation is O(n).- * @param {goog.structs.Collection<T>|Object} col A collection.- * @return {boolean} True if this set is a subset of the given collection.+ * Creates an iterator that returns arrays containing the ith elements from the+ * provided iterables. The returned arrays will be the same size as the number+ * of iterables given in {@code var_args}. Once the shortest iterable is+ * exhausted, subsequent calls to {@code next()} will throw+ * {@code goog.iter.StopIteration}.+ * @see http://docs.python.org/2/library/itertools.html#itertools.izip+ * @param {...!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} var_args Any+ * number of iterable objects.+ * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator that returns+ * arrays of elements from the provided iterables.+ * @template VALUE*/-goog.structs.Set.prototype.isSubsetOf = function(col) {- var colCount = goog.structs.getCount(col);- if (this.getCount() > colCount) {- return false;- }- // TODO(user) Find the minimal collection size where the conversion makes- // the contains() method faster.- if (!(col instanceof goog.structs.Set) && colCount > 5) {- // Convert to a goog.structs.Set so that goog.structs.contains runs in- // O(1) time instead of O(n) time.- col = new goog.structs.Set(col);- }- return goog.structs.every(this, function(value) {- return goog.structs.contains(col, value);- });-};+goog.iter.zip = function(var_args) {+ var args = arguments;+ var iter = new goog.iter.Iterator();+ if (args.length > 0) {+ var iterators = goog.array.map(args, goog.iter.toIterator);+ iter.next = function() {+ var arr = goog.array.map(iterators, function(it) {+ return it.next();+ });+ return arr;+ };+ }-/**- * Returns an iterator that iterates over the elements in this set.- * @param {boolean=} opt_keys This argument is ignored.- * @return {!goog.iter.Iterator} An iterator over the elements in this set.- */-goog.structs.Set.prototype.__iterator__ = function(opt_keys) {- return this.map_.__iterator__(false);+ return iter;};-// Copyright 2006 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License./**- * @fileoverview Logging and debugging utilities.- *- * @see ../demos/debug.html+ * Creates an iterator that returns arrays containing the ith elements from the+ * provided iterables. The returned arrays will be the same size as the number+ * of iterables given in {@code var_args}. Shorter iterables will be extended+ * with {@code fillValue}. Once the longest iterable is exhausted, subsequent+ * calls to {@code next()} will throw {@code goog.iter.StopIteration}.+ * @see http://docs.python.org/2/library/itertools.html#itertools.izip_longest+ * @param {VALUE} fillValue The object or value used to fill shorter iterables.+ * @param {...!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} var_args Any+ * number of iterable objects.+ * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator that returns+ * arrays of elements from the provided iterables.+ * @template VALUE*/+goog.iter.zipLongest = function(fillValue, var_args) {+ var args = goog.array.slice(arguments, 1);+ var iter = new goog.iter.Iterator();-goog.provide('goog.debug');--goog.require('goog.array');-goog.require('goog.html.SafeHtml');-goog.require('goog.html.SafeUrl');-goog.require('goog.html.uncheckedconversions');-goog.require('goog.string.Const');-goog.require('goog.structs.Set');-goog.require('goog.userAgent');---/** @define {boolean} Whether logging should be enabled. */-goog.define('goog.debug.LOGGING_ENABLED', goog.DEBUG);-+ if (args.length > 0) {+ var iterators = goog.array.map(args, goog.iter.toIterator);-/**- * Catches onerror events fired by windows and similar objects.- * @param {function(Object)} logFunc The function to call with the error- * information.- * @param {boolean=} opt_cancel Whether to stop the error from reaching the- * browser.- * @param {Object=} opt_target Object that fires onerror events.- */-goog.debug.catchErrors = function(logFunc, opt_cancel, opt_target) {- var target = opt_target || goog.global;- var oldErrorHandler = target.onerror;- var retVal = !!opt_cancel;+ iter.next = function() {+ var iteratorsHaveValues = false; // false when all iterators are empty.+ var arr = goog.array.map(iterators, function(it) {+ var returnValue;+ try {+ returnValue = it.next();+ // Iterator had a value, so we've not exhausted the iterators.+ // Set flag accordingly.+ iteratorsHaveValues = true;+ } catch (ex) {+ if (ex !== goog.iter.StopIteration) {+ throw ex;+ }+ returnValue = fillValue;+ }+ return returnValue;+ });- // Chrome interprets onerror return value backwards (http://crbug.com/92062)- // until it was fixed in webkit revision r94061 (Webkit 535.3). This- // workaround still needs to be skipped in Safari after the webkit change- // gets pushed out in Safari.- // See https://bugs.webkit.org/show_bug.cgi?id=67119- if (goog.userAgent.WEBKIT &&- !goog.userAgent.isVersionOrHigher('535.3')) {- retVal = !retVal;+ if (!iteratorsHaveValues) {+ throw goog.iter.StopIteration;+ }+ return arr;+ };}- /**- * New onerror handler for this target. This onerror handler follows the spec- * according to- * http://www.whatwg.org/specs/web-apps/current-work/#runtime-script-errors- * The spec was changed in August 2013 to support receiving column information- * and an error object for all scripts on the same origin or cross origin- * scripts with the proper headers. See- * https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror- *- * @param {string} message The error message. For cross-origin errors, this- * will be scrubbed to just "Script error.". For new browsers that have- * updated to follow the latest spec, errors that come from origins that- * have proper cross origin headers will not be scrubbed.- * @param {string} url The URL of the script that caused the error. The URL- * will be scrubbed to "" for cross origin scripts unless the script has- * proper cross origin headers and the browser has updated to the latest- * spec.- * @param {number} line The line number in the script that the error- * occurred on.- * @param {number=} opt_col The optional column number that the error- * occurred on. Only browsers that have updated to the latest spec will- * include this.- * @param {Error=} opt_error The optional actual error object for this- * error that should include the stack. Only browsers that have updated- * to the latest spec will inlude this parameter.- * @return {boolean} Whether to prevent the error from reaching the browser.- */- target.onerror = function(message, url, line, opt_col, opt_error) {- if (oldErrorHandler) {- oldErrorHandler(message, url, line, opt_col, opt_error);- }- logFunc({- message: message,- fileName: url,- line: line,- col: opt_col,- error: opt_error- });- return retVal;- };+ return iter;};/**- * Creates a string representing an object and all its properties.- * @param {Object|null|undefined} obj Object to expose.- * @param {boolean=} opt_showFn Show the functions as well as the properties,- * default is false.- * @return {string} The string representation of {@code obj}.+ * Creates an iterator that filters {@code iterable} based on a series of+ * {@code selectors}. On each call to {@code next()}, one item is taken from+ * both the {@code iterable} and {@code selectors} iterators. If the item from+ * {@code selectors} evaluates to true, the item from {@code iterable} is given.+ * Otherwise, it is skipped. Once either {@code iterable} or {@code selectors}+ * is exhausted, subsequent calls to {@code next()} will throw+ * {@code goog.iter.StopIteration}.+ * @see http://docs.python.org/2/library/itertools.html#itertools.compress+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable to filter.+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} selectors An+ * iterable of items to be evaluated in a boolean context to determine if+ * the corresponding element in {@code iterable} should be included in the+ * result.+ * @return {!goog.iter.Iterator<VALUE>} A new iterator that returns the+ * filtered values.+ * @template VALUE*/-goog.debug.expose = function(obj, opt_showFn) {- if (typeof obj == 'undefined') {- return 'undefined';- }- if (obj == null) {- return 'NULL';- }- var str = [];+goog.iter.compress = function(iterable, selectors) {+ var selectorIterator = goog.iter.toIterator(selectors);- for (var x in obj) {- if (!opt_showFn && goog.isFunction(obj[x])) {- continue;- }- var s = x + ' = ';- /** @preserveTry */- try {- s += obj[x];- } catch (e) {- s += '*** ' + e + ' ***';- }- str.push(s);- }- return str.join('\n');+ return goog.iter.filter(iterable, function() {+ return !!selectorIterator.next();+ });};+/**- * Creates a string representing a given primitive or object, and for an- * object, all its properties and nested objects. WARNING: If an object is- * given, it and all its nested objects will be modified. To detect reference- * cycles, this method identifies objects using goog.getUid() which mutates the- * object.- * @param {*} obj Object to expose.- * @param {boolean=} opt_showFn Also show properties that are functions (by- * default, functions are omitted).- * @return {string} A string representation of {@code obj}.+ * Implements the {@code goog.iter.groupBy} iterator.+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable to group.+ * @param {function(...VALUE): KEY=} opt_keyFunc Optional function for+ * determining the key value for each group in the {@code iterable}. Default+ * is the identity function.+ * @constructor+ * @extends {goog.iter.Iterator<!Array<?>>}+ * @template KEY, VALUE+ * @private*/-goog.debug.deepExpose = function(obj, opt_showFn) {- var str = [];+goog.iter.GroupByIterator_ = function(iterable, opt_keyFunc) {- var helper = function(obj, space, parentSeen) {- var nestspace = space + ' ';- var seen = new goog.structs.Set(parentSeen);+ /**+ * The iterable to group, coerced to an iterator.+ * @type {!goog.iter.Iterator}+ */+ this.iterator = goog.iter.toIterator(iterable);- var indentMultiline = function(str) {- return str.replace(/\n/g, '\n' + space);- };+ /**+ * A function for determining the key value for each element in the iterable.+ * If no function is provided, the identity function is used and returns the+ * element unchanged.+ * @type {function(...VALUE): KEY}+ */+ this.keyFunc = opt_keyFunc || goog.functions.identity;- /** @preserveTry */- try {- if (!goog.isDef(obj)) {- str.push('undefined');- } else if (goog.isNull(obj)) {- str.push('NULL');- } else if (goog.isString(obj)) {- str.push('"' + indentMultiline(obj) + '"');- } else if (goog.isFunction(obj)) {- str.push(indentMultiline(String(obj)));- } else if (goog.isObject(obj)) {- if (seen.contains(obj)) {- str.push('*** reference loop detected ***');- } else {- seen.add(obj);- str.push('{');- for (var x in obj) {- if (!opt_showFn && goog.isFunction(obj[x])) {- continue;- }- str.push('\n');- str.push(nestspace);- str.push(x + ' = ');- helper(obj[x], nestspace, seen);- }- str.push('\n' + space + '}');- }- } else {- str.push(obj);- }- } catch (e) {- str.push('*** ' + e + ' ***');- }- };+ /**+ * The target key for determining the start of a group.+ * @type {KEY}+ */+ this.targetKey;- helper(obj, '', new goog.structs.Set());- return str.join('');+ /**+ * The current key visited during iteration.+ * @type {KEY}+ */+ this.currentKey;++ /**+ * The current value being added to the group.+ * @type {VALUE}+ */+ this.currentValue;};+goog.inherits(goog.iter.GroupByIterator_, goog.iter.Iterator);-/**- * Recursively outputs a nested array as a string.- * @param {Array<?>} arr The array.- * @return {string} String representing nested array.- */-goog.debug.exposeArray = function(arr) {- var str = [];- for (var i = 0; i < arr.length; i++) {- if (goog.isArray(arr[i])) {- str.push(goog.debug.exposeArray(arr[i]));- } else {- str.push(arr[i]);- }+/** @override */+goog.iter.GroupByIterator_.prototype.next = function() {+ while (this.currentKey == this.targetKey) {+ this.currentValue = this.iterator.next(); // Exits on StopIteration+ this.currentKey = this.keyFunc(this.currentValue);}- return '[ ' + str.join(', ') + ' ]';+ this.targetKey = this.currentKey;+ return [this.currentKey, this.groupItems_(this.targetKey)];};/**- * Exposes an exception that has been caught by a try...catch and outputs the- * error as HTML with a stack trace.- * @param {Object} err Error object or string.- * @param {Function=} opt_fn Optional function to start stack trace from.- * @return {string} Details of exception, as HTML.+ * Performs the grouping of objects using the given key.+ * @param {KEY} targetKey The target key object for the group.+ * @return {!Array<VALUE>} An array of grouped objects.+ * @private*/-goog.debug.exposeException = function(err, opt_fn) {- var html = goog.debug.exposeExceptionAsHtml(err, opt_fn);- return goog.html.SafeHtml.unwrap(html);+goog.iter.GroupByIterator_.prototype.groupItems_ = function(targetKey) {+ var arr = [];+ while (this.currentKey == targetKey) {+ arr.push(this.currentValue);+ try {+ this.currentValue = this.iterator.next();+ } catch (ex) {+ if (ex !== goog.iter.StopIteration) {+ throw ex;+ }+ break;+ }+ this.currentKey = this.keyFunc(this.currentValue);+ }+ return arr;};/**- * Exposes an exception that has been caught by a try...catch and outputs the- * error with a stack trace.- * @param {Object} err Error object or string.- * @param {Function=} opt_fn Optional function to start stack trace from.- * @return {!goog.html.SafeHtml} Details of exception.+ * Creates an iterator that returns arrays containing elements from the+ * {@code iterable} grouped by a key value. For iterables with repeated+ * elements (i.e. sorted according to a particular key function), this function+ * has a {@code uniq}-like effect. For example, grouping the array:+ * {@code [A, B, B, C, C, A]} produces+ * {@code [A, [A]], [B, [B, B]], [C, [C, C]], [A, [A]]}.+ * @see http://docs.python.org/2/library/itertools.html#itertools.groupby+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable to group.+ * @param {function(...VALUE): KEY=} opt_keyFunc Optional function for+ * determining the key value for each group in the {@code iterable}. Default+ * is the identity function.+ * @return {!goog.iter.Iterator<!Array<?>>} A new iterator that returns+ * arrays of consecutive key and groups.+ * @template KEY, VALUE*/-goog.debug.exposeExceptionAsHtml = function(err, opt_fn) {- /** @preserveTry */- try {- var e = goog.debug.normalizeErrorObject(err);- // Create the error message- var viewSourceUrl = goog.debug.createViewSourceUrl_(e.fileName);- var error = goog.html.SafeHtml.concat(- goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(- 'Message: ' + e.message + '\nUrl: '),- goog.html.SafeHtml.create('a',- {href: viewSourceUrl, target: '_new'}, e.fileName),- goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(- '\nLine: ' + e.lineNumber + '\n\nBrowser stack:\n' +- e.stack + '-> ' + '[end]\n\nJS stack traversal:\n' +- goog.debug.getStacktrace(opt_fn) + '-> '));- return error;- } catch (e2) {- return goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(- 'Exception trying to expose exception! You win, we lose. ' + e2);- }+goog.iter.groupBy = function(iterable, opt_keyFunc) {+ return new goog.iter.GroupByIterator_(iterable, opt_keyFunc);};/**- * @param {?string=} opt_fileName- * @return {!goog.html.SafeUrl} SafeUrl with view-source scheme, pointing at- * fileName.- * @private+ * Gives an iterator that gives the result of calling the given function+ * <code>f</code> with the arguments taken from the next element from+ * <code>iterable</code> (the elements are expected to also be iterables).+ *+ * Similar to {@see goog.iter#map} but allows the function to accept multiple+ * arguments from the iterable.+ *+ * @param {!goog.iter.Iterable<!goog.iter.Iterable>} iterable The iterable of+ * iterables to iterate over.+ * @param {function(this:THIS,...*):RESULT} f The function to call for every+ * element. This function takes N+2 arguments, where N represents the+ * number of items from the next element of the iterable. The two+ * additional arguments passed to the function are undefined and the+ * iterator itself. The function should return a new value.+ * @param {THIS=} opt_obj The object to be used as the value of 'this' within+ * {@code f}.+ * @return {!goog.iter.Iterator<RESULT>} A new iterator that returns the+ * results of applying the function to each element in the original+ * iterator.+ * @template THIS, RESULT*/-goog.debug.createViewSourceUrl_ = function(opt_fileName) {- if (!goog.isDefAndNotNull(opt_fileName)) {- opt_fileName = '';- }- if (!/^https?:\/\//i.test(opt_fileName)) {- return goog.html.SafeUrl.fromConstant(- goog.string.Const.from('sanitizedviewsrc'));- }- var sanitizedFileName = goog.html.SafeUrl.sanitize(opt_fileName);- return goog.html.uncheckedconversions.- safeUrlFromStringKnownToSatisfyTypeContract(- goog.string.Const.from('view-source scheme plus HTTP/HTTPS URL'),- 'view-source:' + goog.html.SafeUrl.unwrap(sanitizedFileName));+goog.iter.starMap = function(iterable, f, opt_obj) {+ var iterator = goog.iter.toIterator(iterable);+ var iter = new goog.iter.Iterator();++ iter.next = function() {+ var args = goog.iter.toArray(iterator.next());+ return f.apply(opt_obj, goog.array.concat(args, undefined, iterator));+ };++ return iter;};/**- * Normalizes the error/exception object between browsers.- * @param {Object} err Raw error object.- * @return {!Object} Normalized error object.+ * Returns an array of iterators each of which can iterate over the values in+ * {@code iterable} without advancing the others.+ * @see http://docs.python.org/2/library/itertools.html#itertools.tee+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable to tee.+ * @param {number=} opt_num The number of iterators to create. Default is 2.+ * @return {!Array<goog.iter.Iterator<VALUE>>} An array of iterators.+ * @template VALUE*/-goog.debug.normalizeErrorObject = function(err) {- var href = goog.getObjectByName('window.location.href');- if (goog.isString(err)) {- return {- 'message': err,- 'name': 'Unknown error',- 'lineNumber': 'Not available',- 'fileName': href,- 'stack': 'Not available'- };- }-- var lineNumber, fileName;- var threwError = false;+goog.iter.tee = function(iterable, opt_num) {+ var iterator = goog.iter.toIterator(iterable);+ var num = goog.isNumber(opt_num) ? opt_num : 2;+ var buffers = goog.array.map(goog.array.range(num), function() {+ return [];+ });- try {- lineNumber = err.lineNumber || err.line || 'Not available';- } catch (e) {- // Firefox 2 sometimes throws an error when accessing 'lineNumber':- // Message: Permission denied to get property UnnamedClass.lineNumber- lineNumber = 'Not available';- threwError = true;- }+ var addNextIteratorValueToBuffers = function() {+ var val = iterator.next();+ goog.array.forEach(buffers, function(buffer) {+ buffer.push(val);+ });+ };- try {- fileName = err.fileName || err.filename || err.sourceURL ||- // $googDebugFname may be set before a call to eval to set the filename- // that the eval is supposed to present.- goog.global['$googDebugFname'] || href;- } catch (e) {- // Firefox 2 may also throw an error when accessing 'filename'.- fileName = 'Not available';- threwError = true;- }+ var createIterator = function(buffer) {+ // Each tee'd iterator has an associated buffer (initially empty). When a+ // tee'd iterator's buffer is empty, it calls+ // addNextIteratorValueToBuffers(), adding the next value to all tee'd+ // iterators' buffers, and then returns that value. This allows each+ // iterator to be advanced independently.+ var iter = new goog.iter.Iterator();- // The IE Error object contains only the name and the message.- // The Safari Error object uses the line and sourceURL fields.- if (threwError || !err.lineNumber || !err.fileName || !err.stack ||- !err.message || !err.name) {- return {- 'message': err.message || 'Not available',- 'name': err.name || 'UnknownError',- 'lineNumber': lineNumber,- 'fileName': fileName,- 'stack': err.stack || 'Not available'+ iter.next = function() {+ if (goog.array.isEmpty(buffer)) {+ addNextIteratorValueToBuffers();+ }+ goog.asserts.assert(!goog.array.isEmpty(buffer));+ return buffer.shift();};- }- // Standards error object- return err;+ return iter;+ };++ return goog.array.map(buffers, createIterator);};/**- * Converts an object to an Error if it's a String,- * adds a stacktrace if there isn't one,- * and optionally adds an extra message.- * @param {Error|string} err the original thrown object or string.- * @param {string=} opt_message optional additional message to add to the- * error.- * @return {!Error} If err is a string, it is used to create a new Error,- * which is enhanced and returned. Otherwise err itself is enhanced- * and returned.+ * Creates an iterator that returns arrays containing a count and an element+ * obtained from the given {@code iterable}.+ * @see http://docs.python.org/2/library/functions.html#enumerate+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable to enumerate.+ * @param {number=} opt_start Optional starting value. Default is 0.+ * @return {!goog.iter.Iterator<!Array<?>>} A new iterator containing+ * count/item pairs.+ * @template VALUE*/-goog.debug.enhanceError = function(err, opt_message) {- var error;- if (typeof err == 'string') {- error = Error(err);- if (Error.captureStackTrace) {- // Trim this function off the call stack, if we can.- Error.captureStackTrace(error, goog.debug.enhanceError);- }- } else {- error = err;- }-- if (!error.stack) {- error.stack = goog.debug.getStacktrace(goog.debug.enhanceError);- }- if (opt_message) {- // find the first unoccupied 'messageX' property- var x = 0;- while (error['message' + x]) {- ++x;- }- error['message' + x] = String(opt_message);- }- return error;+goog.iter.enumerate = function(iterable, opt_start) {+ return goog.iter.zip(goog.iter.count(opt_start), iterable);};/**- * Gets the current stack trace. Simple and iterative - doesn't worry about- * catching circular references or getting the args.- * @param {number=} opt_depth Optional maximum depth to trace back to.- * @return {string} A string with the function names of all functions in the- * stack, separated by \n.- * @suppress {es5Strict}+ * Creates an iterator that returns the first {@code limitSize} elements from an+ * iterable. If this number is greater than the number of elements in the+ * iterable, all the elements are returned.+ * @see http://goo.gl/V0sihp Inspired by the limit iterator in Guava.+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable to limit.+ * @param {number} limitSize The maximum number of elements to return.+ * @return {!goog.iter.Iterator<VALUE>} A new iterator containing+ * {@code limitSize} elements.+ * @template VALUE*/-goog.debug.getStacktraceSimple = function(opt_depth) {- if (goog.STRICT_MODE_COMPATIBLE) {- var stack = goog.debug.getNativeStackTrace_(goog.debug.getStacktraceSimple);- if (stack) {- return stack;- }- // NOTE: browsers that have strict mode support also have native "stack"- // properties. Fall-through for legacy browser support.- }+goog.iter.limit = function(iterable, limitSize) {+ goog.asserts.assert(goog.math.isInt(limitSize) && limitSize >= 0);- var sb = [];- var fn = arguments.callee.caller;- var depth = 0;+ var iterator = goog.iter.toIterator(iterable);- while (fn && (!opt_depth || depth < opt_depth)) {- sb.push(goog.debug.getFunctionName(fn));- sb.push('()\n');- /** @preserveTry */- try {- fn = fn.caller;- } catch (e) {- sb.push('[exception trying to get caller]\n');- break;- }- depth++;- if (depth >= goog.debug.MAX_STACK_DEPTH) {- sb.push('[...long stack...]');- break;+ var iter = new goog.iter.Iterator();+ var remaining = limitSize;++ iter.next = function() {+ if (remaining-- > 0) {+ return iterator.next();}- }- if (opt_depth && depth >= opt_depth) {- sb.push('[...reached max depth limit...]');- } else {- sb.push('[end]');- }+ throw goog.iter.StopIteration;+ };- return sb.join('');+ return iter;};/**- * Max length of stack to try and output- * @type {number}+ * Creates an iterator that is advanced {@code count} steps ahead. Consumed+ * values are silently discarded. If {@code count} is greater than the number+ * of elements in {@code iterable}, an empty iterator is returned. Subsequent+ * calls to {@code next()} will throw {@code goog.iter.StopIteration}.+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable to consume.+ * @param {number} count The number of elements to consume from the iterator.+ * @return {!goog.iter.Iterator<VALUE>} An iterator advanced zero or more steps+ * ahead.+ * @template VALUE*/-goog.debug.MAX_STACK_DEPTH = 50;+goog.iter.consume = function(iterable, count) {+ goog.asserts.assert(goog.math.isInt(count) && count >= 0);+ var iterator = goog.iter.toIterator(iterable);-/**- * @param {Function} fn The function to start getting the trace from.- * @return {?string}- * @private- */-goog.debug.getNativeStackTrace_ = function(fn) {- var tempErr = new Error();- if (Error.captureStackTrace) {- Error.captureStackTrace(tempErr, fn);- return String(tempErr.stack);- } else {- // IE10, only adds stack traces when an exception is thrown.- try {- throw tempErr;- } catch (e) {- tempErr = e;- }- var stack = tempErr.stack;- if (stack) {- return String(stack);- }+ while (count-- > 0) {+ goog.iter.nextOrValue(iterator, null);}- return null;++ return iterator;};/**- * Gets the current stack trace, either starting from the caller or starting- * from a specified function that's currently on the call stack.- * @param {Function=} opt_fn Optional function to start getting the trace from.- * If not provided, defaults to the function that called this.- * @return {string} Stack trace.- * @suppress {es5Strict}+ * Creates an iterator that returns a range of elements from an iterable.+ * Similar to {@see goog.array#slice} but does not support negative indexes.+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable to slice.+ * @param {number} start The index of the first element to return.+ * @param {number=} opt_end The index after the last element to return. If+ * defined, must be greater than or equal to {@code start}.+ * @return {!goog.iter.Iterator<VALUE>} A new iterator containing a slice of+ * the original.+ * @template VALUE*/-goog.debug.getStacktrace = function(opt_fn) {- var stack;- if (goog.STRICT_MODE_COMPATIBLE) {- // Try to get the stack trace from the environment if it is available.- var contextFn = opt_fn || goog.debug.getStacktrace;- stack = goog.debug.getNativeStackTrace_(contextFn);- }- if (!stack) {- // NOTE: browsers that have strict mode support also have native "stack"- // properties. This function will throw in strict mode.- stack = goog.debug.getStacktraceHelper_(- opt_fn || arguments.callee.caller, []);+goog.iter.slice = function(iterable, start, opt_end) {+ goog.asserts.assert(goog.math.isInt(start) && start >= 0);++ var iterator = goog.iter.consume(iterable, start);++ if (goog.isNumber(opt_end)) {+ goog.asserts.assert(+ goog.math.isInt(/** @type {number} */ (opt_end)) && opt_end >= start);+ iterator = goog.iter.limit(iterator, opt_end - start /* limitSize */);}- return stack;++ return iterator;};/**- * Private helper for getStacktrace().- * @param {Function} fn Function to start getting the trace from.- * @param {Array<!Function>} visited List of functions visited so far.- * @return {string} Stack trace starting from function fn.- * @suppress {es5Strict}+ * Checks an array for duplicate elements.+ * @param {Array<VALUE>|goog.array.ArrayLike} arr The array to check for+ * duplicates.+ * @return {boolean} True, if the array contains duplicates, false otherwise.* @private+ * @template VALUE*/-goog.debug.getStacktraceHelper_ = function(fn, visited) {- var sb = [];-- // Circular reference, certain functions like bind seem to cause a recursive- // loop so we need to catch circular references- if (goog.array.contains(visited, fn)) {- sb.push('[...circular reference...]');-- // Traverse the call stack until function not found or max depth is reached- } else if (fn && visited.length < goog.debug.MAX_STACK_DEPTH) {- sb.push(goog.debug.getFunctionName(fn) + '(');- var args = fn.arguments;- // Args may be null for some special functions such as host objects or eval.- for (var i = 0; args && i < args.length; i++) {- if (i > 0) {- sb.push(', ');- }- var argDesc;- var arg = args[i];- switch (typeof arg) {- case 'object':- argDesc = arg ? 'object' : 'null';- break;-- case 'string':- argDesc = arg;- break;-- case 'number':- argDesc = String(arg);- break;-- case 'boolean':- argDesc = arg ? 'true' : 'false';- break;-- case 'function':- argDesc = goog.debug.getFunctionName(arg);- argDesc = argDesc ? argDesc : '[fn]';- break;+// TODO(user): Consider moving this into goog.array as a public function.+goog.iter.hasDuplicates_ = function(arr) {+ var deduped = [];+ goog.array.removeDuplicates(arr, deduped);+ return arr.length != deduped.length;+};- case 'undefined':- default:- argDesc = typeof arg;- break;- }- if (argDesc.length > 40) {- argDesc = argDesc.substr(0, 40) + '...';- }- sb.push(argDesc);- }- visited.push(fn);- sb.push(')\n');- /** @preserveTry */- try {- sb.push(goog.debug.getStacktraceHelper_(fn.caller, visited));- } catch (e) {- sb.push('[exception trying to get caller]\n');- }+/**+ * Creates an iterator that returns permutations of elements in+ * {@code iterable}.+ *+ * Permutations are obtained by taking the Cartesian product of+ * {@code opt_length} iterables and filtering out those with repeated+ * elements. For example, the permutations of {@code [1,2,3]} are+ * {@code [[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]}.+ * @see http://docs.python.org/2/library/itertools.html#itertools.permutations+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable from which to generate permutations.+ * @param {number=} opt_length Length of each permutation. If omitted, defaults+ * to the length of {@code iterable}.+ * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator containing the+ * permutations of {@code iterable}.+ * @template VALUE+ */+goog.iter.permutations = function(iterable, opt_length) {+ var elements = goog.iter.toArray(iterable);+ var length = goog.isNumber(opt_length) ? opt_length : elements.length;- } else if (fn) {- sb.push('[...long stack...]');- } else {- sb.push('[end]');- }- return sb.join('');+ var sets = goog.array.repeat(elements, length);+ var product = goog.iter.product.apply(undefined, sets);++ return goog.iter.filter(product, function(arr) {+ return !goog.iter.hasDuplicates_(arr);+ });};/**- * Set a custom function name resolver.- * @param {function(Function): string} resolver Resolves functions to their- * names.+ * Creates an iterator that returns combinations of elements from+ * {@code iterable}.+ *+ * Combinations are obtained by taking the {@see goog.iter#permutations} of+ * {@code iterable} and filtering those whose elements appear in the order they+ * are encountered in {@code iterable}. For example, the 3-length combinations+ * of {@code [0,1,2,3]} are {@code [[0,1,2], [0,1,3], [0,2,3], [1,2,3]]}.+ * @see http://docs.python.org/2/library/itertools.html#itertools.combinations+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable from which to generate combinations.+ * @param {number} length The length of each combination.+ * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator containing+ * combinations from the {@code iterable}.+ * @template VALUE*/-goog.debug.setFunctionResolver = function(resolver) {- goog.debug.fnNameResolver_ = resolver;-};+goog.iter.combinations = function(iterable, length) {+ var elements = goog.iter.toArray(iterable);+ var indexes = goog.iter.range(elements.length);+ var indexIterator = goog.iter.permutations(indexes, length);+ // sortedIndexIterator will now give arrays of with the given length that+ // indicate what indexes into "elements" should be returned on each iteration.+ var sortedIndexIterator = goog.iter.filter(indexIterator, function(arr) {+ return goog.array.isSorted(arr);+ });+ var iter = new goog.iter.Iterator();-/**- * Gets a function name- * @param {Function} fn Function to get name of.- * @return {string} Function's name.- */-goog.debug.getFunctionName = function(fn) {- if (goog.debug.fnNameCache_[fn]) {- return goog.debug.fnNameCache_[fn];- }- if (goog.debug.fnNameResolver_) {- var name = goog.debug.fnNameResolver_(fn);- if (name) {- goog.debug.fnNameCache_[fn] = name;- return name;- }+ function getIndexFromElements(index) {+ return elements[index];}- // Heuristically determine function name based on code.- var functionSource = String(fn);- if (!goog.debug.fnNameCache_[functionSource]) {- var matches = /function ([^\(]+)/.exec(functionSource);- if (matches) {- var method = matches[1];- goog.debug.fnNameCache_[functionSource] = method;- } else {- goog.debug.fnNameCache_[functionSource] = '[Anonymous]';- }- }+ iter.next = function() {+ return goog.array.map(+ /** @type {!Array<number>} */+ (sortedIndexIterator.next()), getIndexFromElements);+ };- return goog.debug.fnNameCache_[functionSource];+ return iter;};/**- * Makes whitespace visible by replacing it with printable characters.- * This is useful in finding diffrences between the expected and the actual- * output strings of a testcase.- * @param {string} string whose whitespace needs to be made visible.- * @return {string} string whose whitespace is made visible.+ * Creates an iterator that returns combinations of elements from+ * {@code iterable}, with repeated elements possible.+ *+ * Combinations are obtained by taking the Cartesian product of {@code length}+ * iterables and filtering those whose elements appear in the order they are+ * encountered in {@code iterable}. For example, the 2-length combinations of+ * {@code [1,2,3]} are {@code [[1,1], [1,2], [1,3], [2,2], [2,3], [3,3]]}.+ * @see http://docs.python.org/2/library/itertools.html#itertools.combinations_with_replacement+ * @see http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition+ * @param {!goog.iter.Iterator<VALUE>|!goog.iter.Iterable} iterable The+ * iterable to combine.+ * @param {number} length The length of each combination.+ * @return {!goog.iter.Iterator<!Array<VALUE>>} A new iterator containing+ * combinations from the {@code iterable}.+ * @template VALUE*/-goog.debug.makeWhitespaceVisible = function(string) {- return string.replace(/ /g, '[_]')- .replace(/\f/g, '[f]')- .replace(/\n/g, '[n]\n')- .replace(/\r/g, '[r]')- .replace(/\t/g, '[t]');-};+goog.iter.combinationsWithReplacement = function(iterable, length) {+ var elements = goog.iter.toArray(iterable);+ var indexes = goog.array.range(elements.length);+ var sets = goog.array.repeat(indexes, length);+ var indexIterator = goog.iter.product.apply(undefined, sets);+ // sortedIndexIterator will now give arrays of with the given length that+ // indicate what indexes into "elements" should be returned on each iteration.+ var sortedIndexIterator = goog.iter.filter(indexIterator, function(arr) {+ return goog.array.isSorted(arr);+ });+ var iter = new goog.iter.Iterator();-/**- * Hash map for storing function names that have already been looked up.- * @type {Object}- * @private- */-goog.debug.fnNameCache_ = {};+ function getIndexFromElements(index) {+ return elements[index];+ }+ iter.next = function() {+ return goog.array.map(+ /** @type {!Array<number>} */+ (sortedIndexIterator.next()), getIndexFromElements);+ };-/**- * Resolves functions to their names. Resolved function names will be cached.- * @type {function(Function):string}- * @private- */-goog.debug.fnNameResolver_;+ return iter;+};// Copyright 2006 The Closure Library Authors. All Rights Reserved.//@@ -39203,383 +39413,452 @@ goog.debug.fnNameResolver_;// limitations under the License./**- * @fileoverview Definition of the LogRecord class. Please minimize- * dependencies this file has on other closure classes as any dependency it- * takes won't be able to use the logging infrastructure.+ * @fileoverview Datastructure: Hash Map.*+ * @author [email protected] (Erik Arvidsson)+ *+ * This file contains an implementation of a Map structure. It implements a lot+ * of the methods used in goog.structs so those functions work on hashes. This+ * is best suited for complex key types. For simple keys such as numbers and+ * strings, and where special names like __proto__ are not a concern, consider+ * using the lighter-weight utilities in goog.object.*/-goog.provide('goog.debug.LogRecord');----/**- * LogRecord objects are used to pass logging requests between- * the logging framework and individual log Handlers.- * @constructor- * @param {goog.debug.Logger.Level} level One of the level identifiers.- * @param {string} msg The string message.- * @param {string} loggerName The name of the source logger.- * @param {number=} opt_time Time this log record was created if other than now.- * If 0, we use #goog.now.- * @param {number=} opt_sequenceNumber Sequence number of this log record. This- * should only be passed in when restoring a log record from persistence.- */-goog.debug.LogRecord = function(level, msg, loggerName,- opt_time, opt_sequenceNumber) {- this.reset(level, msg, loggerName, opt_time, opt_sequenceNumber);-};--/**- * Time the LogRecord was created.- * @type {number}- * @private- */-goog.debug.LogRecord.prototype.time_;+goog.provide('goog.structs.Map');+goog.require('goog.iter.Iterator');+goog.require('goog.iter.StopIteration');+goog.require('goog.object');-/**- * Level of the LogRecord- * @type {goog.debug.Logger.Level}- * @private- */-goog.debug.LogRecord.prototype.level_;/**- * Message associated with the record- * @type {string}- * @private+ * Class for Hash Map datastructure.+ * @param {*=} opt_map Map or Object to initialize the map with.+ * @param {...*} var_args If 2 or more arguments are present then they+ * will be used as key-value pairs.+ * @constructor+ * @template K, V*/-goog.debug.LogRecord.prototype.msg_;+goog.structs.Map = function(opt_map, var_args) {+ /**+ * Underlying JS object used to implement the map.+ * @private {!Object}+ */+ this.map_ = {};-/**- * Name of the logger that created the record.- * @type {string}- * @private- */-goog.debug.LogRecord.prototype.loggerName_;+ /**+ * An array of keys. This is necessary for two reasons:+ * 1. Iterating the keys using for (var key in this.map_) allocates an+ * object for every key in IE which is really bad for IE6 GC perf.+ * 2. Without a side data structure, we would need to escape all the keys+ * as that would be the only way we could tell during iteration if the+ * key was an internal key or a property of the object.+ *+ * This array can contain deleted keys so it's necessary to check the map+ * as well to see if the key is still in the map (this doesn't require a+ * memory allocation in IE).+ * @private {!Array<string>}+ */+ this.keys_ = [];+ /**+ * The number of key value pairs in the map.+ * @private {number}+ */+ this.count_ = 0;-/**- * Sequence number for the LogRecord. Each record has a unique sequence number- * that is greater than all log records created before it.- * @type {number}- * @private- */-goog.debug.LogRecord.prototype.sequenceNumber_ = 0;+ /**+ * Version used to detect changes while iterating.+ * @private {number}+ */+ this.version_ = 0;+ var argLength = arguments.length;-/**- * Exception associated with the record- * @type {Object}- * @private- */-goog.debug.LogRecord.prototype.exception_ = null;+ if (argLength > 1) {+ if (argLength % 2) {+ throw Error('Uneven number of arguments');+ }+ for (var i = 0; i < argLength; i += 2) {+ this.set(arguments[i], arguments[i + 1]);+ }+ } else if (opt_map) {+ this.addAll(/** @type {Object} */ (opt_map));+ }+};/**- * @define {boolean} Whether to enable log sequence numbers.+ * @return {number} The number of key-value pairs in the map.*/-goog.define('goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS', true);+goog.structs.Map.prototype.getCount = function() {+ return this.count_;+};/**- * A sequence counter for assigning increasing sequence numbers to LogRecord- * objects.- * @type {number}- * @private+ * Returns the values of the map.+ * @return {!Array<V>} The values in the map.*/-goog.debug.LogRecord.nextSequenceNumber_ = 0;-+goog.structs.Map.prototype.getValues = function() {+ this.cleanupKeysArray_();-/**- * Sets all fields of the log record.- * @param {goog.debug.Logger.Level} level One of the level identifiers.- * @param {string} msg The string message.- * @param {string} loggerName The name of the source logger.- * @param {number=} opt_time Time this log record was created if other than now.- * If 0, we use #goog.now.- * @param {number=} opt_sequenceNumber Sequence number of this log record. This- * should only be passed in when restoring a log record from persistence.- */-goog.debug.LogRecord.prototype.reset = function(level, msg, loggerName,- opt_time, opt_sequenceNumber) {- if (goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS) {- this.sequenceNumber_ = typeof opt_sequenceNumber == 'number' ?- opt_sequenceNumber : goog.debug.LogRecord.nextSequenceNumber_++;+ var rv = [];+ for (var i = 0; i < this.keys_.length; i++) {+ var key = this.keys_[i];+ rv.push(this.map_[key]);}-- this.time_ = opt_time || goog.now();- this.level_ = level;- this.msg_ = msg;- this.loggerName_ = loggerName;- delete this.exception_;+ return rv;};/**- * Get the source Logger's name.- *- * @return {string} source logger name (may be null).+ * Returns the keys of the map.+ * @return {!Array<string>} Array of string values.*/-goog.debug.LogRecord.prototype.getLoggerName = function() {- return this.loggerName_;+goog.structs.Map.prototype.getKeys = function() {+ this.cleanupKeysArray_();+ return /** @type {!Array<string>} */ (this.keys_.concat());};/**- * Get the exception that is part of the log record.- *- * @return {Object} the exception.+ * Whether the map contains the given key.+ * @param {*} key The key to check for.+ * @return {boolean} Whether the map contains the key.*/-goog.debug.LogRecord.prototype.getException = function() {- return this.exception_;+goog.structs.Map.prototype.containsKey = function(key) {+ return goog.structs.Map.hasKey_(this.map_, key);};/**- * Set the exception that is part of the log record.- *- * @param {Object} exception the exception.+ * Whether the map contains the given value. This is O(n).+ * @param {V} val The value to check for.+ * @return {boolean} Whether the map contains the value.*/-goog.debug.LogRecord.prototype.setException = function(exception) {- this.exception_ = exception;+goog.structs.Map.prototype.containsValue = function(val) {+ for (var i = 0; i < this.keys_.length; i++) {+ var key = this.keys_[i];+ if (goog.structs.Map.hasKey_(this.map_, key) && this.map_[key] == val) {+ return true;+ }+ }+ return false;};/**- * Get the source Logger's name.- *- * @param {string} loggerName source logger name (may be null).+ * Whether this map is equal to the argument map.+ * @param {goog.structs.Map} otherMap The map against which to test equality.+ * @param {function(V, V): boolean=} opt_equalityFn Optional equality function+ * to test equality of values. If not specified, this will test whether+ * the values contained in each map are identical objects.+ * @return {boolean} Whether the maps are equal.*/-goog.debug.LogRecord.prototype.setLoggerName = function(loggerName) {- this.loggerName_ = loggerName;-};+goog.structs.Map.prototype.equals = function(otherMap, opt_equalityFn) {+ if (this === otherMap) {+ return true;+ }+ if (this.count_ != otherMap.getCount()) {+ return false;+ }-/**- * Get the logging message level, for example Level.SEVERE.- * @return {goog.debug.Logger.Level} the logging message level.- */-goog.debug.LogRecord.prototype.getLevel = function() {- return this.level_;-};+ var equalityFn = opt_equalityFn || goog.structs.Map.defaultEquals;+ this.cleanupKeysArray_();+ for (var key, i = 0; key = this.keys_[i]; i++) {+ if (!equalityFn(this.get(key), otherMap.get(key))) {+ return false;+ }+ }-/**- * Set the logging message level, for example Level.SEVERE.- * @param {goog.debug.Logger.Level} level the logging message level.- */-goog.debug.LogRecord.prototype.setLevel = function(level) {- this.level_ = level;+ return true;};/**- * Get the "raw" log message, before localization or formatting.- *- * @return {string} the raw message string.+ * Default equality test for values.+ * @param {*} a The first value.+ * @param {*} b The second value.+ * @return {boolean} Whether a and b reference the same object.*/-goog.debug.LogRecord.prototype.getMessage = function() {- return this.msg_;+goog.structs.Map.defaultEquals = function(a, b) {+ return a === b;};/**- * Set the "raw" log message, before localization or formatting.- *- * @param {string} msg the raw message string.+ * @return {boolean} Whether the map is empty.*/-goog.debug.LogRecord.prototype.setMessage = function(msg) {- this.msg_ = msg;+goog.structs.Map.prototype.isEmpty = function() {+ return this.count_ == 0;};/**- * Get event time in milliseconds since 1970.- *- * @return {number} event time in millis since 1970.+ * Removes all key-value pairs from the map.*/-goog.debug.LogRecord.prototype.getMillis = function() {- return this.time_;+goog.structs.Map.prototype.clear = function() {+ this.map_ = {};+ this.keys_.length = 0;+ this.count_ = 0;+ this.version_ = 0;};/**- * Set event time in milliseconds since 1970.- *- * @param {number} time event time in millis since 1970.+ * Removes a key-value pair based on the key. This is O(logN) amortized due to+ * updating the keys array whenever the count becomes half the size of the keys+ * in the keys array.+ * @param {*} key The key to remove.+ * @return {boolean} Whether object was removed.*/-goog.debug.LogRecord.prototype.setMillis = function(time) {- this.time_ = time;-};+goog.structs.Map.prototype.remove = function(key) {+ if (goog.structs.Map.hasKey_(this.map_, key)) {+ delete this.map_[key];+ this.count_--;+ this.version_++;+ // clean up the keys array if the threshhold is hit+ if (this.keys_.length > 2 * this.count_) {+ this.cleanupKeysArray_();+ }-/**- * Get the sequence number.- * <p>- * Sequence numbers are normally assigned in the LogRecord- * constructor, which assigns unique sequence numbers to- * each new LogRecord in increasing order.- * @return {number} the sequence number.- */-goog.debug.LogRecord.prototype.getSequenceNumber = function() {- return this.sequenceNumber_;+ return true;+ }+ return false;};-// Copyright 2010 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License.-/**- * @fileoverview A buffer for log records. The purpose of this is to improve- * logging performance by re-using old objects when the buffer becomes full and- * to eliminate the need for each app to implement their own log buffer. The- * disadvantage to doing this is that log handlers cannot maintain references to- * log records and expect that they are not overwriten at a later point.- *- * @author [email protected] (Andrew Grieve)+ * Cleans up the temp keys array by removing entries that are no longer in the+ * map.+ * @private*/+goog.structs.Map.prototype.cleanupKeysArray_ = function() {+ if (this.count_ != this.keys_.length) {+ // First remove keys that are no longer in the map.+ var srcIndex = 0;+ var destIndex = 0;+ while (srcIndex < this.keys_.length) {+ var key = this.keys_[srcIndex];+ if (goog.structs.Map.hasKey_(this.map_, key)) {+ this.keys_[destIndex++] = key;+ }+ srcIndex++;+ }+ this.keys_.length = destIndex;+ }-goog.provide('goog.debug.LogBuffer');+ if (this.count_ != this.keys_.length) {+ // If the count still isn't correct, that means we have duplicates. This can+ // happen when the same key is added and removed multiple times. Now we have+ // to allocate one extra Object to remove the duplicates. This could have+ // been done in the first pass, but in the common case, we can avoid+ // allocating an extra object by only doing this when necessary.+ var seen = {};+ var srcIndex = 0;+ var destIndex = 0;+ while (srcIndex < this.keys_.length) {+ var key = this.keys_[srcIndex];+ if (!(goog.structs.Map.hasKey_(seen, key))) {+ this.keys_[destIndex++] = key;+ seen[key] = 1;+ }+ srcIndex++;+ }+ this.keys_.length = destIndex;+ }+};-goog.require('goog.asserts');-goog.require('goog.debug.LogRecord');+/**+ * Returns the value for the given key. If the key is not found and the default+ * value is not given this will return {@code undefined}.+ * @param {*} key The key to get the value for.+ * @param {DEFAULT=} opt_val The value to return if no item is found for the+ * given key, defaults to undefined.+ * @return {V|DEFAULT} The value for the given key.+ * @template DEFAULT+ */+goog.structs.Map.prototype.get = function(key, opt_val) {+ if (goog.structs.Map.hasKey_(this.map_, key)) {+ return this.map_[key];+ }+ return opt_val;+};/**- * Creates the log buffer.- * @constructor- * @final+ * Adds a key-value pair to the map.+ * @param {*} key The key.+ * @param {V} value The value to add.+ * @return {*} Some subclasses return a value.*/-goog.debug.LogBuffer = function() {- goog.asserts.assert(goog.debug.LogBuffer.isBufferingEnabled(),- 'Cannot use goog.debug.LogBuffer without defining ' +- 'goog.debug.LogBuffer.CAPACITY.');- this.clear();+goog.structs.Map.prototype.set = function(key, value) {+ if (!(goog.structs.Map.hasKey_(this.map_, key))) {+ this.count_++;+ this.keys_.push(key);+ // Only change the version if we add a new key.+ this.version_++;+ }+ this.map_[key] = value;};/**- * A static method that always returns the same instance of LogBuffer.- * @return {!goog.debug.LogBuffer} The LogBuffer singleton instance.+ * Adds multiple key-value pairs from another goog.structs.Map or Object.+ * @param {Object} map Object containing the data to add.*/-goog.debug.LogBuffer.getInstance = function() {- if (!goog.debug.LogBuffer.instance_) {- // This function is written with the return statement after the assignment- // to avoid the jscompiler StripCode bug described in http://b/2608064.- // After that bug is fixed this can be refactored.- goog.debug.LogBuffer.instance_ = new goog.debug.LogBuffer();+goog.structs.Map.prototype.addAll = function(map) {+ var keys, values;+ if (map instanceof goog.structs.Map) {+ keys = map.getKeys();+ values = map.getValues();+ } else {+ keys = goog.object.getKeys(map);+ values = goog.object.getValues(map);+ }+ // we could use goog.array.forEach here but I don't want to introduce that+ // dependency just for this.+ for (var i = 0; i < keys.length; i++) {+ this.set(keys[i], values[i]);}- return goog.debug.LogBuffer.instance_;};/**- * @define {number} The number of log records to buffer. 0 means disable- * buffering.+ * Calls the given function on each entry in the map.+ * @param {function(this:T, V, K, goog.structs.Map<K,V>)} f+ * @param {T=} opt_obj The value of "this" inside f.+ * @template T*/-goog.define('goog.debug.LogBuffer.CAPACITY', 0);+goog.structs.Map.prototype.forEach = function(f, opt_obj) {+ var keys = this.getKeys();+ for (var i = 0; i < keys.length; i++) {+ var key = keys[i];+ var value = this.get(key);+ f.call(opt_obj, value, key, this);+ }+};/**- * The array to store the records.- * @type {!Array<!goog.debug.LogRecord|undefined>}- * @private+ * Clones a map and returns a new map.+ * @return {!goog.structs.Map} A new map with the same key-value pairs.*/-goog.debug.LogBuffer.prototype.buffer_;+goog.structs.Map.prototype.clone = function() {+ return new goog.structs.Map(this);+};/**- * The index of the most recently added record or -1 if there are no records.- * @type {number}- * @private+ * Returns a new map in which all the keys and values are interchanged+ * (keys become values and values become keys). If multiple keys map to the+ * same value, the chosen transposed value is implementation-dependent.+ *+ * It acts very similarly to {goog.object.transpose(Object)}.+ *+ * @return {!goog.structs.Map} The transposed map.*/-goog.debug.LogBuffer.prototype.curIndex_;+goog.structs.Map.prototype.transpose = function() {+ var transposed = new goog.structs.Map();+ for (var i = 0; i < this.keys_.length; i++) {+ var key = this.keys_[i];+ var value = this.map_[key];+ transposed.set(value, key);+ }++ return transposed;+};/**- * Whether the buffer is at capacity.- * @type {boolean}- * @private+ * @return {!Object} Object representation of the map.*/-goog.debug.LogBuffer.prototype.isFull_;+goog.structs.Map.prototype.toObject = function() {+ this.cleanupKeysArray_();+ var obj = {};+ for (var i = 0; i < this.keys_.length; i++) {+ var key = this.keys_[i];+ obj[key] = this.map_[key];+ }+ return obj;+};/**- * Adds a log record to the buffer, possibly overwriting the oldest record.- * @param {goog.debug.Logger.Level} level One of the level identifiers.- * @param {string} msg The string message.- * @param {string} loggerName The name of the source logger.- * @return {!goog.debug.LogRecord} The log record.+ * Returns an iterator that iterates over the keys in the map. Removal of keys+ * while iterating might have undesired side effects.+ * @return {!goog.iter.Iterator} An iterator over the keys in the map.*/-goog.debug.LogBuffer.prototype.addRecord = function(level, msg, loggerName) {- var curIndex = (this.curIndex_ + 1) % goog.debug.LogBuffer.CAPACITY;- this.curIndex_ = curIndex;- if (this.isFull_) {- var ret = this.buffer_[curIndex];- ret.reset(level, msg, loggerName);- return ret;- }- this.isFull_ = curIndex == goog.debug.LogBuffer.CAPACITY - 1;- return this.buffer_[curIndex] =- new goog.debug.LogRecord(level, msg, loggerName);+goog.structs.Map.prototype.getKeyIterator = function() {+ return this.__iterator__(true);};/**- * @return {boolean} Whether the log buffer is enabled.+ * Returns an iterator that iterates over the values in the map. Removal of+ * keys while iterating might have undesired side effects.+ * @return {!goog.iter.Iterator} An iterator over the values in the map.*/-goog.debug.LogBuffer.isBufferingEnabled = function() {- return goog.debug.LogBuffer.CAPACITY > 0;+goog.structs.Map.prototype.getValueIterator = function() {+ return this.__iterator__(false);};/**- * Removes all buffered log records.+ * Returns an iterator that iterates over the values or the keys in the map.+ * This throws an exception if the map was mutated since the iterator was+ * created.+ * @param {boolean=} opt_keys True to iterate over the keys. False to iterate+ * over the values. The default value is false.+ * @return {!goog.iter.Iterator} An iterator over the values or keys in the map.*/-goog.debug.LogBuffer.prototype.clear = function() {- this.buffer_ = new Array(goog.debug.LogBuffer.CAPACITY);- this.curIndex_ = -1;- this.isFull_ = false;+goog.structs.Map.prototype.__iterator__ = function(opt_keys) {+ // Clean up keys to minimize the risk of iterating over dead keys.+ this.cleanupKeysArray_();++ var i = 0;+ var keys = this.keys_;+ var map = this.map_;+ var version = this.version_;+ var selfObj = this;++ var newIter = new goog.iter.Iterator;+ newIter.next = function() {+ while (true) {+ if (version != selfObj.version_) {+ throw Error('The map has changed since the iterator was created');+ }+ if (i >= keys.length) {+ throw goog.iter.StopIteration;+ }+ var key = keys[i++];+ return opt_keys ? key : map[key];+ }+ };+ return newIter;};/**- * Calls the given function for each buffered log record, starting with the- * oldest one.- * @param {function(!goog.debug.LogRecord)} func The function to call.+ * Safe way to test for hasOwnProperty. It even allows testing for+ * 'hasOwnProperty'.+ * @param {Object} obj The object to test for presence of the given key.+ * @param {*} key The key to check for.+ * @return {boolean} Whether the object has the key.+ * @private*/-goog.debug.LogBuffer.prototype.forEachRecord = function(func) {- var buffer = this.buffer_;- // Corner case: no records.- if (!buffer[0]) {- return;- }- var curIndex = this.curIndex_;- var i = this.isFull_ ? curIndex : -1;- do {- i = (i + 1) % goog.debug.LogBuffer.CAPACITY;- func(/** @type {!goog.debug.LogRecord} */ (buffer[i]));- } while (i != curIndex);+goog.structs.Map.hasKey_ = function(obj, key) {+ return Object.prototype.hasOwnProperty.call(obj, key);};-// Copyright 2006 The Closure Library Authors. All Rights Reserved.//// Licensed under the Apache License, Version 2.0 (the "License");@@ -39595,949 +39874,903 @@ goog.debug.LogBuffer.prototype.forEachRecord = function(func) {// limitations under the License./**- * @fileoverview Definition of the Logger class. Please minimize dependencies- * this file has on other closure classes as any dependency it takes won't be- * able to use the logging infrastructure.+ * @fileoverview Datastructure: Set.*- * @see ../demos/debug.html+ * @author [email protected] (Erik Arvidsson)+ *+ * This class implements a set data structure. Adding and removing is O(1). It+ * supports both object and primitive values. Be careful because you can add+ * both 1 and new Number(1), because these are not the same. You can even add+ * multiple new Number(1) because these are not equal.*/-goog.provide('goog.debug.LogManager');-goog.provide('goog.debug.Loggable');-goog.provide('goog.debug.Logger');-goog.provide('goog.debug.Logger.Level');--goog.require('goog.array');-goog.require('goog.asserts');-goog.require('goog.debug');-goog.require('goog.debug.LogBuffer');-goog.require('goog.debug.LogRecord');+goog.provide('goog.structs.Set');-/**- * A message value that can be handled by a Logger.- *- * Functions are treated like callbacks, but are only called when the event's- * log level is enabled. This is useful for logging messages that are expensive- * to construct.- *- * @typedef {string|function(): string}- */-goog.debug.Loggable;+goog.require('goog.structs');+goog.require('goog.structs.Collection');+goog.require('goog.structs.Map');/**- * The Logger is an object used for logging debug messages. Loggers are- * normally named, using a hierarchical dot-separated namespace. Logger names- * can be arbitrary strings, but they should normally be based on the package- * name or class name of the logged component, such as goog.net.BrowserChannel.- *- * The Logger object is loosely based on the java class- * java.util.logging.Logger. It supports different levels of filtering for- * different loggers.- *- * The logger object should never be instantiated by application code. It- * should always use the goog.debug.Logger.getLogger function.- *+ * A set that can contain both primitives and objects. Adding and removing+ * elements is O(1). Primitives are treated as identical if they have the same+ * type and convert to the same string. Objects are treated as identical only+ * if they are references to the same object. WARNING: A goog.structs.Set can+ * contain both 1 and (new Number(1)), because they are not the same. WARNING:+ * Adding (new Number(1)) twice will yield two distinct elements, because they+ * are two different objects. WARNING: Any object that is added to a+ * goog.structs.Set will be modified! Because goog.getUid() is used to+ * identify objects, every object in the set will be mutated.+ * @param {Array<T>|Object<?,T>=} opt_values Initial values to start with.* @constructor- * @param {string} name The name of the Logger.+ * @implements {goog.structs.Collection<T>}* @final+ * @template T*/-goog.debug.Logger = function(name) {- /**- * Name of the Logger. Generally a dot-separated namespace- * @private {string}- */- this.name_ = name;-- /**- * Parent Logger.- * @private {goog.debug.Logger}- */- this.parent_ = null;-- /**- * Level that this logger only filters above. Null indicates it should- * inherit from the parent.- * @private {goog.debug.Logger.Level}- */- this.level_ = null;-- /**- * Map of children loggers. The keys are the leaf names of the children and- * the values are the child loggers.- * @private {Object}- */- this.children_ = null;-- /**- * Handlers that are listening to this logger.- * @private {Array<Function>}- */- this.handlers_ = null;+goog.structs.Set = function(opt_values) {+ this.map_ = new goog.structs.Map;+ if (opt_values) {+ this.addAll(opt_values);+ }};-/** @const */-goog.debug.Logger.ROOT_LOGGER_NAME = '';---/**- * @define {boolean} Toggles whether loggers other than the root logger can have- * log handlers attached to them and whether they can have their log level- * set. Logging is a bit faster when this is set to false.- */-goog.define('goog.debug.Logger.ENABLE_HIERARCHY', true);---if (!goog.debug.Logger.ENABLE_HIERARCHY) {- /**- * @type {!Array<Function>}- * @private- */- goog.debug.Logger.rootHandlers_ = [];--- /**- * @type {goog.debug.Logger.Level}- * @private- */- goog.debug.Logger.rootLevel_;-}---/**- * The Level class defines a set of standard logging levels that- * can be used to control logging output. The logging Level objects- * are ordered and are specified by ordered integers. Enabling logging- * at a given level also enables logging at all higher levels.- * <p>- * Clients should normally use the predefined Level constants such- * as Level.SEVERE.- * <p>- * The levels in descending order are:- * <ul>- * <li>SEVERE (highest value)- * <li>WARNING- * <li>INFO- * <li>CONFIG- * <li>FINE- * <li>FINER- * <li>FINEST (lowest value)- * </ul>- * In addition there is a level OFF that can be used to turn- * off logging, and a level ALL that can be used to enable- * logging of all messages.- *- * @param {string} name The name of the level.- * @param {number} value The numeric value of the level.- * @constructor- * @final+ * Obtains a unique key for an element of the set. Primitives will yield the+ * same key if they have the same type and convert to the same string. Object+ * references will yield the same key only if they refer to the same object.+ * @param {*} val Object or primitive value to get a key for.+ * @return {string} A unique key for this value/object.+ * @private*/-goog.debug.Logger.Level = function(name, value) {- /**- * The name of the level- * @type {string}- */- this.name = name;-- /**- * The numeric value of the level- * @type {number}- */- this.value = value;+goog.structs.Set.getKey_ = function(val) {+ var type = typeof val;+ if (type == 'object' && val || type == 'function') {+ return 'o' + goog.getUid(/** @type {Object} */ (val));+ } else {+ return type.substr(0, 1) + val;+ }};/**- * @return {string} String representation of the logger level.+ * @return {number} The number of elements in the set.* @override*/-goog.debug.Logger.Level.prototype.toString = function() {- return this.name;+goog.structs.Set.prototype.getCount = function() {+ return this.map_.getCount();};/**- * OFF is a special level that can be used to turn off logging.- * This level is initialized to <CODE>Infinity</CODE>.- * @type {!goog.debug.Logger.Level}- */-goog.debug.Logger.Level.OFF =- new goog.debug.Logger.Level('OFF', Infinity);---/**- * SHOUT is a message level for extra debugging loudness.- * This level is initialized to <CODE>1200</CODE>.- * @type {!goog.debug.Logger.Level}- */-goog.debug.Logger.Level.SHOUT = new goog.debug.Logger.Level('SHOUT', 1200);---/**- * SEVERE is a message level indicating a serious failure.- * This level is initialized to <CODE>1000</CODE>.- * @type {!goog.debug.Logger.Level}- */-goog.debug.Logger.Level.SEVERE = new goog.debug.Logger.Level('SEVERE', 1000);---/**- * WARNING is a message level indicating a potential problem.- * This level is initialized to <CODE>900</CODE>.- * @type {!goog.debug.Logger.Level}- */-goog.debug.Logger.Level.WARNING = new goog.debug.Logger.Level('WARNING', 900);---/**- * INFO is a message level for informational messages.- * This level is initialized to <CODE>800</CODE>.- * @type {!goog.debug.Logger.Level}- */-goog.debug.Logger.Level.INFO = new goog.debug.Logger.Level('INFO', 800);---/**- * CONFIG is a message level for static configuration messages.- * This level is initialized to <CODE>700</CODE>.- * @type {!goog.debug.Logger.Level}- */-goog.debug.Logger.Level.CONFIG = new goog.debug.Logger.Level('CONFIG', 700);---/**- * FINE is a message level providing tracing information.- * This level is initialized to <CODE>500</CODE>.- * @type {!goog.debug.Logger.Level}- */-goog.debug.Logger.Level.FINE = new goog.debug.Logger.Level('FINE', 500);---/**- * FINER indicates a fairly detailed tracing message.- * This level is initialized to <CODE>400</CODE>.- * @type {!goog.debug.Logger.Level}- */-goog.debug.Logger.Level.FINER = new goog.debug.Logger.Level('FINER', 400);--/**- * FINEST indicates a highly detailed tracing message.- * This level is initialized to <CODE>300</CODE>.- * @type {!goog.debug.Logger.Level}- */--goog.debug.Logger.Level.FINEST = new goog.debug.Logger.Level('FINEST', 300);---/**- * ALL indicates that all messages should be logged.- * This level is initialized to <CODE>0</CODE>.- * @type {!goog.debug.Logger.Level}- */-goog.debug.Logger.Level.ALL = new goog.debug.Logger.Level('ALL', 0);---/**- * The predefined levels.- * @type {!Array<!goog.debug.Logger.Level>}- * @final- */-goog.debug.Logger.Level.PREDEFINED_LEVELS = [- goog.debug.Logger.Level.OFF,- goog.debug.Logger.Level.SHOUT,- goog.debug.Logger.Level.SEVERE,- goog.debug.Logger.Level.WARNING,- goog.debug.Logger.Level.INFO,- goog.debug.Logger.Level.CONFIG,- goog.debug.Logger.Level.FINE,- goog.debug.Logger.Level.FINER,- goog.debug.Logger.Level.FINEST,- goog.debug.Logger.Level.ALL];---/**- * A lookup map used to find the level object based on the name or value of- * the level object.- * @type {Object}- * @private- */-goog.debug.Logger.Level.predefinedLevelsCache_ = null;---/**- * Creates the predefined levels cache and populates it.- * @private+ * Add a primitive or an object to the set.+ * @param {T} element The primitive or object to add.+ * @override*/-goog.debug.Logger.Level.createPredefinedLevelsCache_ = function() {- goog.debug.Logger.Level.predefinedLevelsCache_ = {};- for (var i = 0, level; level = goog.debug.Logger.Level.PREDEFINED_LEVELS[i];- i++) {- goog.debug.Logger.Level.predefinedLevelsCache_[level.value] = level;- goog.debug.Logger.Level.predefinedLevelsCache_[level.name] = level;- }+goog.structs.Set.prototype.add = function(element) {+ this.map_.set(goog.structs.Set.getKey_(element), element);};/**- * Gets the predefined level with the given name.- * @param {string} name The name of the level.- * @return {goog.debug.Logger.Level} The level, or null if none found.+ * Adds all the values in the given collection to this set.+ * @param {Array<T>|goog.structs.Collection<T>|Object<?,T>} col A collection+ * containing the elements to add.*/-goog.debug.Logger.Level.getPredefinedLevel = function(name) {- if (!goog.debug.Logger.Level.predefinedLevelsCache_) {- goog.debug.Logger.Level.createPredefinedLevelsCache_();+goog.structs.Set.prototype.addAll = function(col) {+ var values = goog.structs.getValues(col);+ var l = values.length;+ for (var i = 0; i < l; i++) {+ this.add(values[i]);}-- return goog.debug.Logger.Level.predefinedLevelsCache_[name] || null;};/**- * Gets the highest predefined level <= #value.- * @param {number} value Level value.- * @return {goog.debug.Logger.Level} The level, or null if none found.+ * Removes all values in the given collection from this set.+ * @param {Array<T>|goog.structs.Collection<T>|Object<?,T>} col A collection+ * containing the elements to remove.*/-goog.debug.Logger.Level.getPredefinedLevelByValue = function(value) {- if (!goog.debug.Logger.Level.predefinedLevelsCache_) {- goog.debug.Logger.Level.createPredefinedLevelsCache_();+goog.structs.Set.prototype.removeAll = function(col) {+ var values = goog.structs.getValues(col);+ var l = values.length;+ for (var i = 0; i < l; i++) {+ this.remove(values[i]);}+};- if (value in goog.debug.Logger.Level.predefinedLevelsCache_) {- return goog.debug.Logger.Level.predefinedLevelsCache_[value];- }- for (var i = 0; i < goog.debug.Logger.Level.PREDEFINED_LEVELS.length; ++i) {- var level = goog.debug.Logger.Level.PREDEFINED_LEVELS[i];- if (level.value <= value) {- return level;- }- }- return null;+/**+ * Removes the given element from this set.+ * @param {T} element The primitive or object to remove.+ * @return {boolean} Whether the element was found and removed.+ * @override+ */+goog.structs.Set.prototype.remove = function(element) {+ return this.map_.remove(goog.structs.Set.getKey_(element));};/**- * Finds or creates a logger for a named subsystem. If a logger has already been- * created with the given name it is returned. Otherwise a new logger is- * created. If a new logger is created its log level will be configured based- * on the LogManager configuration and it will configured to also send logging- * output to its parent's handlers. It will be registered in the LogManager- * global namespace.- *- * @param {string} name A name for the logger. This should be a dot-separated- * name and should normally be based on the package name or class name of the- * subsystem, such as goog.net.BrowserChannel.- * @return {!goog.debug.Logger} The named logger.- * @deprecated use goog.log instead. http://go/goog-debug-logger-deprecated+ * Removes all elements from this set.*/-goog.debug.Logger.getLogger = function(name) {- return goog.debug.LogManager.getLogger(name);+goog.structs.Set.prototype.clear = function() {+ this.map_.clear();};/**- * Logs a message to profiling tools, if available.- * {@see https://developers.google.com/web-toolkit/speedtracer/logging-api}- * {@see http://msdn.microsoft.com/en-us/library/dd433074(VS.85).aspx}- * @param {string} msg The message to log.+ * Tests whether this set is empty.+ * @return {boolean} True if there are no elements in this set.*/-goog.debug.Logger.logToProfilers = function(msg) {- // Using goog.global, as loggers might be used in window-less contexts.- if (goog.global['console']) {- if (goog.global['console']['timeStamp']) {- // Logs a message to Firebug, Web Inspector, SpeedTracer, etc.- goog.global['console']['timeStamp'](msg);- } else if (goog.global['console']['markTimeline']) {- // TODO(user): markTimeline is deprecated. Drop this else clause entirely- // after Chrome M14 hits stable.- goog.global['console']['markTimeline'](msg);- }- }-- if (goog.global['msWriteProfilerMark']) {- // Logs a message to the Microsoft profiler- goog.global['msWriteProfilerMark'](msg);- }+goog.structs.Set.prototype.isEmpty = function() {+ return this.map_.isEmpty();};/**- * Gets the name of this logger.- * @return {string} The name of this logger.+ * Tests whether this set contains the given element.+ * @param {T} element The primitive or object to test for.+ * @return {boolean} True if this set contains the given element.+ * @override*/-goog.debug.Logger.prototype.getName = function() {- return this.name_;+goog.structs.Set.prototype.contains = function(element) {+ return this.map_.containsKey(goog.structs.Set.getKey_(element));};/**- * Adds a handler to the logger. This doesn't use the event system because- * we want to be able to add logging to the event system.- * @param {Function} handler Handler function to add.+ * Tests whether this set contains all the values in a given collection.+ * Repeated elements in the collection are ignored, e.g. (new+ * goog.structs.Set([1, 2])).containsAll([1, 1]) is True.+ * @param {goog.structs.Collection<T>|Object} col A collection-like object.+ * @return {boolean} True if the set contains all elements.*/-goog.debug.Logger.prototype.addHandler = function(handler) {- if (goog.debug.LOGGING_ENABLED) {- if (goog.debug.Logger.ENABLE_HIERARCHY) {- if (!this.handlers_) {- this.handlers_ = [];- }- this.handlers_.push(handler);- } else {- goog.asserts.assert(!this.name_,- 'Cannot call addHandler on a non-root logger when ' +- 'goog.debug.Logger.ENABLE_HIERARCHY is false.');- goog.debug.Logger.rootHandlers_.push(handler);- }- }+goog.structs.Set.prototype.containsAll = function(col) {+ return goog.structs.every(col, this.contains, this);};/**- * Removes a handler from the logger. This doesn't use the event system because- * we want to be able to add logging to the event system.- * @param {Function} handler Handler function to remove.- * @return {boolean} Whether the handler was removed.+ * Finds all values that are present in both this set and the given collection.+ * @param {Array<S>|Object<?,S>} col A collection.+ * @return {!goog.structs.Set<T|S>} A new set containing all the values+ * (primitives or objects) present in both this set and the given+ * collection.+ * @template S*/-goog.debug.Logger.prototype.removeHandler = function(handler) {- if (goog.debug.LOGGING_ENABLED) {- var handlers = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ :- goog.debug.Logger.rootHandlers_;- return !!handlers && goog.array.remove(handlers, handler);- } else {- return false;+goog.structs.Set.prototype.intersection = function(col) {+ var result = new goog.structs.Set();++ var values = goog.structs.getValues(col);+ for (var i = 0; i < values.length; i++) {+ var value = values[i];+ if (this.contains(value)) {+ result.add(value);+ }}++ return result;};/**- * Returns the parent of this logger.- * @return {goog.debug.Logger} The parent logger or null if this is the root.+ * Finds all values that are present in this set and not in the given+ * collection.+ * @param {Array<T>|goog.structs.Collection<T>|Object<?,T>} col A collection.+ * @return {!goog.structs.Set} A new set containing all the values+ * (primitives or objects) present in this set but not in the given+ * collection.*/-goog.debug.Logger.prototype.getParent = function() {- return this.parent_;+goog.structs.Set.prototype.difference = function(col) {+ var result = this.clone();+ result.removeAll(col);+ return result;};/**- * Returns the children of this logger as a map of the child name to the logger.- * @return {!Object} The map where the keys are the child leaf names and the- * values are the Logger objects.+ * Returns an array containing all the elements in this set.+ * @return {!Array<T>} An array containing all the elements in this set.*/-goog.debug.Logger.prototype.getChildren = function() {- if (!this.children_) {- this.children_ = {};- }- return this.children_;+goog.structs.Set.prototype.getValues = function() {+ return this.map_.getValues();};/**- * Set the log level specifying which message levels will be logged by this- * logger. Message levels lower than this value will be discarded.- * The level value Level.OFF can be used to turn off logging. If the new level- * is null, it means that this node should inherit its level from its nearest- * ancestor with a specific (non-null) level value.- *- * @param {goog.debug.Logger.Level} level The new level.+ * Creates a shallow clone of this set.+ * @return {!goog.structs.Set<T>} A new set containing all the same elements as+ * this set.*/-goog.debug.Logger.prototype.setLevel = function(level) {- if (goog.debug.LOGGING_ENABLED) {- if (goog.debug.Logger.ENABLE_HIERARCHY) {- this.level_ = level;- } else {- goog.asserts.assert(!this.name_,- 'Cannot call setLevel() on a non-root logger when ' +- 'goog.debug.Logger.ENABLE_HIERARCHY is false.');- goog.debug.Logger.rootLevel_ = level;- }- }+goog.structs.Set.prototype.clone = function() {+ return new goog.structs.Set(this);};/**- * Gets the log level specifying which message levels will be logged by this- * logger. Message levels lower than this value will be discarded.- * The level value Level.OFF can be used to turn off logging. If the level- * is null, it means that this node should inherit its level from its nearest- * ancestor with a specific (non-null) level value.- *- * @return {goog.debug.Logger.Level} The level.+ * Tests whether the given collection consists of the same elements as this set,+ * regardless of order, without repetition. Primitives are treated as equal if+ * they have the same type and convert to the same string; objects are treated+ * as equal if they are references to the same object. This operation is O(n).+ * @param {goog.structs.Collection<T>|Object} col A collection.+ * @return {boolean} True if the given collection consists of the same elements+ * as this set, regardless of order, without repetition.*/-goog.debug.Logger.prototype.getLevel = function() {- return goog.debug.LOGGING_ENABLED ?- this.level_ : goog.debug.Logger.Level.OFF;+goog.structs.Set.prototype.equals = function(col) {+ return this.getCount() == goog.structs.getCount(col) && this.isSubsetOf(col);};/**- * Returns the effective level of the logger based on its ancestors' levels.- * @return {goog.debug.Logger.Level} The level.+ * Tests whether the given collection contains all the elements in this set.+ * Primitives are treated as equal if they have the same type and convert to the+ * same string; objects are treated as equal if they are references to the same+ * object. This operation is O(n).+ * @param {goog.structs.Collection<T>|Object} col A collection.+ * @return {boolean} True if this set is a subset of the given collection.*/-goog.debug.Logger.prototype.getEffectiveLevel = function() {- if (!goog.debug.LOGGING_ENABLED) {- return goog.debug.Logger.Level.OFF;- }-- if (!goog.debug.Logger.ENABLE_HIERARCHY) {- return goog.debug.Logger.rootLevel_;- }- if (this.level_) {- return this.level_;+goog.structs.Set.prototype.isSubsetOf = function(col) {+ var colCount = goog.structs.getCount(col);+ if (this.getCount() > colCount) {+ return false;}- if (this.parent_) {- return this.parent_.getEffectiveLevel();+ // TODO(user) Find the minimal collection size where the conversion makes+ // the contains() method faster.+ if (!(col instanceof goog.structs.Set) && colCount > 5) {+ // Convert to a goog.structs.Set so that goog.structs.contains runs in+ // O(1) time instead of O(n) time.+ col = new goog.structs.Set(col);}- goog.asserts.fail('Root logger has no level set.');- return null;+ return goog.structs.every(this, function(value) {+ return goog.structs.contains(col, value);+ });};/**- * Checks if a message of the given level would actually be logged by this- * logger. This check is based on the Loggers effective level, which may be- * inherited from its parent.- * @param {goog.debug.Logger.Level} level The level to check.- * @return {boolean} Whether the message would be logged.+ * Returns an iterator that iterates over the elements in this set.+ * @param {boolean=} opt_keys This argument is ignored.+ * @return {!goog.iter.Iterator} An iterator over the elements in this set.*/-goog.debug.Logger.prototype.isLoggable = function(level) {- return goog.debug.LOGGING_ENABLED &&- level.value >= this.getEffectiveLevel().value;+goog.structs.Set.prototype.__iterator__ = function(opt_keys) {+ return this.map_.__iterator__(false);};+// Copyright 2006 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * Logs a message. If the logger is currently enabled for the- * given message level then the given message is forwarded to all the- * registered output Handler objects.- * @param {goog.debug.Logger.Level} level One of the level identifiers.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error|Object=} opt_exception An exception associated with the- * message.+ * @fileoverview Logging and debugging utilities.+ *+ * @see ../demos/debug.html*/-goog.debug.Logger.prototype.log = function(level, msg, opt_exception) {- // java caches the effective level, not sure it's necessary here- if (goog.debug.LOGGING_ENABLED && this.isLoggable(level)) {- // Message callbacks can be useful when a log message is expensive to build.- if (goog.isFunction(msg)) {- msg = msg();- }- this.doLogRecord_(this.getLogRecord(level, msg, opt_exception));- }-};+goog.provide('goog.debug');+goog.require('goog.array');+goog.require('goog.html.SafeHtml');+goog.require('goog.html.SafeUrl');+goog.require('goog.html.uncheckedconversions');+goog.require('goog.string.Const');+goog.require('goog.structs.Set');+goog.require('goog.userAgent');-/**- * Creates a new log record and adds the exception (if present) to it.- * @param {goog.debug.Logger.Level} level One of the level identifiers.- * @param {string} msg The string message.- * @param {Error|Object=} opt_exception An exception associated with the- * message.- * @return {!goog.debug.LogRecord} A log record.- * @suppress {es5Strict}- */-goog.debug.Logger.prototype.getLogRecord = function(- level, msg, opt_exception) {- if (goog.debug.LogBuffer.isBufferingEnabled()) {- var logRecord =- goog.debug.LogBuffer.getInstance().addRecord(level, msg, this.name_);- } else {- logRecord = new goog.debug.LogRecord(level, String(msg), this.name_);- }- if (opt_exception) {- logRecord.setException(opt_exception);- }- return logRecord;-};++/** @define {boolean} Whether logging should be enabled. */+goog.define('goog.debug.LOGGING_ENABLED', goog.DEBUG);/**- * Logs a message at the Logger.Level.SHOUT level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Catches onerror events fired by windows and similar objects.+ * @param {function(Object)} logFunc The function to call with the error+ * information.+ * @param {boolean=} opt_cancel Whether to stop the error from reaching the+ * browser.+ * @param {Object=} opt_target Object that fires onerror events.*/-goog.debug.Logger.prototype.shout = function(msg, opt_exception) {- if (goog.debug.LOGGING_ENABLED) {- this.log(goog.debug.Logger.Level.SHOUT, msg, opt_exception);+goog.debug.catchErrors = function(logFunc, opt_cancel, opt_target) {+ var target = opt_target || goog.global;+ var oldErrorHandler = target.onerror;+ var retVal = !!opt_cancel;++ // Chrome interprets onerror return value backwards (http://crbug.com/92062)+ // until it was fixed in webkit revision r94061 (Webkit 535.3). This+ // workaround still needs to be skipped in Safari after the webkit change+ // gets pushed out in Safari.+ // See https://bugs.webkit.org/show_bug.cgi?id=67119+ if (goog.userAgent.WEBKIT &&+ !goog.userAgent.isVersionOrHigher('535.3')) {+ retVal = !retVal;}++ /**+ * New onerror handler for this target. This onerror handler follows the spec+ * according to+ * http://www.whatwg.org/specs/web-apps/current-work/#runtime-script-errors+ * The spec was changed in August 2013 to support receiving column information+ * and an error object for all scripts on the same origin or cross origin+ * scripts with the proper headers. See+ * https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror+ *+ * @param {string} message The error message. For cross-origin errors, this+ * will be scrubbed to just "Script error.". For new browsers that have+ * updated to follow the latest spec, errors that come from origins that+ * have proper cross origin headers will not be scrubbed.+ * @param {string} url The URL of the script that caused the error. The URL+ * will be scrubbed to "" for cross origin scripts unless the script has+ * proper cross origin headers and the browser has updated to the latest+ * spec.+ * @param {number} line The line number in the script that the error+ * occurred on.+ * @param {number=} opt_col The optional column number that the error+ * occurred on. Only browsers that have updated to the latest spec will+ * include this.+ * @param {Error=} opt_error The optional actual error object for this+ * error that should include the stack. Only browsers that have updated+ * to the latest spec will inlude this parameter.+ * @return {boolean} Whether to prevent the error from reaching the browser.+ */+ target.onerror = function(message, url, line, opt_col, opt_error) {+ if (oldErrorHandler) {+ oldErrorHandler(message, url, line, opt_col, opt_error);+ }+ logFunc({+ message: message,+ fileName: url,+ line: line,+ col: opt_col,+ error: opt_error+ });+ return retVal;+ };};/**- * Logs a message at the Logger.Level.SEVERE level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Creates a string representing an object and all its properties.+ * @param {Object|null|undefined} obj Object to expose.+ * @param {boolean=} opt_showFn Show the functions as well as the properties,+ * default is false.+ * @return {string} The string representation of {@code obj}.*/-goog.debug.Logger.prototype.severe = function(msg, opt_exception) {- if (goog.debug.LOGGING_ENABLED) {- this.log(goog.debug.Logger.Level.SEVERE, msg, opt_exception);+goog.debug.expose = function(obj, opt_showFn) {+ if (typeof obj == 'undefined') {+ return 'undefined';+ }+ if (obj == null) {+ return 'NULL';+ }+ var str = [];++ for (var x in obj) {+ if (!opt_showFn && goog.isFunction(obj[x])) {+ continue;+ }+ var s = x + ' = ';+ /** @preserveTry */+ try {+ s += obj[x];+ } catch (e) {+ s += '*** ' + e + ' ***';+ }+ str.push(s);}+ return str.join('\n');};/**- * Logs a message at the Logger.Level.WARNING level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Creates a string representing a given primitive or object, and for an+ * object, all its properties and nested objects. WARNING: If an object is+ * given, it and all its nested objects will be modified. To detect reference+ * cycles, this method identifies objects using goog.getUid() which mutates the+ * object.+ * @param {*} obj Object to expose.+ * @param {boolean=} opt_showFn Also show properties that are functions (by+ * default, functions are omitted).+ * @return {string} A string representation of {@code obj}.*/-goog.debug.Logger.prototype.warning = function(msg, opt_exception) {- if (goog.debug.LOGGING_ENABLED) {- this.log(goog.debug.Logger.Level.WARNING, msg, opt_exception);- }+goog.debug.deepExpose = function(obj, opt_showFn) {+ var str = [];++ var helper = function(obj, space, parentSeen) {+ var nestspace = space + ' ';+ var seen = new goog.structs.Set(parentSeen);++ var indentMultiline = function(str) {+ return str.replace(/\n/g, '\n' + space);+ };++ /** @preserveTry */+ try {+ if (!goog.isDef(obj)) {+ str.push('undefined');+ } else if (goog.isNull(obj)) {+ str.push('NULL');+ } else if (goog.isString(obj)) {+ str.push('"' + indentMultiline(obj) + '"');+ } else if (goog.isFunction(obj)) {+ str.push(indentMultiline(String(obj)));+ } else if (goog.isObject(obj)) {+ if (seen.contains(obj)) {+ str.push('*** reference loop detected ***');+ } else {+ seen.add(obj);+ str.push('{');+ for (var x in obj) {+ if (!opt_showFn && goog.isFunction(obj[x])) {+ continue;+ }+ str.push('\n');+ str.push(nestspace);+ str.push(x + ' = ');+ helper(obj[x], nestspace, seen);+ }+ str.push('\n' + space + '}');+ }+ } else {+ str.push(obj);+ }+ } catch (e) {+ str.push('*** ' + e + ' ***');+ }+ };++ helper(obj, '', new goog.structs.Set());+ return str.join('');};/**- * Logs a message at the Logger.Level.INFO level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Recursively outputs a nested array as a string.+ * @param {Array<?>} arr The array.+ * @return {string} String representing nested array.*/-goog.debug.Logger.prototype.info = function(msg, opt_exception) {- if (goog.debug.LOGGING_ENABLED) {- this.log(goog.debug.Logger.Level.INFO, msg, opt_exception);+goog.debug.exposeArray = function(arr) {+ var str = [];+ for (var i = 0; i < arr.length; i++) {+ if (goog.isArray(arr[i])) {+ str.push(goog.debug.exposeArray(arr[i]));+ } else {+ str.push(arr[i]);+ }}+ return '[ ' + str.join(', ') + ' ]';};/**- * Logs a message at the Logger.Level.CONFIG level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Exposes an exception that has been caught by a try...catch and outputs the+ * error as HTML with a stack trace.+ * @param {Object} err Error object or string.+ * @param {Function=} opt_fn Optional function to start stack trace from.+ * @return {string} Details of exception, as HTML.*/-goog.debug.Logger.prototype.config = function(msg, opt_exception) {- if (goog.debug.LOGGING_ENABLED) {- this.log(goog.debug.Logger.Level.CONFIG, msg, opt_exception);- }+goog.debug.exposeException = function(err, opt_fn) {+ var html = goog.debug.exposeExceptionAsHtml(err, opt_fn);+ return goog.html.SafeHtml.unwrap(html);};/**- * Logs a message at the Logger.Level.FINE level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Exposes an exception that has been caught by a try...catch and outputs the+ * error with a stack trace.+ * @param {Object} err Error object or string.+ * @param {Function=} opt_fn Optional function to start stack trace from.+ * @return {!goog.html.SafeHtml} Details of exception.*/-goog.debug.Logger.prototype.fine = function(msg, opt_exception) {- if (goog.debug.LOGGING_ENABLED) {- this.log(goog.debug.Logger.Level.FINE, msg, opt_exception);+goog.debug.exposeExceptionAsHtml = function(err, opt_fn) {+ /** @preserveTry */+ try {+ var e = goog.debug.normalizeErrorObject(err);+ // Create the error message+ var viewSourceUrl = goog.debug.createViewSourceUrl_(e.fileName);+ var error = goog.html.SafeHtml.concat(+ goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(+ 'Message: ' + e.message + '\nUrl: '),+ goog.html.SafeHtml.create('a',+ {href: viewSourceUrl, target: '_new'}, e.fileName),+ goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(+ '\nLine: ' + e.lineNumber + '\n\nBrowser stack:\n' ++ e.stack + '-> ' + '[end]\n\nJS stack traversal:\n' ++ goog.debug.getStacktrace(opt_fn) + '-> '));+ return error;+ } catch (e2) {+ return goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(+ 'Exception trying to expose exception! You win, we lose. ' + e2);}};/**- * Logs a message at the Logger.Level.FINER level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * @param {?string=} opt_fileName+ * @return {!goog.html.SafeUrl} SafeUrl with view-source scheme, pointing at+ * fileName.+ * @private*/-goog.debug.Logger.prototype.finer = function(msg, opt_exception) {- if (goog.debug.LOGGING_ENABLED) {- this.log(goog.debug.Logger.Level.FINER, msg, opt_exception);+goog.debug.createViewSourceUrl_ = function(opt_fileName) {+ if (!goog.isDefAndNotNull(opt_fileName)) {+ opt_fileName = '';+ }+ if (!/^https?:\/\//i.test(opt_fileName)) {+ return goog.html.SafeUrl.fromConstant(+ goog.string.Const.from('sanitizedviewsrc'));}+ var sanitizedFileName = goog.html.SafeUrl.sanitize(opt_fileName);+ return goog.html.uncheckedconversions.+ safeUrlFromStringKnownToSatisfyTypeContract(+ goog.string.Const.from('view-source scheme plus HTTP/HTTPS URL'),+ 'view-source:' + goog.html.SafeUrl.unwrap(sanitizedFileName));};/**- * Logs a message at the Logger.Level.FINEST level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Normalizes the error/exception object between browsers.+ * @param {Object} err Raw error object.+ * @return {!Object} Normalized error object.*/-goog.debug.Logger.prototype.finest = function(msg, opt_exception) {- if (goog.debug.LOGGING_ENABLED) {- this.log(goog.debug.Logger.Level.FINEST, msg, opt_exception);+goog.debug.normalizeErrorObject = function(err) {+ var href = goog.getObjectByName('window.location.href');+ if (goog.isString(err)) {+ return {+ 'message': err,+ 'name': 'Unknown error',+ 'lineNumber': 'Not available',+ 'fileName': href,+ 'stack': 'Not available'+ };}-};+ var lineNumber, fileName;+ var threwError = false;-/**- * Logs a LogRecord. If the logger is currently enabled for the- * given message level then the given message is forwarded to all the- * registered output Handler objects.- * @param {goog.debug.LogRecord} logRecord A log record to log.- */-goog.debug.Logger.prototype.logRecord = function(logRecord) {- if (goog.debug.LOGGING_ENABLED && this.isLoggable(logRecord.getLevel())) {- this.doLogRecord_(logRecord);+ try {+ lineNumber = err.lineNumber || err.line || 'Not available';+ } catch (e) {+ // Firefox 2 sometimes throws an error when accessing 'lineNumber':+ // Message: Permission denied to get property UnnamedClass.lineNumber+ lineNumber = 'Not available';+ threwError = true;+ }++ try {+ fileName = err.fileName || err.filename || err.sourceURL ||+ // $googDebugFname may be set before a call to eval to set the filename+ // that the eval is supposed to present.+ goog.global['$googDebugFname'] || href;+ } catch (e) {+ // Firefox 2 may also throw an error when accessing 'filename'.+ fileName = 'Not available';+ threwError = true;+ }++ // The IE Error object contains only the name and the message.+ // The Safari Error object uses the line and sourceURL fields.+ if (threwError || !err.lineNumber || !err.fileName || !err.stack ||+ !err.message || !err.name) {+ return {+ 'message': err.message || 'Not available',+ 'name': err.name || 'UnknownError',+ 'lineNumber': lineNumber,+ 'fileName': fileName,+ 'stack': err.stack || 'Not available'+ };}++ // Standards error object+ return err;};/**- * Logs a LogRecord.- * @param {goog.debug.LogRecord} logRecord A log record to log.- * @private+ * Converts an object to an Error if it's a String,+ * adds a stacktrace if there isn't one,+ * and optionally adds an extra message.+ * @param {Error|string} err the original thrown object or string.+ * @param {string=} opt_message optional additional message to add to the+ * error.+ * @return {!Error} If err is a string, it is used to create a new Error,+ * which is enhanced and returned. Otherwise err itself is enhanced+ * and returned.*/-goog.debug.Logger.prototype.doLogRecord_ = function(logRecord) {- goog.debug.Logger.logToProfilers('log:' + logRecord.getMessage());- if (goog.debug.Logger.ENABLE_HIERARCHY) {- var target = this;- while (target) {- target.callPublish_(logRecord);- target = target.getParent();+goog.debug.enhanceError = function(err, opt_message) {+ var error;+ if (typeof err == 'string') {+ error = Error(err);+ if (Error.captureStackTrace) {+ // Trim this function off the call stack, if we can.+ Error.captureStackTrace(error, goog.debug.enhanceError);}} else {- for (var i = 0, handler; handler = goog.debug.Logger.rootHandlers_[i++]; ) {- handler(logRecord);+ error = err;+ }++ if (!error.stack) {+ error.stack = goog.debug.getStacktrace(goog.debug.enhanceError);+ }+ if (opt_message) {+ // find the first unoccupied 'messageX' property+ var x = 0;+ while (error['message' + x]) {+ ++x;}+ error['message' + x] = String(opt_message);}+ return error;};/**- * Calls the handlers for publish.- * @param {goog.debug.LogRecord} logRecord The log record to publish.- * @private+ * Gets the current stack trace. Simple and iterative - doesn't worry about+ * catching circular references or getting the args.+ * @param {number=} opt_depth Optional maximum depth to trace back to.+ * @return {string} A string with the function names of all functions in the+ * stack, separated by \n.+ * @suppress {es5Strict}*/-goog.debug.Logger.prototype.callPublish_ = function(logRecord) {- if (this.handlers_) {- for (var i = 0, handler; handler = this.handlers_[i]; i++) {- handler(logRecord);+goog.debug.getStacktraceSimple = function(opt_depth) {+ if (goog.STRICT_MODE_COMPATIBLE) {+ var stack = goog.debug.getNativeStackTrace_(goog.debug.getStacktraceSimple);+ if (stack) {+ return stack;}+ // NOTE: browsers that have strict mode support also have native "stack"+ // properties. Fall-through for legacy browser support.}-};--/**- * Sets the parent of this logger. This is used for setting up the logger tree.- * @param {goog.debug.Logger} parent The parent logger.- * @private- */-goog.debug.Logger.prototype.setParent_ = function(parent) {- this.parent_ = parent;-};+ var sb = [];+ var fn = arguments.callee.caller;+ var depth = 0;+ while (fn && (!opt_depth || depth < opt_depth)) {+ sb.push(goog.debug.getFunctionName(fn));+ sb.push('()\n');+ /** @preserveTry */+ try {+ fn = fn.caller;+ } catch (e) {+ sb.push('[exception trying to get caller]\n');+ break;+ }+ depth++;+ if (depth >= goog.debug.MAX_STACK_DEPTH) {+ sb.push('[...long stack...]');+ break;+ }+ }+ if (opt_depth && depth >= opt_depth) {+ sb.push('[...reached max depth limit...]');+ } else {+ sb.push('[end]');+ }-/**- * Adds a child to this logger. This is used for setting up the logger tree.- * @param {string} name The leaf name of the child.- * @param {goog.debug.Logger} logger The child logger.- * @private- */-goog.debug.Logger.prototype.addChild_ = function(name, logger) {- this.getChildren()[name] = logger;+ return sb.join('');};/**- * There is a single global LogManager object that is used to maintain a set of- * shared state about Loggers and log services. This is loosely based on the- * java class java.util.logging.LogManager.- * @const- */-goog.debug.LogManager = {};---/**- * Map of logger names to logger objects.- *- * @type {!Object<string, !goog.debug.Logger>}- * @private+ * Max length of stack to try and output+ * @type {number}*/-goog.debug.LogManager.loggers_ = {};+goog.debug.MAX_STACK_DEPTH = 50;/**- * The root logger which is the root of the logger tree.- * @type {goog.debug.Logger}+ * @param {Function} fn The function to start getting the trace from.+ * @return {?string}* @private*/-goog.debug.LogManager.rootLogger_ = null;+goog.debug.getNativeStackTrace_ = function(fn) {+ var tempErr = new Error();+ if (Error.captureStackTrace) {+ Error.captureStackTrace(tempErr, fn);+ return String(tempErr.stack);+ } else {+ // IE10, only adds stack traces when an exception is thrown.+ try {+ throw tempErr;+ } catch (e) {+ tempErr = e;+ }+ var stack = tempErr.stack;+ if (stack) {+ return String(stack);+ }+ }+ return null;+};/**- * Initializes the LogManager if not already initialized.+ * Gets the current stack trace, either starting from the caller or starting+ * from a specified function that's currently on the call stack.+ * @param {Function=} opt_fn Optional function to start getting the trace from.+ * If not provided, defaults to the function that called this.+ * @return {string} Stack trace.+ * @suppress {es5Strict}*/-goog.debug.LogManager.initialize = function() {- if (!goog.debug.LogManager.rootLogger_) {- goog.debug.LogManager.rootLogger_ = new goog.debug.Logger(- goog.debug.Logger.ROOT_LOGGER_NAME);- goog.debug.LogManager.loggers_[goog.debug.Logger.ROOT_LOGGER_NAME] =- goog.debug.LogManager.rootLogger_;- goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG);+goog.debug.getStacktrace = function(opt_fn) {+ var stack;+ if (goog.STRICT_MODE_COMPATIBLE) {+ // Try to get the stack trace from the environment if it is available.+ var contextFn = opt_fn || goog.debug.getStacktrace;+ stack = goog.debug.getNativeStackTrace_(contextFn);+ }+ if (!stack) {+ // NOTE: browsers that have strict mode support also have native "stack"+ // properties. This function will throw in strict mode.+ stack = goog.debug.getStacktraceHelper_(+ opt_fn || arguments.callee.caller, []);}+ return stack;};/**- * Returns all the loggers.- * @return {!Object<string, !goog.debug.Logger>} Map of logger names to logger- * objects.+ * Private helper for getStacktrace().+ * @param {Function} fn Function to start getting the trace from.+ * @param {Array<!Function>} visited List of functions visited so far.+ * @return {string} Stack trace starting from function fn.+ * @suppress {es5Strict}+ * @private*/-goog.debug.LogManager.getLoggers = function() {- return goog.debug.LogManager.loggers_;-};+goog.debug.getStacktraceHelper_ = function(fn, visited) {+ var sb = [];+ // Circular reference, certain functions like bind seem to cause a recursive+ // loop so we need to catch circular references+ if (goog.array.contains(visited, fn)) {+ sb.push('[...circular reference...]');-/**- * Returns the root of the logger tree namespace, the logger with the empty- * string as its name.- *- * @return {!goog.debug.Logger} The root logger.- */-goog.debug.LogManager.getRoot = function() {- goog.debug.LogManager.initialize();- return /** @type {!goog.debug.Logger} */ (goog.debug.LogManager.rootLogger_);-};+ // Traverse the call stack until function not found or max depth is reached+ } else if (fn && visited.length < goog.debug.MAX_STACK_DEPTH) {+ sb.push(goog.debug.getFunctionName(fn) + '(');+ var args = fn.arguments;+ // Args may be null for some special functions such as host objects or eval.+ for (var i = 0; args && i < args.length; i++) {+ if (i > 0) {+ sb.push(', ');+ }+ var argDesc;+ var arg = args[i];+ switch (typeof arg) {+ case 'object':+ argDesc = arg ? 'object' : 'null';+ break;+ case 'string':+ argDesc = arg;+ break;-/**- * Finds a named logger.- *- * @param {string} name A name for the logger. This should be a dot-separated- * name and should normally be based on the package name or class name of the- * subsystem, such as goog.net.BrowserChannel.- * @return {!goog.debug.Logger} The named logger.- */-goog.debug.LogManager.getLogger = function(name) {- goog.debug.LogManager.initialize();- var ret = goog.debug.LogManager.loggers_[name];- return ret || goog.debug.LogManager.createLogger_(name);-};+ case 'number':+ argDesc = String(arg);+ break;+ case 'boolean':+ argDesc = arg ? 'true' : 'false';+ break;-/**- * Creates a function that can be passed to goog.debug.catchErrors. The function- * will log all reported errors using the given logger.- * @param {goog.debug.Logger=} opt_logger The logger to log the errors to.- * Defaults to the root logger.- * @return {function(Object)} The created function.- */-goog.debug.LogManager.createFunctionForCatchErrors = function(opt_logger) {- return function(info) {- var logger = opt_logger || goog.debug.LogManager.getRoot();- logger.severe('Error: ' + info.message + ' (' + info.fileName +- ' @ Line: ' + info.line + ')');- };-};+ case 'function':+ argDesc = goog.debug.getFunctionName(arg);+ argDesc = argDesc ? argDesc : '[fn]';+ break;+ case 'undefined':+ default:+ argDesc = typeof arg;+ break;+ }-/**- * Creates the named logger. Will also create the parents of the named logger- * if they don't yet exist.- * @param {string} name The name of the logger.- * @return {!goog.debug.Logger} The named logger.- * @private- */-goog.debug.LogManager.createLogger_ = function(name) {- // find parent logger- var logger = new goog.debug.Logger(name);- if (goog.debug.Logger.ENABLE_HIERARCHY) {- var lastDotIndex = name.lastIndexOf('.');- var parentName = name.substr(0, lastDotIndex);- var leafName = name.substr(lastDotIndex + 1);- var parentLogger = goog.debug.LogManager.getLogger(parentName);+ if (argDesc.length > 40) {+ argDesc = argDesc.substr(0, 40) + '...';+ }+ sb.push(argDesc);+ }+ visited.push(fn);+ sb.push(')\n');+ /** @preserveTry */+ try {+ sb.push(goog.debug.getStacktraceHelper_(fn.caller, visited));+ } catch (e) {+ sb.push('[exception trying to get caller]\n');+ }- // tell the parent about the child and the child about the parent- parentLogger.addChild_(leafName, logger);- logger.setParent_(parentLogger);+ } else if (fn) {+ sb.push('[...long stack...]');+ } else {+ sb.push('[end]');}-- goog.debug.LogManager.loggers_[name] = logger;- return logger;+ return sb.join('');};-// Copyright 2007 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License.--/**- * @fileoverview Definition the goog.debug.RelativeTimeProvider class.- *- */--goog.provide('goog.debug.RelativeTimeProvider');--/**- * A simple object to keep track of a timestamp considered the start of- * something. The main use is for the logger system to maintain a start time- * that is occasionally reset. For example, in Gmail, we reset this relative- * time at the start of a user action so that timings are offset from the- * beginning of the action. This class also provides a singleton as the default- * behavior for most use cases is to share the same start time.- *- * @constructor- * @final+ * Set a custom function name resolver.+ * @param {function(Function): string} resolver Resolves functions to their+ * names.*/-goog.debug.RelativeTimeProvider = function() {- /**- * The start time.- * @type {number}- * @private- */- this.relativeTimeStart_ = goog.now();+goog.debug.setFunctionResolver = function(resolver) {+ goog.debug.fnNameResolver_ = resolver;};/**- * Default instance.- * @type {goog.debug.RelativeTimeProvider}- * @private+ * Gets a function name+ * @param {Function} fn Function to get name of.+ * @return {string} Function's name.*/-goog.debug.RelativeTimeProvider.defaultInstance_ =- new goog.debug.RelativeTimeProvider();+goog.debug.getFunctionName = function(fn) {+ if (goog.debug.fnNameCache_[fn]) {+ return goog.debug.fnNameCache_[fn];+ }+ if (goog.debug.fnNameResolver_) {+ var name = goog.debug.fnNameResolver_(fn);+ if (name) {+ goog.debug.fnNameCache_[fn] = name;+ return name;+ }+ }+ // Heuristically determine function name based on code.+ var functionSource = String(fn);+ if (!goog.debug.fnNameCache_[functionSource]) {+ var matches = /function ([^\(]+)/.exec(functionSource);+ if (matches) {+ var method = matches[1];+ goog.debug.fnNameCache_[functionSource] = method;+ } else {+ goog.debug.fnNameCache_[functionSource] = '[Anonymous]';+ }+ }-/**- * Sets the start time to the specified time.- * @param {number} timeStamp The start time.- */-goog.debug.RelativeTimeProvider.prototype.set = function(timeStamp) {- this.relativeTimeStart_ = timeStamp;+ return goog.debug.fnNameCache_[functionSource];};/**- * Resets the start time to now.+ * Makes whitespace visible by replacing it with printable characters.+ * This is useful in finding diffrences between the expected and the actual+ * output strings of a testcase.+ * @param {string} string whose whitespace needs to be made visible.+ * @return {string} string whose whitespace is made visible.*/-goog.debug.RelativeTimeProvider.prototype.reset = function() {- this.set(goog.now());+goog.debug.makeWhitespaceVisible = function(string) {+ return string.replace(/ /g, '[_]')+ .replace(/\f/g, '[f]')+ .replace(/\n/g, '[n]\n')+ .replace(/\r/g, '[r]')+ .replace(/\t/g, '[t]');};/**- * @return {number} The start time.+ * Hash map for storing function names that have already been looked up.+ * @type {Object}+ * @private*/-goog.debug.RelativeTimeProvider.prototype.get = function() {- return this.relativeTimeStart_;-};+goog.debug.fnNameCache_ = {};/**- * @return {goog.debug.RelativeTimeProvider} The default instance.+ * Resolves functions to their names. Resolved function names will be cached.+ * @type {function(Function):string}+ * @private*/-goog.debug.RelativeTimeProvider.getDefaultInstance = function() {- return goog.debug.RelativeTimeProvider.defaultInstance_;-};+goog.debug.fnNameResolver_;// Copyright 2006 The Closure Library Authors. All Rights Reserved.//@@ -40554,563 +40787,235 @@ goog.debug.RelativeTimeProvider.getDefaultInstance = function() {// limitations under the License./**- * @fileoverview Definition of various formatters for logging. Please minimize+ * @fileoverview Definition of the LogRecord class. Please minimize* dependencies this file has on other closure classes as any dependency it* takes won't be able to use the logging infrastructure.**/-goog.provide('goog.debug.Formatter');-goog.provide('goog.debug.HtmlFormatter');-goog.provide('goog.debug.TextFormatter');--goog.require('goog.debug');-goog.require('goog.debug.Logger');-goog.require('goog.debug.RelativeTimeProvider');-goog.require('goog.html.SafeHtml');+goog.provide('goog.debug.LogRecord');/**- * Base class for Formatters. A Formatter is used to format a LogRecord into- * something that can be displayed to the user.- *- * @param {string=} opt_prefix The prefix to place before text records.+ * LogRecord objects are used to pass logging requests between+ * the logging framework and individual log Handlers.* @constructor+ * @param {goog.debug.Logger.Level} level One of the level identifiers.+ * @param {string} msg The string message.+ * @param {string} loggerName The name of the source logger.+ * @param {number=} opt_time Time this log record was created if other than now.+ * If 0, we use #goog.now.+ * @param {number=} opt_sequenceNumber Sequence number of this log record. This+ * should only be passed in when restoring a log record from persistence.*/-goog.debug.Formatter = function(opt_prefix) {- this.prefix_ = opt_prefix || '';-- /**- * A provider that returns the relative start time.- * @type {goog.debug.RelativeTimeProvider}- * @private- */- this.startTimeProvider_ =- goog.debug.RelativeTimeProvider.getDefaultInstance();-};---/**- * Whether to append newlines to the end of formatted log records.- * @type {boolean}- */-goog.debug.Formatter.prototype.appendNewline = true;---/**- * Whether to show absolute time in the DebugWindow.- * @type {boolean}- */-goog.debug.Formatter.prototype.showAbsoluteTime = true;---/**- * Whether to show relative time in the DebugWindow.- * @type {boolean}- */-goog.debug.Formatter.prototype.showRelativeTime = true;---/**- * Whether to show the logger name in the DebugWindow.- * @type {boolean}- */-goog.debug.Formatter.prototype.showLoggerName = true;---/**- * Whether to show the logger exception text.- * @type {boolean}- */-goog.debug.Formatter.prototype.showExceptionText = false;---/**- * Whether to show the severity level.- * @type {boolean}- */-goog.debug.Formatter.prototype.showSeverityLevel = false;---/**- * Formats a record.- * @param {goog.debug.LogRecord} logRecord the logRecord to format.- * @return {string} The formatted string.- */-goog.debug.Formatter.prototype.formatRecord = goog.abstractMethod;---/**- * Sets the start time provider. By default, this is the default instance- * but can be changed.- * @param {goog.debug.RelativeTimeProvider} provider The provider to use.- */-goog.debug.Formatter.prototype.setStartTimeProvider = function(provider) {- this.startTimeProvider_ = provider;+goog.debug.LogRecord = function(level, msg, loggerName,+ opt_time, opt_sequenceNumber) {+ this.reset(level, msg, loggerName, opt_time, opt_sequenceNumber);};/**- * Returns the start time provider. By default, this is the default instance- * but can be changed.- * @return {goog.debug.RelativeTimeProvider} The start time provider.+ * Time the LogRecord was created.+ * @type {number}+ * @private*/-goog.debug.Formatter.prototype.getStartTimeProvider = function() {- return this.startTimeProvider_;-};+goog.debug.LogRecord.prototype.time_;/**- * Resets the start relative time.+ * Level of the LogRecord+ * @type {goog.debug.Logger.Level}+ * @private*/-goog.debug.Formatter.prototype.resetRelativeTimeStart = function() {- this.startTimeProvider_.reset();-};+goog.debug.LogRecord.prototype.level_;/**- * Returns a string for the time/date of the LogRecord.- * @param {goog.debug.LogRecord} logRecord The record to get a time stamp for.- * @return {string} A string representation of the time/date of the LogRecord.+ * Message associated with the record+ * @type {string}* @private*/-goog.debug.Formatter.getDateTimeStamp_ = function(logRecord) {- var time = new Date(logRecord.getMillis());- return goog.debug.Formatter.getTwoDigitString_((time.getFullYear() - 2000)) +- goog.debug.Formatter.getTwoDigitString_((time.getMonth() + 1)) +- goog.debug.Formatter.getTwoDigitString_(time.getDate()) + ' ' +- goog.debug.Formatter.getTwoDigitString_(time.getHours()) + ':' +- goog.debug.Formatter.getTwoDigitString_(time.getMinutes()) + ':' +- goog.debug.Formatter.getTwoDigitString_(time.getSeconds()) + '.' +- goog.debug.Formatter.getTwoDigitString_(- Math.floor(time.getMilliseconds() / 10));-};+goog.debug.LogRecord.prototype.msg_;/**- * Returns the number as a two-digit string, meaning it prepends a 0 if the- * number if less than 10.- * @param {number} n The number to format.- * @return {string} A two-digit string representation of {@code n}.+ * Name of the logger that created the record.+ * @type {string}* @private*/-goog.debug.Formatter.getTwoDigitString_ = function(n) {- if (n < 10) {- return '0' + n;- }- return String(n);-};+goog.debug.LogRecord.prototype.loggerName_;/**- * Returns a string for the number of seconds relative to the start time.- * Prepads with spaces so that anything less than 1000 seconds takes up the- * same number of characters for better formatting.- * @param {goog.debug.LogRecord} logRecord The log to compare time to.- * @param {number} relativeTimeStart The start time to compare to.- * @return {string} The number of seconds of the LogRecord relative to the- * start time.+ * Sequence number for the LogRecord. Each record has a unique sequence number+ * that is greater than all log records created before it.+ * @type {number}* @private*/-goog.debug.Formatter.getRelativeTime_ = function(logRecord,- relativeTimeStart) {- var ms = logRecord.getMillis() - relativeTimeStart;- var sec = ms / 1000;- var str = sec.toFixed(3);-- var spacesToPrepend = 0;- if (sec < 1) {- spacesToPrepend = 2;- } else {- while (sec < 100) {- spacesToPrepend++;- sec *= 10;- }- }- while (spacesToPrepend-- > 0) {- str = ' ' + str;- }- return str;-};-+goog.debug.LogRecord.prototype.sequenceNumber_ = 0;/**- * Formatter that returns formatted html. See formatRecord for the classes- * it uses for various types of formatted output.- *- * @param {string=} opt_prefix The prefix to place before text records.- * @constructor- * @extends {goog.debug.Formatter}+ * Exception associated with the record+ * @type {Object}+ * @private*/-goog.debug.HtmlFormatter = function(opt_prefix) {- goog.debug.Formatter.call(this, opt_prefix);-};-goog.inherits(goog.debug.HtmlFormatter, goog.debug.Formatter);+goog.debug.LogRecord.prototype.exception_ = null;/**- * Whether to show the logger exception text- * @type {boolean}- * @override+ * @define {boolean} Whether to enable log sequence numbers.*/-goog.debug.HtmlFormatter.prototype.showExceptionText = true;+goog.define('goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS', true);/**- * Formats a record- * @param {goog.debug.LogRecord} logRecord the logRecord to format.- * @return {string} The formatted string as html.- * @override+ * A sequence counter for assigning increasing sequence numbers to LogRecord+ * objects.+ * @type {number}+ * @private*/-goog.debug.HtmlFormatter.prototype.formatRecord = function(logRecord) {- if (!logRecord) {- return '';- }- // OK not to use goog.html.SafeHtml.unwrap() here.- return this.formatRecordAsHtml(logRecord).getTypedStringValue();-};+goog.debug.LogRecord.nextSequenceNumber_ = 0;/**- * Formats a record.- * @param {!goog.debug.LogRecord} logRecord the logRecord to format.- * @return {!goog.html.SafeHtml} The formatted string as SafeHtml.+ * Sets all fields of the log record.+ * @param {goog.debug.Logger.Level} level One of the level identifiers.+ * @param {string} msg The string message.+ * @param {string} loggerName The name of the source logger.+ * @param {number=} opt_time Time this log record was created if other than now.+ * If 0, we use #goog.now.+ * @param {number=} opt_sequenceNumber Sequence number of this log record. This+ * should only be passed in when restoring a log record from persistence.*/-goog.debug.HtmlFormatter.prototype.formatRecordAsHtml = function(logRecord) {- var className;- switch (logRecord.getLevel().value) {- case goog.debug.Logger.Level.SHOUT.value:- className = 'dbg-sh';- break;- case goog.debug.Logger.Level.SEVERE.value:- className = 'dbg-sev';- break;- case goog.debug.Logger.Level.WARNING.value:- className = 'dbg-w';- break;- case goog.debug.Logger.Level.INFO.value:- className = 'dbg-i';- break;- case goog.debug.Logger.Level.FINE.value:- default:- className = 'dbg-f';- break;- }-- // HTML for user defined prefix, time, logger name, and severity.- var sb = [];- sb.push(this.prefix_, ' ');- if (this.showAbsoluteTime) {- sb.push('[', goog.debug.Formatter.getDateTimeStamp_(logRecord), '] ');- }- if (this.showRelativeTime) {- sb.push('[',- goog.debug.Formatter.getRelativeTime_(- logRecord, this.startTimeProvider_.get()),- 's] ');- }- if (this.showLoggerName) {- sb.push('[', logRecord.getLoggerName(), '] ');- }- if (this.showSeverityLevel) {- sb.push('[', logRecord.getLevel().name, '] ');- }- var fullPrefixHtml =- goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(sb.join(''));-- // HTML for exception text and log record.- var exceptionHtml = goog.html.SafeHtml.EMPTY;- if (this.showExceptionText && logRecord.getException()) {- exceptionHtml = goog.html.SafeHtml.concat(- goog.html.SafeHtml.create('br'),- goog.debug.exposeExceptionAsHtml(logRecord.getException()));+goog.debug.LogRecord.prototype.reset = function(level, msg, loggerName,+ opt_time, opt_sequenceNumber) {+ if (goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS) {+ this.sequenceNumber_ = typeof opt_sequenceNumber == 'number' ?+ opt_sequenceNumber : goog.debug.LogRecord.nextSequenceNumber_++;}- var logRecordHtml = goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(- logRecord.getMessage());- var recordAndExceptionHtml = goog.html.SafeHtml.create(- 'span',- {'class': className},- goog.html.SafeHtml.concat(logRecordHtml, exceptionHtml));-- // Combine both pieces of HTML and, if needed, append a final newline.- var html;- if (this.appendNewline) {- html = goog.html.SafeHtml.concat(fullPrefixHtml, recordAndExceptionHtml,- goog.html.SafeHtml.create('br'));- } else {- html = goog.html.SafeHtml.concat(fullPrefixHtml, recordAndExceptionHtml);- }- return html;+ this.time_ = opt_time || goog.now();+ this.level_ = level;+ this.msg_ = msg;+ this.loggerName_ = loggerName;+ delete this.exception_;};-/**- * Formatter that returns formatted plain text+ * Get the source Logger's name.*- * @param {string=} opt_prefix The prefix to place before text records.- * @constructor- * @extends {goog.debug.Formatter}- * @final- */-goog.debug.TextFormatter = function(opt_prefix) {- goog.debug.Formatter.call(this, opt_prefix);-};-goog.inherits(goog.debug.TextFormatter, goog.debug.Formatter);---/**- * Formats a record as text- * @param {goog.debug.LogRecord} logRecord the logRecord to format.- * @return {string} The formatted string.- * @override+ * @return {string} source logger name (may be null).*/-goog.debug.TextFormatter.prototype.formatRecord = function(logRecord) {- // Build message html- var sb = [];- sb.push(this.prefix_, ' ');- if (this.showAbsoluteTime) {- sb.push('[', goog.debug.Formatter.getDateTimeStamp_(logRecord), '] ');- }- if (this.showRelativeTime) {- sb.push('[', goog.debug.Formatter.getRelativeTime_(logRecord,- this.startTimeProvider_.get()), 's] ');- }-- if (this.showLoggerName) {- sb.push('[', logRecord.getLoggerName(), '] ');- }- if (this.showSeverityLevel) {- sb.push('[', logRecord.getLevel().name, '] ');- }- sb.push(logRecord.getMessage());- if (this.showExceptionText) {- var exception = logRecord.getException();- if (exception) {- var exceptionText = exception instanceof Error ?- exception.message :- exception.toString();- sb.push('\n', exceptionText);- }- }- if (this.appendNewline) {- sb.push('\n');- }- return sb.join('');+goog.debug.LogRecord.prototype.getLoggerName = function() {+ return this.loggerName_;};-// Copyright 2006 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License./**- * @fileoverview Simple logger that logs to the window console if available.- *- * Has an autoInstall option which can be put into initialization code, which- * will start logging if "Debug=true" is in document.location.href+ * Get the exception that is part of the log record.*+ * @return {Object} the exception.*/--goog.provide('goog.debug.Console');--goog.require('goog.debug.LogManager');-goog.require('goog.debug.Logger');-goog.require('goog.debug.TextFormatter');----/**- * Create and install a log handler that logs to window.console if available- * @constructor- */-goog.debug.Console = function() {- this.publishHandler_ = goog.bind(this.addLogRecord, this);-- /**- * Formatter for formatted output.- * @type {!goog.debug.TextFormatter}- * @private- */- this.formatter_ = new goog.debug.TextFormatter();- this.formatter_.showAbsoluteTime = false;- this.formatter_.showExceptionText = false;- // The console logging methods automatically append a newline.- this.formatter_.appendNewline = false;-- this.isCapturing_ = false;- this.logBuffer_ = '';-- /**- * Loggers that we shouldn't output.- * @type {!Object<boolean>}- * @private- */- this.filteredLoggers_ = {};-};---/**- * Returns the text formatter used by this console- * @return {!goog.debug.TextFormatter} The text formatter.- */-goog.debug.Console.prototype.getFormatter = function() {- return this.formatter_;-};---/**- * Sets whether we are currently capturing logger output.- * @param {boolean} capturing Whether to capture logger output.- */-goog.debug.Console.prototype.setCapturing = function(capturing) {- if (capturing == this.isCapturing_) {- return;- }-- // attach or detach handler from the root logger- var rootLogger = goog.debug.LogManager.getRoot();- if (capturing) {- rootLogger.addHandler(this.publishHandler_);- } else {- rootLogger.removeHandler(this.publishHandler_);- this.logBuffer = '';- }- this.isCapturing_ = capturing;+goog.debug.LogRecord.prototype.getException = function() {+ return this.exception_;};/**- * Adds a log record.- * @param {goog.debug.LogRecord} logRecord The log entry.+ * Set the exception that is part of the log record.+ *+ * @param {Object} exception the exception.*/-goog.debug.Console.prototype.addLogRecord = function(logRecord) {-- // Check to see if the log record is filtered or not.- if (this.filteredLoggers_[logRecord.getLoggerName()]) {- return;- }-- var record = this.formatter_.formatRecord(logRecord);- var console = goog.debug.Console.console_;- if (console) {- switch (logRecord.getLevel()) {- case goog.debug.Logger.Level.SHOUT:- goog.debug.Console.logToConsole_(console, 'info', record);- break;- case goog.debug.Logger.Level.SEVERE:- goog.debug.Console.logToConsole_(console, 'error', record);- break;- case goog.debug.Logger.Level.WARNING:- goog.debug.Console.logToConsole_(console, 'warn', record);- break;- default:- goog.debug.Console.logToConsole_(console, 'debug', record);- break;- }- } else {- this.logBuffer_ += record;- }+goog.debug.LogRecord.prototype.setException = function(exception) {+ this.exception_ = exception;};/**- * Adds a logger name to be filtered.- * @param {string} loggerName the logger name to add.+ * Get the source Logger's name.+ *+ * @param {string} loggerName source logger name (may be null).*/-goog.debug.Console.prototype.addFilter = function(loggerName) {- this.filteredLoggers_[loggerName] = true;+goog.debug.LogRecord.prototype.setLoggerName = function(loggerName) {+ this.loggerName_ = loggerName;};/**- * Removes a logger name to be filtered.- * @param {string} loggerName the logger name to remove.+ * Get the logging message level, for example Level.SEVERE.+ * @return {goog.debug.Logger.Level} the logging message level.*/-goog.debug.Console.prototype.removeFilter = function(loggerName) {- delete this.filteredLoggers_[loggerName];+goog.debug.LogRecord.prototype.getLevel = function() {+ return this.level_;};/**- * Global console logger instance- * @type {goog.debug.Console}+ * Set the logging message level, for example Level.SEVERE.+ * @param {goog.debug.Logger.Level} level the logging message level.*/-goog.debug.Console.instance = null;+goog.debug.LogRecord.prototype.setLevel = function(level) {+ this.level_ = level;+};/**- * The console to which to log. This is a property so it can be mocked out in- * this unit test for goog.debug.Console. Using goog.global, as console might be- * used in window-less contexts.- * @type {Object}- * @private+ * Get the "raw" log message, before localization or formatting.+ *+ * @return {string} the raw message string.*/-goog.debug.Console.console_ = goog.global['console'];+goog.debug.LogRecord.prototype.getMessage = function() {+ return this.msg_;+};/**- * Sets the console to which to log.- * @param {!Object} console The console to which to log.+ * Set the "raw" log message, before localization or formatting.+ *+ * @param {string} msg the raw message string.*/-goog.debug.Console.setConsole = function(console) {- goog.debug.Console.console_ = console;+goog.debug.LogRecord.prototype.setMessage = function(msg) {+ this.msg_ = msg;};/**- * Install the console and start capturing if "Debug=true" is in the page URL+ * Get event time in milliseconds since 1970.+ *+ * @return {number} event time in millis since 1970.*/-goog.debug.Console.autoInstall = function() {- if (!goog.debug.Console.instance) {- goog.debug.Console.instance = new goog.debug.Console();- }-- if (goog.global.location &&- goog.global.location.href.indexOf('Debug=true') != -1) {- goog.debug.Console.instance.setCapturing(true);- }+goog.debug.LogRecord.prototype.getMillis = function() {+ return this.time_;};/**- * Show an alert with all of the captured debug information.- * Information is only captured if console is not available+ * Set event time in milliseconds since 1970.+ *+ * @param {number} time event time in millis since 1970.*/-goog.debug.Console.show = function() {- alert(goog.debug.Console.instance.logBuffer_);+goog.debug.LogRecord.prototype.setMillis = function(time) {+ this.time_ = time;};/**- * Logs the record to the console using the given function. If the function is- * not available on the console object, the log function is used instead.- * @param {!Object} console The console object.- * @param {string} fnName The name of the function to use.- * @param {string} record The record to log.- * @private+ * Get the sequence number.+ * <p>+ * Sequence numbers are normally assigned in the LogRecord+ * constructor, which assigns unique sequence numbers to+ * each new LogRecord in increasing order.+ * @return {number} the sequence number.*/-goog.debug.Console.logToConsole_ = function(console, fnName, record) {- if (console[fnName]) {- console[fnName](record);- } else {- console.log(record);- }+goog.debug.LogRecord.prototype.getSequenceNumber = function() {+ return this.sequenceNumber_;};-// Copyright 2007 The Closure Library Authors. All Rights Reserved.++// Copyright 2010 The Closure Library Authors. All Rights Reserved.//// Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.@@ -41125,172 +41030,140 @@ goog.debug.Console.logToConsole_ = function(console, fnName, record) {// limitations under the License./**- * @fileoverview Utility class that monitors viewport size changes.+ * @fileoverview A buffer for log records. The purpose of this is to improve+ * logging performance by re-using old objects when the buffer becomes full and+ * to eliminate the need for each app to implement their own log buffer. The+ * disadvantage to doing this is that log handlers cannot maintain references to+ * log records and expect that they are not overwriten at a later point.*- * @author [email protected] (Attila Bodis)- * @see ../demos/viewportsizemonitor.html+ * @author [email protected] (Andrew Grieve)*/-goog.provide('goog.dom.ViewportSizeMonitor');+goog.provide('goog.debug.LogBuffer');-goog.require('goog.dom');-goog.require('goog.events');-goog.require('goog.events.EventTarget');-goog.require('goog.events.EventType');-goog.require('goog.math.Size');+goog.require('goog.asserts');+goog.require('goog.debug.LogRecord');/**- * This class can be used to monitor changes in the viewport size. Instances- * dispatch a {@link goog.events.EventType.RESIZE} event when the viewport size- * changes. Handlers can call {@link goog.dom.ViewportSizeMonitor#getSize} to- * get the new viewport size.- *- * Use this class if you want to execute resize/reflow logic each time the- * user resizes the browser window. This class is guaranteed to only dispatch- * {@code RESIZE} events when the pixel dimensions of the viewport change.- * (Internet Explorer fires resize events if any element on the page is resized,- * even if the viewport dimensions are unchanged, which can lead to infinite- * resize loops.)- *- * Example usage:- * <pre>- * var vsm = new goog.dom.ViewportSizeMonitor();- * goog.events.listen(vsm, goog.events.EventType.RESIZE, function(e) {- * alert('Viewport size changed to ' + vsm.getSize());- * });- * </pre>- *- * Manually verified on IE6, IE7, FF2, Opera 11, Safari 4 and Chrome.- *- * @param {Window=} opt_window The window to monitor; defaults to the window in- * which this code is executing.+ * Creates the log buffer.* @constructor- * @extends {goog.events.EventTarget}+ * @final*/-goog.dom.ViewportSizeMonitor = function(opt_window) {- goog.events.EventTarget.call(this);-- // Default the window to the current window if unspecified.- this.window_ = opt_window || window;-- // Listen for window resize events.- this.listenerKey_ = goog.events.listen(this.window_,- goog.events.EventType.RESIZE, this.handleResize_, false, this);-- // Set the initial size.- this.size_ = goog.dom.getViewportSize(this.window_);+goog.debug.LogBuffer = function() {+ goog.asserts.assert(goog.debug.LogBuffer.isBufferingEnabled(),+ 'Cannot use goog.debug.LogBuffer without defining ' ++ 'goog.debug.LogBuffer.CAPACITY.');+ this.clear();};-goog.inherits(goog.dom.ViewportSizeMonitor, goog.events.EventTarget);/**- * Returns a viewport size monitor for the given window. A new one is created- * if it doesn't exist already. This prevents the unnecessary creation of- * multiple spooling monitors for a window.- * @param {Window=} opt_window The window to monitor; defaults to the window in- * which this code is executing.- * @return {!goog.dom.ViewportSizeMonitor} Monitor for the given window.+ * A static method that always returns the same instance of LogBuffer.+ * @return {!goog.debug.LogBuffer} The LogBuffer singleton instance.*/-goog.dom.ViewportSizeMonitor.getInstanceForWindow = function(opt_window) {- var currentWindow = opt_window || window;- var uid = goog.getUid(currentWindow);-- return goog.dom.ViewportSizeMonitor.windowInstanceMap_[uid] =- goog.dom.ViewportSizeMonitor.windowInstanceMap_[uid] ||- new goog.dom.ViewportSizeMonitor(currentWindow);+goog.debug.LogBuffer.getInstance = function() {+ if (!goog.debug.LogBuffer.instance_) {+ // This function is written with the return statement after the assignment+ // to avoid the jscompiler StripCode bug described in http://b/2608064.+ // After that bug is fixed this can be refactored.+ goog.debug.LogBuffer.instance_ = new goog.debug.LogBuffer();+ }+ return goog.debug.LogBuffer.instance_;};/**- * Removes and disposes a viewport size monitor for the given window if one- * exists.- * @param {Window=} opt_window The window whose monitor should be removed;- * defaults to the window in which this code is executing.+ * @define {number} The number of log records to buffer. 0 means disable+ * buffering.*/-goog.dom.ViewportSizeMonitor.removeInstanceForWindow = function(opt_window) {- var uid = goog.getUid(opt_window || window);-- goog.dispose(goog.dom.ViewportSizeMonitor.windowInstanceMap_[uid]);- delete goog.dom.ViewportSizeMonitor.windowInstanceMap_[uid];-};+goog.define('goog.debug.LogBuffer.CAPACITY', 0);/**- * Map of window hash code to viewport size monitor for that window, if- * created.- * @type {Object<number,goog.dom.ViewportSizeMonitor>}+ * The array to store the records.+ * @type {!Array<!goog.debug.LogRecord|undefined>}* @private*/-goog.dom.ViewportSizeMonitor.windowInstanceMap_ = {};+goog.debug.LogBuffer.prototype.buffer_;/**- * Event listener key for window the window resize handler, as returned by- * {@link goog.events.listen}.- * @type {goog.events.Key}+ * The index of the most recently added record or -1 if there are no records.+ * @type {number}* @private*/-goog.dom.ViewportSizeMonitor.prototype.listenerKey_ = null;+goog.debug.LogBuffer.prototype.curIndex_;/**- * The window to monitor. Defaults to the window in which the code is running.- * @type {Window}+ * Whether the buffer is at capacity.+ * @type {boolean}* @private*/-goog.dom.ViewportSizeMonitor.prototype.window_ = null;+goog.debug.LogBuffer.prototype.isFull_;/**- * The most recently recorded size of the viewport, in pixels.- * @type {goog.math.Size?}- * @private+ * Adds a log record to the buffer, possibly overwriting the oldest record.+ * @param {goog.debug.Logger.Level} level One of the level identifiers.+ * @param {string} msg The string message.+ * @param {string} loggerName The name of the source logger.+ * @return {!goog.debug.LogRecord} The log record.*/-goog.dom.ViewportSizeMonitor.prototype.size_ = null;+goog.debug.LogBuffer.prototype.addRecord = function(level, msg, loggerName) {+ var curIndex = (this.curIndex_ + 1) % goog.debug.LogBuffer.CAPACITY;+ this.curIndex_ = curIndex;+ if (this.isFull_) {+ var ret = this.buffer_[curIndex];+ ret.reset(level, msg, loggerName);+ return ret;+ }+ this.isFull_ = curIndex == goog.debug.LogBuffer.CAPACITY - 1;+ return this.buffer_[curIndex] =+ new goog.debug.LogRecord(level, msg, loggerName);+};/**- * Returns the most recently recorded size of the viewport, in pixels. May- * return null if no window resize event has been handled yet.- * @return {goog.math.Size} The viewport dimensions, in pixels.+ * @return {boolean} Whether the log buffer is enabled.*/-goog.dom.ViewportSizeMonitor.prototype.getSize = function() {- // Return a clone instead of the original to preserve encapsulation.- return this.size_ ? this.size_.clone() : null;+goog.debug.LogBuffer.isBufferingEnabled = function() {+ return goog.debug.LogBuffer.CAPACITY > 0;};-/** @override */-goog.dom.ViewportSizeMonitor.prototype.disposeInternal = function() {- goog.dom.ViewportSizeMonitor.superClass_.disposeInternal.call(this);-- if (this.listenerKey_) {- goog.events.unlistenByKey(this.listenerKey_);- this.listenerKey_ = null;- }-- this.window_ = null;- this.size_ = null;+/**+ * Removes all buffered log records.+ */+goog.debug.LogBuffer.prototype.clear = function() {+ this.buffer_ = new Array(goog.debug.LogBuffer.CAPACITY);+ this.curIndex_ = -1;+ this.isFull_ = false;};/**- * Handles window resize events by measuring the dimensions of the- * viewport and dispatching a {@link goog.events.EventType.RESIZE} event if the- * current dimensions are different from the previous ones.- * @param {goog.events.Event} event The window resize event to handle.- * @private+ * Calls the given function for each buffered log record, starting with the+ * oldest one.+ * @param {function(!goog.debug.LogRecord)} func The function to call.*/-goog.dom.ViewportSizeMonitor.prototype.handleResize_ = function(event) {- var size = goog.dom.getViewportSize(this.window_);- if (!goog.math.Size.equals(size, this.size_)) {- this.size_ = size;- this.dispatchEvent(goog.events.EventType.RESIZE);+goog.debug.LogBuffer.prototype.forEachRecord = function(func) {+ var buffer = this.buffer_;+ // Corner case: no records.+ if (!buffer[0]) {+ return;}+ var curIndex = this.curIndex_;+ var i = this.isFull_ ? curIndex : -1;+ do {+ i = (i + 1) % goog.debug.LogBuffer.CAPACITY;+ func(/** @type {!goog.debug.LogRecord} */ (buffer[i]));+ } while (i != curIndex);};+// Copyright 2006 The Closure Library Authors. All Rights Reserved.//// Licensed under the Apache License, Version 2.0 (the "License");@@ -41306,965 +41179,866 @@ goog.dom.ViewportSizeMonitor.prototype.handleResize_ = function(event) {// limitations under the License./**- * @fileoverview Constant declarations for common key codes.+ * @fileoverview Definition of the Logger class. Please minimize dependencies+ * this file has on other closure classes as any dependency it takes won't be+ * able to use the logging infrastructure.*- * @author [email protected] (Emil A Eklund)- * @see ../demos/keyhandler.html+ * @see ../demos/debug.html*/-goog.provide('goog.events.KeyCodes');+goog.provide('goog.debug.LogManager');+goog.provide('goog.debug.Loggable');+goog.provide('goog.debug.Logger');+goog.provide('goog.debug.Logger.Level');-goog.require('goog.userAgent');+goog.require('goog.array');+goog.require('goog.asserts');+goog.require('goog.debug');+goog.require('goog.debug.LogBuffer');+goog.require('goog.debug.LogRecord');/**- * Key codes for common characters.+ * A message value that can be handled by a Logger.*- * This list is not localized and therefore some of the key codes are not- * correct for non US keyboard layouts. See comments below.+ * Functions are treated like callbacks, but are only called when the event's+ * log level is enabled. This is useful for logging messages that are expensive+ * to construct.*- * @enum {number}+ * @typedef {string|function(): string}*/-goog.events.KeyCodes = {- WIN_KEY_FF_LINUX: 0,- MAC_ENTER: 3,- BACKSPACE: 8,- TAB: 9,- NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac- ENTER: 13,- SHIFT: 16,- CTRL: 17,- ALT: 18,- PAUSE: 19,- CAPS_LOCK: 20,- ESC: 27,- SPACE: 32,- PAGE_UP: 33, // also NUM_NORTH_EAST- PAGE_DOWN: 34, // also NUM_SOUTH_EAST- END: 35, // also NUM_SOUTH_WEST- HOME: 36, // also NUM_NORTH_WEST- LEFT: 37, // also NUM_WEST- UP: 38, // also NUM_NORTH- RIGHT: 39, // also NUM_EAST- DOWN: 40, // also NUM_SOUTH- PRINT_SCREEN: 44,- INSERT: 45, // also NUM_INSERT- DELETE: 46, // also NUM_DELETE- ZERO: 48,- ONE: 49,- TWO: 50,- THREE: 51,- FOUR: 52,- FIVE: 53,- SIX: 54,- SEVEN: 55,- EIGHT: 56,- NINE: 57,- FF_SEMICOLON: 59, // Firefox (Gecko) fires this for semicolon instead of 186- FF_EQUALS: 61, // Firefox (Gecko) fires this for equals instead of 187- FF_DASH: 173, // Firefox (Gecko) fires this for dash instead of 189- QUESTION_MARK: 63, // needs localization- A: 65,- B: 66,- C: 67,- D: 68,- E: 69,- F: 70,- G: 71,- H: 72,- I: 73,- J: 74,- K: 75,- L: 76,- M: 77,- N: 78,- O: 79,- P: 80,- Q: 81,- R: 82,- S: 83,- T: 84,- U: 85,- V: 86,- W: 87,- X: 88,- Y: 89,- Z: 90,- META: 91, // WIN_KEY_LEFT- WIN_KEY_RIGHT: 92,- CONTEXT_MENU: 93,- NUM_ZERO: 96,- NUM_ONE: 97,- NUM_TWO: 98,- NUM_THREE: 99,- NUM_FOUR: 100,- NUM_FIVE: 101,- NUM_SIX: 102,- NUM_SEVEN: 103,- NUM_EIGHT: 104,- NUM_NINE: 105,- NUM_MULTIPLY: 106,- NUM_PLUS: 107,- NUM_MINUS: 109,- NUM_PERIOD: 110,- NUM_DIVISION: 111,- F1: 112,- F2: 113,- F3: 114,- F4: 115,- F5: 116,- F6: 117,- F7: 118,- F8: 119,- F9: 120,- F10: 121,- F11: 122,- F12: 123,- NUMLOCK: 144,- SCROLL_LOCK: 145,+goog.debug.Loggable;++++/**+ * The Logger is an object used for logging debug messages. Loggers are+ * normally named, using a hierarchical dot-separated namespace. Logger names+ * can be arbitrary strings, but they should normally be based on the package+ * name or class name of the logged component, such as goog.net.BrowserChannel.+ *+ * The Logger object is loosely based on the java class+ * java.util.logging.Logger. It supports different levels of filtering for+ * different loggers.+ *+ * The logger object should never be instantiated by application code. It+ * should always use the goog.debug.Logger.getLogger function.+ *+ * @constructor+ * @param {string} name The name of the Logger.+ * @final+ */+goog.debug.Logger = function(name) {+ /**+ * Name of the Logger. Generally a dot-separated namespace+ * @private {string}+ */+ this.name_ = name;++ /**+ * Parent Logger.+ * @private {goog.debug.Logger}+ */+ this.parent_ = null;++ /**+ * Level that this logger only filters above. Null indicates it should+ * inherit from the parent.+ * @private {goog.debug.Logger.Level}+ */+ this.level_ = null;++ /**+ * Map of children loggers. The keys are the leaf names of the children and+ * the values are the child loggers.+ * @private {Object}+ */+ this.children_ = null;++ /**+ * Handlers that are listening to this logger.+ * @private {Array<Function>}+ */+ this.handlers_ = null;+};+++/** @const */+goog.debug.Logger.ROOT_LOGGER_NAME = '';+++/**+ * @define {boolean} Toggles whether loggers other than the root logger can have+ * log handlers attached to them and whether they can have their log level+ * set. Logging is a bit faster when this is set to false.+ */+goog.define('goog.debug.Logger.ENABLE_HIERARCHY', true);+++if (!goog.debug.Logger.ENABLE_HIERARCHY) {+ /**+ * @type {!Array<Function>}+ * @private+ */+ goog.debug.Logger.rootHandlers_ = [];+++ /**+ * @type {goog.debug.Logger.Level}+ * @private+ */+ goog.debug.Logger.rootLevel_;+}++++/**+ * The Level class defines a set of standard logging levels that+ * can be used to control logging output. The logging Level objects+ * are ordered and are specified by ordered integers. Enabling logging+ * at a given level also enables logging at all higher levels.+ * <p>+ * Clients should normally use the predefined Level constants such+ * as Level.SEVERE.+ * <p>+ * The levels in descending order are:+ * <ul>+ * <li>SEVERE (highest value)+ * <li>WARNING+ * <li>INFO+ * <li>CONFIG+ * <li>FINE+ * <li>FINER+ * <li>FINEST (lowest value)+ * </ul>+ * In addition there is a level OFF that can be used to turn+ * off logging, and a level ALL that can be used to enable+ * logging of all messages.+ *+ * @param {string} name The name of the level.+ * @param {number} value The numeric value of the level.+ * @constructor+ * @final+ */+goog.debug.Logger.Level = function(name, value) {+ /**+ * The name of the level+ * @type {string}+ */+ this.name = name;- // OS-specific media keys like volume controls and browser controls.- FIRST_MEDIA_KEY: 166,- LAST_MEDIA_KEY: 183,+ /**+ * The numeric value of the level+ * @type {number}+ */+ this.value = value;+};- SEMICOLON: 186, // needs localization- DASH: 189, // needs localization- EQUALS: 187, // needs localization- COMMA: 188, // needs localization- PERIOD: 190, // needs localization- SLASH: 191, // needs localization- APOSTROPHE: 192, // needs localization- TILDE: 192, // needs localization- SINGLE_QUOTE: 222, // needs localization- OPEN_SQUARE_BRACKET: 219, // needs localization- BACKSLASH: 220, // needs localization- CLOSE_SQUARE_BRACKET: 221, // needs localization- WIN_KEY: 224,- MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91- MAC_WK_CMD_LEFT: 91, // WebKit Left Command key fired, same as META- MAC_WK_CMD_RIGHT: 93, // WebKit Right Command key fired, different from META- WIN_IME: 229,- // We've seen users whose machines fire this keycode at regular one- // second intervals. The common thread among these users is that- // they're all using Dell Inspiron laptops, so we suspect that this- // indicates a hardware/bios problem.- // http://en.community.dell.com/support-forums/laptop/f/3518/p/19285957/19523128.aspx- PHANTOM: 255+/**+ * @return {string} String representation of the logger level.+ * @override+ */+goog.debug.Logger.Level.prototype.toString = function() {+ return this.name;};/**- * Returns true if the event contains a text modifying key.- * @param {goog.events.BrowserEvent} e A key event.- * @return {boolean} Whether it's a text modifying key.+ * OFF is a special level that can be used to turn off logging.+ * This level is initialized to <CODE>Infinity</CODE>.+ * @type {!goog.debug.Logger.Level}*/-goog.events.KeyCodes.isTextModifyingKeyEvent = function(e) {- if (e.altKey && !e.ctrlKey ||- e.metaKey ||- // Function keys don't generate text- e.keyCode >= goog.events.KeyCodes.F1 &&- e.keyCode <= goog.events.KeyCodes.F12) {- return false;- }+goog.debug.Logger.Level.OFF =+ new goog.debug.Logger.Level('OFF', Infinity);- // The following keys are quite harmless, even in combination with- // CTRL, ALT or SHIFT.- switch (e.keyCode) {- case goog.events.KeyCodes.ALT:- case goog.events.KeyCodes.CAPS_LOCK:- case goog.events.KeyCodes.CONTEXT_MENU:- case goog.events.KeyCodes.CTRL:- case goog.events.KeyCodes.DOWN:- case goog.events.KeyCodes.END:- case goog.events.KeyCodes.ESC:- case goog.events.KeyCodes.HOME:- case goog.events.KeyCodes.INSERT:- case goog.events.KeyCodes.LEFT:- case goog.events.KeyCodes.MAC_FF_META:- case goog.events.KeyCodes.META:- case goog.events.KeyCodes.NUMLOCK:- case goog.events.KeyCodes.NUM_CENTER:- case goog.events.KeyCodes.PAGE_DOWN:- case goog.events.KeyCodes.PAGE_UP:- case goog.events.KeyCodes.PAUSE:- case goog.events.KeyCodes.PHANTOM:- case goog.events.KeyCodes.PRINT_SCREEN:- case goog.events.KeyCodes.RIGHT:- case goog.events.KeyCodes.SCROLL_LOCK:- case goog.events.KeyCodes.SHIFT:- case goog.events.KeyCodes.UP:- case goog.events.KeyCodes.WIN_KEY:- case goog.events.KeyCodes.WIN_KEY_RIGHT:- return false;- case goog.events.KeyCodes.WIN_KEY_FF_LINUX:- return !goog.userAgent.GECKO;- default:- return e.keyCode < goog.events.KeyCodes.FIRST_MEDIA_KEY ||- e.keyCode > goog.events.KeyCodes.LAST_MEDIA_KEY;- }-};++/**+ * SHOUT is a message level for extra debugging loudness.+ * This level is initialized to <CODE>1200</CODE>.+ * @type {!goog.debug.Logger.Level}+ */+goog.debug.Logger.Level.SHOUT = new goog.debug.Logger.Level('SHOUT', 1200);/**- * Returns true if the key fires a keypress event in the current browser.- *- * Accoridng to MSDN [1] IE only fires keypress events for the following keys:- * - Letters: A - Z (uppercase and lowercase)- * - Numerals: 0 - 9- * - Symbols: ! @ # $ % ^ & * ( ) _ - + = < [ ] { } , . / ? \ | ' ` " ~- * - System: ESC, SPACEBAR, ENTER- *- * That's not entirely correct though, for instance there's no distinction- * between upper and lower case letters.- *- * [1] http://msdn2.microsoft.com/en-us/library/ms536939(VS.85).aspx)- *- * Safari is similar to IE, but does not fire keypress for ESC.- *- * Additionally, IE6 does not fire keydown or keypress events for letters when- * the control or alt keys are held down and the shift key is not. IE7 does- * fire keydown in these cases, though, but not keypress.- *- * @param {number} keyCode A key code.- * @param {number=} opt_heldKeyCode Key code of a currently-held key.- * @param {boolean=} opt_shiftKey Whether the shift key is held down.- * @param {boolean=} opt_ctrlKey Whether the control key is held down.- * @param {boolean=} opt_altKey Whether the alt key is held down.- * @return {boolean} Whether it's a key that fires a keypress event.+ * SEVERE is a message level indicating a serious failure.+ * This level is initialized to <CODE>1000</CODE>.+ * @type {!goog.debug.Logger.Level}*/-goog.events.KeyCodes.firesKeyPressEvent = function(keyCode, opt_heldKeyCode,- opt_shiftKey, opt_ctrlKey, opt_altKey) {- if (!goog.userAgent.IE &&- !(goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher('525'))) {- return true;- }+goog.debug.Logger.Level.SEVERE = new goog.debug.Logger.Level('SEVERE', 1000);- if (goog.userAgent.MAC && opt_altKey) {- return goog.events.KeyCodes.isCharacterKey(keyCode);- }- // Alt but not AltGr which is represented as Alt+Ctrl.- if (opt_altKey && !opt_ctrlKey) {- return false;- }+/**+ * WARNING is a message level indicating a potential problem.+ * This level is initialized to <CODE>900</CODE>.+ * @type {!goog.debug.Logger.Level}+ */+goog.debug.Logger.Level.WARNING = new goog.debug.Logger.Level('WARNING', 900);- // Saves Ctrl or Alt + key for IE and WebKit 525+, which won't fire keypress.- // Non-IE browsers and WebKit prior to 525 won't get this far so no need to- // check the user agent.- if (goog.isNumber(opt_heldKeyCode)) {- opt_heldKeyCode = goog.events.KeyCodes.normalizeKeyCode(opt_heldKeyCode);- }- if (!opt_shiftKey &&- (opt_heldKeyCode == goog.events.KeyCodes.CTRL ||- opt_heldKeyCode == goog.events.KeyCodes.ALT ||- goog.userAgent.MAC &&- opt_heldKeyCode == goog.events.KeyCodes.META)) {- return false;- }- // Some keys with Ctrl/Shift do not issue keypress in WEBKIT.- if (goog.userAgent.WEBKIT && opt_ctrlKey && opt_shiftKey) {- switch (keyCode) {- case goog.events.KeyCodes.BACKSLASH:- case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:- case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:- case goog.events.KeyCodes.TILDE:- case goog.events.KeyCodes.SEMICOLON:- case goog.events.KeyCodes.DASH:- case goog.events.KeyCodes.EQUALS:- case goog.events.KeyCodes.COMMA:- case goog.events.KeyCodes.PERIOD:- case goog.events.KeyCodes.SLASH:- case goog.events.KeyCodes.APOSTROPHE:- case goog.events.KeyCodes.SINGLE_QUOTE:- return false;- }- }+/**+ * INFO is a message level for informational messages.+ * This level is initialized to <CODE>800</CODE>.+ * @type {!goog.debug.Logger.Level}+ */+goog.debug.Logger.Level.INFO = new goog.debug.Logger.Level('INFO', 800);- // When Ctrl+<somekey> is held in IE, it only fires a keypress once, but it- // continues to fire keydown events as the event repeats.- if (goog.userAgent.IE && opt_ctrlKey && opt_heldKeyCode == keyCode) {- return false;- }- switch (keyCode) {- case goog.events.KeyCodes.ENTER:- return true;- case goog.events.KeyCodes.ESC:- return !goog.userAgent.WEBKIT;- }+/**+ * CONFIG is a message level for static configuration messages.+ * This level is initialized to <CODE>700</CODE>.+ * @type {!goog.debug.Logger.Level}+ */+goog.debug.Logger.Level.CONFIG = new goog.debug.Logger.Level('CONFIG', 700);- return goog.events.KeyCodes.isCharacterKey(keyCode);-};++/**+ * FINE is a message level providing tracing information.+ * This level is initialized to <CODE>500</CODE>.+ * @type {!goog.debug.Logger.Level}+ */+goog.debug.Logger.Level.FINE = new goog.debug.Logger.Level('FINE', 500);/**- * Returns true if the key produces a character.- * This does not cover characters on non-US keyboards (Russian, Hebrew, etc.).- *- * @param {number} keyCode A key code.- * @return {boolean} Whether it's a character key.+ * FINER indicates a fairly detailed tracing message.+ * This level is initialized to <CODE>400</CODE>.+ * @type {!goog.debug.Logger.Level}*/-goog.events.KeyCodes.isCharacterKey = function(keyCode) {- if (keyCode >= goog.events.KeyCodes.ZERO &&- keyCode <= goog.events.KeyCodes.NINE) {- return true;- }+goog.debug.Logger.Level.FINER = new goog.debug.Logger.Level('FINER', 400);- if (keyCode >= goog.events.KeyCodes.NUM_ZERO &&- keyCode <= goog.events.KeyCodes.NUM_MULTIPLY) {- return true;- }+/**+ * FINEST indicates a highly detailed tracing message.+ * This level is initialized to <CODE>300</CODE>.+ * @type {!goog.debug.Logger.Level}+ */- if (keyCode >= goog.events.KeyCodes.A &&- keyCode <= goog.events.KeyCodes.Z) {- return true;- }+goog.debug.Logger.Level.FINEST = new goog.debug.Logger.Level('FINEST', 300);- // Safari sends zero key code for non-latin characters.- if (goog.userAgent.WEBKIT && keyCode == 0) {- return true;- }- switch (keyCode) {- case goog.events.KeyCodes.SPACE:- case goog.events.KeyCodes.QUESTION_MARK:- case goog.events.KeyCodes.NUM_PLUS:- case goog.events.KeyCodes.NUM_MINUS:- case goog.events.KeyCodes.NUM_PERIOD:- case goog.events.KeyCodes.NUM_DIVISION:- case goog.events.KeyCodes.SEMICOLON:- case goog.events.KeyCodes.FF_SEMICOLON:- case goog.events.KeyCodes.DASH:- case goog.events.KeyCodes.EQUALS:- case goog.events.KeyCodes.FF_EQUALS:- case goog.events.KeyCodes.COMMA:- case goog.events.KeyCodes.PERIOD:- case goog.events.KeyCodes.SLASH:- case goog.events.KeyCodes.APOSTROPHE:- case goog.events.KeyCodes.SINGLE_QUOTE:- case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:- case goog.events.KeyCodes.BACKSLASH:- case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:- return true;- default:- return false;- }-};+/**+ * ALL indicates that all messages should be logged.+ * This level is initialized to <CODE>0</CODE>.+ * @type {!goog.debug.Logger.Level}+ */+goog.debug.Logger.Level.ALL = new goog.debug.Logger.Level('ALL', 0);/**- * Normalizes key codes from OS/Browser-specific value to the general one.- * @param {number} keyCode The native key code.- * @return {number} The normalized key code.+ * The predefined levels.+ * @type {!Array<!goog.debug.Logger.Level>}+ * @final*/-goog.events.KeyCodes.normalizeKeyCode = function(keyCode) {- if (goog.userAgent.GECKO) {- return goog.events.KeyCodes.normalizeGeckoKeyCode(keyCode);- } else if (goog.userAgent.MAC && goog.userAgent.WEBKIT) {- return goog.events.KeyCodes.normalizeMacWebKitKeyCode(keyCode);- } else {- return keyCode;+goog.debug.Logger.Level.PREDEFINED_LEVELS = [+ goog.debug.Logger.Level.OFF,+ goog.debug.Logger.Level.SHOUT,+ goog.debug.Logger.Level.SEVERE,+ goog.debug.Logger.Level.WARNING,+ goog.debug.Logger.Level.INFO,+ goog.debug.Logger.Level.CONFIG,+ goog.debug.Logger.Level.FINE,+ goog.debug.Logger.Level.FINER,+ goog.debug.Logger.Level.FINEST,+ goog.debug.Logger.Level.ALL];+++/**+ * A lookup map used to find the level object based on the name or value of+ * the level object.+ * @type {Object}+ * @private+ */+goog.debug.Logger.Level.predefinedLevelsCache_ = null;+++/**+ * Creates the predefined levels cache and populates it.+ * @private+ */+goog.debug.Logger.Level.createPredefinedLevelsCache_ = function() {+ goog.debug.Logger.Level.predefinedLevelsCache_ = {};+ for (var i = 0, level; level = goog.debug.Logger.Level.PREDEFINED_LEVELS[i];+ i++) {+ goog.debug.Logger.Level.predefinedLevelsCache_[level.value] = level;+ goog.debug.Logger.Level.predefinedLevelsCache_[level.name] = level;}};/**- * Normalizes key codes from their Gecko-specific value to the general one.- * @param {number} keyCode The native key code.- * @return {number} The normalized key code.+ * Gets the predefined level with the given name.+ * @param {string} name The name of the level.+ * @return {goog.debug.Logger.Level} The level, or null if none found.*/-goog.events.KeyCodes.normalizeGeckoKeyCode = function(keyCode) {- switch (keyCode) {- case goog.events.KeyCodes.FF_EQUALS:- return goog.events.KeyCodes.EQUALS;- case goog.events.KeyCodes.FF_SEMICOLON:- return goog.events.KeyCodes.SEMICOLON;- case goog.events.KeyCodes.FF_DASH:- return goog.events.KeyCodes.DASH;- case goog.events.KeyCodes.MAC_FF_META:- return goog.events.KeyCodes.META;- case goog.events.KeyCodes.WIN_KEY_FF_LINUX:- return goog.events.KeyCodes.WIN_KEY;- default:- return keyCode;+goog.debug.Logger.Level.getPredefinedLevel = function(name) {+ if (!goog.debug.Logger.Level.predefinedLevelsCache_) {+ goog.debug.Logger.Level.createPredefinedLevelsCache_();}++ return goog.debug.Logger.Level.predefinedLevelsCache_[name] || null;};/**- * Normalizes key codes from their Mac WebKit-specific value to the general one.- * @param {number} keyCode The native key code.- * @return {number} The normalized key code.+ * Gets the highest predefined level <= #value.+ * @param {number} value Level value.+ * @return {goog.debug.Logger.Level} The level, or null if none found.*/-goog.events.KeyCodes.normalizeMacWebKitKeyCode = function(keyCode) {- switch (keyCode) {- case goog.events.KeyCodes.MAC_WK_CMD_RIGHT: // 93- return goog.events.KeyCodes.META; // 91- default:- return keyCode;+goog.debug.Logger.Level.getPredefinedLevelByValue = function(value) {+ if (!goog.debug.Logger.Level.predefinedLevelsCache_) {+ goog.debug.Logger.Level.createPredefinedLevelsCache_();+ }++ if (value in goog.debug.Logger.Level.predefinedLevelsCache_) {+ return goog.debug.Logger.Level.predefinedLevelsCache_[value];+ }++ for (var i = 0; i < goog.debug.Logger.Level.PREDEFINED_LEVELS.length; ++i) {+ var level = goog.debug.Logger.Level.PREDEFINED_LEVELS[i];+ if (level.value <= value) {+ return level;+ }}+ return null;};-// Copyright 2007 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License./**- * @fileoverview This file contains a class for working with keyboard events- * that repeat consistently across browsers and platforms. It also unifies the- * key code so that it is the same in all browsers and platforms.- *- * Different web browsers have very different keyboard event handling. Most- * importantly is that only certain browsers repeat keydown events:- * IE, Opera, FF/Win32, and Safari 3 repeat keydown events.- * FF/Mac and Safari 2 do not.- *- * For the purposes of this code, "Safari 3" means WebKit 525+, when WebKit- * decided that they should try to match IE's key handling behavior.- * Safari 3.0.4, which shipped with Leopard (WebKit 523), has the- * Safari 2 behavior.- *- * Firefox, Safari, Opera prevent on keypress- *- * IE prevents on keydown- *- * Firefox does not fire keypress for shift, ctrl, alt- * Firefox does fire keydown for shift, ctrl, alt, meta- * Firefox does not repeat keydown for shift, ctrl, alt, meta- *- * Firefox does not fire keypress for up and down in an input- *- * Opera fires keypress for shift, ctrl, alt, meta- * Opera does not repeat keypress for shift, ctrl, alt, meta- *- * Safari 2 and 3 do not fire keypress for shift, ctrl, alt- * Safari 2 does not fire keydown for shift, ctrl, alt- * Safari 3 *does* fire keydown for shift, ctrl, alt- *- * IE provides the keycode for keyup/down events and the charcode (in the- * keycode field) for keypress.- *- * Mozilla provides the keycode for keyup/down and the charcode for keypress- * unless it's a non text modifying key in which case the keycode is provided.- *- * Safari 3 provides the keycode and charcode for all events.- *- * Opera provides the keycode for keyup/down event and either the charcode or- * the keycode (in the keycode field) for keypress events.- *- * Firefox x11 doesn't fire keydown events if a another key is already held down- * until the first key is released. This can cause a key event to be fired with- * a keyCode for the first key and a charCode for the second key.- *- * Safari in keypress- *- * charCode keyCode which- * ENTER: 13 13 13- * F1: 63236 63236 63236- * F8: 63243 63243 63243- * ...- * p: 112 112 112- * P: 80 80 80- *- * Firefox, keypress:- *- * charCode keyCode which- * ENTER: 0 13 13- * F1: 0 112 0- * F8: 0 119 0- * ...- * p: 112 0 112- * P: 80 0 80- *- * Opera, Mac+Win32, keypress:- *- * charCode keyCode which- * ENTER: undefined 13 13- * F1: undefined 112 0- * F8: undefined 119 0- * ...- * p: undefined 112 112- * P: undefined 80 80- *- * IE7, keydown- *- * charCode keyCode which- * ENTER: undefined 13 undefined- * F1: undefined 112 undefined- * F8: undefined 119 undefined- * ...- * p: undefined 80 undefined- * P: undefined 80 undefined+ * Finds or creates a logger for a named subsystem. If a logger has already been+ * created with the given name it is returned. Otherwise a new logger is+ * created. If a new logger is created its log level will be configured based+ * on the LogManager configuration and it will configured to also send logging+ * output to its parent's handlers. It will be registered in the LogManager+ * global namespace.*- * @author [email protected] (Erik Arvidsson)- * @author [email protected] (Emil A Eklund)- * @see ../demos/keyhandler.html+ * @param {string} name A name for the logger. This should be a dot-separated+ * name and should normally be based on the package name or class name of the+ * subsystem, such as goog.net.BrowserChannel.+ * @return {!goog.debug.Logger} The named logger.+ * @deprecated use goog.log instead. http://go/goog-debug-logger-deprecated+ */+goog.debug.Logger.getLogger = function(name) {+ return goog.debug.LogManager.getLogger(name);+};+++/**+ * Logs a message to profiling tools, if available.+ * {@see https://developers.google.com/web-toolkit/speedtracer/logging-api}+ * {@see http://msdn.microsoft.com/en-us/library/dd433074(VS.85).aspx}+ * @param {string} msg The message to log.*/+goog.debug.Logger.logToProfilers = function(msg) {+ // Using goog.global, as loggers might be used in window-less contexts.+ if (goog.global['console']) {+ if (goog.global['console']['timeStamp']) {+ // Logs a message to Firebug, Web Inspector, SpeedTracer, etc.+ goog.global['console']['timeStamp'](msg);+ } else if (goog.global['console']['markTimeline']) {+ // TODO(user): markTimeline is deprecated. Drop this else clause entirely+ // after Chrome M14 hits stable.+ goog.global['console']['markTimeline'](msg);+ }+ }-goog.provide('goog.events.KeyEvent');-goog.provide('goog.events.KeyHandler');-goog.provide('goog.events.KeyHandler.EventType');+ if (goog.global['msWriteProfilerMark']) {+ // Logs a message to the Microsoft profiler+ goog.global['msWriteProfilerMark'](msg);+ }+};-goog.require('goog.events');-goog.require('goog.events.BrowserEvent');-goog.require('goog.events.EventTarget');-goog.require('goog.events.EventType');-goog.require('goog.events.KeyCodes');-goog.require('goog.userAgent');+/**+ * Gets the name of this logger.+ * @return {string} The name of this logger.+ */+goog.debug.Logger.prototype.getName = function() {+ return this.name_;+};/**- * A wrapper around an element that you want to listen to keyboard events on.- * @param {Element|Document=} opt_element The element or document to listen on.- * @param {boolean=} opt_capture Whether to listen for browser events in- * capture phase (defaults to false).- * @constructor- * @extends {goog.events.EventTarget}- * @final+ * Adds a handler to the logger. This doesn't use the event system because+ * we want to be able to add logging to the event system.+ * @param {Function} handler Handler function to add.*/-goog.events.KeyHandler = function(opt_element, opt_capture) {- goog.events.EventTarget.call(this);-- if (opt_element) {- this.attach(opt_element, opt_capture);+goog.debug.Logger.prototype.addHandler = function(handler) {+ if (goog.debug.LOGGING_ENABLED) {+ if (goog.debug.Logger.ENABLE_HIERARCHY) {+ if (!this.handlers_) {+ this.handlers_ = [];+ }+ this.handlers_.push(handler);+ } else {+ goog.asserts.assert(!this.name_,+ 'Cannot call addHandler on a non-root logger when ' ++ 'goog.debug.Logger.ENABLE_HIERARCHY is false.');+ goog.debug.Logger.rootHandlers_.push(handler);+ }}};-goog.inherits(goog.events.KeyHandler, goog.events.EventTarget);/**- * This is the element that we will listen to the real keyboard events on.- * @type {Element|Document|null}- * @private+ * Removes a handler from the logger. This doesn't use the event system because+ * we want to be able to add logging to the event system.+ * @param {Function} handler Handler function to remove.+ * @return {boolean} Whether the handler was removed.*/-goog.events.KeyHandler.prototype.element_ = null;+goog.debug.Logger.prototype.removeHandler = function(handler) {+ if (goog.debug.LOGGING_ENABLED) {+ var handlers = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ :+ goog.debug.Logger.rootHandlers_;+ return !!handlers && goog.array.remove(handlers, handler);+ } else {+ return false;+ }+};/**- * The key for the key press listener.- * @type {goog.events.Key}- * @private+ * Returns the parent of this logger.+ * @return {goog.debug.Logger} The parent logger or null if this is the root.*/-goog.events.KeyHandler.prototype.keyPressKey_ = null;+goog.debug.Logger.prototype.getParent = function() {+ return this.parent_;+};/**- * The key for the key down listener.- * @type {goog.events.Key}- * @private+ * Returns the children of this logger as a map of the child name to the logger.+ * @return {!Object} The map where the keys are the child leaf names and the+ * values are the Logger objects.*/-goog.events.KeyHandler.prototype.keyDownKey_ = null;+goog.debug.Logger.prototype.getChildren = function() {+ if (!this.children_) {+ this.children_ = {};+ }+ return this.children_;+};/**- * The key for the key up listener.- * @type {goog.events.Key}- * @private+ * Set the log level specifying which message levels will be logged by this+ * logger. Message levels lower than this value will be discarded.+ * The level value Level.OFF can be used to turn off logging. If the new level+ * is null, it means that this node should inherit its level from its nearest+ * ancestor with a specific (non-null) level value.+ *+ * @param {goog.debug.Logger.Level} level The new level.*/-goog.events.KeyHandler.prototype.keyUpKey_ = null;+goog.debug.Logger.prototype.setLevel = function(level) {+ if (goog.debug.LOGGING_ENABLED) {+ if (goog.debug.Logger.ENABLE_HIERARCHY) {+ this.level_ = level;+ } else {+ goog.asserts.assert(!this.name_,+ 'Cannot call setLevel() on a non-root logger when ' ++ 'goog.debug.Logger.ENABLE_HIERARCHY is false.');+ goog.debug.Logger.rootLevel_ = level;+ }+ }+};/**- * Used to detect keyboard repeat events.- * @private- * @type {number}+ * Gets the log level specifying which message levels will be logged by this+ * logger. Message levels lower than this value will be discarded.+ * The level value Level.OFF can be used to turn off logging. If the level+ * is null, it means that this node should inherit its level from its nearest+ * ancestor with a specific (non-null) level value.+ *+ * @return {goog.debug.Logger.Level} The level.*/-goog.events.KeyHandler.prototype.lastKey_ = -1;+goog.debug.Logger.prototype.getLevel = function() {+ return goog.debug.LOGGING_ENABLED ?+ this.level_ : goog.debug.Logger.Level.OFF;+};/**- * Keycode recorded for key down events. As most browsers don't report the- * keycode in the key press event we need to record it in the key down phase.- * @private- * @type {number}+ * Returns the effective level of the logger based on its ancestors' levels.+ * @return {goog.debug.Logger.Level} The level.*/-goog.events.KeyHandler.prototype.keyCode_ = -1;+goog.debug.Logger.prototype.getEffectiveLevel = function() {+ if (!goog.debug.LOGGING_ENABLED) {+ return goog.debug.Logger.Level.OFF;+ }++ if (!goog.debug.Logger.ENABLE_HIERARCHY) {+ return goog.debug.Logger.rootLevel_;+ }+ if (this.level_) {+ return this.level_;+ }+ if (this.parent_) {+ return this.parent_.getEffectiveLevel();+ }+ goog.asserts.fail('Root logger has no level set.');+ return null;+};/**- * Alt key recorded for key down events. FF on Mac does not report the alt key- * flag in the key press event, we need to record it in the key down phase.- * @type {boolean}- * @private+ * Checks if a message of the given level would actually be logged by this+ * logger. This check is based on the Loggers effective level, which may be+ * inherited from its parent.+ * @param {goog.debug.Logger.Level} level The level to check.+ * @return {boolean} Whether the message would be logged.*/-goog.events.KeyHandler.prototype.altKey_ = false;+goog.debug.Logger.prototype.isLoggable = function(level) {+ return goog.debug.LOGGING_ENABLED &&+ level.value >= this.getEffectiveLevel().value;+};/**- * Enum type for the events fired by the key handler- * @enum {string}+ * Logs a message. If the logger is currently enabled for the+ * given message level then the given message is forwarded to all the+ * registered output Handler objects.+ * @param {goog.debug.Logger.Level} level One of the level identifiers.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error|Object=} opt_exception An exception associated with the+ * message.*/-goog.events.KeyHandler.EventType = {- KEY: 'key'+goog.debug.Logger.prototype.log = function(level, msg, opt_exception) {+ // java caches the effective level, not sure it's necessary here+ if (goog.debug.LOGGING_ENABLED && this.isLoggable(level)) {+ // Message callbacks can be useful when a log message is expensive to build.+ if (goog.isFunction(msg)) {+ msg = msg();+ }++ this.doLogRecord_(this.getLogRecord(level, msg, opt_exception));+ }};/**- * An enumeration of key codes that Safari 2 does incorrectly- * @type {Object}- * @private+ * Creates a new log record and adds the exception (if present) to it.+ * @param {goog.debug.Logger.Level} level One of the level identifiers.+ * @param {string} msg The string message.+ * @param {Error|Object=} opt_exception An exception associated with the+ * message.+ * @return {!goog.debug.LogRecord} A log record.+ * @suppress {es5Strict}*/-goog.events.KeyHandler.safariKey_ = {- '3': goog.events.KeyCodes.ENTER, // 13- '12': goog.events.KeyCodes.NUMLOCK, // 144- '63232': goog.events.KeyCodes.UP, // 38- '63233': goog.events.KeyCodes.DOWN, // 40- '63234': goog.events.KeyCodes.LEFT, // 37- '63235': goog.events.KeyCodes.RIGHT, // 39- '63236': goog.events.KeyCodes.F1, // 112- '63237': goog.events.KeyCodes.F2, // 113- '63238': goog.events.KeyCodes.F3, // 114- '63239': goog.events.KeyCodes.F4, // 115- '63240': goog.events.KeyCodes.F5, // 116- '63241': goog.events.KeyCodes.F6, // 117- '63242': goog.events.KeyCodes.F7, // 118- '63243': goog.events.KeyCodes.F8, // 119- '63244': goog.events.KeyCodes.F9, // 120- '63245': goog.events.KeyCodes.F10, // 121- '63246': goog.events.KeyCodes.F11, // 122- '63247': goog.events.KeyCodes.F12, // 123- '63248': goog.events.KeyCodes.PRINT_SCREEN, // 44- '63272': goog.events.KeyCodes.DELETE, // 46- '63273': goog.events.KeyCodes.HOME, // 36- '63275': goog.events.KeyCodes.END, // 35- '63276': goog.events.KeyCodes.PAGE_UP, // 33- '63277': goog.events.KeyCodes.PAGE_DOWN, // 34- '63289': goog.events.KeyCodes.NUMLOCK, // 144- '63302': goog.events.KeyCodes.INSERT // 45+goog.debug.Logger.prototype.getLogRecord = function(+ level, msg, opt_exception) {+ if (goog.debug.LogBuffer.isBufferingEnabled()) {+ var logRecord =+ goog.debug.LogBuffer.getInstance().addRecord(level, msg, this.name_);+ } else {+ logRecord = new goog.debug.LogRecord(level, String(msg), this.name_);+ }+ if (opt_exception) {+ logRecord.setException(opt_exception);+ }+ return logRecord;};/**- * An enumeration of key identifiers currently part of the W3C draft for DOM3- * and their mappings to keyCodes.- * http://www.w3.org/TR/DOM-Level-3-Events/keyset.html#KeySet-Set- * This is currently supported in Safari and should be platform independent.- * @type {Object}- * @private+ * Logs a message at the Logger.Level.SHOUT level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-goog.events.KeyHandler.keyIdentifier_ = {- 'Up': goog.events.KeyCodes.UP, // 38- 'Down': goog.events.KeyCodes.DOWN, // 40- 'Left': goog.events.KeyCodes.LEFT, // 37- 'Right': goog.events.KeyCodes.RIGHT, // 39- 'Enter': goog.events.KeyCodes.ENTER, // 13- 'F1': goog.events.KeyCodes.F1, // 112- 'F2': goog.events.KeyCodes.F2, // 113- 'F3': goog.events.KeyCodes.F3, // 114- 'F4': goog.events.KeyCodes.F4, // 115- 'F5': goog.events.KeyCodes.F5, // 116- 'F6': goog.events.KeyCodes.F6, // 117- 'F7': goog.events.KeyCodes.F7, // 118- 'F8': goog.events.KeyCodes.F8, // 119- 'F9': goog.events.KeyCodes.F9, // 120- 'F10': goog.events.KeyCodes.F10, // 121- 'F11': goog.events.KeyCodes.F11, // 122- 'F12': goog.events.KeyCodes.F12, // 123- 'U+007F': goog.events.KeyCodes.DELETE, // 46- 'Home': goog.events.KeyCodes.HOME, // 36- 'End': goog.events.KeyCodes.END, // 35- 'PageUp': goog.events.KeyCodes.PAGE_UP, // 33- 'PageDown': goog.events.KeyCodes.PAGE_DOWN, // 34- 'Insert': goog.events.KeyCodes.INSERT // 45+goog.debug.Logger.prototype.shout = function(msg, opt_exception) {+ if (goog.debug.LOGGING_ENABLED) {+ this.log(goog.debug.Logger.Level.SHOUT, msg, opt_exception);+ }};/**- * If true, the KeyEvent fires on keydown. Otherwise, it fires on keypress.- *- * @type {boolean}- * @private+ * Logs a message at the Logger.Level.SEVERE level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-goog.events.KeyHandler.USES_KEYDOWN_ = goog.userAgent.IE ||- goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher('525');+goog.debug.Logger.prototype.severe = function(msg, opt_exception) {+ if (goog.debug.LOGGING_ENABLED) {+ this.log(goog.debug.Logger.Level.SEVERE, msg, opt_exception);+ }+};/**- * If true, the alt key flag is saved during the key down and reused when- * handling the key press. FF on Mac does not set the alt flag in the key press- * event.- * @type {boolean}- * @private+ * Logs a message at the Logger.Level.WARNING level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_ = goog.userAgent.MAC &&- goog.userAgent.GECKO;+goog.debug.Logger.prototype.warning = function(msg, opt_exception) {+ if (goog.debug.LOGGING_ENABLED) {+ this.log(goog.debug.Logger.Level.WARNING, msg, opt_exception);+ }+};/**- * Records the keycode for browsers that only returns the keycode for key up/- * down events. For browser/key combinations that doesn't trigger a key pressed- * event it also fires the patched key event.- * @param {goog.events.BrowserEvent} e The key down event.- * @private+ * Logs a message at the Logger.Level.INFO level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-goog.events.KeyHandler.prototype.handleKeyDown_ = function(e) {- // Ctrl-Tab and Alt-Tab can cause the focus to be moved to another window- // before we've caught a key-up event. If the last-key was one of these we- // reset the state.- if (goog.userAgent.WEBKIT) {- if (this.lastKey_ == goog.events.KeyCodes.CTRL && !e.ctrlKey ||- this.lastKey_ == goog.events.KeyCodes.ALT && !e.altKey ||- goog.userAgent.MAC &&- this.lastKey_ == goog.events.KeyCodes.META && !e.metaKey) {- this.lastKey_ = -1;- this.keyCode_ = -1;- }+goog.debug.Logger.prototype.info = function(msg, opt_exception) {+ if (goog.debug.LOGGING_ENABLED) {+ this.log(goog.debug.Logger.Level.INFO, msg, opt_exception);}+};- if (this.lastKey_ == -1) {- if (e.ctrlKey && e.keyCode != goog.events.KeyCodes.CTRL) {- this.lastKey_ = goog.events.KeyCodes.CTRL;- } else if (e.altKey && e.keyCode != goog.events.KeyCodes.ALT) {- this.lastKey_ = goog.events.KeyCodes.ALT;- } else if (e.metaKey && e.keyCode != goog.events.KeyCodes.META) {- this.lastKey_ = goog.events.KeyCodes.META;- }- }- if (goog.events.KeyHandler.USES_KEYDOWN_ &&- !goog.events.KeyCodes.firesKeyPressEvent(e.keyCode,- this.lastKey_, e.shiftKey, e.ctrlKey, e.altKey)) {- this.handleEvent(e);- } else {- this.keyCode_ = goog.events.KeyCodes.normalizeKeyCode(e.keyCode);- if (goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_) {- this.altKey_ = e.altKey;- }+/**+ * Logs a message at the Logger.Level.CONFIG level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.+ */+goog.debug.Logger.prototype.config = function(msg, opt_exception) {+ if (goog.debug.LOGGING_ENABLED) {+ this.log(goog.debug.Logger.Level.CONFIG, msg, opt_exception);}};/**- * Resets the stored previous values. Needed to be called for webkit which will- * not generate a key up for meta key operations. This should only be called- * when having finished with repeat key possiblities.+ * Logs a message at the Logger.Level.FINE level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-goog.events.KeyHandler.prototype.resetState = function() {- this.lastKey_ = -1;- this.keyCode_ = -1;+goog.debug.Logger.prototype.fine = function(msg, opt_exception) {+ if (goog.debug.LOGGING_ENABLED) {+ this.log(goog.debug.Logger.Level.FINE, msg, opt_exception);+ }};/**- * Clears the stored previous key value, resetting the key repeat status. Uses- * -1 because the Safari 3 Windows beta reports 0 for certain keys (like Home- * and End.)- * @param {goog.events.BrowserEvent} e The keyup event.- * @private+ * Logs a message at the Logger.Level.FINER level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-goog.events.KeyHandler.prototype.handleKeyup_ = function(e) {- this.resetState();- this.altKey_ = e.altKey;+goog.debug.Logger.prototype.finer = function(msg, opt_exception) {+ if (goog.debug.LOGGING_ENABLED) {+ this.log(goog.debug.Logger.Level.FINER, msg, opt_exception);+ }};/**- * Handles the events on the element.- * @param {goog.events.BrowserEvent} e The keyboard event sent from the- * browser.+ * Logs a message at the Logger.Level.FINEST level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-goog.events.KeyHandler.prototype.handleEvent = function(e) {- var be = e.getBrowserEvent();- var keyCode, charCode;- var altKey = be.altKey;+goog.debug.Logger.prototype.finest = function(msg, opt_exception) {+ if (goog.debug.LOGGING_ENABLED) {+ this.log(goog.debug.Logger.Level.FINEST, msg, opt_exception);+ }+};- // IE reports the character code in the keyCode field for keypress events.- // There are two exceptions however, Enter and Escape.- if (goog.userAgent.IE && e.type == goog.events.EventType.KEYPRESS) {- keyCode = this.keyCode_;- charCode = keyCode != goog.events.KeyCodes.ENTER &&- keyCode != goog.events.KeyCodes.ESC ?- be.keyCode : 0;- // Safari reports the character code in the keyCode field for keypress- // events but also has a charCode field.- } else if (goog.userAgent.WEBKIT &&- e.type == goog.events.EventType.KEYPRESS) {- keyCode = this.keyCode_;- charCode = be.charCode >= 0 && be.charCode < 63232 &&- goog.events.KeyCodes.isCharacterKey(keyCode) ?- be.charCode : 0;+/**+ * Logs a LogRecord. If the logger is currently enabled for the+ * given message level then the given message is forwarded to all the+ * registered output Handler objects.+ * @param {goog.debug.LogRecord} logRecord A log record to log.+ */+goog.debug.Logger.prototype.logRecord = function(logRecord) {+ if (goog.debug.LOGGING_ENABLED && this.isLoggable(logRecord.getLevel())) {+ this.doLogRecord_(logRecord);+ }+};- // Opera reports the keycode or the character code in the keyCode field.- } else if (goog.userAgent.OPERA) {- keyCode = this.keyCode_;- charCode = goog.events.KeyCodes.isCharacterKey(keyCode) ?- be.keyCode : 0;- // Mozilla reports the character code in the charCode field.- } else {- keyCode = be.keyCode || this.keyCode_;- charCode = be.charCode || 0;- if (goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_) {- altKey = this.altKey_;+/**+ * Logs a LogRecord.+ * @param {goog.debug.LogRecord} logRecord A log record to log.+ * @private+ */+goog.debug.Logger.prototype.doLogRecord_ = function(logRecord) {+ goog.debug.Logger.logToProfilers('log:' + logRecord.getMessage());+ if (goog.debug.Logger.ENABLE_HIERARCHY) {+ var target = this;+ while (target) {+ target.callPublish_(logRecord);+ target = target.getParent();}- // On the Mac, shift-/ triggers a question mark char code and no key code- // (normalized to WIN_KEY), so we synthesize the latter.- if (goog.userAgent.MAC &&- charCode == goog.events.KeyCodes.QUESTION_MARK &&- keyCode == goog.events.KeyCodes.WIN_KEY) {- keyCode = goog.events.KeyCodes.SLASH;+ } else {+ for (var i = 0, handler; handler = goog.debug.Logger.rootHandlers_[i++]; ) {+ handler(logRecord);}}+};- keyCode = goog.events.KeyCodes.normalizeKeyCode(keyCode);- var key = keyCode;- var keyIdentifier = be.keyIdentifier;-- // Correct the key value for certain browser-specific quirks.- if (keyCode) {- if (keyCode >= 63232 && keyCode in goog.events.KeyHandler.safariKey_) {- // NOTE(nicksantos): Safari 3 has fixed this problem,- // this is only needed for Safari 2.- key = goog.events.KeyHandler.safariKey_[keyCode];- } else {- // Safari returns 25 for Shift+Tab instead of 9.- if (keyCode == 25 && e.shiftKey) {- key = 9;- }+/**+ * Calls the handlers for publish.+ * @param {goog.debug.LogRecord} logRecord The log record to publish.+ * @private+ */+goog.debug.Logger.prototype.callPublish_ = function(logRecord) {+ if (this.handlers_) {+ for (var i = 0, handler; handler = this.handlers_[i]; i++) {+ handler(logRecord);}- } else if (keyIdentifier &&- keyIdentifier in goog.events.KeyHandler.keyIdentifier_) {- // This is needed for Safari Windows because it currently doesn't give a- // keyCode/which for non printable keys.- key = goog.events.KeyHandler.keyIdentifier_[keyIdentifier];}+};- // If we get the same keycode as a keydown/keypress without having seen a- // keyup event, then this event was caused by key repeat.- var repeat = key == this.lastKey_;- this.lastKey_ = key;-- var event = new goog.events.KeyEvent(key, charCode, repeat, be);- event.altKey = altKey;- this.dispatchEvent(event);++/**+ * Sets the parent of this logger. This is used for setting up the logger tree.+ * @param {goog.debug.Logger} parent The parent logger.+ * @private+ */+goog.debug.Logger.prototype.setParent_ = function(parent) {+ this.parent_ = parent;};/**- * Returns the element listened on for the real keyboard events.- * @return {Element|Document|null} The element listened on for the real- * keyboard events.+ * Adds a child to this logger. This is used for setting up the logger tree.+ * @param {string} name The leaf name of the child.+ * @param {goog.debug.Logger} logger The child logger.+ * @private*/-goog.events.KeyHandler.prototype.getElement = function() {- return this.element_;+goog.debug.Logger.prototype.addChild_ = function(name, logger) {+ this.getChildren()[name] = logger;};/**- * Adds the proper key event listeners to the element.- * @param {Element|Document} element The element to listen on.- * @param {boolean=} opt_capture Whether to listen for browser events in- * capture phase (defaults to false).+ * There is a single global LogManager object that is used to maintain a set of+ * shared state about Loggers and log services. This is loosely based on the+ * java class java.util.logging.LogManager.+ * @const*/-goog.events.KeyHandler.prototype.attach = function(element, opt_capture) {- if (this.keyUpKey_) {- this.detach();- }+goog.debug.LogManager = {};- this.element_ = element;- this.keyPressKey_ = goog.events.listen(this.element_,- goog.events.EventType.KEYPRESS,- this,- opt_capture);+/**+ * Map of logger names to logger objects.+ *+ * @type {!Object<string, !goog.debug.Logger>}+ * @private+ */+goog.debug.LogManager.loggers_ = {};- // Most browsers (Safari 2 being the notable exception) doesn't include the- // keyCode in keypress events (IE has the char code in the keyCode field and- // Mozilla only included the keyCode if there's no charCode). Thus we have to- // listen for keydown to capture the keycode.- this.keyDownKey_ = goog.events.listen(this.element_,- goog.events.EventType.KEYDOWN,- this.handleKeyDown_,- opt_capture,- this);+/**+ * The root logger which is the root of the logger tree.+ * @type {goog.debug.Logger}+ * @private+ */+goog.debug.LogManager.rootLogger_ = null;- this.keyUpKey_ = goog.events.listen(this.element_,- goog.events.EventType.KEYUP,- this.handleKeyup_,- opt_capture,- this);++/**+ * Initializes the LogManager if not already initialized.+ */+goog.debug.LogManager.initialize = function() {+ if (!goog.debug.LogManager.rootLogger_) {+ goog.debug.LogManager.rootLogger_ = new goog.debug.Logger(+ goog.debug.Logger.ROOT_LOGGER_NAME);+ goog.debug.LogManager.loggers_[goog.debug.Logger.ROOT_LOGGER_NAME] =+ goog.debug.LogManager.rootLogger_;+ goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG);+ }};/**- * Removes the listeners that may exist.+ * Returns all the loggers.+ * @return {!Object<string, !goog.debug.Logger>} Map of logger names to logger+ * objects.*/-goog.events.KeyHandler.prototype.detach = function() {- if (this.keyPressKey_) {- goog.events.unlistenByKey(this.keyPressKey_);- goog.events.unlistenByKey(this.keyDownKey_);- goog.events.unlistenByKey(this.keyUpKey_);- this.keyPressKey_ = null;- this.keyDownKey_ = null;- this.keyUpKey_ = null;- }- this.element_ = null;- this.lastKey_ = -1;- this.keyCode_ = -1;+goog.debug.LogManager.getLoggers = function() {+ return goog.debug.LogManager.loggers_;};-/** @override */-goog.events.KeyHandler.prototype.disposeInternal = function() {- goog.events.KeyHandler.superClass_.disposeInternal.call(this);- this.detach();+/**+ * Returns the root of the logger tree namespace, the logger with the empty+ * string as its name.+ *+ * @return {!goog.debug.Logger} The root logger.+ */+goog.debug.LogManager.getRoot = function() {+ goog.debug.LogManager.initialize();+ return /** @type {!goog.debug.Logger} */ (goog.debug.LogManager.rootLogger_);};+/**+ * Finds a named logger.+ *+ * @param {string} name A name for the logger. This should be a dot-separated+ * name and should normally be based on the package name or class name of the+ * subsystem, such as goog.net.BrowserChannel.+ * @return {!goog.debug.Logger} The named logger.+ */+goog.debug.LogManager.getLogger = function(name) {+ goog.debug.LogManager.initialize();+ var ret = goog.debug.LogManager.loggers_[name];+ return ret || goog.debug.LogManager.createLogger_(name);+};+/**- * This class is used for the goog.events.KeyHandler.EventType.KEY event and- * it overrides the key code with the fixed key code.- * @param {number} keyCode The adjusted key code.- * @param {number} charCode The unicode character code.- * @param {boolean} repeat Whether this event was generated by keyboard repeat.- * @param {Event} browserEvent Browser event object.- * @constructor- * @extends {goog.events.BrowserEvent}- * @final+ * Creates a function that can be passed to goog.debug.catchErrors. The function+ * will log all reported errors using the given logger.+ * @param {goog.debug.Logger=} opt_logger The logger to log the errors to.+ * Defaults to the root logger.+ * @return {function(Object)} The created function.*/-goog.events.KeyEvent = function(keyCode, charCode, repeat, browserEvent) {- goog.events.BrowserEvent.call(this, browserEvent);- this.type = goog.events.KeyHandler.EventType.KEY;+goog.debug.LogManager.createFunctionForCatchErrors = function(opt_logger) {+ return function(info) {+ var logger = opt_logger || goog.debug.LogManager.getRoot();+ logger.severe('Error: ' + info.message + ' (' + info.fileName ++ ' @ Line: ' + info.line + ')');+ };+};- /**- * Keycode of key press.- * @type {number}- */- this.keyCode = keyCode;- /**- * Unicode character code.- * @type {number}- */- this.charCode = charCode;+/**+ * Creates the named logger. Will also create the parents of the named logger+ * if they don't yet exist.+ * @param {string} name The name of the logger.+ * @return {!goog.debug.Logger} The named logger.+ * @private+ */+goog.debug.LogManager.createLogger_ = function(name) {+ // find parent logger+ var logger = new goog.debug.Logger(name);+ if (goog.debug.Logger.ENABLE_HIERARCHY) {+ var lastDotIndex = name.lastIndexOf('.');+ var parentName = name.substr(0, lastDotIndex);+ var leafName = name.substr(lastDotIndex + 1);+ var parentLogger = goog.debug.LogManager.getLogger(parentName);- /**- * True if this event was generated by keyboard auto-repeat (i.e., the user is- * holding the key down.)- * @type {boolean}- */- this.repeat = repeat;+ // tell the parent about the child and the child about the parent+ parentLogger.addChild_(leafName, logger);+ logger.setParent_(parentLogger);+ }++ goog.debug.LogManager.loggers_[name] = logger;+ return logger;};-goog.inherits(goog.events.KeyEvent, goog.events.BrowserEvent);-// Copyright 2006 The Closure Library Authors. All Rights Reserved.+// Copyright 2007 The Closure Library Authors. All Rights Reserved.//// Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance with the License.@@ -42279,1857 +42053,2293 @@ goog.inherits(goog.events.KeyEvent, goog.events.BrowserEvent);// limitations under the License./**- * @fileoverview This event wrapper will dispatch an event when the user uses- * the mouse wheel to scroll an element. You can get the direction by checking- * the deltaX and deltaY properties of the event.- *- * This class aims to smooth out inconsistencies between browser platforms with- * regards to mousewheel events, but we do not cover every possible- * software/hardware combination out there, some of which occasionally produce- * very large deltas in mousewheel events. If your application wants to guard- * against extremely large deltas, use the setMaxDeltaX and setMaxDeltaY APIs- * to set maximum values that make sense for your application.+ * @fileoverview Definition the goog.debug.RelativeTimeProvider class.*- * @author [email protected] (Erik Arvidsson)- * @see ../demos/mousewheelhandler.html*/-goog.provide('goog.events.MouseWheelEvent');-goog.provide('goog.events.MouseWheelHandler');-goog.provide('goog.events.MouseWheelHandler.EventType');--goog.require('goog.dom');-goog.require('goog.events');-goog.require('goog.events.BrowserEvent');-goog.require('goog.events.EventTarget');-goog.require('goog.math');-goog.require('goog.style');-goog.require('goog.userAgent');+goog.provide('goog.debug.RelativeTimeProvider');/**- * This event handler allows you to catch mouse wheel events in a consistent- * manner.- * @param {Element|Document} element The element to listen to the mouse wheel- * event on.- * @param {boolean=} opt_capture Whether to handle the mouse wheel event in- * capture phase.+ * A simple object to keep track of a timestamp considered the start of+ * something. The main use is for the logger system to maintain a start time+ * that is occasionally reset. For example, in Gmail, we reset this relative+ * time at the start of a user action so that timings are offset from the+ * beginning of the action. This class also provides a singleton as the default+ * behavior for most use cases is to share the same start time.+ ** @constructor- * @extends {goog.events.EventTarget}+ * @final*/-goog.events.MouseWheelHandler = function(element, opt_capture) {- goog.events.EventTarget.call(this);-- /**- * This is the element that we will listen to the real mouse wheel events on.- * @type {Element|Document}- * @private- */- this.element_ = element;-- var rtlElement = goog.dom.isElement(this.element_) ?- /** @type {Element} */ (this.element_) :- (this.element_ ? /** @type {Document} */ (this.element_).body : null);-- /**- * True if the element exists and is RTL, false otherwise.- * @type {boolean}- * @private- */- this.isRtl_ = !!rtlElement && goog.style.isRightToLeft(rtlElement);-- var type = goog.userAgent.GECKO ? 'DOMMouseScroll' : 'mousewheel';-+goog.debug.RelativeTimeProvider = function() {/**- * The key returned from the goog.events.listen.- * @type {goog.events.Key}+ * The start time.+ * @type {number}* @private*/- this.listenKey_ = goog.events.listen(this.element_, type, this, opt_capture);-};-goog.inherits(goog.events.MouseWheelHandler, goog.events.EventTarget);---/**- * Enum type for the events fired by the mouse wheel handler.- * @enum {string}- */-goog.events.MouseWheelHandler.EventType = {- MOUSEWHEEL: 'mousewheel'+ this.relativeTimeStart_ = goog.now();};/**- * Optional maximum magnitude for x delta on each mousewheel event.- * @type {number|undefined}+ * Default instance.+ * @type {goog.debug.RelativeTimeProvider}* @private*/-goog.events.MouseWheelHandler.prototype.maxDeltaX_;+goog.debug.RelativeTimeProvider.defaultInstance_ =+ new goog.debug.RelativeTimeProvider();/**- * Optional maximum magnitude for y delta on each mousewheel event.- * @type {number|undefined}- * @private+ * Sets the start time to the specified time.+ * @param {number} timeStamp The start time.*/-goog.events.MouseWheelHandler.prototype.maxDeltaY_;+goog.debug.RelativeTimeProvider.prototype.set = function(timeStamp) {+ this.relativeTimeStart_ = timeStamp;+};/**- * @param {number} maxDeltaX Maximum magnitude for x delta on each mousewheel- * event. Should be non-negative.+ * Resets the start time to now.*/-goog.events.MouseWheelHandler.prototype.setMaxDeltaX = function(maxDeltaX) {- this.maxDeltaX_ = maxDeltaX;+goog.debug.RelativeTimeProvider.prototype.reset = function() {+ this.set(goog.now());};/**- * @param {number} maxDeltaY Maximum magnitude for y delta on each mousewheel- * event. Should be non-negative.+ * @return {number} The start time.*/-goog.events.MouseWheelHandler.prototype.setMaxDeltaY = function(maxDeltaY) {- this.maxDeltaY_ = maxDeltaY;+goog.debug.RelativeTimeProvider.prototype.get = function() {+ return this.relativeTimeStart_;};/**- * Handles the events on the element.- * @param {goog.events.BrowserEvent} e The underlying browser event.+ * @return {goog.debug.RelativeTimeProvider} The default instance.*/-goog.events.MouseWheelHandler.prototype.handleEvent = function(e) {- var deltaX = 0;- var deltaY = 0;- var detail = 0;- var be = e.getBrowserEvent();- if (be.type == 'mousewheel') {- var wheelDeltaScaleFactor = 1;- if (goog.userAgent.IE ||- goog.userAgent.WEBKIT &&- (goog.userAgent.WINDOWS || goog.userAgent.isVersionOrHigher('532.0'))) {- // In IE we get a multiple of 120; we adjust to a multiple of 3 to- // represent number of lines scrolled (like Gecko).- // Newer versions of Webkit match IE behavior, and WebKit on- // Windows also matches IE behavior.- // See bug https://bugs.webkit.org/show_bug.cgi?id=24368- wheelDeltaScaleFactor = 40;- }-- detail = goog.events.MouseWheelHandler.smartScale_(- -be.wheelDelta, wheelDeltaScaleFactor);- if (goog.isDef(be.wheelDeltaX)) {- // Webkit has two properties to indicate directional scroll, and- // can scroll both directions at once.- deltaX = goog.events.MouseWheelHandler.smartScale_(- -be.wheelDeltaX, wheelDeltaScaleFactor);- deltaY = goog.events.MouseWheelHandler.smartScale_(- -be.wheelDeltaY, wheelDeltaScaleFactor);- } else {- deltaY = detail;- }-- // Historical note: Opera (pre 9.5) used to negate the detail value.- } else { // Gecko- // Gecko returns multiple of 3 (representing the number of lines scrolled)- detail = be.detail;-- // Gecko sometimes returns really big values if the user changes settings to- // scroll a whole page per scroll- if (detail > 100) {- detail = 3;- } else if (detail < -100) {- detail = -3;- }-- // Firefox 3.1 adds an axis field to the event to indicate direction of- // scroll. See https://developer.mozilla.org/en/Gecko-Specific_DOM_Events- if (goog.isDef(be.axis) && be.axis === be.HORIZONTAL_AXIS) {- deltaX = detail;- } else {- deltaY = detail;- }- }-- if (goog.isNumber(this.maxDeltaX_)) {- deltaX = goog.math.clamp(deltaX, -this.maxDeltaX_, this.maxDeltaX_);- }- if (goog.isNumber(this.maxDeltaY_)) {- deltaY = goog.math.clamp(deltaY, -this.maxDeltaY_, this.maxDeltaY_);- }- // Don't clamp 'detail', since it could be ambiguous which axis it refers to- // and because it's informally deprecated anyways.-- // For horizontal scrolling we need to flip the value for RTL grids.- if (this.isRtl_) {- deltaX = -deltaX;- }- var newEvent = new goog.events.MouseWheelEvent(detail, be, deltaX, deltaY);- this.dispatchEvent(newEvent);+goog.debug.RelativeTimeProvider.getDefaultInstance = function() {+ return goog.debug.RelativeTimeProvider.defaultInstance_;};+// Copyright 2006 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * Helper for scaling down a mousewheel delta by a scale factor, if appropriate.- * @param {number} mouseWheelDelta Delta from a mouse wheel event. Expected to- * be an integer.- * @param {number} scaleFactor Factor to scale the delta down by. Expected to- * be an integer.- * @return {number} Scaled-down delta value, or the original delta if the- * scaleFactor does not appear to be applicable.- * @private+ * @fileoverview Definition of various formatters for logging. Please minimize+ * dependencies this file has on other closure classes as any dependency it+ * takes won't be able to use the logging infrastructure.+ **/-goog.events.MouseWheelHandler.smartScale_ = function(mouseWheelDelta,- scaleFactor) {- // The basic problem here is that in Webkit on Mac and Linux, we can get two- // very different types of mousewheel events: from continuous devices- // (touchpads, Mighty Mouse) or non-continuous devices (normal wheel mice).- //- // Non-continuous devices in Webkit get their wheel deltas scaled up to- // behave like IE. Continuous devices return much smaller unscaled values- // (which most of the time will not be cleanly divisible by the IE scale- // factor), so we should not try to normalize them down.- //- // Detailed discussion:- // https://bugs.webkit.org/show_bug.cgi?id=29601- // http://trac.webkit.org/browser/trunk/WebKit/chromium/src/mac/WebInputEventFactory.mm#L1063- if (goog.userAgent.WEBKIT &&- (goog.userAgent.MAC || goog.userAgent.LINUX) &&- (mouseWheelDelta % scaleFactor) != 0) {- return mouseWheelDelta;- } else {- return mouseWheelDelta / scaleFactor;- }-};+goog.provide('goog.debug.Formatter');+goog.provide('goog.debug.HtmlFormatter');+goog.provide('goog.debug.TextFormatter');-/** @override */-goog.events.MouseWheelHandler.prototype.disposeInternal = function() {- goog.events.MouseWheelHandler.superClass_.disposeInternal.call(this);- goog.events.unlistenByKey(this.listenKey_);- this.listenKey_ = null;-};+goog.require('goog.debug');+goog.require('goog.debug.Logger');+goog.require('goog.debug.RelativeTimeProvider');+goog.require('goog.html.SafeHtml');/**- * A base class for mouse wheel events. This is used with the- * MouseWheelHandler.+ * Base class for Formatters. A Formatter is used to format a LogRecord into+ * something that can be displayed to the user.*- * @param {number} detail The number of rows the user scrolled.- * @param {Event} browserEvent Browser event object.- * @param {number} deltaX The number of rows the user scrolled in the X- * direction.- * @param {number} deltaY The number of rows the user scrolled in the Y- * direction.+ * @param {string=} opt_prefix The prefix to place before text records.* @constructor- * @extends {goog.events.BrowserEvent}- * @final*/-goog.events.MouseWheelEvent = function(detail, browserEvent, deltaX, deltaY) {- goog.events.BrowserEvent.call(this, browserEvent);-- this.type = goog.events.MouseWheelHandler.EventType.MOUSEWHEEL;+goog.debug.Formatter = function(opt_prefix) {+ this.prefix_ = opt_prefix || '';/**- * The number of lines the user scrolled- * @type {number}- * NOTE: Informally deprecated. Use deltaX and deltaY instead, they provide- * more information.+ * A provider that returns the relative start time.+ * @type {goog.debug.RelativeTimeProvider}+ * @private*/- this.detail = detail;+ this.startTimeProvider_ =+ goog.debug.RelativeTimeProvider.getDefaultInstance();+};- /**- * The number of "lines" scrolled in the X direction.- *- * Note that not all browsers provide enough information to distinguish- * horizontal and vertical scroll events, so for these unsupported browsers,- * we will always have a deltaX of 0, even if the user scrolled their mouse- * wheel or trackpad sideways.- *- * Currently supported browsers are Webkit and Firefox 3.1 or later.- *- * @type {number}- */- this.deltaX = deltaX;- /**- * The number of lines scrolled in the Y direction.- * @type {number}- */- this.deltaY = deltaY;-};-goog.inherits(goog.events.MouseWheelEvent, goog.events.BrowserEvent);+/**+ * Whether to append newlines to the end of formatted log records.+ * @type {boolean}+ */+goog.debug.Formatter.prototype.appendNewline = true;+++/**+ * Whether to show absolute time in the DebugWindow.+ * @type {boolean}+ */+goog.debug.Formatter.prototype.showAbsoluteTime = true;+++/**+ * Whether to show relative time in the DebugWindow.+ * @type {boolean}+ */+goog.debug.Formatter.prototype.showRelativeTime = true;-// Copyright 2013 The Closure Library Authors. All Rights Reserved.-//-// Licensed under the Apache License, Version 2.0 (the "License");-// you may not use this file except in compliance with the License.-// You may obtain a copy of the License at-//-// http://www.apache.org/licenses/LICENSE-2.0-//-// Unless required by applicable law or agreed to in writing, software-// distributed under the License is distributed on an "AS-IS" BASIS,-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-// See the License for the specific language governing permissions and-// limitations under the License./**- * @fileoverview Basic strippable logging definitions.- * @see http://go/closurelogging- *- * @author [email protected] (John Lenz)+ * Whether to show the logger name in the DebugWindow.+ * @type {boolean}*/+goog.debug.Formatter.prototype.showLoggerName = true;-goog.provide('goog.log');-goog.provide('goog.log.Level');-goog.provide('goog.log.LogRecord');-goog.provide('goog.log.Logger');--goog.require('goog.debug');-goog.require('goog.debug.LogManager');-goog.require('goog.debug.LogRecord');-goog.require('goog.debug.Logger');+/**+ * Whether to show the logger exception text.+ * @type {boolean}+ */+goog.debug.Formatter.prototype.showExceptionText = false;-/** @define {boolean} Whether logging is enabled. */-goog.define('goog.log.ENABLED', goog.debug.LOGGING_ENABLED);+/**+ * Whether to show the severity level.+ * @type {boolean}+ */+goog.debug.Formatter.prototype.showSeverityLevel = false;-/** @const */-goog.log.ROOT_LOGGER_NAME = goog.debug.Logger.ROOT_LOGGER_NAME;+/**+ * Formats a record.+ * @param {goog.debug.LogRecord} logRecord the logRecord to format.+ * @return {string} The formatted string.+ */+goog.debug.Formatter.prototype.formatRecord = goog.abstractMethod;/**- * @constructor- * @final+ * Sets the start time provider. By default, this is the default instance+ * but can be changed.+ * @param {goog.debug.RelativeTimeProvider} provider The provider to use.*/-goog.log.Logger = goog.debug.Logger;-+goog.debug.Formatter.prototype.setStartTimeProvider = function(provider) {+ this.startTimeProvider_ = provider;+};/**- * @constructor- * @final+ * Returns the start time provider. By default, this is the default instance+ * but can be changed.+ * @return {goog.debug.RelativeTimeProvider} The start time provider.*/-goog.log.Level = goog.debug.Logger.Level;-+goog.debug.Formatter.prototype.getStartTimeProvider = function() {+ return this.startTimeProvider_;+};/**- * @constructor- * @final+ * Resets the start relative time.*/-goog.log.LogRecord = goog.debug.LogRecord;+goog.debug.Formatter.prototype.resetRelativeTimeStart = function() {+ this.startTimeProvider_.reset();+};/**- * Finds or creates a logger for a named subsystem. If a logger has already been- * created with the given name it is returned. Otherwise a new logger is- * created. If a new logger is created its log level will be configured based- * on the goog.debug.LogManager configuration and it will configured to also- * send logging output to its parent's handlers.- * @see goog.debug.LogManager- *- * @param {string} name A name for the logger. This should be a dot-separated- * name and should normally be based on the package name or class name of- * the subsystem, such as goog.net.BrowserChannel.- * @param {goog.log.Level=} opt_level If provided, override the- * default logging level with the provided level.- * @return {goog.log.Logger} The named logger or null if logging is disabled.+ * Returns a string for the time/date of the LogRecord.+ * @param {goog.debug.LogRecord} logRecord The record to get a time stamp for.+ * @return {string} A string representation of the time/date of the LogRecord.+ * @private*/-goog.log.getLogger = function(name, opt_level) {- if (goog.log.ENABLED) {- var logger = goog.debug.LogManager.getLogger(name);- if (opt_level && logger) {- logger.setLevel(opt_level);- }- return logger;- } else {- return null;- }+goog.debug.Formatter.getDateTimeStamp_ = function(logRecord) {+ var time = new Date(logRecord.getMillis());+ return goog.debug.Formatter.getTwoDigitString_((time.getFullYear() - 2000)) ++ goog.debug.Formatter.getTwoDigitString_((time.getMonth() + 1)) ++ goog.debug.Formatter.getTwoDigitString_(time.getDate()) + ' ' ++ goog.debug.Formatter.getTwoDigitString_(time.getHours()) + ':' ++ goog.debug.Formatter.getTwoDigitString_(time.getMinutes()) + ':' ++ goog.debug.Formatter.getTwoDigitString_(time.getSeconds()) + '.' ++ goog.debug.Formatter.getTwoDigitString_(+ Math.floor(time.getMilliseconds() / 10));};-// TODO(johnlenz): try to tighten the types to these functions./**- * Adds a handler to the logger. This doesn't use the event system because- * we want to be able to add logging to the event system.- * @param {goog.log.Logger} logger- * @param {Function} handler Handler function to add.+ * Returns the number as a two-digit string, meaning it prepends a 0 if the+ * number if less than 10.+ * @param {number} n The number to format.+ * @return {string} A two-digit string representation of {@code n}.+ * @private*/-goog.log.addHandler = function(logger, handler) {- if (goog.log.ENABLED && logger) {- logger.addHandler(handler);+goog.debug.Formatter.getTwoDigitString_ = function(n) {+ if (n < 10) {+ return '0' + n;}+ return String(n);};/**- * Removes a handler from the logger. This doesn't use the event system because- * we want to be able to add logging to the event system.- * @param {goog.log.Logger} logger- * @param {Function} handler Handler function to remove.- * @return {boolean} Whether the handler was removed.+ * Returns a string for the number of seconds relative to the start time.+ * Prepads with spaces so that anything less than 1000 seconds takes up the+ * same number of characters for better formatting.+ * @param {goog.debug.LogRecord} logRecord The log to compare time to.+ * @param {number} relativeTimeStart The start time to compare to.+ * @return {string} The number of seconds of the LogRecord relative to the+ * start time.+ * @private*/-goog.log.removeHandler = function(logger, handler) {- if (goog.log.ENABLED && logger) {- return logger.removeHandler(handler);+goog.debug.Formatter.getRelativeTime_ = function(logRecord,+ relativeTimeStart) {+ var ms = logRecord.getMillis() - relativeTimeStart;+ var sec = ms / 1000;+ var str = sec.toFixed(3);++ var spacesToPrepend = 0;+ if (sec < 1) {+ spacesToPrepend = 2;} else {- return false;+ while (sec < 100) {+ spacesToPrepend++;+ sec *= 10;+ }+ }+ while (spacesToPrepend-- > 0) {+ str = ' ' + str;}+ return str;};+/**- * Logs a message. If the logger is currently enabled for the- * given message level then the given message is forwarded to all the- * registered output Handler objects.- * @param {goog.log.Logger} logger- * @param {goog.log.Level} level One of the level identifiers.- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error|Object=} opt_exception An exception associated with the- * message.+ * Formatter that returns formatted html. See formatRecord for the classes+ * it uses for various types of formatted output.+ *+ * @param {string=} opt_prefix The prefix to place before text records.+ * @constructor+ * @extends {goog.debug.Formatter}*/-goog.log.log = function(logger, level, msg, opt_exception) {- if (goog.log.ENABLED && logger) {- logger.log(level, msg, opt_exception);- }+goog.debug.HtmlFormatter = function(opt_prefix) {+ goog.debug.Formatter.call(this, opt_prefix);};+goog.inherits(goog.debug.HtmlFormatter, goog.debug.Formatter);/**- * Logs a message at the Level.SEVERE level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.log.Logger} logger- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Whether to show the logger exception text+ * @type {boolean}+ * @override*/-goog.log.error = function(logger, msg, opt_exception) {- if (goog.log.ENABLED && logger) {- logger.severe(msg, opt_exception);+goog.debug.HtmlFormatter.prototype.showExceptionText = true;+++/**+ * Formats a record+ * @param {goog.debug.LogRecord} logRecord the logRecord to format.+ * @return {string} The formatted string as html.+ * @override+ */+goog.debug.HtmlFormatter.prototype.formatRecord = function(logRecord) {+ if (!logRecord) {+ return '';}+ // OK not to use goog.html.SafeHtml.unwrap() here.+ return this.formatRecordAsHtml(logRecord).getTypedStringValue();};/**- * Logs a message at the Level.WARNING level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.log.Logger} logger- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Formats a record.+ * @param {!goog.debug.LogRecord} logRecord the logRecord to format.+ * @return {!goog.html.SafeHtml} The formatted string as SafeHtml.*/-goog.log.warning = function(logger, msg, opt_exception) {- if (goog.log.ENABLED && logger) {- logger.warning(msg, opt_exception);+goog.debug.HtmlFormatter.prototype.formatRecordAsHtml = function(logRecord) {+ var className;+ switch (logRecord.getLevel().value) {+ case goog.debug.Logger.Level.SHOUT.value:+ className = 'dbg-sh';+ break;+ case goog.debug.Logger.Level.SEVERE.value:+ className = 'dbg-sev';+ break;+ case goog.debug.Logger.Level.WARNING.value:+ className = 'dbg-w';+ break;+ case goog.debug.Logger.Level.INFO.value:+ className = 'dbg-i';+ break;+ case goog.debug.Logger.Level.FINE.value:+ default:+ className = 'dbg-f';+ break;+ }++ // HTML for user defined prefix, time, logger name, and severity.+ var sb = [];+ sb.push(this.prefix_, ' ');+ if (this.showAbsoluteTime) {+ sb.push('[', goog.debug.Formatter.getDateTimeStamp_(logRecord), '] ');+ }+ if (this.showRelativeTime) {+ sb.push('[',+ goog.debug.Formatter.getRelativeTime_(+ logRecord, this.startTimeProvider_.get()),+ 's] ');+ }+ if (this.showLoggerName) {+ sb.push('[', logRecord.getLoggerName(), '] ');+ }+ if (this.showSeverityLevel) {+ sb.push('[', logRecord.getLevel().name, '] ');+ }+ var fullPrefixHtml =+ goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(sb.join(''));++ // HTML for exception text and log record.+ var exceptionHtml = goog.html.SafeHtml.EMPTY;+ if (this.showExceptionText && logRecord.getException()) {+ exceptionHtml = goog.html.SafeHtml.concat(+ goog.html.SafeHtml.create('br'),+ goog.debug.exposeExceptionAsHtml(logRecord.getException()));+ }+ var logRecordHtml = goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(+ logRecord.getMessage());+ var recordAndExceptionHtml = goog.html.SafeHtml.create(+ 'span',+ {'class': className},+ goog.html.SafeHtml.concat(logRecordHtml, exceptionHtml));+++ // Combine both pieces of HTML and, if needed, append a final newline.+ var html;+ if (this.appendNewline) {+ html = goog.html.SafeHtml.concat(fullPrefixHtml, recordAndExceptionHtml,+ goog.html.SafeHtml.create('br'));+ } else {+ html = goog.html.SafeHtml.concat(fullPrefixHtml, recordAndExceptionHtml);}+ return html;};+/**- * Logs a message at the Level.INFO level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.log.Logger} logger- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Formatter that returns formatted plain text+ *+ * @param {string=} opt_prefix The prefix to place before text records.+ * @constructor+ * @extends {goog.debug.Formatter}+ * @final*/-goog.log.info = function(logger, msg, opt_exception) {- if (goog.log.ENABLED && logger) {- logger.info(msg, opt_exception);- }+goog.debug.TextFormatter = function(opt_prefix) {+ goog.debug.Formatter.call(this, opt_prefix);};+goog.inherits(goog.debug.TextFormatter, goog.debug.Formatter);/**- * Logs a message at the Level.Fine level.- * If the logger is currently enabled for the given message level then the- * given message is forwarded to all the registered output Handler objects.- * @param {goog.log.Logger} logger- * @param {goog.debug.Loggable} msg The message to log.- * @param {Error=} opt_exception An exception associated with the message.+ * Formats a record as text+ * @param {goog.debug.LogRecord} logRecord the logRecord to format.+ * @return {string} The formatted string.+ * @override*/-goog.log.fine = function(logger, msg, opt_exception) {- if (goog.log.ENABLED && logger) {- logger.fine(msg, opt_exception);+goog.debug.TextFormatter.prototype.formatRecord = function(logRecord) {+ // Build message html+ var sb = [];+ sb.push(this.prefix_, ' ');+ if (this.showAbsoluteTime) {+ sb.push('[', goog.debug.Formatter.getDateTimeStamp_(logRecord), '] ');+ }+ if (this.showRelativeTime) {+ sb.push('[', goog.debug.Formatter.getRelativeTime_(logRecord,+ this.startTimeProvider_.get()), 's] ');}-};-// Based on https://github.com/Polymer/PointerEvents+ if (this.showLoggerName) {+ sb.push('[', logRecord.getLoggerName(), '] ');+ }+ if (this.showSeverityLevel) {+ sb.push('[', logRecord.getLevel().name, '] ');+ }+ sb.push(logRecord.getMessage());+ if (this.showExceptionText) {+ var exception = logRecord.getException();+ if (exception) {+ var exceptionText = exception instanceof Error ?+ exception.message :+ exception.toString();+ sb.push('\n', exceptionText);+ }+ }+ if (this.appendNewline) {+ sb.push('\n');+ }+ return sb.join('');+};-// Copyright (c) 2013 The Polymer Authors. All rights reserved.+// Copyright 2006 The Closure Library Authors. All Rights Reserved.//-// Redistribution and use in source and binary forms, with or without-// modification, are permitted provided that the following conditions are-// met:+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at//-// * Redistributions of source code must retain the above copyright-// notice, this list of conditions and the following disclaimer.-// * Redistributions in binary form must reproduce the above-// copyright notice, this list of conditions and the following disclaimer-// in the documentation and/or other materials provided with the-// distribution.-// * Neither the name of Google Inc. nor the names of its-// contributors may be used to endorse or promote products derived from-// this software without specific prior written permission.+// http://www.apache.org/licenses/LICENSE-2.0//-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.--goog.provide('ol.pointer.PointerEvent');---goog.require('goog.events');-goog.require('goog.events.Event');-goog.require('goog.object');--+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * A class for pointer events.+ * @fileoverview Simple logger that logs to the window console if available.*- * This class is used as an abstraction for mouse events,- * touch events and even native pointer events.+ * Has an autoInstall option which can be put into initialization code, which+ * will start logging if "Debug=true" is in document.location.href*- * @constructor- * @extends {goog.events.Event}- * @param {string} type The type of the event to create.- * @param {goog.events.BrowserEvent} browserEvent- * @param {Object.<string, ?>=} opt_eventDict An optional dictionary of- * initial event properties.*/-ol.pointer.PointerEvent = function(type, browserEvent, opt_eventDict) {- goog.base(this, type);- /**- * @const- * @type {goog.events.BrowserEvent}- */- this.browserEvent = browserEvent;+goog.provide('goog.debug.Console');- var eventDict = goog.isDef(opt_eventDict) ? opt_eventDict : {};+goog.require('goog.debug.LogManager');+goog.require('goog.debug.Logger');+goog.require('goog.debug.TextFormatter');- /**- * @type {number}- */- this.buttons = this.getButtons_(eventDict);- /**- * @type {number}- */- this.pressure = this.getPressure_(eventDict, this.buttons);- // MouseEvent related properties+/**+ * Create and install a log handler that logs to window.console if available+ * @constructor+ */+goog.debug.Console = function() {+ this.publishHandler_ = goog.bind(this.addLogRecord, this);/**- * @type {boolean}+ * Formatter for formatted output.+ * @type {!goog.debug.TextFormatter}+ * @private*/- this.bubbles = goog.object.get(eventDict, 'bubbles', false);+ this.formatter_ = new goog.debug.TextFormatter();+ this.formatter_.showAbsoluteTime = false;+ this.formatter_.showExceptionText = false;+ // The console logging methods automatically append a newline.+ this.formatter_.appendNewline = false;- /**- * @type {boolean}- */- this.cancelable = goog.object.get(eventDict, 'cancelable', false);+ this.isCapturing_ = false;+ this.logBuffer_ = '';/**- * @type {Object}+ * Loggers that we shouldn't output.+ * @type {!Object<boolean>}+ * @private*/- this.view = goog.object.get(eventDict, 'view', null);+ this.filteredLoggers_ = {};+};- /**- * @type {number}- */- this.detail = goog.object.get(eventDict, 'detail', null);- /**- * @type {number}- */- this.screenX = goog.object.get(eventDict, 'screenX', 0);+/**+ * Returns the text formatter used by this console+ * @return {!goog.debug.TextFormatter} The text formatter.+ */+goog.debug.Console.prototype.getFormatter = function() {+ return this.formatter_;+};- /**- * @type {number}- */- this.screenY = goog.object.get(eventDict, 'screenY', 0);- /**- * @type {number}- */- this.clientX = goog.object.get(eventDict, 'clientX', 0);+/**+ * Sets whether we are currently capturing logger output.+ * @param {boolean} capturing Whether to capture logger output.+ */+goog.debug.Console.prototype.setCapturing = function(capturing) {+ if (capturing == this.isCapturing_) {+ return;+ }- /**- * @type {number}- */- this.clientY = goog.object.get(eventDict, 'clientY', 0);+ // attach or detach handler from the root logger+ var rootLogger = goog.debug.LogManager.getRoot();+ if (capturing) {+ rootLogger.addHandler(this.publishHandler_);+ } else {+ rootLogger.removeHandler(this.publishHandler_);+ this.logBuffer = '';+ }+ this.isCapturing_ = capturing;+};- /**- * @type {boolean}- */- this.ctrlKey = goog.object.get(eventDict, 'ctrlKey', false);- /**- * @type {boolean}- */- this.altKey = goog.object.get(eventDict, 'altKey', false);+/**+ * Adds a log record.+ * @param {goog.debug.LogRecord} logRecord The log entry.+ */+goog.debug.Console.prototype.addLogRecord = function(logRecord) {++ // Check to see if the log record is filtered or not.+ if (this.filteredLoggers_[logRecord.getLoggerName()]) {+ return;+ }- /**- * @type {boolean}- */- this.shiftKey = goog.object.get(eventDict, 'shiftKey', false);+ var record = this.formatter_.formatRecord(logRecord);+ var console = goog.debug.Console.console_;+ if (console) {+ switch (logRecord.getLevel()) {+ case goog.debug.Logger.Level.SHOUT:+ goog.debug.Console.logToConsole_(console, 'info', record);+ break;+ case goog.debug.Logger.Level.SEVERE:+ goog.debug.Console.logToConsole_(console, 'error', record);+ break;+ case goog.debug.Logger.Level.WARNING:+ goog.debug.Console.logToConsole_(console, 'warn', record);+ break;+ default:+ goog.debug.Console.logToConsole_(console, 'debug', record);+ break;+ }+ } else {+ this.logBuffer_ += record;+ }+};- /**- * @type {boolean}- */- this.metaKey = goog.object.get(eventDict, 'metaKey', false);- /**- * @type {number}- */- this.button = goog.object.get(eventDict, 'button', 0);+/**+ * Adds a logger name to be filtered.+ * @param {string} loggerName the logger name to add.+ */+goog.debug.Console.prototype.addFilter = function(loggerName) {+ this.filteredLoggers_[loggerName] = true;+};- /**- * @type {Node}- */- this.relatedTarget = goog.object.get(eventDict, 'relatedTarget', null);- // PointerEvent related properties+/**+ * Removes a logger name to be filtered.+ * @param {string} loggerName the logger name to remove.+ */+goog.debug.Console.prototype.removeFilter = function(loggerName) {+ delete this.filteredLoggers_[loggerName];+};- /**- * @const- * @type {number}- */- this.pointerId = goog.object.get(eventDict, 'pointerId', 0);- /**- * @type {number}- */- this.width = goog.object.get(eventDict, 'width', 0);+/**+ * Global console logger instance+ * @type {goog.debug.Console}+ */+goog.debug.Console.instance = null;- /**- * @type {number}- */- this.height = goog.object.get(eventDict, 'height', 0);- /**- * @type {number}- */- this.tiltX = goog.object.get(eventDict, 'tiltX', 0);+/**+ * The console to which to log. This is a property so it can be mocked out in+ * this unit test for goog.debug.Console. Using goog.global, as console might be+ * used in window-less contexts.+ * @type {Object}+ * @private+ */+goog.debug.Console.console_ = goog.global['console'];- /**- * @type {number}- */- this.tiltY = goog.object.get(eventDict, 'tiltY', 0);- /**- * @type {string}- */- this.pointerType = goog.object.get(eventDict, 'pointerType', '');+/**+ * Sets the console to which to log.+ * @param {!Object} console The console to which to log.+ */+goog.debug.Console.setConsole = function(console) {+ goog.debug.Console.console_ = console;+};- /**- * @type {number}- */- this.hwTimestamp = goog.object.get(eventDict, 'hwTimestamp', 0);- /**- * @type {boolean}- */- this.isPrimary = goog.object.get(eventDict, 'isPrimary', false);+/**+ * Install the console and start capturing if "Debug=true" is in the page URL+ */+goog.debug.Console.autoInstall = function() {+ if (!goog.debug.Console.instance) {+ goog.debug.Console.instance = new goog.debug.Console();+ }- // keep the semantics of preventDefault- if (browserEvent.preventDefault) {- this.preventDefault = function() {- browserEvent.preventDefault();- };+ if (goog.global.location &&+ goog.global.location.href.indexOf('Debug=true') != -1) {+ goog.debug.Console.instance.setCapturing(true);}};-goog.inherits(ol.pointer.PointerEvent, goog.events.Event);/**- * @private- * @param {Object.<string, ?>} eventDict- * @return {number}+ * Show an alert with all of the captured debug information.+ * Information is only captured if console is not available*/-ol.pointer.PointerEvent.prototype.getButtons_ = function(eventDict) {- // According to the w3c spec,- // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-button- // MouseEvent.button == 0 can mean either no mouse button depressed, or the- // left mouse button depressed.- //- // As of now, the only way to distinguish between the two states of- // MouseEvent.button is by using the deprecated MouseEvent.which property, as- // this maps mouse buttons to positive integers > 0, and uses 0 to mean that- // no mouse button is held.- //- // MouseEvent.which is derived from MouseEvent.button at MouseEvent creation,- // but initMouseEvent does not expose an argument with which to set- // MouseEvent.which. Calling initMouseEvent with a buttonArg of 0 will set- // MouseEvent.button == 0 and MouseEvent.which == 1, breaking the expectations- // of app developers.- //- // The only way to propagate the correct state of MouseEvent.which and- // MouseEvent.button to a new MouseEvent.button == 0 and MouseEvent.which == 0- // is to call initMouseEvent with a buttonArg value of -1.- //- // This is fixed with DOM Level 4's use of buttons- var buttons;- if (eventDict.buttons || ol.pointer.PointerEvent.HAS_BUTTONS) {- buttons = eventDict.buttons;- } else {- switch (eventDict.which) {- case 1: buttons = 1; break;- case 2: buttons = 4; break;- case 3: buttons = 2; break;- default: buttons = 0;- }- }- return buttons;+goog.debug.Console.show = function() {+ alert(goog.debug.Console.instance.logBuffer_);};/**+ * Logs the record to the console using the given function. If the function is+ * not available on the console object, the log function is used instead.+ * @param {!Object} console The console object.+ * @param {string} fnName The name of the function to use.+ * @param {string} record The record to log.* @private- * @param {Object.<string, ?>} eventDict- * @param {number} buttons- * @return {number}*/-ol.pointer.PointerEvent.prototype.getPressure_ = function(eventDict, buttons) {- // Spec requires that pointers without pressure specified use 0.5 for down- // state and 0 for up state.- var pressure = 0;- if (eventDict.pressure) {- pressure = eventDict.pressure;+goog.debug.Console.logToConsole_ = function(console, fnName, record) {+ if (console[fnName]) {+ console[fnName](record);} else {- pressure = buttons ? 0.5 : 0;+ console.log(record);}- return pressure;};+// Copyright 2007 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * Is the `buttons` property supported?- * @type {boolean}+ * @fileoverview Utility class that monitors viewport size changes.+ *+ * @author [email protected] (Attila Bodis)+ * @see ../demos/viewportsizemonitor.html*/-ol.pointer.PointerEvent.HAS_BUTTONS = false;++goog.provide('goog.dom.ViewportSizeMonitor');++goog.require('goog.dom');+goog.require('goog.events');+goog.require('goog.events.EventTarget');+goog.require('goog.events.EventType');+goog.require('goog.math.Size');+/**- * Checks if the `buttons` property is supported.+ * This class can be used to monitor changes in the viewport size. Instances+ * dispatch a {@link goog.events.EventType.RESIZE} event when the viewport size+ * changes. Handlers can call {@link goog.dom.ViewportSizeMonitor#getSize} to+ * get the new viewport size.+ *+ * Use this class if you want to execute resize/reflow logic each time the+ * user resizes the browser window. This class is guaranteed to only dispatch+ * {@code RESIZE} events when the pixel dimensions of the viewport change.+ * (Internet Explorer fires resize events if any element on the page is resized,+ * even if the viewport dimensions are unchanged, which can lead to infinite+ * resize loops.)+ *+ * Example usage:+ * <pre>+ * var vsm = new goog.dom.ViewportSizeMonitor();+ * goog.events.listen(vsm, goog.events.EventType.RESIZE, function(e) {+ * alert('Viewport size changed to ' + vsm.getSize());+ * });+ * </pre>+ *+ * Manually verified on IE6, IE7, FF2, Opera 11, Safari 4 and Chrome.+ *+ * @param {Window=} opt_window The window to monitor; defaults to the window in+ * which this code is executing.+ * @constructor+ * @extends {goog.events.EventTarget}*/-(function() {- try {- var ev = new MouseEvent('click', {buttons: 1});- ol.pointer.PointerEvent.HAS_BUTTONS = ev.buttons === 1;- } catch (e) {- }-})();+goog.dom.ViewportSizeMonitor = function(opt_window) {+ goog.events.EventTarget.call(this);-goog.provide('ol.pointer.EventSource');+ // Default the window to the current window if unspecified.+ this.window_ = opt_window || window;-goog.require('goog.events.BrowserEvent');-goog.require('goog.object');+ // Listen for window resize events.+ this.listenerKey_ = goog.events.listen(this.window_,+ goog.events.EventType.RESIZE, this.handleResize_, false, this);+ // Set the initial size.+ this.size_ = goog.dom.getViewportSize(this.window_);+};+goog.inherits(goog.dom.ViewportSizeMonitor, goog.events.EventTarget);/**- * @param {ol.pointer.PointerEventHandler} dispatcher- * @param {Object.<string, function(goog.events.BrowserEvent)>} mapping- * @constructor+ * Returns a viewport size monitor for the given window. A new one is created+ * if it doesn't exist already. This prevents the unnecessary creation of+ * multiple spooling monitors for a window.+ * @param {Window=} opt_window The window to monitor; defaults to the window in+ * which this code is executing.+ * @return {!goog.dom.ViewportSizeMonitor} Monitor for the given window.*/-ol.pointer.EventSource = function(dispatcher, mapping) {- /**- * @type {ol.pointer.PointerEventHandler}- */- this.dispatcher = dispatcher;+goog.dom.ViewportSizeMonitor.getInstanceForWindow = function(opt_window) {+ var currentWindow = opt_window || window;+ var uid = goog.getUid(currentWindow);- /**- * @private- * @const- * @type {Object.<string, function(goog.events.BrowserEvent)>}- */- this.mapping_ = mapping;+ return goog.dom.ViewportSizeMonitor.windowInstanceMap_[uid] =+ goog.dom.ViewportSizeMonitor.windowInstanceMap_[uid] ||+ new goog.dom.ViewportSizeMonitor(currentWindow);};/**- * List of events supported by this source.- * @return {Array.<string>} Event names+ * Removes and disposes a viewport size monitor for the given window if one+ * exists.+ * @param {Window=} opt_window The window whose monitor should be removed;+ * defaults to the window in which this code is executing.*/-ol.pointer.EventSource.prototype.getEvents = function() {- return goog.object.getKeys(this.mapping_);+goog.dom.ViewportSizeMonitor.removeInstanceForWindow = function(opt_window) {+ var uid = goog.getUid(opt_window || window);++ goog.dispose(goog.dom.ViewportSizeMonitor.windowInstanceMap_[uid]);+ delete goog.dom.ViewportSizeMonitor.windowInstanceMap_[uid];};/**- * Returns a mapping between the supported event types and- * the handlers that should handle an event.- * @return {Object.<string, function(goog.events.BrowserEvent)>}- * Event/Handler mapping+ * Map of window hash code to viewport size monitor for that window, if+ * created.+ * @type {Object<number,goog.dom.ViewportSizeMonitor>}+ * @private*/-ol.pointer.EventSource.prototype.getMapping = function() {- return this.mapping_;-};+goog.dom.ViewportSizeMonitor.windowInstanceMap_ = {};/**- * Returns the handler that should handle a given event type.- * @param {string} eventType- * @return {function(goog.events.BrowserEvent)} Handler+ * Event listener key for window the window resize handler, as returned by+ * {@link goog.events.listen}.+ * @type {goog.events.Key}+ * @private*/-ol.pointer.EventSource.prototype.getHandlerForEvent = function(eventType) {- return this.mapping_[eventType];+goog.dom.ViewportSizeMonitor.prototype.listenerKey_ = null;+++/**+ * The window to monitor. Defaults to the window in which the code is running.+ * @type {Window}+ * @private+ */+goog.dom.ViewportSizeMonitor.prototype.window_ = null;+++/**+ * The most recently recorded size of the viewport, in pixels.+ * @type {goog.math.Size?}+ * @private+ */+goog.dom.ViewportSizeMonitor.prototype.size_ = null;+++/**+ * Returns the most recently recorded size of the viewport, in pixels. May+ * return null if no window resize event has been handled yet.+ * @return {goog.math.Size} The viewport dimensions, in pixels.+ */+goog.dom.ViewportSizeMonitor.prototype.getSize = function() {+ // Return a clone instead of the original to preserve encapsulation.+ return this.size_ ? this.size_.clone() : null;};-// Based on https://github.com/Polymer/PointerEvents-// Copyright (c) 2013 The Polymer Authors. All rights reserved.+/** @override */+goog.dom.ViewportSizeMonitor.prototype.disposeInternal = function() {+ goog.dom.ViewportSizeMonitor.superClass_.disposeInternal.call(this);++ if (this.listenerKey_) {+ goog.events.unlistenByKey(this.listenerKey_);+ this.listenerKey_ = null;+ }++ this.window_ = null;+ this.size_ = null;+};+++/**+ * Handles window resize events by measuring the dimensions of the+ * viewport and dispatching a {@link goog.events.EventType.RESIZE} event if the+ * current dimensions are different from the previous ones.+ * @param {goog.events.Event} event The window resize event to handle.+ * @private+ */+goog.dom.ViewportSizeMonitor.prototype.handleResize_ = function(event) {+ var size = goog.dom.getViewportSize(this.window_);+ if (!goog.math.Size.equals(size, this.size_)) {+ this.size_ = size;+ this.dispatchEvent(goog.events.EventType.RESIZE);+ }+};++// Copyright 2006 The Closure Library Authors. All Rights Reserved.//-// Redistribution and use in source and binary forms, with or without-// modification, are permitted provided that the following conditions are-// met:+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at//-// * Redistributions of source code must retain the above copyright-// notice, this list of conditions and the following disclaimer.-// * Redistributions in binary form must reproduce the above-// copyright notice, this list of conditions and the following disclaimer-// in the documentation and/or other materials provided with the-// distribution.-// * Neither the name of Google Inc. nor the names of its-// contributors may be used to endorse or promote products derived from-// this software without specific prior written permission.+// http://www.apache.org/licenses/LICENSE-2.0//-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++/**+ * @fileoverview Constant declarations for common key codes.+ *+ * @author [email protected] (Emil A Eklund)+ * @see ../demos/keyhandler.html+ */++goog.provide('goog.events.KeyCodes');++goog.require('goog.userAgent');+++/**+ * Key codes for common characters.+ *+ * This list is not localized and therefore some of the key codes are not+ * correct for non US keyboard layouts. See comments below.+ *+ * @enum {number}+ */+goog.events.KeyCodes = {+ WIN_KEY_FF_LINUX: 0,+ MAC_ENTER: 3,+ BACKSPACE: 8,+ TAB: 9,+ NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac+ ENTER: 13,+ SHIFT: 16,+ CTRL: 17,+ ALT: 18,+ PAUSE: 19,+ CAPS_LOCK: 20,+ ESC: 27,+ SPACE: 32,+ PAGE_UP: 33, // also NUM_NORTH_EAST+ PAGE_DOWN: 34, // also NUM_SOUTH_EAST+ END: 35, // also NUM_SOUTH_WEST+ HOME: 36, // also NUM_NORTH_WEST+ LEFT: 37, // also NUM_WEST+ UP: 38, // also NUM_NORTH+ RIGHT: 39, // also NUM_EAST+ DOWN: 40, // also NUM_SOUTH+ PRINT_SCREEN: 44,+ INSERT: 45, // also NUM_INSERT+ DELETE: 46, // also NUM_DELETE+ ZERO: 48,+ ONE: 49,+ TWO: 50,+ THREE: 51,+ FOUR: 52,+ FIVE: 53,+ SIX: 54,+ SEVEN: 55,+ EIGHT: 56,+ NINE: 57,+ FF_SEMICOLON: 59, // Firefox (Gecko) fires this for semicolon instead of 186+ FF_EQUALS: 61, // Firefox (Gecko) fires this for equals instead of 187+ FF_DASH: 173, // Firefox (Gecko) fires this for dash instead of 189+ QUESTION_MARK: 63, // needs localization+ A: 65,+ B: 66,+ C: 67,+ D: 68,+ E: 69,+ F: 70,+ G: 71,+ H: 72,+ I: 73,+ J: 74,+ K: 75,+ L: 76,+ M: 77,+ N: 78,+ O: 79,+ P: 80,+ Q: 81,+ R: 82,+ S: 83,+ T: 84,+ U: 85,+ V: 86,+ W: 87,+ X: 88,+ Y: 89,+ Z: 90,+ META: 91, // WIN_KEY_LEFT+ WIN_KEY_RIGHT: 92,+ CONTEXT_MENU: 93,+ NUM_ZERO: 96,+ NUM_ONE: 97,+ NUM_TWO: 98,+ NUM_THREE: 99,+ NUM_FOUR: 100,+ NUM_FIVE: 101,+ NUM_SIX: 102,+ NUM_SEVEN: 103,+ NUM_EIGHT: 104,+ NUM_NINE: 105,+ NUM_MULTIPLY: 106,+ NUM_PLUS: 107,+ NUM_MINUS: 109,+ NUM_PERIOD: 110,+ NUM_DIVISION: 111,+ F1: 112,+ F2: 113,+ F3: 114,+ F4: 115,+ F5: 116,+ F6: 117,+ F7: 118,+ F8: 119,+ F9: 120,+ F10: 121,+ F11: 122,+ F12: 123,+ NUMLOCK: 144,+ SCROLL_LOCK: 145,-goog.provide('ol.pointer.MouseSource');+ // OS-specific media keys like volume controls and browser controls.+ FIRST_MEDIA_KEY: 166,+ LAST_MEDIA_KEY: 183,-goog.require('goog.object');-goog.require('ol.pointer.EventSource');+ SEMICOLON: 186, // needs localization+ DASH: 189, // needs localization+ EQUALS: 187, // needs localization+ COMMA: 188, // needs localization+ PERIOD: 190, // needs localization+ SLASH: 191, // needs localization+ APOSTROPHE: 192, // needs localization+ TILDE: 192, // needs localization+ SINGLE_QUOTE: 222, // needs localization+ OPEN_SQUARE_BRACKET: 219, // needs localization+ BACKSLASH: 220, // needs localization+ CLOSE_SQUARE_BRACKET: 221, // needs localization+ WIN_KEY: 224,+ MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91+ MAC_WK_CMD_LEFT: 91, // WebKit Left Command key fired, same as META+ MAC_WK_CMD_RIGHT: 93, // WebKit Right Command key fired, different from META+ WIN_IME: 229,+ // We've seen users whose machines fire this keycode at regular one+ // second intervals. The common thread among these users is that+ // they're all using Dell Inspiron laptops, so we suspect that this+ // indicates a hardware/bios problem.+ // http://en.community.dell.com/support-forums/laptop/f/3518/p/19285957/19523128.aspx+ PHANTOM: 255+};/**- * @param {ol.pointer.PointerEventHandler} dispatcher- * @constructor- * @extends {ol.pointer.EventSource}+ * Returns true if the event contains a text modifying key.+ * @param {goog.events.BrowserEvent} e A key event.+ * @return {boolean} Whether it's a text modifying key.*/-ol.pointer.MouseSource = function(dispatcher) {- var mapping = {- 'mousedown': this.mousedown,- 'mousemove': this.mousemove,- 'mouseup': this.mouseup,- 'mouseover': this.mouseover,- 'mouseout': this.mouseout- };- goog.base(this, dispatcher, mapping);-- /**- * @const- * @type {Object.<string, goog.events.BrowserEvent|Object>}- */- this.pointerMap = dispatcher.pointerMap;+goog.events.KeyCodes.isTextModifyingKeyEvent = function(e) {+ if (e.altKey && !e.ctrlKey ||+ e.metaKey ||+ // Function keys don't generate text+ e.keyCode >= goog.events.KeyCodes.F1 &&+ e.keyCode <= goog.events.KeyCodes.F12) {+ return false;+ }- /**- * @const- * @type {Array.<ol.Pixel>}- */- this.lastTouches = [];+ // The following keys are quite harmless, even in combination with+ // CTRL, ALT or SHIFT.+ switch (e.keyCode) {+ case goog.events.KeyCodes.ALT:+ case goog.events.KeyCodes.CAPS_LOCK:+ case goog.events.KeyCodes.CONTEXT_MENU:+ case goog.events.KeyCodes.CTRL:+ case goog.events.KeyCodes.DOWN:+ case goog.events.KeyCodes.END:+ case goog.events.KeyCodes.ESC:+ case goog.events.KeyCodes.HOME:+ case goog.events.KeyCodes.INSERT:+ case goog.events.KeyCodes.LEFT:+ case goog.events.KeyCodes.MAC_FF_META:+ case goog.events.KeyCodes.META:+ case goog.events.KeyCodes.NUMLOCK:+ case goog.events.KeyCodes.NUM_CENTER:+ case goog.events.KeyCodes.PAGE_DOWN:+ case goog.events.KeyCodes.PAGE_UP:+ case goog.events.KeyCodes.PAUSE:+ case goog.events.KeyCodes.PHANTOM:+ case goog.events.KeyCodes.PRINT_SCREEN:+ case goog.events.KeyCodes.RIGHT:+ case goog.events.KeyCodes.SCROLL_LOCK:+ case goog.events.KeyCodes.SHIFT:+ case goog.events.KeyCodes.UP:+ case goog.events.KeyCodes.WIN_KEY:+ case goog.events.KeyCodes.WIN_KEY_RIGHT:+ return false;+ case goog.events.KeyCodes.WIN_KEY_FF_LINUX:+ return !goog.userAgent.GECKO;+ default:+ return e.keyCode < goog.events.KeyCodes.FIRST_MEDIA_KEY ||+ e.keyCode > goog.events.KeyCodes.LAST_MEDIA_KEY;+ }};-goog.inherits(ol.pointer.MouseSource, ol.pointer.EventSource);/**- * @const- * @type {number}+ * Returns true if the key fires a keypress event in the current browser.+ *+ * Accoridng to MSDN [1] IE only fires keypress events for the following keys:+ * - Letters: A - Z (uppercase and lowercase)+ * - Numerals: 0 - 9+ * - Symbols: ! @ # $ % ^ & * ( ) _ - + = < [ ] { } , . / ? \ | ' ` " ~+ * - System: ESC, SPACEBAR, ENTER+ *+ * That's not entirely correct though, for instance there's no distinction+ * between upper and lower case letters.+ *+ * [1] http://msdn2.microsoft.com/en-us/library/ms536939(VS.85).aspx)+ *+ * Safari is similar to IE, but does not fire keypress for ESC.+ *+ * Additionally, IE6 does not fire keydown or keypress events for letters when+ * the control or alt keys are held down and the shift key is not. IE7 does+ * fire keydown in these cases, though, but not keypress.+ *+ * @param {number} keyCode A key code.+ * @param {number=} opt_heldKeyCode Key code of a currently-held key.+ * @param {boolean=} opt_shiftKey Whether the shift key is held down.+ * @param {boolean=} opt_ctrlKey Whether the control key is held down.+ * @param {boolean=} opt_altKey Whether the alt key is held down.+ * @return {boolean} Whether it's a key that fires a keypress event.*/-ol.pointer.MouseSource.POINTER_ID = 1;+goog.events.KeyCodes.firesKeyPressEvent = function(keyCode, opt_heldKeyCode,+ opt_shiftKey, opt_ctrlKey, opt_altKey) {+ if (!goog.userAgent.IE &&+ !(goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher('525'))) {+ return true;+ }+ if (goog.userAgent.MAC && opt_altKey) {+ return goog.events.KeyCodes.isCharacterKey(keyCode);+ }-/**- * @const- * @type {string}- */-ol.pointer.MouseSource.POINTER_TYPE = 'mouse';+ // Alt but not AltGr which is represented as Alt+Ctrl.+ if (opt_altKey && !opt_ctrlKey) {+ return false;+ }+ // Saves Ctrl or Alt + key for IE and WebKit 525+, which won't fire keypress.+ // Non-IE browsers and WebKit prior to 525 won't get this far so no need to+ // check the user agent.+ if (goog.isNumber(opt_heldKeyCode)) {+ opt_heldKeyCode = goog.events.KeyCodes.normalizeKeyCode(opt_heldKeyCode);+ }+ if (!opt_shiftKey &&+ (opt_heldKeyCode == goog.events.KeyCodes.CTRL ||+ opt_heldKeyCode == goog.events.KeyCodes.ALT ||+ goog.userAgent.MAC &&+ opt_heldKeyCode == goog.events.KeyCodes.META)) {+ return false;+ }-/**- * Radius around touchend that swallows mouse events.- *- * @const- * @type {number}- */-ol.pointer.MouseSource.DEDUP_DIST = 25;+ // Some keys with Ctrl/Shift do not issue keypress in WEBKIT.+ if (goog.userAgent.WEBKIT && opt_ctrlKey && opt_shiftKey) {+ switch (keyCode) {+ case goog.events.KeyCodes.BACKSLASH:+ case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:+ case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:+ case goog.events.KeyCodes.TILDE:+ case goog.events.KeyCodes.SEMICOLON:+ case goog.events.KeyCodes.DASH:+ case goog.events.KeyCodes.EQUALS:+ case goog.events.KeyCodes.COMMA:+ case goog.events.KeyCodes.PERIOD:+ case goog.events.KeyCodes.SLASH:+ case goog.events.KeyCodes.APOSTROPHE:+ case goog.events.KeyCodes.SINGLE_QUOTE:+ return false;+ }+ }+ // When Ctrl+<somekey> is held in IE, it only fires a keypress once, but it+ // continues to fire keydown events as the event repeats.+ if (goog.userAgent.IE && opt_ctrlKey && opt_heldKeyCode == keyCode) {+ return false;+ }-/**- * Detect if a mouse event was simulated from a touch by- * checking if previously there was a touch event at the- * same position.- *- * FIXME - Known problem with the native Android browser on- * Samsung GT-I9100 (Android 4.1.2):- * In case the page is scrolled, this function does not work- * correctly when a canvas is used (WebGL or canvas renderer).- * Mouse listeners on canvas elements (for this browser), create- * two mouse events: One 'good' and one 'bad' one (on other browsers or- * when a div is used, there is only one event). For the 'bad' one,- * clientX/clientY and also pageX/pageY are wrong when the page- * is scrolled. Because of that, this function can not detect if- * the events were simulated from a touch event. As result, a- * pointer event at a wrong position is dispatched, which confuses- * the map interactions.- * It is unclear, how one can get the correct position for the event- * or detect that the positions are invalid.- *- * @private- * @param {goog.events.BrowserEvent} inEvent- * @return {boolean} True, if the event was generated by a touch.- */-ol.pointer.MouseSource.prototype.isEventSimulatedFromTouch_ =- function(inEvent) {- var lts = this.lastTouches;- var x = inEvent.clientX, y = inEvent.clientY;- for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {- // simulated mouse events will be swallowed near a primary touchend- var dx = Math.abs(x - t[0]), dy = Math.abs(y - t[1]);- if (dx <= ol.pointer.MouseSource.DEDUP_DIST &&- dy <= ol.pointer.MouseSource.DEDUP_DIST) {+ switch (keyCode) {+ case goog.events.KeyCodes.ENTER:return true;- }+ case goog.events.KeyCodes.ESC:+ return !goog.userAgent.WEBKIT;}- return false;++ return goog.events.KeyCodes.isCharacterKey(keyCode);};/**- * Creates a copy of the original event that will be used- * for the fake pointer event.+ * Returns true if the key produces a character.+ * This does not cover characters on non-US keyboards (Russian, Hebrew, etc.).*- * @param {goog.events.BrowserEvent} inEvent- * @param {ol.pointer.PointerEventHandler} dispatcher- * @return {Object}+ * @param {number} keyCode A key code.+ * @return {boolean} Whether it's a character key.*/-ol.pointer.MouseSource.prepareEvent = function(inEvent, dispatcher) {- var e = dispatcher.cloneEvent(inEvent, inEvent.getBrowserEvent());+goog.events.KeyCodes.isCharacterKey = function(keyCode) {+ if (keyCode >= goog.events.KeyCodes.ZERO &&+ keyCode <= goog.events.KeyCodes.NINE) {+ return true;+ }- // forward mouse preventDefault- var pd = e.preventDefault;- e.preventDefault = function() {- inEvent.preventDefault();- pd();- };+ if (keyCode >= goog.events.KeyCodes.NUM_ZERO &&+ keyCode <= goog.events.KeyCodes.NUM_MULTIPLY) {+ return true;+ }- e.pointerId = ol.pointer.MouseSource.POINTER_ID;- e.isPrimary = true;- e.pointerType = ol.pointer.MouseSource.POINTER_TYPE;+ if (keyCode >= goog.events.KeyCodes.A &&+ keyCode <= goog.events.KeyCodes.Z) {+ return true;+ }- return e;+ // Safari sends zero key code for non-latin characters.+ if (goog.userAgent.WEBKIT && keyCode == 0) {+ return true;+ }++ switch (keyCode) {+ case goog.events.KeyCodes.SPACE:+ case goog.events.KeyCodes.QUESTION_MARK:+ case goog.events.KeyCodes.NUM_PLUS:+ case goog.events.KeyCodes.NUM_MINUS:+ case goog.events.KeyCodes.NUM_PERIOD:+ case goog.events.KeyCodes.NUM_DIVISION:+ case goog.events.KeyCodes.SEMICOLON:+ case goog.events.KeyCodes.FF_SEMICOLON:+ case goog.events.KeyCodes.DASH:+ case goog.events.KeyCodes.EQUALS:+ case goog.events.KeyCodes.FF_EQUALS:+ case goog.events.KeyCodes.COMMA:+ case goog.events.KeyCodes.PERIOD:+ case goog.events.KeyCodes.SLASH:+ case goog.events.KeyCodes.APOSTROPHE:+ case goog.events.KeyCodes.SINGLE_QUOTE:+ case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:+ case goog.events.KeyCodes.BACKSLASH:+ case goog.events.KeyCodes.CLOSE_SQUARE_BRACKET:+ return true;+ default:+ return false;+ }};/**- * Handler for `mousedown`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Normalizes key codes from OS/Browser-specific value to the general one.+ * @param {number} keyCode The native key code.+ * @return {number} The normalized key code.*/-ol.pointer.MouseSource.prototype.mousedown = function(inEvent) {- if (!this.isEventSimulatedFromTouch_(inEvent)) {- var p = goog.object.containsKey(this.pointerMap,- ol.pointer.MouseSource.POINTER_ID.toString());- // TODO(dfreedman) workaround for some elements not sending mouseup- // http://crbug/149091- if (p) {- this.cancel(inEvent);- }- var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);- this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()] = inEvent;- this.dispatcher.down(e, inEvent);+goog.events.KeyCodes.normalizeKeyCode = function(keyCode) {+ if (goog.userAgent.GECKO) {+ return goog.events.KeyCodes.normalizeGeckoKeyCode(keyCode);+ } else if (goog.userAgent.MAC && goog.userAgent.WEBKIT) {+ return goog.events.KeyCodes.normalizeMacWebKitKeyCode(keyCode);+ } else {+ return keyCode;}};/**- * Handler for `mousemove`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Normalizes key codes from their Gecko-specific value to the general one.+ * @param {number} keyCode The native key code.+ * @return {number} The normalized key code.*/-ol.pointer.MouseSource.prototype.mousemove = function(inEvent) {- if (!this.isEventSimulatedFromTouch_(inEvent)) {- var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);- this.dispatcher.move(e, inEvent);+goog.events.KeyCodes.normalizeGeckoKeyCode = function(keyCode) {+ switch (keyCode) {+ case goog.events.KeyCodes.FF_EQUALS:+ return goog.events.KeyCodes.EQUALS;+ case goog.events.KeyCodes.FF_SEMICOLON:+ return goog.events.KeyCodes.SEMICOLON;+ case goog.events.KeyCodes.FF_DASH:+ return goog.events.KeyCodes.DASH;+ case goog.events.KeyCodes.MAC_FF_META:+ return goog.events.KeyCodes.META;+ case goog.events.KeyCodes.WIN_KEY_FF_LINUX:+ return goog.events.KeyCodes.WIN_KEY;+ default:+ return keyCode;}};/**- * Handler for `mouseup`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Normalizes key codes from their Mac WebKit-specific value to the general one.+ * @param {number} keyCode The native key code.+ * @return {number} The normalized key code.*/-ol.pointer.MouseSource.prototype.mouseup = function(inEvent) {- if (!this.isEventSimulatedFromTouch_(inEvent)) {- var p = this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()];-- if (p && p.button === inEvent.button) {- var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);- this.dispatcher.up(e, inEvent);- this.cleanupMouse();- }+goog.events.KeyCodes.normalizeMacWebKitKeyCode = function(keyCode) {+ switch (keyCode) {+ case goog.events.KeyCodes.MAC_WK_CMD_RIGHT: // 93+ return goog.events.KeyCodes.META; // 91+ default:+ return keyCode;}};+// Copyright 2007 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * Handler for `mouseover`.+ * @fileoverview This file contains a class for working with keyboard events+ * that repeat consistently across browsers and platforms. It also unifies the+ * key code so that it is the same in all browsers and platforms.*- * @param {goog.events.BrowserEvent} inEvent+ * Different web browsers have very different keyboard event handling. Most+ * importantly is that only certain browsers repeat keydown events:+ * IE, Opera, FF/Win32, and Safari 3 repeat keydown events.+ * FF/Mac and Safari 2 do not.+ *+ * For the purposes of this code, "Safari 3" means WebKit 525+, when WebKit+ * decided that they should try to match IE's key handling behavior.+ * Safari 3.0.4, which shipped with Leopard (WebKit 523), has the+ * Safari 2 behavior.+ *+ * Firefox, Safari, Opera prevent on keypress+ *+ * IE prevents on keydown+ *+ * Firefox does not fire keypress for shift, ctrl, alt+ * Firefox does fire keydown for shift, ctrl, alt, meta+ * Firefox does not repeat keydown for shift, ctrl, alt, meta+ *+ * Firefox does not fire keypress for up and down in an input+ *+ * Opera fires keypress for shift, ctrl, alt, meta+ * Opera does not repeat keypress for shift, ctrl, alt, meta+ *+ * Safari 2 and 3 do not fire keypress for shift, ctrl, alt+ * Safari 2 does not fire keydown for shift, ctrl, alt+ * Safari 3 *does* fire keydown for shift, ctrl, alt+ *+ * IE provides the keycode for keyup/down events and the charcode (in the+ * keycode field) for keypress.+ *+ * Mozilla provides the keycode for keyup/down and the charcode for keypress+ * unless it's a non text modifying key in which case the keycode is provided.+ *+ * Safari 3 provides the keycode and charcode for all events.+ *+ * Opera provides the keycode for keyup/down event and either the charcode or+ * the keycode (in the keycode field) for keypress events.+ *+ * Firefox x11 doesn't fire keydown events if a another key is already held down+ * until the first key is released. This can cause a key event to be fired with+ * a keyCode for the first key and a charCode for the second key.+ *+ * Safari in keypress+ *+ * charCode keyCode which+ * ENTER: 13 13 13+ * F1: 63236 63236 63236+ * F8: 63243 63243 63243+ * ...+ * p: 112 112 112+ * P: 80 80 80+ *+ * Firefox, keypress:+ *+ * charCode keyCode which+ * ENTER: 0 13 13+ * F1: 0 112 0+ * F8: 0 119 0+ * ...+ * p: 112 0 112+ * P: 80 0 80+ *+ * Opera, Mac+Win32, keypress:+ *+ * charCode keyCode which+ * ENTER: undefined 13 13+ * F1: undefined 112 0+ * F8: undefined 119 0+ * ...+ * p: undefined 112 112+ * P: undefined 80 80+ *+ * IE7, keydown+ *+ * charCode keyCode which+ * ENTER: undefined 13 undefined+ * F1: undefined 112 undefined+ * F8: undefined 119 undefined+ * ...+ * p: undefined 80 undefined+ * P: undefined 80 undefined+ *+ * @author [email protected] (Erik Arvidsson)+ * @author [email protected] (Emil A Eklund)+ * @see ../demos/keyhandler.html*/-ol.pointer.MouseSource.prototype.mouseover = function(inEvent) {- if (!this.isEventSimulatedFromTouch_(inEvent)) {- var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);- this.dispatcher.enterOver(e, inEvent);++goog.provide('goog.events.KeyEvent');+goog.provide('goog.events.KeyHandler');+goog.provide('goog.events.KeyHandler.EventType');++goog.require('goog.events');+goog.require('goog.events.BrowserEvent');+goog.require('goog.events.EventTarget');+goog.require('goog.events.EventType');+goog.require('goog.events.KeyCodes');+goog.require('goog.userAgent');++++/**+ * A wrapper around an element that you want to listen to keyboard events on.+ * @param {Element|Document=} opt_element The element or document to listen on.+ * @param {boolean=} opt_capture Whether to listen for browser events in+ * capture phase (defaults to false).+ * @constructor+ * @extends {goog.events.EventTarget}+ * @final+ */+goog.events.KeyHandler = function(opt_element, opt_capture) {+ goog.events.EventTarget.call(this);++ if (opt_element) {+ this.attach(opt_element, opt_capture);}};+goog.inherits(goog.events.KeyHandler, goog.events.EventTarget);/**- * Handler for `mouseout`.- *- * @param {goog.events.BrowserEvent} inEvent+ * This is the element that we will listen to the real keyboard events on.+ * @type {Element|Document|null}+ * @private*/-ol.pointer.MouseSource.prototype.mouseout = function(inEvent) {- if (!this.isEventSimulatedFromTouch_(inEvent)) {- var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);- this.dispatcher.leaveOut(e, inEvent);- }-};+goog.events.KeyHandler.prototype.element_ = null;/**- * Dispatches a `pointercancel` event.- *- * @param {goog.events.BrowserEvent} inEvent+ * The key for the key press listener.+ * @type {goog.events.Key}+ * @private*/-ol.pointer.MouseSource.prototype.cancel = function(inEvent) {- var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);- this.dispatcher.cancel(e, inEvent);- this.cleanupMouse();-};+goog.events.KeyHandler.prototype.keyPressKey_ = null;/**- * Remove the mouse from the list of active pointers.+ * The key for the key down listener.+ * @type {goog.events.Key}+ * @private*/-ol.pointer.MouseSource.prototype.cleanupMouse = function() {- goog.object.remove(this.pointerMap,- ol.pointer.MouseSource.POINTER_ID.toString());-};--// Based on https://github.com/Polymer/PointerEvents--// Copyright (c) 2013 The Polymer Authors. All rights reserved.-//-// Redistribution and use in source and binary forms, with or without-// modification, are permitted provided that the following conditions are-// met:-//-// * Redistributions of source code must retain the above copyright-// notice, this list of conditions and the following disclaimer.-// * Redistributions in binary form must reproduce the above-// copyright notice, this list of conditions and the following disclaimer-// in the documentation and/or other materials provided with the-// distribution.-// * Neither the name of Google Inc. nor the names of its-// contributors may be used to endorse or promote products derived from-// this software without specific prior written permission.-//-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.--goog.provide('ol.pointer.MsSource');+goog.events.KeyHandler.prototype.keyDownKey_ = null;-goog.require('goog.object');-goog.require('ol.pointer.EventSource');+/**+ * The key for the key up listener.+ * @type {goog.events.Key}+ * @private+ */+goog.events.KeyHandler.prototype.keyUpKey_ = null;/**- * @param {ol.pointer.PointerEventHandler} dispatcher- * @constructor- * @extends {ol.pointer.EventSource}+ * Used to detect keyboard repeat events.+ * @private+ * @type {number}*/-ol.pointer.MsSource = function(dispatcher) {- var mapping = {- 'MSPointerDown': this.msPointerDown,- 'MSPointerMove': this.msPointerMove,- 'MSPointerUp': this.msPointerUp,- 'MSPointerOut': this.msPointerOut,- 'MSPointerOver': this.msPointerOver,- 'MSPointerCancel': this.msPointerCancel,- 'MSGotPointerCapture': this.msGotPointerCapture,- 'MSLostPointerCapture': this.msLostPointerCapture- };- goog.base(this, dispatcher, mapping);+goog.events.KeyHandler.prototype.lastKey_ = -1;- /**- * @const- * @type {Object.<string, goog.events.BrowserEvent|Object>}- */- this.pointerMap = dispatcher.pointerMap;- /**- * @const- * @type {Array.<string>}- */- this.POINTER_TYPES = [- '',- 'unavailable',- 'touch',- 'pen',- 'mouse'- ];-};-goog.inherits(ol.pointer.MsSource, ol.pointer.EventSource);+/**+ * Keycode recorded for key down events. As most browsers don't report the+ * keycode in the key press event we need to record it in the key down phase.+ * @private+ * @type {number}+ */+goog.events.KeyHandler.prototype.keyCode_ = -1;/**- * Creates a copy of the original event that will be used- * for the fake pointer event.- *+ * Alt key recorded for key down events. FF on Mac does not report the alt key+ * flag in the key press event, we need to record it in the key down phase.+ * @type {boolean}* @private- * @param {goog.events.BrowserEvent} inEvent- * @return {Object}*/-ol.pointer.MsSource.prototype.prepareEvent_ = function(inEvent) {- var e = inEvent;- if (goog.isNumber(inEvent.getBrowserEvent().pointerType)) {- e = this.dispatcher.cloneEvent(inEvent, inEvent.getBrowserEvent());- e.pointerType = this.POINTER_TYPES[inEvent.getBrowserEvent().pointerType];- }-- return e;-};+goog.events.KeyHandler.prototype.altKey_ = false;/**- * Remove this pointer from the list of active pointers.- * @param {number} pointerId+ * Enum type for the events fired by the key handler+ * @enum {string}*/-ol.pointer.MsSource.prototype.cleanup = function(pointerId) {- goog.object.remove(this.pointerMap, pointerId);+goog.events.KeyHandler.EventType = {+ KEY: 'key'};/**- * Handler for `msPointerDown`.- *- * @param {goog.events.BrowserEvent} inEvent+ * An enumeration of key codes that Safari 2 does incorrectly+ * @type {Object}+ * @private*/-ol.pointer.MsSource.prototype.msPointerDown = function(inEvent) {- this.pointerMap[inEvent.getBrowserEvent().pointerId] = inEvent;- var e = this.prepareEvent_(inEvent);- this.dispatcher.down(e, inEvent);+goog.events.KeyHandler.safariKey_ = {+ '3': goog.events.KeyCodes.ENTER, // 13+ '12': goog.events.KeyCodes.NUMLOCK, // 144+ '63232': goog.events.KeyCodes.UP, // 38+ '63233': goog.events.KeyCodes.DOWN, // 40+ '63234': goog.events.KeyCodes.LEFT, // 37+ '63235': goog.events.KeyCodes.RIGHT, // 39+ '63236': goog.events.KeyCodes.F1, // 112+ '63237': goog.events.KeyCodes.F2, // 113+ '63238': goog.events.KeyCodes.F3, // 114+ '63239': goog.events.KeyCodes.F4, // 115+ '63240': goog.events.KeyCodes.F5, // 116+ '63241': goog.events.KeyCodes.F6, // 117+ '63242': goog.events.KeyCodes.F7, // 118+ '63243': goog.events.KeyCodes.F8, // 119+ '63244': goog.events.KeyCodes.F9, // 120+ '63245': goog.events.KeyCodes.F10, // 121+ '63246': goog.events.KeyCodes.F11, // 122+ '63247': goog.events.KeyCodes.F12, // 123+ '63248': goog.events.KeyCodes.PRINT_SCREEN, // 44+ '63272': goog.events.KeyCodes.DELETE, // 46+ '63273': goog.events.KeyCodes.HOME, // 36+ '63275': goog.events.KeyCodes.END, // 35+ '63276': goog.events.KeyCodes.PAGE_UP, // 33+ '63277': goog.events.KeyCodes.PAGE_DOWN, // 34+ '63289': goog.events.KeyCodes.NUMLOCK, // 144+ '63302': goog.events.KeyCodes.INSERT // 45};/**- * Handler for `msPointerMove`.- *- * @param {goog.events.BrowserEvent} inEvent+ * An enumeration of key identifiers currently part of the W3C draft for DOM3+ * and their mappings to keyCodes.+ * http://www.w3.org/TR/DOM-Level-3-Events/keyset.html#KeySet-Set+ * This is currently supported in Safari and should be platform independent.+ * @type {Object}+ * @private*/-ol.pointer.MsSource.prototype.msPointerMove = function(inEvent) {- var e = this.prepareEvent_(inEvent);- this.dispatcher.move(e, inEvent);+goog.events.KeyHandler.keyIdentifier_ = {+ 'Up': goog.events.KeyCodes.UP, // 38+ 'Down': goog.events.KeyCodes.DOWN, // 40+ 'Left': goog.events.KeyCodes.LEFT, // 37+ 'Right': goog.events.KeyCodes.RIGHT, // 39+ 'Enter': goog.events.KeyCodes.ENTER, // 13+ 'F1': goog.events.KeyCodes.F1, // 112+ 'F2': goog.events.KeyCodes.F2, // 113+ 'F3': goog.events.KeyCodes.F3, // 114+ 'F4': goog.events.KeyCodes.F4, // 115+ 'F5': goog.events.KeyCodes.F5, // 116+ 'F6': goog.events.KeyCodes.F6, // 117+ 'F7': goog.events.KeyCodes.F7, // 118+ 'F8': goog.events.KeyCodes.F8, // 119+ 'F9': goog.events.KeyCodes.F9, // 120+ 'F10': goog.events.KeyCodes.F10, // 121+ 'F11': goog.events.KeyCodes.F11, // 122+ 'F12': goog.events.KeyCodes.F12, // 123+ 'U+007F': goog.events.KeyCodes.DELETE, // 46+ 'Home': goog.events.KeyCodes.HOME, // 36+ 'End': goog.events.KeyCodes.END, // 35+ 'PageUp': goog.events.KeyCodes.PAGE_UP, // 33+ 'PageDown': goog.events.KeyCodes.PAGE_DOWN, // 34+ 'Insert': goog.events.KeyCodes.INSERT // 45};/**- * Handler for `msPointerUp`.+ * If true, the KeyEvent fires on keydown. Otherwise, it fires on keypress.*- * @param {goog.events.BrowserEvent} inEvent+ * @type {boolean}+ * @private*/-ol.pointer.MsSource.prototype.msPointerUp = function(inEvent) {- var e = this.prepareEvent_(inEvent);- this.dispatcher.up(e, inEvent);- this.cleanup(inEvent.getBrowserEvent().pointerId);-};+goog.events.KeyHandler.USES_KEYDOWN_ = goog.userAgent.IE ||+ goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher('525');/**- * Handler for `msPointerOut`.- *- * @param {goog.events.BrowserEvent} inEvent+ * If true, the alt key flag is saved during the key down and reused when+ * handling the key press. FF on Mac does not set the alt flag in the key press+ * event.+ * @type {boolean}+ * @private*/-ol.pointer.MsSource.prototype.msPointerOut = function(inEvent) {- var e = this.prepareEvent_(inEvent);- this.dispatcher.leaveOut(e, inEvent);-};+goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_ = goog.userAgent.MAC &&+ goog.userAgent.GECKO;/**- * Handler for `msPointerOver`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Records the keycode for browsers that only returns the keycode for key up/+ * down events. For browser/key combinations that doesn't trigger a key pressed+ * event it also fires the patched key event.+ * @param {goog.events.BrowserEvent} e The key down event.+ * @private*/-ol.pointer.MsSource.prototype.msPointerOver = function(inEvent) {- var e = this.prepareEvent_(inEvent);- this.dispatcher.enterOver(e, inEvent);+goog.events.KeyHandler.prototype.handleKeyDown_ = function(e) {+ // Ctrl-Tab and Alt-Tab can cause the focus to be moved to another window+ // before we've caught a key-up event. If the last-key was one of these we+ // reset the state.+ if (goog.userAgent.WEBKIT) {+ if (this.lastKey_ == goog.events.KeyCodes.CTRL && !e.ctrlKey ||+ this.lastKey_ == goog.events.KeyCodes.ALT && !e.altKey ||+ goog.userAgent.MAC &&+ this.lastKey_ == goog.events.KeyCodes.META && !e.metaKey) {+ this.lastKey_ = -1;+ this.keyCode_ = -1;+ }+ }++ if (this.lastKey_ == -1) {+ if (e.ctrlKey && e.keyCode != goog.events.KeyCodes.CTRL) {+ this.lastKey_ = goog.events.KeyCodes.CTRL;+ } else if (e.altKey && e.keyCode != goog.events.KeyCodes.ALT) {+ this.lastKey_ = goog.events.KeyCodes.ALT;+ } else if (e.metaKey && e.keyCode != goog.events.KeyCodes.META) {+ this.lastKey_ = goog.events.KeyCodes.META;+ }+ }++ if (goog.events.KeyHandler.USES_KEYDOWN_ &&+ !goog.events.KeyCodes.firesKeyPressEvent(e.keyCode,+ this.lastKey_, e.shiftKey, e.ctrlKey, e.altKey)) {+ this.handleEvent(e);+ } else {+ this.keyCode_ = goog.events.KeyCodes.normalizeKeyCode(e.keyCode);+ if (goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_) {+ this.altKey_ = e.altKey;+ }+ }};/**- * Handler for `msPointerCancel`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Resets the stored previous values. Needed to be called for webkit which will+ * not generate a key up for meta key operations. This should only be called+ * when having finished with repeat key possiblities.*/-ol.pointer.MsSource.prototype.msPointerCancel = function(inEvent) {- var e = this.prepareEvent_(inEvent);- this.dispatcher.cancel(e, inEvent);- this.cleanup(inEvent.getBrowserEvent().pointerId);+goog.events.KeyHandler.prototype.resetState = function() {+ this.lastKey_ = -1;+ this.keyCode_ = -1;};/**- * Handler for `msLostPointerCapture`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Clears the stored previous key value, resetting the key repeat status. Uses+ * -1 because the Safari 3 Windows beta reports 0 for certain keys (like Home+ * and End.)+ * @param {goog.events.BrowserEvent} e The keyup event.+ * @private*/-ol.pointer.MsSource.prototype.msLostPointerCapture = function(inEvent) {- var e = this.dispatcher.makeEvent('lostpointercapture',- inEvent.getBrowserEvent(), inEvent);- this.dispatcher.dispatchEvent(e);+goog.events.KeyHandler.prototype.handleKeyup_ = function(e) {+ this.resetState();+ this.altKey_ = e.altKey;};/**- * Handler for `msGotPointerCapture`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Handles the events on the element.+ * @param {goog.events.BrowserEvent} e The keyboard event sent from the+ * browser.*/-ol.pointer.MsSource.prototype.msGotPointerCapture = function(inEvent) {- var e = this.dispatcher.makeEvent('gotpointercapture',- inEvent.getBrowserEvent(), inEvent);- this.dispatcher.dispatchEvent(e);-};+goog.events.KeyHandler.prototype.handleEvent = function(e) {+ var be = e.getBrowserEvent();+ var keyCode, charCode;+ var altKey = be.altKey;-// Based on https://github.com/Polymer/PointerEvents+ // IE reports the character code in the keyCode field for keypress events.+ // There are two exceptions however, Enter and Escape.+ if (goog.userAgent.IE && e.type == goog.events.EventType.KEYPRESS) {+ keyCode = this.keyCode_;+ charCode = keyCode != goog.events.KeyCodes.ENTER &&+ keyCode != goog.events.KeyCodes.ESC ?+ be.keyCode : 0;-// Copyright (c) 2013 The Polymer Authors. All rights reserved.-//-// Redistribution and use in source and binary forms, with or without-// modification, are permitted provided that the following conditions are-// met:-//-// * Redistributions of source code must retain the above copyright-// notice, this list of conditions and the following disclaimer.-// * Redistributions in binary form must reproduce the above-// copyright notice, this list of conditions and the following disclaimer-// in the documentation and/or other materials provided with the-// distribution.-// * Neither the name of Google Inc. nor the names of its-// contributors may be used to endorse or promote products derived from-// this software without specific prior written permission.-//-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+ // Safari reports the character code in the keyCode field for keypress+ // events but also has a charCode field.+ } else if (goog.userAgent.WEBKIT &&+ e.type == goog.events.EventType.KEYPRESS) {+ keyCode = this.keyCode_;+ charCode = be.charCode >= 0 && be.charCode < 63232 &&+ goog.events.KeyCodes.isCharacterKey(keyCode) ?+ be.charCode : 0;-goog.provide('ol.pointer.NativeSource');+ // Opera reports the keycode or the character code in the keyCode field.+ } else if (goog.userAgent.OPERA) {+ keyCode = this.keyCode_;+ charCode = goog.events.KeyCodes.isCharacterKey(keyCode) ?+ be.keyCode : 0;-goog.require('goog.object');-goog.require('ol.pointer.EventSource');+ // Mozilla reports the character code in the charCode field.+ } else {+ keyCode = be.keyCode || this.keyCode_;+ charCode = be.charCode || 0;+ if (goog.events.KeyHandler.SAVE_ALT_FOR_KEYPRESS_) {+ altKey = this.altKey_;+ }+ // On the Mac, shift-/ triggers a question mark char code and no key code+ // (normalized to WIN_KEY), so we synthesize the latter.+ if (goog.userAgent.MAC &&+ charCode == goog.events.KeyCodes.QUESTION_MARK &&+ keyCode == goog.events.KeyCodes.WIN_KEY) {+ keyCode = goog.events.KeyCodes.SLASH;+ }+ }+ keyCode = goog.events.KeyCodes.normalizeKeyCode(keyCode);+ var key = keyCode;+ var keyIdentifier = be.keyIdentifier;+ // Correct the key value for certain browser-specific quirks.+ if (keyCode) {+ if (keyCode >= 63232 && keyCode in goog.events.KeyHandler.safariKey_) {+ // NOTE(nicksantos): Safari 3 has fixed this problem,+ // this is only needed for Safari 2.+ key = goog.events.KeyHandler.safariKey_[keyCode];+ } else {-/**- * @param {ol.pointer.PointerEventHandler} dispatcher- * @constructor- * @extends {ol.pointer.EventSource}- */-ol.pointer.NativeSource = function(dispatcher) {- var mapping = {- 'pointerdown': this.pointerDown,- 'pointermove': this.pointerMove,- 'pointerup': this.pointerUp,- 'pointerout': this.pointerOut,- 'pointerover': this.pointerOver,- 'pointercancel': this.pointerCancel,- 'gotpointercapture': this.gotPointerCapture,- 'lostpointercapture': this.lostPointerCapture- };- goog.base(this, dispatcher, mapping);-};-goog.inherits(ol.pointer.NativeSource, ol.pointer.EventSource);+ // Safari returns 25 for Shift+Tab instead of 9.+ if (keyCode == 25 && e.shiftKey) {+ key = 9;+ }+ }+ } else if (keyIdentifier &&+ keyIdentifier in goog.events.KeyHandler.keyIdentifier_) {+ // This is needed for Safari Windows because it currently doesn't give a+ // keyCode/which for non printable keys.+ key = goog.events.KeyHandler.keyIdentifier_[keyIdentifier];+ }+ // If we get the same keycode as a keydown/keypress without having seen a+ // keyup event, then this event was caused by key repeat.+ var repeat = key == this.lastKey_;+ this.lastKey_ = key;-/**- * Handler for `pointerdown`.- *- * @param {goog.events.BrowserEvent} inEvent- */-ol.pointer.NativeSource.prototype.pointerDown = function(inEvent) {- this.dispatcher.fireNativeEvent(inEvent);+ var event = new goog.events.KeyEvent(key, charCode, repeat, be);+ event.altKey = altKey;+ this.dispatchEvent(event);};/**- * Handler for `pointermove`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Returns the element listened on for the real keyboard events.+ * @return {Element|Document|null} The element listened on for the real+ * keyboard events.*/-ol.pointer.NativeSource.prototype.pointerMove = function(inEvent) {- this.dispatcher.fireNativeEvent(inEvent);+goog.events.KeyHandler.prototype.getElement = function() {+ return this.element_;};/**- * Handler for `pointerup`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Adds the proper key event listeners to the element.+ * @param {Element|Document} element The element to listen on.+ * @param {boolean=} opt_capture Whether to listen for browser events in+ * capture phase (defaults to false).*/-ol.pointer.NativeSource.prototype.pointerUp = function(inEvent) {- this.dispatcher.fireNativeEvent(inEvent);-};+goog.events.KeyHandler.prototype.attach = function(element, opt_capture) {+ if (this.keyUpKey_) {+ this.detach();+ }+ this.element_ = element;-/**- * Handler for `pointerout`.- *- * @param {goog.events.BrowserEvent} inEvent- */-ol.pointer.NativeSource.prototype.pointerOut = function(inEvent) {- this.dispatcher.fireNativeEvent(inEvent);-};+ this.keyPressKey_ = goog.events.listen(this.element_,+ goog.events.EventType.KEYPRESS,+ this,+ opt_capture);++ // Most browsers (Safari 2 being the notable exception) doesn't include the+ // keyCode in keypress events (IE has the char code in the keyCode field and+ // Mozilla only included the keyCode if there's no charCode). Thus we have to+ // listen for keydown to capture the keycode.+ this.keyDownKey_ = goog.events.listen(this.element_,+ goog.events.EventType.KEYDOWN,+ this.handleKeyDown_,+ opt_capture,+ this);-/**- * Handler for `pointerover`.- *- * @param {goog.events.BrowserEvent} inEvent- */-ol.pointer.NativeSource.prototype.pointerOver = function(inEvent) {- this.dispatcher.fireNativeEvent(inEvent);+ this.keyUpKey_ = goog.events.listen(this.element_,+ goog.events.EventType.KEYUP,+ this.handleKeyup_,+ opt_capture,+ this);};/**- * Handler for `pointercancel`.- *- * @param {goog.events.BrowserEvent} inEvent+ * Removes the listeners that may exist.*/-ol.pointer.NativeSource.prototype.pointerCancel = function(inEvent) {- this.dispatcher.fireNativeEvent(inEvent);+goog.events.KeyHandler.prototype.detach = function() {+ if (this.keyPressKey_) {+ goog.events.unlistenByKey(this.keyPressKey_);+ goog.events.unlistenByKey(this.keyDownKey_);+ goog.events.unlistenByKey(this.keyUpKey_);+ this.keyPressKey_ = null;+ this.keyDownKey_ = null;+ this.keyUpKey_ = null;+ }+ this.element_ = null;+ this.lastKey_ = -1;+ this.keyCode_ = -1;};-/**- * Handler for `lostpointercapture`.- *- * @param {goog.events.BrowserEvent} inEvent- */-ol.pointer.NativeSource.prototype.lostPointerCapture = function(inEvent) {- this.dispatcher.fireNativeEvent(inEvent);+/** @override */+goog.events.KeyHandler.prototype.disposeInternal = function() {+ goog.events.KeyHandler.superClass_.disposeInternal.call(this);+ this.detach();};+/**- * Handler for `gotpointercapture`.- *- * @param {goog.events.BrowserEvent} inEvent+ * This class is used for the goog.events.KeyHandler.EventType.KEY event and+ * it overrides the key code with the fixed key code.+ * @param {number} keyCode The adjusted key code.+ * @param {number} charCode The unicode character code.+ * @param {boolean} repeat Whether this event was generated by keyboard repeat.+ * @param {Event} browserEvent Browser event object.+ * @constructor+ * @extends {goog.events.BrowserEvent}+ * @final*/-ol.pointer.NativeSource.prototype.gotPointerCapture = function(inEvent) {- this.dispatcher.fireNativeEvent(inEvent);-};+goog.events.KeyEvent = function(keyCode, charCode, repeat, browserEvent) {+ goog.events.BrowserEvent.call(this, browserEvent);+ this.type = goog.events.KeyHandler.EventType.KEY;-// Based on https://github.com/Polymer/PointerEvents+ /**+ * Keycode of key press.+ * @type {number}+ */+ this.keyCode = keyCode;-// Copyright (c) 2013 The Polymer Authors. All rights reserved.+ /**+ * Unicode character code.+ * @type {number}+ */+ this.charCode = charCode;++ /**+ * True if this event was generated by keyboard auto-repeat (i.e., the user is+ * holding the key down.)+ * @type {boolean}+ */+ this.repeat = repeat;+};+goog.inherits(goog.events.KeyEvent, goog.events.BrowserEvent);++// Copyright 2006 The Closure Library Authors. All Rights Reserved.//-// Redistribution and use in source and binary forms, with or without-// modification, are permitted provided that the following conditions are-// met:+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at//-// * Redistributions of source code must retain the above copyright-// notice, this list of conditions and the following disclaimer.-// * Redistributions in binary form must reproduce the above-// copyright notice, this list of conditions and the following disclaimer-// in the documentation and/or other materials provided with the-// distribution.-// * Neither the name of Google Inc. nor the names of its-// contributors may be used to endorse or promote products derived from-// this software without specific prior written permission.+// http://www.apache.org/licenses/LICENSE-2.0//-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.-goog.provide('ol.pointer.TouchSource');+/**+ * @fileoverview This event wrapper will dispatch an event when the user uses+ * the mouse wheel to scroll an element. You can get the direction by checking+ * the deltaX and deltaY properties of the event.+ *+ * This class aims to smooth out inconsistencies between browser platforms with+ * regards to mousewheel events, but we do not cover every possible+ * software/hardware combination out there, some of which occasionally produce+ * very large deltas in mousewheel events. If your application wants to guard+ * against extremely large deltas, use the setMaxDeltaX and setMaxDeltaY APIs+ * to set maximum values that make sense for your application.+ *+ * @author [email protected] (Erik Arvidsson)+ * @see ../demos/mousewheelhandler.html+ */-goog.require('goog.array');-goog.require('goog.object');-goog.require('ol.pointer.EventSource');-goog.require('ol.pointer.MouseSource');+goog.provide('goog.events.MouseWheelEvent');+goog.provide('goog.events.MouseWheelHandler');+goog.provide('goog.events.MouseWheelHandler.EventType');++goog.require('goog.dom');+goog.require('goog.events');+goog.require('goog.events.BrowserEvent');+goog.require('goog.events.EventTarget');+goog.require('goog.math');+goog.require('goog.style');+goog.require('goog.userAgent');/**+ * This event handler allows you to catch mouse wheel events in a consistent+ * manner.+ * @param {Element|Document} element The element to listen to the mouse wheel+ * event on.+ * @param {boolean=} opt_capture Whether to handle the mouse wheel event in+ * capture phase.* @constructor- * @param {ol.pointer.PointerEventHandler} dispatcher- * @param {ol.pointer.MouseSource} mouseSource- * @extends {ol.pointer.EventSource}+ * @extends {goog.events.EventTarget}*/-ol.pointer.TouchSource = function(dispatcher, mouseSource) {- var mapping = {- 'touchstart': this.touchstart,- 'touchmove': this.touchmove,- 'touchend': this.touchend,- 'touchcancel': this.touchcancel- };- goog.base(this, dispatcher, mapping);+goog.events.MouseWheelHandler = function(element, opt_capture) {+ goog.events.EventTarget.call(this);/**- * @const- * @type {Object.<string, goog.events.BrowserEvent|Object>}+ * This is the element that we will listen to the real mouse wheel events on.+ * @type {Element|Document}+ * @private*/- this.pointerMap = dispatcher.pointerMap;+ this.element_ = element;- /**- * @const- * @type {ol.pointer.MouseSource}- */- this.mouseSource = mouseSource;+ var rtlElement = goog.dom.isElement(this.element_) ?+ /** @type {Element} */ (this.element_) :+ (this.element_ ? /** @type {Document} */ (this.element_).body : null);/**+ * True if the element exists and is RTL, false otherwise.+ * @type {boolean}* @private- * @type {number|undefined}*/- this.firstTouchId_ = undefined;+ this.isRtl_ = !!rtlElement && goog.style.isRightToLeft(rtlElement);- /**- * @private- * @type {number}- */- this.clickCount_ = 0;+ var type = goog.userAgent.GECKO ? 'DOMMouseScroll' : 'mousewheel';/**+ * The key returned from the goog.events.listen.+ * @type {goog.events.Key}* @private- * @type {number|undefined}*/- this.resetId_ = undefined;+ this.listenKey_ = goog.events.listen(this.element_, type, this, opt_capture);};-goog.inherits(ol.pointer.TouchSource, ol.pointer.EventSource);+goog.inherits(goog.events.MouseWheelHandler, goog.events.EventTarget);/**- * Mouse event timeout: This should be long enough to- * ignore compat mouse events made by touch.- * @const- * @type {number}+ * Enum type for the events fired by the mouse wheel handler.+ * @enum {string}*/-ol.pointer.TouchSource.DEDUP_TIMEOUT = 2500;+goog.events.MouseWheelHandler.EventType = {+ MOUSEWHEEL: 'mousewheel'+};/**- * @const- * @type {number}+ * Optional maximum magnitude for x delta on each mousewheel event.+ * @type {number|undefined}+ * @private*/-ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT = 200;+goog.events.MouseWheelHandler.prototype.maxDeltaX_;/**- * @const- * @type {string}+ * Optional maximum magnitude for y delta on each mousewheel event.+ * @type {number|undefined}+ * @private*/-ol.pointer.TouchSource.POINTER_TYPE = 'touch';+goog.events.MouseWheelHandler.prototype.maxDeltaY_;/**- * @private- * @param {Touch} inTouch- * @return {boolean} True, if this is the primary touch.+ * @param {number} maxDeltaX Maximum magnitude for x delta on each mousewheel+ * event. Should be non-negative.*/-ol.pointer.TouchSource.prototype.isPrimaryTouch_ = function(inTouch) {- return this.firstTouchId_ === inTouch.identifier;+goog.events.MouseWheelHandler.prototype.setMaxDeltaX = function(maxDeltaX) {+ this.maxDeltaX_ = maxDeltaX;};/**- * Set primary touch if there are no pointers, or the only pointer is the mouse.- * @param {Touch} inTouch- * @private+ * @param {number} maxDeltaY Maximum magnitude for y delta on each mousewheel+ * event. Should be non-negative.*/-ol.pointer.TouchSource.prototype.setPrimaryTouch_ = function(inTouch) {- var count = goog.object.getCount(this.pointerMap);- if (count === 0 || (count === 1 && goog.object.containsKey(this.pointerMap,- ol.pointer.MouseSource.POINTER_ID.toString()))) {- this.firstTouchId_ = inTouch.identifier;- this.cancelResetClickCount_();- }+goog.events.MouseWheelHandler.prototype.setMaxDeltaY = function(maxDeltaY) {+ this.maxDeltaY_ = maxDeltaY;};/**- * @private- * @param {Object} inPointer+ * Handles the events on the element.+ * @param {goog.events.BrowserEvent} e The underlying browser event.*/-ol.pointer.TouchSource.prototype.removePrimaryPointer_ = function(inPointer) {- if (inPointer.isPrimary) {- this.firstTouchId_ = undefined;- this.resetClickCount_();+goog.events.MouseWheelHandler.prototype.handleEvent = function(e) {+ var deltaX = 0;+ var deltaY = 0;+ var detail = 0;+ var be = e.getBrowserEvent();+ if (be.type == 'mousewheel') {+ var wheelDeltaScaleFactor = 1;+ if (goog.userAgent.IE ||+ goog.userAgent.WEBKIT &&+ (goog.userAgent.WINDOWS || goog.userAgent.isVersionOrHigher('532.0'))) {+ // In IE we get a multiple of 120; we adjust to a multiple of 3 to+ // represent number of lines scrolled (like Gecko).+ // Newer versions of Webkit match IE behavior, and WebKit on+ // Windows also matches IE behavior.+ // See bug https://bugs.webkit.org/show_bug.cgi?id=24368+ wheelDeltaScaleFactor = 40;+ }++ detail = goog.events.MouseWheelHandler.smartScale_(+ -be.wheelDelta, wheelDeltaScaleFactor);+ if (goog.isDef(be.wheelDeltaX)) {+ // Webkit has two properties to indicate directional scroll, and+ // can scroll both directions at once.+ deltaX = goog.events.MouseWheelHandler.smartScale_(+ -be.wheelDeltaX, wheelDeltaScaleFactor);+ deltaY = goog.events.MouseWheelHandler.smartScale_(+ -be.wheelDeltaY, wheelDeltaScaleFactor);+ } else {+ deltaY = detail;+ }++ // Historical note: Opera (pre 9.5) used to negate the detail value.+ } else { // Gecko+ // Gecko returns multiple of 3 (representing the number of lines scrolled)+ detail = be.detail;++ // Gecko sometimes returns really big values if the user changes settings to+ // scroll a whole page per scroll+ if (detail > 100) {+ detail = 3;+ } else if (detail < -100) {+ detail = -3;+ }++ // Firefox 3.1 adds an axis field to the event to indicate direction of+ // scroll. See https://developer.mozilla.org/en/Gecko-Specific_DOM_Events+ if (goog.isDef(be.axis) && be.axis === be.HORIZONTAL_AXIS) {+ deltaX = detail;+ } else {+ deltaY = detail;+ }}-};+ if (goog.isNumber(this.maxDeltaX_)) {+ deltaX = goog.math.clamp(deltaX, -this.maxDeltaX_, this.maxDeltaX_);+ }+ if (goog.isNumber(this.maxDeltaY_)) {+ deltaY = goog.math.clamp(deltaY, -this.maxDeltaY_, this.maxDeltaY_);+ }+ // Don't clamp 'detail', since it could be ambiguous which axis it refers to+ // and because it's informally deprecated anyways.-/**- * @private- */-ol.pointer.TouchSource.prototype.resetClickCount_ = function() {- this.resetId_ = goog.global.setTimeout(- goog.bind(this.resetClickCountHandler_, this),- ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT);+ // For horizontal scrolling we need to flip the value for RTL grids.+ if (this.isRtl_) {+ deltaX = -deltaX;+ }+ var newEvent = new goog.events.MouseWheelEvent(detail, be, deltaX, deltaY);+ this.dispatchEvent(newEvent);};/**+ * Helper for scaling down a mousewheel delta by a scale factor, if appropriate.+ * @param {number} mouseWheelDelta Delta from a mouse wheel event. Expected to+ * be an integer.+ * @param {number} scaleFactor Factor to scale the delta down by. Expected to+ * be an integer.+ * @return {number} Scaled-down delta value, or the original delta if the+ * scaleFactor does not appear to be applicable.* @private*/-ol.pointer.TouchSource.prototype.resetClickCountHandler_ = function() {- this.clickCount_ = 0;- this.resetId_ = undefined;+goog.events.MouseWheelHandler.smartScale_ = function(mouseWheelDelta,+ scaleFactor) {+ // The basic problem here is that in Webkit on Mac and Linux, we can get two+ // very different types of mousewheel events: from continuous devices+ // (touchpads, Mighty Mouse) or non-continuous devices (normal wheel mice).+ //+ // Non-continuous devices in Webkit get their wheel deltas scaled up to+ // behave like IE. Continuous devices return much smaller unscaled values+ // (which most of the time will not be cleanly divisible by the IE scale+ // factor), so we should not try to normalize them down.+ //+ // Detailed discussion:+ // https://bugs.webkit.org/show_bug.cgi?id=29601+ // http://trac.webkit.org/browser/trunk/WebKit/chromium/src/mac/WebInputEventFactory.mm#L1063+ if (goog.userAgent.WEBKIT &&+ (goog.userAgent.MAC || goog.userAgent.LINUX) &&+ (mouseWheelDelta % scaleFactor) != 0) {+ return mouseWheelDelta;+ } else {+ return mouseWheelDelta / scaleFactor;+ }};-/**- * @private- */-ol.pointer.TouchSource.prototype.cancelResetClickCount_ = function() {- if (goog.isDef(this.resetId_)) {- goog.global.clearTimeout(this.resetId_);- }+/** @override */+goog.events.MouseWheelHandler.prototype.disposeInternal = function() {+ goog.events.MouseWheelHandler.superClass_.disposeInternal.call(this);+ goog.events.unlistenByKey(this.listenKey_);+ this.listenKey_ = null;};+/**- * @private- * @param {goog.events.BrowserEvent} browserEvent Browser event- * @param {Touch} inTouch Touch event- * @return {Object}+ * A base class for mouse wheel events. This is used with the+ * MouseWheelHandler.+ *+ * @param {number} detail The number of rows the user scrolled.+ * @param {Event} browserEvent Browser event object.+ * @param {number} deltaX The number of rows the user scrolled in the X+ * direction.+ * @param {number} deltaY The number of rows the user scrolled in the Y+ * direction.+ * @constructor+ * @extends {goog.events.BrowserEvent}+ * @final*/-ol.pointer.TouchSource.prototype.touchToPointer_ =- function(browserEvent, inTouch) {- var e = this.dispatcher.cloneEvent(browserEvent, inTouch);- // Spec specifies that pointerId 1 is reserved for Mouse.- // Touch identifiers can start at 0.- // Add 2 to the touch identifier for compatibility.- e.pointerId = inTouch.identifier + 2;- // TODO: check if this is necessary?- //e.target = findTarget(e);- e.bubbles = true;- e.cancelable = true;- e.detail = this.clickCount_;- e.button = 0;- e.buttons = 1;- e.width = inTouch.webkitRadiusX || inTouch.radiusX || 0;- e.height = inTouch.webkitRadiusY || inTouch.radiusY || 0;- e.pressure = inTouch.webkitForce || inTouch.force || 0.5;- e.isPrimary = this.isPrimaryTouch_(inTouch);- e.pointerType = ol.pointer.TouchSource.POINTER_TYPE;+goog.events.MouseWheelEvent = function(detail, browserEvent, deltaX, deltaY) {+ goog.events.BrowserEvent.call(this, browserEvent);- // make sure that the properties that are different for- // each `Touch` object are not copied from the BrowserEvent object- e.clientX = inTouch.clientX;- e.clientY = inTouch.clientY;- e.screenX = inTouch.screenX;- e.screenY = inTouch.screenY;+ this.type = goog.events.MouseWheelHandler.EventType.MOUSEWHEEL;- return e;-};+ /**+ * The number of lines the user scrolled+ * @type {number}+ * NOTE: Informally deprecated. Use deltaX and deltaY instead, they provide+ * more information.+ */+ this.detail = detail;+ /**+ * The number of "lines" scrolled in the X direction.+ *+ * Note that not all browsers provide enough information to distinguish+ * horizontal and vertical scroll events, so for these unsupported browsers,+ * we will always have a deltaX of 0, even if the user scrolled their mouse+ * wheel or trackpad sideways.+ *+ * Currently supported browsers are Webkit and Firefox 3.1 or later.+ *+ * @type {number}+ */+ this.deltaX = deltaX;-/**- * @private- * @param {goog.events.BrowserEvent} inEvent Touch event- * @param {function(goog.events.BrowserEvent, Object)} inFunction- */-ol.pointer.TouchSource.prototype.processTouches_ =- function(inEvent, inFunction) {- var touches = Array.prototype.slice.call(- inEvent.getBrowserEvent().changedTouches);- var count = touches.length;- function preventDefault() {- inEvent.preventDefault();- }- var i, pointer;- for (i = 0; i < count; ++i) {- pointer = this.touchToPointer_(inEvent, touches[i]);- // forward touch preventDefaults- pointer.preventDefault = preventDefault;- inFunction.call(this, inEvent, pointer);- }+ /**+ * The number of lines scrolled in the Y direction.+ * @type {number}+ */+ this.deltaY = deltaY;};+goog.inherits(goog.events.MouseWheelEvent, goog.events.BrowserEvent);+// Copyright 2013 The Closure Library Authors. All Rights Reserved.+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS-IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License./**- * @private- * @param {TouchList} touchList- * @param {number} searchId- * @return {boolean} True, if the `Touch` with the given id is in the list.+ * @fileoverview Basic strippable logging definitions.+ * @see http://go/closurelogging+ *+ * @author [email protected] (John Lenz)*/-ol.pointer.TouchSource.prototype.findTouch_ = function(touchList, searchId) {- var l = touchList.length;- var touch;- for (var i = 0; i < l; i++) {- touch = touchList[i];- if (touch.identifier === searchId) {- return true;- }- }- return false;-};++goog.provide('goog.log');+goog.provide('goog.log.Level');+goog.provide('goog.log.LogRecord');+goog.provide('goog.log.Logger');++goog.require('goog.debug');+goog.require('goog.debug.LogManager');+goog.require('goog.debug.LogRecord');+goog.require('goog.debug.Logger');+++/** @define {boolean} Whether logging is enabled. */+goog.define('goog.log.ENABLED', goog.debug.LOGGING_ENABLED);+++/** @const */+goog.log.ROOT_LOGGER_NAME = goog.debug.Logger.ROOT_LOGGER_NAME;+/**- * In some instances, a touchstart can happen without a touchend. This- * leaves the pointermap in a broken state.- * Therefore, on every touchstart, we remove the touches that did not fire a- * touchend event.- * To keep state globally consistent, we fire a pointercancel for- * this "abandoned" touch- *- * @private- * @param {goog.events.BrowserEvent} inEvent+ * @constructor+ * @final*/-ol.pointer.TouchSource.prototype.vacuumTouches_ = function(inEvent) {- var touchList = inEvent.getBrowserEvent().touches;- // pointerMap.getCount() should be < touchList.length here,- // as the touchstart has not been processed yet.- var keys = goog.object.getKeys(this.pointerMap);- var count = keys.length;- if (count >= touchList.length) {- var d = [];- var i, key, value;- for (i = 0; i < count; ++i) {- key = keys[i];- value = this.pointerMap[key];- // Never remove pointerId == 1, which is mouse.- // Touch identifiers are 2 smaller than their pointerId, which is the- // index in pointermap.- if (key != ol.pointer.MouseSource.POINTER_ID &&- !this.findTouch_(touchList, key - 2)) {- d.push(value.out);- }- }- for (i = 0; i < d.length; ++i) {- this.cancelOut_(inEvent, d[i]);- }- }-};+goog.log.Logger = goog.debug.Logger;+/**- * Handler for `touchstart`, triggers `pointerover`,- * `pointerenter` and `pointerdown` events.- *- * @param {goog.events.BrowserEvent} inEvent+ * @constructor+ * @final*/-ol.pointer.TouchSource.prototype.touchstart = function(inEvent) {- this.vacuumTouches_(inEvent);- this.setPrimaryTouch_(inEvent.getBrowserEvent().changedTouches[0]);- this.dedupSynthMouse_(inEvent);- this.clickCount_++;- this.processTouches_(inEvent, this.overDown_);-};+goog.log.Level = goog.debug.Logger.Level;+/**- * @private- * @param {goog.events.BrowserEvent} browserEvent- * @param {Object} inPointer+ * @constructor+ * @final*/-ol.pointer.TouchSource.prototype.overDown_ = function(browserEvent, inPointer) {- this.pointerMap[inPointer.pointerId] = {- target: inPointer.target,- out: inPointer,- outTarget: inPointer.target- };- this.dispatcher.over(inPointer, browserEvent);- this.dispatcher.enter(inPointer, browserEvent);- this.dispatcher.down(inPointer, browserEvent);-};+goog.log.LogRecord = goog.debug.LogRecord;/**- * Handler for `touchmove`.+ * Finds or creates a logger for a named subsystem. If a logger has already been+ * created with the given name it is returned. Otherwise a new logger is+ * created. If a new logger is created its log level will be configured based+ * on the goog.debug.LogManager configuration and it will configured to also+ * send logging output to its parent's handlers.+ * @see goog.debug.LogManager*- * @param {goog.events.BrowserEvent} inEvent+ * @param {string} name A name for the logger. This should be a dot-separated+ * name and should normally be based on the package name or class name of+ * the subsystem, such as goog.net.BrowserChannel.+ * @param {goog.log.Level=} opt_level If provided, override the+ * default logging level with the provided level.+ * @return {goog.log.Logger} The named logger or null if logging is disabled.*/-ol.pointer.TouchSource.prototype.touchmove = function(inEvent) {- inEvent.preventDefault();- this.processTouches_(inEvent, this.moveOverOut_);+goog.log.getLogger = function(name, opt_level) {+ if (goog.log.ENABLED) {+ var logger = goog.debug.LogManager.getLogger(name);+ if (opt_level && logger) {+ logger.setLevel(opt_level);+ }+ return logger;+ } else {+ return null;+ }};+// TODO(johnlenz): try to tighten the types to these functions./**- * @private- * @param {goog.events.BrowserEvent} browserEvent- * @param {Object} inPointer+ * Adds a handler to the logger. This doesn't use the event system because+ * we want to be able to add logging to the event system.+ * @param {goog.log.Logger} logger+ * @param {Function} handler Handler function to add.*/-ol.pointer.TouchSource.prototype.moveOverOut_ =- function(browserEvent, inPointer) {- var event = inPointer;- var pointer = this.pointerMap[event.pointerId];- // a finger drifted off the screen, ignore it- if (!pointer) {- return;- }- var outEvent = pointer.out;- var outTarget = pointer.outTarget;- this.dispatcher.move(event, browserEvent);- if (outEvent && outTarget !== event.target) {- outEvent.relatedTarget = event.target;- event.relatedTarget = outTarget;- // recover from retargeting by shadow- outEvent.target = outTarget;- if (event.target) {- this.dispatcher.leaveOut(outEvent, browserEvent);- this.dispatcher.enterOver(event, browserEvent);- } else {- // clean up case when finger leaves the screen- event.target = outTarget;- event.relatedTarget = null;- this.cancelOut_(browserEvent, event);- }+goog.log.addHandler = function(logger, handler) {+ if (goog.log.ENABLED && logger) {+ logger.addHandler(handler);}- pointer.out = event;- pointer.outTarget = event.target;};/**- * Handler for `touchend`, triggers `pointerup`,- * `pointerout` and `pointerleave` events.- *- * @param {goog.events.BrowserEvent} inEvent+ * Removes a handler from the logger. This doesn't use the event system because+ * we want to be able to add logging to the event system.+ * @param {goog.log.Logger} logger+ * @param {Function} handler Handler function to remove.+ * @return {boolean} Whether the handler was removed.*/-ol.pointer.TouchSource.prototype.touchend = function(inEvent) {- this.dedupSynthMouse_(inEvent);- this.processTouches_(inEvent, this.upOut_);+goog.log.removeHandler = function(logger, handler) {+ if (goog.log.ENABLED && logger) {+ return logger.removeHandler(handler);+ } else {+ return false;+ }};/**- * @private- * @param {goog.events.BrowserEvent} browserEvent- * @param {Object} inPointer+ * Logs a message. If the logger is currently enabled for the+ * given message level then the given message is forwarded to all the+ * registered output Handler objects.+ * @param {goog.log.Logger} logger+ * @param {goog.log.Level} level One of the level identifiers.+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error|Object=} opt_exception An exception associated with the+ * message.*/-ol.pointer.TouchSource.prototype.upOut_ = function(browserEvent, inPointer) {- this.dispatcher.up(inPointer, browserEvent);- this.dispatcher.out(inPointer, browserEvent);- this.dispatcher.leave(inPointer, browserEvent);- this.cleanUpPointer_(inPointer);+goog.log.log = function(logger, level, msg, opt_exception) {+ if (goog.log.ENABLED && logger) {+ logger.log(level, msg, opt_exception);+ }};/**- * Handler for `touchcancel`, triggers `pointercancel`,- * `pointerout` and `pointerleave` events.- *- * @param {goog.events.BrowserEvent} inEvent+ * Logs a message at the Level.SEVERE level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.log.Logger} logger+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-ol.pointer.TouchSource.prototype.touchcancel = function(inEvent) {- this.processTouches_(inEvent, this.cancelOut_);+goog.log.error = function(logger, msg, opt_exception) {+ if (goog.log.ENABLED && logger) {+ logger.severe(msg, opt_exception);+ }};/**- * @private- * @param {goog.events.BrowserEvent} browserEvent- * @param {Object} inPointer+ * Logs a message at the Level.WARNING level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.log.Logger} logger+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-ol.pointer.TouchSource.prototype.cancelOut_ =- function(browserEvent, inPointer) {- this.dispatcher.cancel(inPointer, browserEvent);- this.dispatcher.out(inPointer, browserEvent);- this.dispatcher.leave(inPointer, browserEvent);- this.cleanUpPointer_(inPointer);+goog.log.warning = function(logger, msg, opt_exception) {+ if (goog.log.ENABLED && logger) {+ logger.warning(msg, opt_exception);+ }};/**- * @private- * @param {Object} inPointer+ * Logs a message at the Level.INFO level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.log.Logger} logger+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-ol.pointer.TouchSource.prototype.cleanUpPointer_ = function(inPointer) {- goog.object.remove(this.pointerMap, inPointer.pointerId);- this.removePrimaryPointer_(inPointer);+goog.log.info = function(logger, msg, opt_exception) {+ if (goog.log.ENABLED && logger) {+ logger.info(msg, opt_exception);+ }};/**- * Prevent synth mouse events from creating pointer events.- *- * @private- * @param {goog.events.BrowserEvent} inEvent+ * Logs a message at the Level.Fine level.+ * If the logger is currently enabled for the given message level then the+ * given message is forwarded to all the registered output Handler objects.+ * @param {goog.log.Logger} logger+ * @param {goog.debug.Loggable} msg The message to log.+ * @param {Error=} opt_exception An exception associated with the message.*/-ol.pointer.TouchSource.prototype.dedupSynthMouse_ = function(inEvent) {- var lts = this.mouseSource.lastTouches;- var t = inEvent.getBrowserEvent().changedTouches[0];- // only the primary finger will synth mouse events- if (this.isPrimaryTouch_(t)) {- // remember x/y of last touch- var lt = /** @type {ol.Pixel} */ ([t.clientX, t.clientY]);- lts.push(lt);-- goog.global.setTimeout(function() {- // remove touch after timeout- goog.array.remove(lts, lt);- }, ol.pointer.TouchSource.DEDUP_TIMEOUT);+goog.log.fine = function(logger, msg, opt_exception) {+ if (goog.log.ENABLED && logger) {+ logger.fine(msg, opt_exception);}};@@ -44163,3065 +44373,3079 @@ ol.pointer.TouchSource.prototype.dedupSynthMouse_ = function(inEvent) {// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.-goog.provide('ol.pointer.PointerEventHandler');+goog.provide('ol.pointer.PointerEvent');+-goog.require('goog.array');goog.require('goog.events');-goog.require('goog.events.BrowserEvent');goog.require('goog.events.Event');-goog.require('goog.events.EventTarget');--goog.require('ol.has');-goog.require('ol.pointer.MouseSource');-goog.require('ol.pointer.MsSource');-goog.require('ol.pointer.NativeSource');-goog.require('ol.pointer.PointerEvent');-goog.require('ol.pointer.TouchSource');+goog.require('goog.object');/**+ * A class for pointer events.+ *+ * This class is used as an abstraction for mouse events,+ * touch events and even native pointer events.+ ** @constructor- * @extends {goog.events.EventTarget}- * @param {Element|HTMLDocument} element Viewport element.+ * @extends {goog.events.Event}+ * @param {string} type The type of the event to create.+ * @param {goog.events.BrowserEvent} browserEvent+ * @param {Object.<string, ?>=} opt_eventDict An optional dictionary of+ * initial event properties.*/-ol.pointer.PointerEventHandler = function(element) {- goog.base(this);+ol.pointer.PointerEvent = function(type, browserEvent, opt_eventDict) {+ goog.base(this, type);/*** @const- * @private- * @type {Element|HTMLDocument}+ * @type {goog.events.BrowserEvent}*/- this.element_ = element;+ this.browserEvent = browserEvent;++ var eventDict = goog.isDef(opt_eventDict) ? opt_eventDict : {};/**- * @const- * @type {Object.<string, goog.events.BrowserEvent|Object>}+ * @type {number}*/- this.pointerMap = {};+ this.buttons = this.getButtons_(eventDict);/**- * @type {Object.<string, function(goog.events.BrowserEvent)>}- * @private+ * @type {number}*/- this.eventMap_ = {};+ this.pressure = this.getPressure_(eventDict, this.buttons);++ // MouseEvent related properties/**- * @type {Array.<ol.pointer.EventSource>}- * @private+ * @type {boolean}*/- this.eventSourceList_ = [];+ this.bubbles = goog.object.get(eventDict, 'bubbles', false);- this.registerSources();-};-goog.inherits(ol.pointer.PointerEventHandler, goog.events.EventTarget);+ /**+ * @type {boolean}+ */+ this.cancelable = goog.object.get(eventDict, 'cancelable', false);+ /**+ * @type {Object}+ */+ this.view = goog.object.get(eventDict, 'view', null);-/**- * Set up the event sources (mouse, touch and native pointers)- * that generate pointer events.- */-ol.pointer.PointerEventHandler.prototype.registerSources = function() {- if (ol.has.POINTER) {- this.registerSource('native', new ol.pointer.NativeSource(this));- } else if (ol.has.MSPOINTER) {- this.registerSource('ms', new ol.pointer.MsSource(this));- } else {- var mouseSource = new ol.pointer.MouseSource(this);- this.registerSource('mouse', mouseSource);+ /**+ * @type {number}+ */+ this.detail = goog.object.get(eventDict, 'detail', null);- if (ol.has.TOUCH) {- this.registerSource('touch',- new ol.pointer.TouchSource(this, mouseSource));- }- }+ /**+ * @type {number}+ */+ this.screenX = goog.object.get(eventDict, 'screenX', 0);- // register events on the viewport element- this.register_();-};+ /**+ * @type {number}+ */+ this.screenY = goog.object.get(eventDict, 'screenY', 0);+ /**+ * @type {number}+ */+ this.clientX = goog.object.get(eventDict, 'clientX', 0);-/**- * Add a new event source that will generate pointer events.- *- * @param {string} name A name for the event source- * @param {ol.pointer.EventSource} source- */-ol.pointer.PointerEventHandler.prototype.registerSource =- function(name, source) {- var s = source;- var newEvents = s.getEvents();+ /**+ * @type {number}+ */+ this.clientY = goog.object.get(eventDict, 'clientY', 0);- if (newEvents) {- goog.array.forEach(newEvents, function(e) {- var handler = s.getHandlerForEvent(e);+ /**+ * @type {boolean}+ */+ this.ctrlKey = goog.object.get(eventDict, 'ctrlKey', false);- if (handler) {- this.eventMap_[e] = goog.bind(handler, s);- }- }, this);- this.eventSourceList_.push(s);- }-};+ /**+ * @type {boolean}+ */+ this.altKey = goog.object.get(eventDict, 'altKey', false);+ /**+ * @type {boolean}+ */+ this.shiftKey = goog.object.get(eventDict, 'shiftKey', false);-/**- * Set up the events for all registered event sources.- * @private- */-ol.pointer.PointerEventHandler.prototype.register_ = function() {- var l = this.eventSourceList_.length;- var eventSource;- for (var i = 0; i < l; i++) {- eventSource = this.eventSourceList_[i];- this.addEvents_(eventSource.getEvents());- }-};+ /**+ * @type {boolean}+ */+ this.metaKey = goog.object.get(eventDict, 'metaKey', false);+ /**+ * @type {number}+ */+ this.button = goog.object.get(eventDict, 'button', 0);-/**- * Remove all registered events.- * @private- */-ol.pointer.PointerEventHandler.prototype.unregister_ = function() {- var l = this.eventSourceList_.length;- var eventSource;- for (var i = 0; i < l; i++) {- eventSource = this.eventSourceList_[i];- this.removeEvents_(eventSource.getEvents());+ /**+ * @type {Node}+ */+ this.relatedTarget = goog.object.get(eventDict, 'relatedTarget', null);++ // PointerEvent related properties++ /**+ * @const+ * @type {number}+ */+ this.pointerId = goog.object.get(eventDict, 'pointerId', 0);++ /**+ * @type {number}+ */+ this.width = goog.object.get(eventDict, 'width', 0);++ /**+ * @type {number}+ */+ this.height = goog.object.get(eventDict, 'height', 0);++ /**+ * @type {number}+ */+ this.tiltX = goog.object.get(eventDict, 'tiltX', 0);++ /**+ * @type {number}+ */+ this.tiltY = goog.object.get(eventDict, 'tiltY', 0);++ /**+ * @type {string}+ */+ this.pointerType = goog.object.get(eventDict, 'pointerType', '');++ /**+ * @type {number}+ */+ this.hwTimestamp = goog.object.get(eventDict, 'hwTimestamp', 0);++ /**+ * @type {boolean}+ */+ this.isPrimary = goog.object.get(eventDict, 'isPrimary', false);++ // keep the semantics of preventDefault+ if (browserEvent.preventDefault) {+ this.preventDefault = function() {+ browserEvent.preventDefault();+ };}};+goog.inherits(ol.pointer.PointerEvent, goog.events.Event);/**- * Calls the right handler for a new event.* @private- * @param {goog.events.BrowserEvent} inEvent Browser event.+ * @param {Object.<string, ?>} eventDict+ * @return {number}*/-ol.pointer.PointerEventHandler.prototype.eventHandler_ = function(inEvent) {- var type = inEvent.type;- var handler = this.eventMap_[type];- if (handler) {- handler(inEvent);+ol.pointer.PointerEvent.prototype.getButtons_ = function(eventDict) {+ // According to the w3c spec,+ // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-button+ // MouseEvent.button == 0 can mean either no mouse button depressed, or the+ // left mouse button depressed.+ //+ // As of now, the only way to distinguish between the two states of+ // MouseEvent.button is by using the deprecated MouseEvent.which property, as+ // this maps mouse buttons to positive integers > 0, and uses 0 to mean that+ // no mouse button is held.+ //+ // MouseEvent.which is derived from MouseEvent.button at MouseEvent creation,+ // but initMouseEvent does not expose an argument with which to set+ // MouseEvent.which. Calling initMouseEvent with a buttonArg of 0 will set+ // MouseEvent.button == 0 and MouseEvent.which == 1, breaking the expectations+ // of app developers.+ //+ // The only way to propagate the correct state of MouseEvent.which and+ // MouseEvent.button to a new MouseEvent.button == 0 and MouseEvent.which == 0+ // is to call initMouseEvent with a buttonArg value of -1.+ //+ // This is fixed with DOM Level 4's use of buttons+ var buttons;+ if (eventDict.buttons || ol.pointer.PointerEvent.HAS_BUTTONS) {+ buttons = eventDict.buttons;+ } else {+ switch (eventDict.which) {+ case 1: buttons = 1; break;+ case 2: buttons = 4; break;+ case 3: buttons = 2; break;+ default: buttons = 0;+ }}+ return buttons;};/**- * Setup listeners for the given events.* @private- * @param {Array.<string>} events List of events.- */-ol.pointer.PointerEventHandler.prototype.addEvents_ = function(events) {- goog.array.forEach(events, function(eventName) {- goog.events.listen(this.element_, eventName,- this.eventHandler_, false, this);- }, this);+ * @param {Object.<string, ?>} eventDict+ * @param {number} buttons+ * @return {number}+ */+ol.pointer.PointerEvent.prototype.getPressure_ = function(eventDict, buttons) {+ // Spec requires that pointers without pressure specified use 0.5 for down+ // state and 0 for up state.+ var pressure = 0;+ if (eventDict.pressure) {+ pressure = eventDict.pressure;+ } else {+ pressure = buttons ? 0.5 : 0;+ }+ return pressure;};/**- * Unregister listeners for the given events.- * @private- * @param {Array.<string>} events List of events.+ * Is the `buttons` property supported?+ * @type {boolean}*/-ol.pointer.PointerEventHandler.prototype.removeEvents_ = function(events) {- goog.array.forEach(events, function(e) {- goog.events.unlisten(this.element_, e,- this.eventHandler_, false, this);- }, this);-};+ol.pointer.PointerEvent.HAS_BUTTONS = false;/**- * Returns a snapshot of inEvent, with writable properties.- *- * @param {goog.events.BrowserEvent} browserEvent Browser event.- * @param {Event|Touch} inEvent An event that contains- * properties to copy.- * @return {Object} An object containing shallow copies of- * `inEvent`'s properties.+ * Checks if the `buttons` property is supported.*/-ol.pointer.PointerEventHandler.prototype.cloneEvent =- function(browserEvent, inEvent) {- var eventCopy = {}, p;- for (var i = 0, ii = ol.pointer.CLONE_PROPS.length; i < ii; i++) {- p = ol.pointer.CLONE_PROPS[i][0];- eventCopy[p] =- browserEvent[p] ||- inEvent[p] ||- ol.pointer.CLONE_PROPS[i][1];+(function() {+ try {+ var ev = new MouseEvent('click', {buttons: 1});+ ol.pointer.PointerEvent.HAS_BUTTONS = ev.buttons === 1;+ } catch (e) {}+})();- return eventCopy;-};+goog.provide('ol.pointer.EventSource');+goog.require('goog.events.BrowserEvent');+goog.require('goog.object');-// EVENTS/**- * Triggers a 'pointerdown' event.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent+ * @param {ol.pointer.PointerEventHandler} dispatcher+ * @param {Object.<string, function(goog.events.BrowserEvent)>} mapping+ * @constructor*/-ol.pointer.PointerEventHandler.prototype.down =- function(pointerEventData, browserEvent) {- this.fireEvent(ol.pointer.EventType.POINTERDOWN,- pointerEventData, browserEvent);-};-+ol.pointer.EventSource = function(dispatcher, mapping) {+ /**+ * @type {ol.pointer.PointerEventHandler}+ */+ this.dispatcher = dispatcher;-/**- * Triggers a 'pointermove' event.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent- */-ol.pointer.PointerEventHandler.prototype.move =- function(pointerEventData, browserEvent) {- this.fireEvent(ol.pointer.EventType.POINTERMOVE,- pointerEventData, browserEvent);+ /**+ * @private+ * @const+ * @type {Object.<string, function(goog.events.BrowserEvent)>}+ */+ this.mapping_ = mapping;};/**- * Triggers a 'pointerup' event.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent+ * List of events supported by this source.+ * @return {Array.<string>} Event names*/-ol.pointer.PointerEventHandler.prototype.up =- function(pointerEventData, browserEvent) {- this.fireEvent(ol.pointer.EventType.POINTERUP,- pointerEventData, browserEvent);+ol.pointer.EventSource.prototype.getEvents = function() {+ return goog.object.getKeys(this.mapping_);};/**- * Triggers a 'pointerenter' event.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent+ * Returns a mapping between the supported event types and+ * the handlers that should handle an event.+ * @return {Object.<string, function(goog.events.BrowserEvent)>}+ * Event/Handler mapping*/-ol.pointer.PointerEventHandler.prototype.enter =- function(pointerEventData, browserEvent) {- pointerEventData.bubbles = false;- this.fireEvent(ol.pointer.EventType.POINTERENTER,- pointerEventData, browserEvent);+ol.pointer.EventSource.prototype.getMapping = function() {+ return this.mapping_;};/**- * Triggers a 'pointerleave' event.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent+ * Returns the handler that should handle a given event type.+ * @param {string} eventType+ * @return {function(goog.events.BrowserEvent)} Handler*/-ol.pointer.PointerEventHandler.prototype.leave =- function(pointerEventData, browserEvent) {- pointerEventData.bubbles = false;- this.fireEvent(ol.pointer.EventType.POINTERLEAVE,- pointerEventData, browserEvent);+ol.pointer.EventSource.prototype.getHandlerForEvent = function(eventType) {+ return this.mapping_[eventType];};+// Based on https://github.com/Polymer/PointerEvents-/**- * Triggers a 'pointerover' event.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent- */-ol.pointer.PointerEventHandler.prototype.over =- function(pointerEventData, browserEvent) {- pointerEventData.bubbles = true;- this.fireEvent(ol.pointer.EventType.POINTEROVER,- pointerEventData, browserEvent);-};+// Copyright (c) 2013 The Polymer Authors. All rights reserved.+//+// Redistribution and use in source and binary forms, with or without+// modification, are permitted provided that the following conditions are+// met:+//+// * Redistributions of source code must retain the above copyright+// notice, this list of conditions and the following disclaimer.+// * Redistributions in binary form must reproduce the above+// copyright notice, this list of conditions and the following disclaimer+// in the documentation and/or other materials provided with the+// distribution.+// * Neither the name of Google Inc. nor the names of its+// contributors may be used to endorse or promote products derived from+// this software without specific prior written permission.+//+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+goog.provide('ol.pointer.MouseSource');++goog.require('goog.object');+goog.require('ol.pointer.EventSource');-/**- * Triggers a 'pointerout' event.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent- */-ol.pointer.PointerEventHandler.prototype.out =- function(pointerEventData, browserEvent) {- pointerEventData.bubbles = true;- this.fireEvent(ol.pointer.EventType.POINTEROUT,- pointerEventData, browserEvent);-};/**- * Triggers a 'pointercancel' event.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent+ * @param {ol.pointer.PointerEventHandler} dispatcher+ * @constructor+ * @extends {ol.pointer.EventSource}*/-ol.pointer.PointerEventHandler.prototype.cancel =- function(pointerEventData, browserEvent) {- this.fireEvent(ol.pointer.EventType.POINTERCANCEL,- pointerEventData, browserEvent);-};+ol.pointer.MouseSource = function(dispatcher) {+ var mapping = {+ 'mousedown': this.mousedown,+ 'mousemove': this.mousemove,+ 'mouseup': this.mouseup,+ 'mouseover': this.mouseover,+ 'mouseout': this.mouseout+ };+ goog.base(this, dispatcher, mapping);+ /**+ * @const+ * @type {Object.<string, goog.events.BrowserEvent|Object>}+ */+ this.pointerMap = dispatcher.pointerMap;-/**- * Triggers a combination of 'pointerout' and 'pointerleave' events.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent- */-ol.pointer.PointerEventHandler.prototype.leaveOut =- function(pointerEventData, browserEvent) {- this.out(pointerEventData, browserEvent);- if (!this.contains_(- pointerEventData.target,- pointerEventData.relatedTarget)) {- this.leave(pointerEventData, browserEvent);- }+ /**+ * @const+ * @type {Array.<ol.Pixel>}+ */+ this.lastTouches = [];};+goog.inherits(ol.pointer.MouseSource, ol.pointer.EventSource);/**- * Triggers a combination of 'pointerover' and 'pointerevents' events.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent+ * @const+ * @type {number}*/-ol.pointer.PointerEventHandler.prototype.enterOver =- function(pointerEventData, browserEvent) {- this.over(pointerEventData, browserEvent);- if (!this.contains_(- pointerEventData.target,- pointerEventData.relatedTarget)) {- this.enter(pointerEventData, browserEvent);- }-};+ol.pointer.MouseSource.POINTER_ID = 1;/**- * @private- * @param {Element} container- * @param {Element} contained- * @return {boolean} Returns true if the container element- * contains the other element.+ * @const+ * @type {string}*/-ol.pointer.PointerEventHandler.prototype.contains_ =- function(container, contained) {- return container.contains(contained);-};+ol.pointer.MouseSource.POINTER_TYPE = 'mouse';-// EVENT CREATION AND TRACKING/**- * Creates a new Event of type `inType`, based on the information in- * `pointerEventData`.+ * Radius around touchend that swallows mouse events.*- * @param {string} inType A string representing the type of event to create.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent- * @return {ol.pointer.PointerEvent} A PointerEvent of type `inType`.+ * @const+ * @type {number}*/-ol.pointer.PointerEventHandler.prototype.makeEvent =- function(inType, pointerEventData, browserEvent) {- return new ol.pointer.PointerEvent(inType, browserEvent, pointerEventData);-};+ol.pointer.MouseSource.DEDUP_DIST = 25;/**- * Make and dispatch an event in one call.- * @param {string} inType A string representing the type of event.- * @param {Object} pointerEventData- * @param {goog.events.BrowserEvent } browserEvent+ * Detect if a mouse event was simulated from a touch by+ * checking if previously there was a touch event at the+ * same position.+ *+ * FIXME - Known problem with the native Android browser on+ * Samsung GT-I9100 (Android 4.1.2):+ * In case the page is scrolled, this function does not work+ * correctly when a canvas is used (WebGL or canvas renderer).+ * Mouse listeners on canvas elements (for this browser), create+ * two mouse events: One 'good' and one 'bad' one (on other browsers or+ * when a div is used, there is only one event). For the 'bad' one,+ * clientX/clientY and also pageX/pageY are wrong when the page+ * is scrolled. Because of that, this function can not detect if+ * the events were simulated from a touch event. As result, a+ * pointer event at a wrong position is dispatched, which confuses+ * the map interactions.+ * It is unclear, how one can get the correct position for the event+ * or detect that the positions are invalid.+ *+ * @private+ * @param {goog.events.BrowserEvent} inEvent+ * @return {boolean} True, if the event was generated by a touch.*/-ol.pointer.PointerEventHandler.prototype.fireEvent =- function(inType, pointerEventData, browserEvent) {- var e = this.makeEvent(inType, pointerEventData, browserEvent);- this.dispatchEvent(e);+ol.pointer.MouseSource.prototype.isEventSimulatedFromTouch_ =+ function(inEvent) {+ var lts = this.lastTouches;+ var x = inEvent.clientX, y = inEvent.clientY;+ for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {+ // simulated mouse events will be swallowed near a primary touchend+ var dx = Math.abs(x - t[0]), dy = Math.abs(y - t[1]);+ if (dx <= ol.pointer.MouseSource.DEDUP_DIST &&+ dy <= ol.pointer.MouseSource.DEDUP_DIST) {+ return true;+ }+ }+ return false;};/**- * Creates a pointer event from a native pointer event- * and dispatches this event.- * @param {goog.events.BrowserEvent} nativeEvent A platform event with a target.+ * Creates a copy of the original event that will be used+ * for the fake pointer event.+ *+ * @param {goog.events.BrowserEvent} inEvent+ * @param {ol.pointer.PointerEventHandler} dispatcher+ * @return {Object}*/-ol.pointer.PointerEventHandler.prototype.fireNativeEvent =- function(nativeEvent) {- var e = this.makeEvent(nativeEvent.type, nativeEvent.getBrowserEvent(),- nativeEvent);- this.dispatchEvent(e);-};+ol.pointer.MouseSource.prepareEvent = function(inEvent, dispatcher) {+ var e = dispatcher.cloneEvent(inEvent, inEvent.getBrowserEvent());+ // forward mouse preventDefault+ var pd = e.preventDefault;+ e.preventDefault = function() {+ inEvent.preventDefault();+ pd();+ };-/**- * Wrap a native mouse event into a pointer event.- * This proxy method is required for the legacy IE support.- * @param {string} eventType The pointer event type.- * @param {goog.events.BrowserEvent} browserEvent- * @return {ol.pointer.PointerEvent}- */-ol.pointer.PointerEventHandler.prototype.wrapMouseEvent =- function(eventType, browserEvent) {- var pointerEvent = this.makeEvent(- eventType,- ol.pointer.MouseSource.prepareEvent(browserEvent, this),- browserEvent- );- return pointerEvent;+ e.pointerId = ol.pointer.MouseSource.POINTER_ID;+ e.isPrimary = true;+ e.pointerType = ol.pointer.MouseSource.POINTER_TYPE;++ return e;};/**- * @inheritDoc+ * Handler for `mousedown`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.pointer.PointerEventHandler.prototype.disposeInternal = function() {- this.unregister_();- goog.base(this, 'disposeInternal');+ol.pointer.MouseSource.prototype.mousedown = function(inEvent) {+ if (!this.isEventSimulatedFromTouch_(inEvent)) {+ var p = goog.object.containsKey(this.pointerMap,+ ol.pointer.MouseSource.POINTER_ID.toString());+ // TODO(dfreedman) workaround for some elements not sending mouseup+ // http://crbug/149091+ if (p) {+ this.cancel(inEvent);+ }+ var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);+ this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()] = inEvent;+ this.dispatcher.down(e, inEvent);+ }};/**- * Constants for event names.- * @enum {string}+ * Handler for `mousemove`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.pointer.EventType = {- POINTERMOVE: 'pointermove',- POINTERDOWN: 'pointerdown',- POINTERUP: 'pointerup',- POINTEROVER: 'pointerover',- POINTEROUT: 'pointerout',- POINTERENTER: 'pointerenter',- POINTERLEAVE: 'pointerleave',- POINTERCANCEL: 'pointercancel'+ol.pointer.MouseSource.prototype.mousemove = function(inEvent) {+ if (!this.isEventSimulatedFromTouch_(inEvent)) {+ var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);+ this.dispatcher.move(e, inEvent);+ }};/**- * Properties to copy when cloning an event, with default values.- * @type {Array.<Array>}+ * Handler for `mouseup`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.pointer.CLONE_PROPS = [- // MouseEvent- ['bubbles', false],- ['cancelable', false],- ['view', null],- ['detail', null],- ['screenX', 0],- ['screenY', 0],- ['clientX', 0],- ['clientY', 0],- ['ctrlKey', false],- ['altKey', false],- ['shiftKey', false],- ['metaKey', false],- ['button', 0],- ['relatedTarget', null],- // DOM Level 3- ['buttons', 0],- // PointerEvent- ['pointerId', 0],- ['width', 0],- ['height', 0],- ['pressure', 0],- ['tiltX', 0],- ['tiltY', 0],- ['pointerType', ''],- ['hwTimestamp', 0],- ['isPrimary', false],- // event instance- ['type', ''],- ['target', null],- ['currentTarget', null],- ['which', 0]-];--goog.provide('ol.MapBrowserEvent');-goog.provide('ol.MapBrowserEvent.EventType');-goog.provide('ol.MapBrowserEventHandler');-goog.provide('ol.MapBrowserPointerEvent');--goog.require('goog.array');-goog.require('goog.asserts');-goog.require('goog.events');-goog.require('goog.events.BrowserEvent');-goog.require('goog.events.EventTarget');-goog.require('goog.events.EventType');-goog.require('goog.object');-goog.require('ol');-goog.require('ol.Coordinate');-goog.require('ol.MapEvent');-goog.require('ol.Pixel');-goog.require('ol.pointer.PointerEvent');-goog.require('ol.pointer.PointerEventHandler');+ol.pointer.MouseSource.prototype.mouseup = function(inEvent) {+ if (!this.isEventSimulatedFromTouch_(inEvent)) {+ var p = this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()];+ if (p && p.button === inEvent.button) {+ var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);+ this.dispatcher.up(e, inEvent);+ this.cleanupMouse();+ }+ }+};/**- * @classdesc- * Events emitted as map browser events are instances of this type.- * See {@link ol.Map} for which events trigger a map browser event.+ * Handler for `mouseover`.*- * @constructor- * @extends {ol.MapEvent}- * @implements {oli.MapBrowserEvent}- * @param {string} type Event type.- * @param {ol.Map} map Map.- * @param {goog.events.BrowserEvent} browserEvent Browser event.- * @param {boolean=} opt_dragging Is the map currently being dragged?- * @param {?olx.FrameState=} opt_frameState Frame state.+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEvent = function(type, map, browserEvent, opt_dragging,- opt_frameState) {-- goog.base(this, type, map, opt_frameState);-- /**- * @const- * @type {goog.events.BrowserEvent}- */- this.browserEvent = browserEvent;-- /**- * @const- * @type {Event}- * @api stable- */- this.originalEvent = browserEvent.getBrowserEvent();-- /**- * @type {ol.Pixel}- * @api stable- */- this.pixel = map.getEventPixel(this.originalEvent);-- /**- * @type {ol.Coordinate}- * @api stable- */- this.coordinate = map.getCoordinateFromPixel(this.pixel);-- /**- * Indicates if the map is currently being dragged. Only set for- * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.- *- * @type {boolean}- * @api stable- */- this.dragging = goog.isDef(opt_dragging) ? opt_dragging : false;-+ol.pointer.MouseSource.prototype.mouseover = function(inEvent) {+ if (!this.isEventSimulatedFromTouch_(inEvent)) {+ var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);+ this.dispatcher.enterOver(e, inEvent);+ }};-goog.inherits(ol.MapBrowserEvent, ol.MapEvent);/**- * Prevents the default browser action.- * @see https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault- * @override- * @api stable+ * Handler for `mouseout`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEvent.prototype.preventDefault = function() {- goog.base(this, 'preventDefault');- this.browserEvent.preventDefault();+ol.pointer.MouseSource.prototype.mouseout = function(inEvent) {+ if (!this.isEventSimulatedFromTouch_(inEvent)) {+ var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);+ this.dispatcher.leaveOut(e, inEvent);+ }};/**- * Prevents further propagation of the current event.- * @see https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation- * @override- * @api stable+ * Dispatches a `pointercancel` event.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEvent.prototype.stopPropagation = function() {- goog.base(this, 'stopPropagation');- this.browserEvent.stopPropagation();+ol.pointer.MouseSource.prototype.cancel = function(inEvent) {+ var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);+ this.dispatcher.cancel(e, inEvent);+ this.cleanupMouse();};-/**- * @constructor- * @extends {ol.MapBrowserEvent}- * @param {string} type Event type.- * @param {ol.Map} map Map.- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.- * @param {boolean=} opt_dragging Is the map currently being dragged?- * @param {?olx.FrameState=} opt_frameState Frame state.+ * Remove the mouse from the list of active pointers.*/-ol.MapBrowserPointerEvent = function(type, map, pointerEvent, opt_dragging,- opt_frameState) {+ol.pointer.MouseSource.prototype.cleanupMouse = function() {+ goog.object.remove(this.pointerMap,+ ol.pointer.MouseSource.POINTER_ID.toString());+};- goog.base(this, type, map, pointerEvent.browserEvent, opt_dragging,- opt_frameState);+// Based on https://github.com/Polymer/PointerEvents- /**- * @const- * @type {ol.pointer.PointerEvent}- */- this.pointerEvent = pointerEvent;+// Copyright (c) 2013 The Polymer Authors. All rights reserved.+//+// Redistribution and use in source and binary forms, with or without+// modification, are permitted provided that the following conditions are+// met:+//+// * Redistributions of source code must retain the above copyright+// notice, this list of conditions and the following disclaimer.+// * Redistributions in binary form must reproduce the above+// copyright notice, this list of conditions and the following disclaimer+// in the documentation and/or other materials provided with the+// distribution.+// * Neither the name of Google Inc. nor the names of its+// contributors may be used to endorse or promote products derived from+// this software without specific prior written permission.+//+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.-};-goog.inherits(ol.MapBrowserPointerEvent, ol.MapBrowserEvent);+goog.provide('ol.pointer.MsSource');++goog.require('goog.object');+goog.require('ol.pointer.EventSource');/**- * @param {ol.Map} map The map with the viewport to listen to events on.+ * @param {ol.pointer.PointerEventHandler} dispatcher* @constructor- * @extends {goog.events.EventTarget}+ * @extends {ol.pointer.EventSource}*/-ol.MapBrowserEventHandler = function(map) {-- goog.base(this);-- /**- * This is the element that we will listen to the real events on.- * @type {ol.Map}- * @private- */- this.map_ = map;-- /**- * @type {number}- * @private- */- this.clickTimeoutId_ = 0;+ol.pointer.MsSource = function(dispatcher) {+ var mapping = {+ 'MSPointerDown': this.msPointerDown,+ 'MSPointerMove': this.msPointerMove,+ 'MSPointerUp': this.msPointerUp,+ 'MSPointerOut': this.msPointerOut,+ 'MSPointerOver': this.msPointerOver,+ 'MSPointerCancel': this.msPointerCancel,+ 'MSGotPointerCapture': this.msGotPointerCapture,+ 'MSLostPointerCapture': this.msLostPointerCapture+ };+ goog.base(this, dispatcher, mapping);/**- * @type {boolean}- * @private+ * @const+ * @type {Object.<string, goog.events.BrowserEvent|Object>}*/- this.dragging_ = false;+ this.pointerMap = dispatcher.pointerMap;/**- * @type {Array.<goog.events.Key>}- * @private+ * @const+ * @type {Array.<string>}*/- this.dragListenerKeys_ = null;+ this.POINTER_TYPES = [+ '',+ 'unavailable',+ 'touch',+ 'pen',+ 'mouse'+ ];+};+goog.inherits(ol.pointer.MsSource, ol.pointer.EventSource);- /**- * @type {goog.events.Key}- * @private- */- this.pointerdownListenerKey_ = null;- if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE) {- /**- * @type {goog.events.Key}- * @private- */- this.ieDblclickListenerKey_ = null;+/**+ * Creates a copy of the original event that will be used+ * for the fake pointer event.+ *+ * @private+ * @param {goog.events.BrowserEvent} inEvent+ * @return {Object}+ */+ol.pointer.MsSource.prototype.prepareEvent_ = function(inEvent) {+ var e = inEvent;+ if (goog.isNumber(inEvent.getBrowserEvent().pointerType)) {+ e = this.dispatcher.cloneEvent(inEvent, inEvent.getBrowserEvent());+ e.pointerType = this.POINTER_TYPES[inEvent.getBrowserEvent().pointerType];}- /**- * The most recent "down" type event (or null if none have occurred).- * Set on pointerdown.- * @type {ol.pointer.PointerEvent}- * @private- */- this.down_ = null;-- var element = this.map_.getViewport();+ return e;+};- /**- * @type {number}- * @private- */- this.activePointers_ = 0;- /**- * @type {Object.<number, boolean>}- * @private- */- this.trackedTouches_ = {};+/**+ * Remove this pointer from the list of active pointers.+ * @param {number} pointerId+ */+ol.pointer.MsSource.prototype.cleanup = function(pointerId) {+ goog.object.remove(this.pointerMap, pointerId);+};- /**- * Event handler which generates pointer events for- * the viewport element.- *- * @type {ol.pointer.PointerEventHandler}- * @private- */- this.pointerEventHandler_ = new ol.pointer.PointerEventHandler(element);- /**- * Event handler which generates pointer events for- * the document (used when dragging).- *- * @type {ol.pointer.PointerEventHandler}- * @private- */- this.documentPointerEventHandler_ = null;+/**+ * Handler for `msPointerDown`.+ *+ * @param {goog.events.BrowserEvent} inEvent+ */+ol.pointer.MsSource.prototype.msPointerDown = function(inEvent) {+ this.pointerMap[inEvent.getBrowserEvent().pointerId] = inEvent;+ var e = this.prepareEvent_(inEvent);+ this.dispatcher.down(e, inEvent);+};- this.pointerdownListenerKey_ = goog.events.listen(this.pointerEventHandler_,- ol.pointer.EventType.POINTERDOWN,- this.handlePointerDown_, false, this);- this.relayedListenerKey_ = goog.events.listen(this.pointerEventHandler_,- ol.pointer.EventType.POINTERMOVE,- this.relayEvent_, false, this);+/**+ * Handler for `msPointerMove`.+ *+ * @param {goog.events.BrowserEvent} inEvent+ */+ol.pointer.MsSource.prototype.msPointerMove = function(inEvent) {+ var e = this.prepareEvent_(inEvent);+ this.dispatcher.move(e, inEvent);+};- if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE) {- /*- * On legacy IE, double clicks do not produce two mousedown and- * mouseup events. That is why a separate DBLCLICK event listener- * is used.- */- this.ieDblclickListenerKey_ = goog.events.listen(element,- goog.events.EventType.DBLCLICK,- this.emulateClickLegacyIE_, false, this);- }+/**+ * Handler for `msPointerUp`.+ *+ * @param {goog.events.BrowserEvent} inEvent+ */+ol.pointer.MsSource.prototype.msPointerUp = function(inEvent) {+ var e = this.prepareEvent_(inEvent);+ this.dispatcher.up(e, inEvent);+ this.cleanup(inEvent.getBrowserEvent().pointerId);};-goog.inherits(ol.MapBrowserEventHandler, goog.events.EventTarget);/**- * @param {goog.events.BrowserEvent} browserEvent Pointer event.- * @private+ * Handler for `msPointerOut`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEventHandler.prototype.emulateClickLegacyIE_ =- function(browserEvent) {- var pointerEvent = this.pointerEventHandler_.wrapMouseEvent(- ol.MapBrowserEvent.EventType.POINTERUP,- browserEvent- );- this.emulateClick_(pointerEvent);+ol.pointer.MsSource.prototype.msPointerOut = function(inEvent) {+ var e = this.prepareEvent_(inEvent);+ this.dispatcher.leaveOut(e, inEvent);};/**- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.- * @private+ * Handler for `msPointerOver`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEventHandler.prototype.emulateClick_ = function(pointerEvent) {- var newEvent;- newEvent = new ol.MapBrowserPointerEvent(- ol.MapBrowserEvent.EventType.CLICK, this.map_, pointerEvent);- this.dispatchEvent(newEvent);- if (this.clickTimeoutId_ !== 0) {- // double-click- goog.global.clearTimeout(this.clickTimeoutId_);- this.clickTimeoutId_ = 0;- newEvent = new ol.MapBrowserPointerEvent(- ol.MapBrowserEvent.EventType.DBLCLICK, this.map_, pointerEvent);- this.dispatchEvent(newEvent);- } else {- // click- this.clickTimeoutId_ = goog.global.setTimeout(goog.bind(function() {- this.clickTimeoutId_ = 0;- var newEvent = new ol.MapBrowserPointerEvent(- ol.MapBrowserEvent.EventType.SINGLECLICK, this.map_, pointerEvent);- this.dispatchEvent(newEvent);- }, this), 250);- }+ol.pointer.MsSource.prototype.msPointerOver = function(inEvent) {+ var e = this.prepareEvent_(inEvent);+ this.dispatcher.enterOver(e, inEvent);};/**- * Keeps track on how many pointers are currently active.+ * Handler for `msPointerCancel`.*- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.- * @private+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEventHandler.prototype.updateActivePointers_ =- function(pointerEvent) {- var event = pointerEvent;-- if (event.type == ol.MapBrowserEvent.EventType.POINTERUP ||- event.type == ol.MapBrowserEvent.EventType.POINTERCANCEL) {- delete this.trackedTouches_[event.pointerId];- } else if (event.type == ol.MapBrowserEvent.EventType.POINTERDOWN) {- this.trackedTouches_[event.pointerId] = true;- }- this.activePointers_ = goog.object.getCount(this.trackedTouches_);+ol.pointer.MsSource.prototype.msPointerCancel = function(inEvent) {+ var e = this.prepareEvent_(inEvent);+ this.dispatcher.cancel(e, inEvent);+ this.cleanup(inEvent.getBrowserEvent().pointerId);};/**- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.- * @private+ * Handler for `msLostPointerCapture`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEventHandler.prototype.handlePointerUp_ = function(pointerEvent) {- this.updateActivePointers_(pointerEvent);- var newEvent = new ol.MapBrowserPointerEvent(- ol.MapBrowserEvent.EventType.POINTERUP, this.map_, pointerEvent);- this.dispatchEvent(newEvent);+ol.pointer.MsSource.prototype.msLostPointerCapture = function(inEvent) {+ var e = this.dispatcher.makeEvent('lostpointercapture',+ inEvent.getBrowserEvent(), inEvent);+ this.dispatcher.dispatchEvent(e);+};- // We emulate click events on left mouse button click, touch contact, and pen- // contact. isMouseActionButton returns true in these cases (evt.button is set- // to 0).- // See http://www.w3.org/TR/pointerevents/#button-states- if (!this.dragging_ && this.isMouseActionButton_(pointerEvent)) {- goog.asserts.assert(!goog.isNull(this.down_));- this.emulateClick_(this.down_);- }- goog.asserts.assert(this.activePointers_ >= 0);- if (this.activePointers_ === 0) {- goog.array.forEach(this.dragListenerKeys_, goog.events.unlistenByKey);- this.dragListenerKeys_ = null;- this.dragging_ = false;- this.down_ = null;- goog.dispose(this.documentPointerEventHandler_);- this.documentPointerEventHandler_ = null;- }+/**+ * Handler for `msGotPointerCapture`.+ *+ * @param {goog.events.BrowserEvent} inEvent+ */+ol.pointer.MsSource.prototype.msGotPointerCapture = function(inEvent) {+ var e = this.dispatcher.makeEvent('gotpointercapture',+ inEvent.getBrowserEvent(), inEvent);+ this.dispatcher.dispatchEvent(e);};+// Based on https://github.com/Polymer/PointerEvents++// Copyright (c) 2013 The Polymer Authors. All rights reserved.+//+// Redistribution and use in source and binary forms, with or without+// modification, are permitted provided that the following conditions are+// met:+//+// * Redistributions of source code must retain the above copyright+// notice, this list of conditions and the following disclaimer.+// * Redistributions in binary form must reproduce the above+// copyright notice, this list of conditions and the following disclaimer+// in the documentation and/or other materials provided with the+// distribution.+// * Neither the name of Google Inc. nor the names of its+// contributors may be used to endorse or promote products derived from+// this software without specific prior written permission.+//+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.++goog.provide('ol.pointer.NativeSource');++goog.require('goog.object');+goog.require('ol.pointer.EventSource');++/**- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.- * @return {boolean} If the left mouse button was pressed.- * @private+ * @param {ol.pointer.PointerEventHandler} dispatcher+ * @constructor+ * @extends {ol.pointer.EventSource}*/-ol.MapBrowserEventHandler.prototype.isMouseActionButton_ =- function(pointerEvent) {- if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE) {- return pointerEvent.button == 1;- } else {- return pointerEvent.button === 0;- }+ol.pointer.NativeSource = function(dispatcher) {+ var mapping = {+ 'pointerdown': this.pointerDown,+ 'pointermove': this.pointerMove,+ 'pointerup': this.pointerUp,+ 'pointerout': this.pointerOut,+ 'pointerover': this.pointerOver,+ 'pointercancel': this.pointerCancel,+ 'gotpointercapture': this.gotPointerCapture,+ 'lostpointercapture': this.lostPointerCapture+ };+ goog.base(this, dispatcher, mapping);};+goog.inherits(ol.pointer.NativeSource, ol.pointer.EventSource);/**- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.- * @private+ * Handler for `pointerdown`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEventHandler.prototype.handlePointerDown_ =- function(pointerEvent) {- this.updateActivePointers_(pointerEvent);- var newEvent = new ol.MapBrowserPointerEvent(- ol.MapBrowserEvent.EventType.POINTERDOWN, this.map_, pointerEvent);- this.dispatchEvent(newEvent);-- this.down_ = pointerEvent;+ol.pointer.NativeSource.prototype.pointerDown = function(inEvent) {+ this.dispatcher.fireNativeEvent(inEvent);+};- if (goog.isNull(this.dragListenerKeys_)) {- /* Set up a pointer event handler on the `document`,- * which is required when the pointer is moved outside- * the viewport when dragging.- */- this.documentPointerEventHandler_ =- new ol.pointer.PointerEventHandler(document);- this.dragListenerKeys_ = [- goog.events.listen(this.documentPointerEventHandler_,- ol.MapBrowserEvent.EventType.POINTERMOVE,- this.handlePointerMove_, false, this),- goog.events.listen(this.documentPointerEventHandler_,- ol.MapBrowserEvent.EventType.POINTERUP,- this.handlePointerUp_, false, this),- /* Note that the listener for `pointercancel is set up on- * `pointerEventHandler_` and not `documentPointerEventHandler_` like- * the `pointerup` and `pointermove` listeners.- *- * The reason for this is the following: `TouchSource.vacuumTouches_()`- * issues `pointercancel` events, when there was no `touchend` for a- * `touchstart`. Now, let's say a first `touchstart` is registered on- * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.- * But `documentPointerEventHandler_` doesn't know about the first- * `touchstart`. If there is no `touchend` for the `touchstart`, we can- * only receive a `touchcancel` from `pointerEventHandler_`, because it is- * only registered there.- */- goog.events.listen(this.pointerEventHandler_,- ol.MapBrowserEvent.EventType.POINTERCANCEL,- this.handlePointerUp_, false, this)- ];- }+/**+ * Handler for `pointermove`.+ *+ * @param {goog.events.BrowserEvent} inEvent+ */+ol.pointer.NativeSource.prototype.pointerMove = function(inEvent) {+ this.dispatcher.fireNativeEvent(inEvent);};/**- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.- * @private+ * Handler for `pointerup`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEventHandler.prototype.handlePointerMove_ =- function(pointerEvent) {- // Fix IE10 on windows Surface : When you tap the tablet, it triggers- // multiple pointermove events between pointerdown and pointerup with- // the exact same coordinates of the pointerdown event. To avoid a- // 'false' touchmove event to be dispatched , we test if the pointer- // effectively moved.- if (this.isMoving_(pointerEvent)) {- this.dragging_ = true;- var newEvent = new ol.MapBrowserPointerEvent(- ol.MapBrowserEvent.EventType.POINTERDRAG, this.map_, pointerEvent,- this.dragging_);- this.dispatchEvent(newEvent);- }-- // Some native android browser triggers mousemove events during small period- // of time. See: https://code.google.com/p/android/issues/detail?id=5491 or- // https://code.google.com/p/android/issues/detail?id=19827- // ex: Galaxy Tab P3110 + Android 4.1.1- pointerEvent.preventDefault();+ol.pointer.NativeSource.prototype.pointerUp = function(inEvent) {+ this.dispatcher.fireNativeEvent(inEvent);};/**- * Wrap and relay a pointer event. Note that this requires that the type- * string for the MapBrowserPointerEvent matches the PointerEvent type.- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.- * @private- */-ol.MapBrowserEventHandler.prototype.relayEvent_ = function(pointerEvent) {- var dragging = !goog.isNull(this.down_) && this.isMoving_(pointerEvent);- this.dispatchEvent(new ol.MapBrowserPointerEvent(- pointerEvent.type, this.map_, pointerEvent, dragging));+ * Handler for `pointerout`.+ *+ * @param {goog.events.BrowserEvent} inEvent+ */+ol.pointer.NativeSource.prototype.pointerOut = function(inEvent) {+ this.dispatcher.fireNativeEvent(inEvent);};/**- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.- * @return {boolean}- * @private+ * Handler for `pointerover`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEventHandler.prototype.isMoving_ = function(pointerEvent) {- return pointerEvent.clientX != this.down_.clientX ||- pointerEvent.clientY != this.down_.clientY;+ol.pointer.NativeSource.prototype.pointerOver = function(inEvent) {+ this.dispatcher.fireNativeEvent(inEvent);};/**- * @inheritDoc+ * Handler for `pointercancel`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEventHandler.prototype.disposeInternal = function() {- if (!goog.isNull(this.relayedListenerKey_)) {- goog.events.unlistenByKey(this.relayedListenerKey_);- this.relayedListenerKey_ = null;- }- if (!goog.isNull(this.pointerdownListenerKey_)) {- goog.events.unlistenByKey(this.pointerdownListenerKey_);- this.pointerdownListenerKey_ = null;- }- if (!goog.isNull(this.dragListenerKeys_)) {- goog.array.forEach(this.dragListenerKeys_, goog.events.unlistenByKey);- this.dragListenerKeys_ = null;- }- if (!goog.isNull(this.documentPointerEventHandler_)) {- goog.dispose(this.documentPointerEventHandler_);- this.documentPointerEventHandler_ = null;- }- if (!goog.isNull(this.pointerEventHandler_)) {- goog.dispose(this.pointerEventHandler_);- this.pointerEventHandler_ = null;- }- if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE &&- !goog.isNull(this.ieDblclickListenerKey_)) {- goog.events.unlistenByKey(this.ieDblclickListenerKey_);- this.ieDblclickListenerKey_ = null;- }- goog.base(this, 'disposeInternal');+ol.pointer.NativeSource.prototype.pointerCancel = function(inEvent) {+ this.dispatcher.fireNativeEvent(inEvent);};/**- * Constants for event names.- * @enum {string}+ * Handler for `lostpointercapture`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.MapBrowserEvent.EventType = {- // derived event types- /**- * A true single click with no dragging and no double click. Note that this- * event is delayed by 250 ms to ensure that it is not a double click.- * @event ol.MapBrowserEvent#singleclick- * @api- */- SINGLECLICK: 'singleclick',- /**- * A click with no dragging. A double click will fire two of this.- * @event ol.MapBrowserEvent#click- * @api- */- CLICK: goog.events.EventType.CLICK,- /**- * A true double click, with no dragging.- * @event ol.MapBrowserEvent#dblclick- * @api- */- DBLCLICK: goog.events.EventType.DBLCLICK,- /**- * Triggered when a pointer is dragged.- * @event ol.MapBrowserEvent#pointerdrag- * @api- */- POINTERDRAG: 'pointerdrag',-- // original pointer event types- /**- * Triggered when a pointer is moved. Note that on touch devices this is- * triggered when the map is panned, so is not the same as mousemove.- * @event ol.MapBrowserEvent#pointermove- * @api- */- POINTERMOVE: 'pointermove',- POINTERDOWN: 'pointerdown',- POINTERUP: 'pointerup',- POINTEROVER: 'pointerover',- POINTEROUT: 'pointerout',- POINTERENTER: 'pointerenter',- POINTERLEAVE: 'pointerleave',- POINTERCANCEL: 'pointercancel'+ol.pointer.NativeSource.prototype.lostPointerCapture = function(inEvent) {+ this.dispatcher.fireNativeEvent(inEvent);};-goog.provide('ol.source.Source');-goog.provide('ol.source.State');--goog.require('goog.events.EventType');-goog.require('ol.Attribution');-goog.require('ol.Object');-goog.require('ol.proj');-/**- * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.- * @enum {string}- * @api+ * Handler for `gotpointercapture`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.source.State = {- UNDEFINED: 'undefined',- LOADING: 'loading',- READY: 'ready',- ERROR: 'error'+ol.pointer.NativeSource.prototype.gotPointerCapture = function(inEvent) {+ this.dispatcher.fireNativeEvent(inEvent);};+// Based on https://github.com/Polymer/PointerEvents-/**- * @typedef {{attributions: (Array.<ol.Attribution>|undefined),- * logo: (string|olx.LogoOptions|undefined),- * projection: ol.proj.ProjectionLike,- * state: (ol.source.State|undefined)}}- */-ol.source.SourceOptions;+// Copyright (c) 2013 The Polymer Authors. All rights reserved.+//+// Redistribution and use in source and binary forms, with or without+// modification, are permitted provided that the following conditions are+// met:+//+// * Redistributions of source code must retain the above copyright+// notice, this list of conditions and the following disclaimer.+// * Redistributions in binary form must reproduce the above+// copyright notice, this list of conditions and the following disclaimer+// in the documentation and/or other materials provided with the+// distribution.+// * Neither the name of Google Inc. nor the names of its+// contributors may be used to endorse or promote products derived from+// this software without specific prior written permission.+//+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.++goog.provide('ol.pointer.TouchSource');++goog.require('goog.array');+goog.require('goog.object');+goog.require('ol.pointer.EventSource');+goog.require('ol.pointer.MouseSource');/**- * @classdesc- * Abstract base class; normally only used for creating subclasses and not- * instantiated in apps.- * Base class for {@link ol.layer.Layer} sources.- ** @constructor- * @extends {ol.Object}- * @fires change Triggered when the state of the source changes.- * @param {ol.source.SourceOptions} options Source options.- * @api stable+ * @param {ol.pointer.PointerEventHandler} dispatcher+ * @param {ol.pointer.MouseSource} mouseSource+ * @extends {ol.pointer.EventSource}*/-ol.source.Source = function(options) {+ol.pointer.TouchSource = function(dispatcher, mouseSource) {+ var mapping = {+ 'touchstart': this.touchstart,+ 'touchmove': this.touchmove,+ 'touchend': this.touchend,+ 'touchcancel': this.touchcancel+ };+ goog.base(this, dispatcher, mapping);- goog.base(this);+ /**+ * @const+ * @type {Object.<string, goog.events.BrowserEvent|Object>}+ */+ this.pointerMap = dispatcher.pointerMap;/**- * @private- * @type {ol.proj.Projection}+ * @const+ * @type {ol.pointer.MouseSource}*/- this.projection_ = ol.proj.get(options.projection);+ this.mouseSource = mouseSource;/*** @private- * @type {Array.<ol.Attribution>}+ * @type {number|undefined}*/- this.attributions_ = goog.isDef(options.attributions) ?- options.attributions : null;+ this.firstTouchId_ = undefined;/*** @private- * @type {string|olx.LogoOptions|undefined}+ * @type {number}*/- this.logo_ = options.logo;+ this.clickCount_ = 0;/*** @private- * @type {ol.source.State}+ * @type {number|undefined}*/- this.state_ = goog.isDef(options.state) ?- options.state : ol.source.State.READY;--};-goog.inherits(ol.source.Source, ol.Object);---/**- * @param {ol.Coordinate} coordinate Coordinate.- * @param {number} resolution Resolution.- * @param {number} rotation Rotation.- * @param {Object.<string, boolean>} skippedFeatureUids Skipped feature uids.- * @param {function(ol.Feature): T} callback Feature callback.- * @return {T|undefined} Callback result.- * @template T- */-ol.source.Source.prototype.forEachFeatureAtCoordinate =- goog.nullFunction;---/**- * @return {Array.<ol.Attribution>} Attributions.- * @api stable- */-ol.source.Source.prototype.getAttributions = function() {- return this.attributions_;+ this.resetId_ = undefined;};+goog.inherits(ol.pointer.TouchSource, ol.pointer.EventSource);/**- * @return {string|olx.LogoOptions|undefined} Logo.- * @api stable+ * Mouse event timeout: This should be long enough to+ * ignore compat mouse events made by touch.+ * @const+ * @type {number}*/-ol.source.Source.prototype.getLogo = function() {- return this.logo_;-};+ol.pointer.TouchSource.DEDUP_TIMEOUT = 2500;/**- * @return {ol.proj.Projection} Projection.- * @api+ * @const+ * @type {number}*/-ol.source.Source.prototype.getProjection = function() {- return this.projection_;-};+ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT = 200;/**- * @return {Array.<number>|undefined} Resolutions.+ * @const+ * @type {string}*/-ol.source.Source.prototype.getResolutions = goog.abstractMethod;+ol.pointer.TouchSource.POINTER_TYPE = 'touch';/**- * @return {ol.source.State} State.- * @api+ * @private+ * @param {Touch} inTouch+ * @return {boolean} True, if this is the primary touch.*/-ol.source.Source.prototype.getState = function() {- return this.state_;+ol.pointer.TouchSource.prototype.isPrimaryTouch_ = function(inTouch) {+ return this.firstTouchId_ === inTouch.identifier;};/**- * @param {Array.<ol.Attribution>} attributions Attributions.+ * Set primary touch if there are no pointers, or the only pointer is the mouse.+ * @param {Touch} inTouch+ * @private*/-ol.source.Source.prototype.setAttributions = function(attributions) {- this.attributions_ = attributions;+ol.pointer.TouchSource.prototype.setPrimaryTouch_ = function(inTouch) {+ var count = goog.object.getCount(this.pointerMap);+ if (count === 0 || (count === 1 && goog.object.containsKey(this.pointerMap,+ ol.pointer.MouseSource.POINTER_ID.toString()))) {+ this.firstTouchId_ = inTouch.identifier;+ this.cancelResetClickCount_();+ }};/**- * @param {string|olx.LogoOptions|undefined} logo Logo.+ * @private+ * @param {Object} inPointer*/-ol.source.Source.prototype.setLogo = function(logo) {- this.logo_ = logo;+ol.pointer.TouchSource.prototype.removePrimaryPointer_ = function(inPointer) {+ if (inPointer.isPrimary) {+ this.firstTouchId_ = undefined;+ this.resetClickCount_();+ }};/**- * @param {ol.source.State} state State.- * @protected+ * @private*/-ol.source.Source.prototype.setState = function(state) {- this.state_ = state;- this.changed();+ol.pointer.TouchSource.prototype.resetClickCount_ = function() {+ this.resetId_ = goog.global.setTimeout(+ goog.bind(this.resetClickCountHandler_, this),+ ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT);};/**- * @param {ol.proj.Projection} projection Projetion.+ * @private*/-ol.source.Source.prototype.setProjection = function(projection) {- this.projection_ = projection;+ol.pointer.TouchSource.prototype.resetClickCountHandler_ = function() {+ this.clickCount_ = 0;+ this.resetId_ = undefined;};-goog.provide('ol.layer.Base');-goog.provide('ol.layer.LayerProperty');-goog.provide('ol.layer.LayerState');--goog.require('goog.events');-goog.require('goog.math');-goog.require('goog.object');-goog.require('ol.Object');-goog.require('ol.source.State');-/**- * @enum {string}+ * @private*/-ol.layer.LayerProperty = {- BRIGHTNESS: 'brightness',- CONTRAST: 'contrast',- HUE: 'hue',- OPACITY: 'opacity',- SATURATION: 'saturation',- VISIBLE: 'visible',- EXTENT: 'extent',- MAX_RESOLUTION: 'maxResolution',- MIN_RESOLUTION: 'minResolution',- SOURCE: 'source'+ol.pointer.TouchSource.prototype.cancelResetClickCount_ = function() {+ if (goog.isDef(this.resetId_)) {+ goog.global.clearTimeout(this.resetId_);+ }};/**- * @typedef {{layer: ol.layer.Layer,- * brightness: number,- * contrast: number,- * hue: number,- * opacity: number,- * saturation: number,- * sourceState: ol.source.State,- * visible: boolean,- * extent: (ol.Extent|undefined),- * maxResolution: number,- * minResolution: number}}- */-ol.layer.LayerState;----/**- * @classdesc- * Abstract base class; normally only used for creating subclasses and not- * instantiated in apps.- * Note that with `ol.layer.Base` and all its subclasses, any property set in- * the options is set as a {@link ol.Object} property on the layer object, so- * is observable, and has get/set accessors.- *- * @constructor- * @extends {ol.Object}- * @param {olx.layer.BaseOptions} options Layer options.- * @api stable+ * @private+ * @param {goog.events.BrowserEvent} browserEvent Browser event+ * @param {Touch} inTouch Touch event+ * @return {Object}*/-ol.layer.Base = function(options) {-- goog.base(this);-- /**- * @type {Object.<string, *>}- */- var properties = goog.object.clone(options);- properties[ol.layer.LayerProperty.BRIGHTNESS] =- goog.isDef(options.brightness) ? options.brightness : 0;- properties[ol.layer.LayerProperty.CONTRAST] =- goog.isDef(options.contrast) ? options.contrast : 1;- properties[ol.layer.LayerProperty.HUE] =- goog.isDef(options.hue) ? options.hue : 0;- properties[ol.layer.LayerProperty.OPACITY] =- goog.isDef(options.opacity) ? options.opacity : 1;- properties[ol.layer.LayerProperty.SATURATION] =- goog.isDef(options.saturation) ? options.saturation : 1;- properties[ol.layer.LayerProperty.VISIBLE] =- goog.isDef(options.visible) ? options.visible : true;- properties[ol.layer.LayerProperty.MAX_RESOLUTION] =- goog.isDef(options.maxResolution) ? options.maxResolution : Infinity;- properties[ol.layer.LayerProperty.MIN_RESOLUTION] =- goog.isDef(options.minResolution) ? options.minResolution : 0;-- this.setProperties(properties);-};-goog.inherits(ol.layer.Base, ol.Object);+ol.pointer.TouchSource.prototype.touchToPointer_ =+ function(browserEvent, inTouch) {+ var e = this.dispatcher.cloneEvent(browserEvent, inTouch);+ // Spec specifies that pointerId 1 is reserved for Mouse.+ // Touch identifiers can start at 0.+ // Add 2 to the touch identifier for compatibility.+ e.pointerId = inTouch.identifier + 2;+ // TODO: check if this is necessary?+ //e.target = findTarget(e);+ e.bubbles = true;+ e.cancelable = true;+ e.detail = this.clickCount_;+ e.button = 0;+ e.buttons = 1;+ e.width = inTouch.webkitRadiusX || inTouch.radiusX || 0;+ e.height = inTouch.webkitRadiusY || inTouch.radiusY || 0;+ e.pressure = inTouch.webkitForce || inTouch.force || 0.5;+ e.isPrimary = this.isPrimaryTouch_(inTouch);+ e.pointerType = ol.pointer.TouchSource.POINTER_TYPE;+ // make sure that the properties that are different for+ // each `Touch` object are not copied from the BrowserEvent object+ e.clientX = inTouch.clientX;+ e.clientY = inTouch.clientY;+ e.screenX = inTouch.screenX;+ e.screenY = inTouch.screenY;-/**- * @return {number} The brightness of the layer.- * @observable- * @api- */-ol.layer.Base.prototype.getBrightness = function() {- return /** @type {number} */ (this.get(ol.layer.LayerProperty.BRIGHTNESS));+ return e;};-goog.exportProperty(- ol.layer.Base.prototype,- 'getBrightness',- ol.layer.Base.prototype.getBrightness);/**- * @return {number} The contrast of the layer.- * @observable- * @api+ * @private+ * @param {goog.events.BrowserEvent} inEvent Touch event+ * @param {function(goog.events.BrowserEvent, Object)} inFunction*/-ol.layer.Base.prototype.getContrast = function() {- return /** @type {number} */ (this.get(ol.layer.LayerProperty.CONTRAST));+ol.pointer.TouchSource.prototype.processTouches_ =+ function(inEvent, inFunction) {+ var touches = Array.prototype.slice.call(+ inEvent.getBrowserEvent().changedTouches);+ var count = touches.length;+ function preventDefault() {+ inEvent.preventDefault();+ }+ var i, pointer;+ for (i = 0; i < count; ++i) {+ pointer = this.touchToPointer_(inEvent, touches[i]);+ // forward touch preventDefaults+ pointer.preventDefault = preventDefault;+ inFunction.call(this, inEvent, pointer);+ }};-goog.exportProperty(- ol.layer.Base.prototype,- 'getContrast',- ol.layer.Base.prototype.getContrast);/**- * @return {number} The hue of the layer.- * @observable- * @api+ * @private+ * @param {TouchList} touchList+ * @param {number} searchId+ * @return {boolean} True, if the `Touch` with the given id is in the list.*/-ol.layer.Base.prototype.getHue = function() {- return /** @type {number} */ (this.get(ol.layer.LayerProperty.HUE));+ol.pointer.TouchSource.prototype.findTouch_ = function(touchList, searchId) {+ var l = touchList.length;+ var touch;+ for (var i = 0; i < l; i++) {+ touch = touchList[i];+ if (touch.identifier === searchId) {+ return true;+ }+ }+ return false;};-goog.exportProperty(- ol.layer.Base.prototype,- 'getHue',- ol.layer.Base.prototype.getHue);/**- * @return {ol.layer.LayerState} Layer state.- */-ol.layer.Base.prototype.getLayerState = function() {- var brightness = this.getBrightness();- var contrast = this.getContrast();- var hue = this.getHue();- var opacity = this.getOpacity();- var saturation = this.getSaturation();- var sourceState = this.getSourceState();- var visible = this.getVisible();- var extent = this.getExtent();- var maxResolution = this.getMaxResolution();- var minResolution = this.getMinResolution();- return {- layer: /** @type {ol.layer.Layer} */ (this),- brightness: goog.math.clamp(brightness, -1, 1),- contrast: Math.max(contrast, 0),- hue: hue,- opacity: goog.math.clamp(opacity, 0, 1),- saturation: Math.max(saturation, 0),- sourceState: sourceState,- visible: visible,- extent: extent,- maxResolution: maxResolution,- minResolution: Math.max(minResolution, 0)- };+ * In some instances, a touchstart can happen without a touchend. This+ * leaves the pointermap in a broken state.+ * Therefore, on every touchstart, we remove the touches that did not fire a+ * touchend event.+ * To keep state globally consistent, we fire a pointercancel for+ * this "abandoned" touch+ *+ * @private+ * @param {goog.events.BrowserEvent} inEvent+ */+ol.pointer.TouchSource.prototype.vacuumTouches_ = function(inEvent) {+ var touchList = inEvent.getBrowserEvent().touches;+ // pointerMap.getCount() should be < touchList.length here,+ // as the touchstart has not been processed yet.+ var keys = goog.object.getKeys(this.pointerMap);+ var count = keys.length;+ if (count >= touchList.length) {+ var d = [];+ var i, key, value;+ for (i = 0; i < count; ++i) {+ key = keys[i];+ value = this.pointerMap[key];+ // Never remove pointerId == 1, which is mouse.+ // Touch identifiers are 2 smaller than their pointerId, which is the+ // index in pointermap.+ if (key != ol.pointer.MouseSource.POINTER_ID &&+ !this.findTouch_(touchList, key - 2)) {+ d.push(value.out);+ }+ }+ for (i = 0; i < d.length; ++i) {+ this.cancelOut_(inEvent, d[i]);+ }+ }};/**- * @param {Array.<ol.layer.Layer>=} opt_array Array of layers (to be- * modified in place).- * @return {Array.<ol.layer.Layer>} Array of layers.+ * Handler for `touchstart`, triggers `pointerover`,+ * `pointerenter` and `pointerdown` events.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.layer.Base.prototype.getLayersArray = goog.abstractMethod;+ol.pointer.TouchSource.prototype.touchstart = function(inEvent) {+ this.vacuumTouches_(inEvent);+ this.setPrimaryTouch_(inEvent.getBrowserEvent().changedTouches[0]);+ this.dedupSynthMouse_(inEvent);+ this.clickCount_++;+ this.processTouches_(inEvent, this.overDown_);+};/**- * @param {Array.<ol.layer.LayerState>=} opt_states Optional list of layer- * states (to be modified in place).- * @return {Array.<ol.layer.LayerState>} List of layer states.+ * @private+ * @param {goog.events.BrowserEvent} browserEvent+ * @param {Object} inPointer*/-ol.layer.Base.prototype.getLayerStatesArray = goog.abstractMethod;+ol.pointer.TouchSource.prototype.overDown_ = function(browserEvent, inPointer) {+ this.pointerMap[inPointer.pointerId] = {+ target: inPointer.target,+ out: inPointer,+ outTarget: inPointer.target+ };+ this.dispatcher.over(inPointer, browserEvent);+ this.dispatcher.enter(inPointer, browserEvent);+ this.dispatcher.down(inPointer, browserEvent);+};/**- * @return {ol.Extent|undefined} The layer extent.- * @observable- * @api stable+ * Handler for `touchmove`.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.layer.Base.prototype.getExtent = function() {- return /** @type {ol.Extent|undefined} */ (- this.get(ol.layer.LayerProperty.EXTENT));+ol.pointer.TouchSource.prototype.touchmove = function(inEvent) {+ inEvent.preventDefault();+ this.processTouches_(inEvent, this.moveOverOut_);};-goog.exportProperty(- ol.layer.Base.prototype,- 'getExtent',- ol.layer.Base.prototype.getExtent);/**- * @return {number} The maximum resolution of the layer.- * @observable- * @api stable+ * @private+ * @param {goog.events.BrowserEvent} browserEvent+ * @param {Object} inPointer*/-ol.layer.Base.prototype.getMaxResolution = function() {- return /** @type {number} */ (- this.get(ol.layer.LayerProperty.MAX_RESOLUTION));+ol.pointer.TouchSource.prototype.moveOverOut_ =+ function(browserEvent, inPointer) {+ var event = inPointer;+ var pointer = this.pointerMap[event.pointerId];+ // a finger drifted off the screen, ignore it+ if (!pointer) {+ return;+ }+ var outEvent = pointer.out;+ var outTarget = pointer.outTarget;+ this.dispatcher.move(event, browserEvent);+ if (outEvent && outTarget !== event.target) {+ outEvent.relatedTarget = event.target;+ event.relatedTarget = outTarget;+ // recover from retargeting by shadow+ outEvent.target = outTarget;+ if (event.target) {+ this.dispatcher.leaveOut(outEvent, browserEvent);+ this.dispatcher.enterOver(event, browserEvent);+ } else {+ // clean up case when finger leaves the screen+ event.target = outTarget;+ event.relatedTarget = null;+ this.cancelOut_(browserEvent, event);+ }+ }+ pointer.out = event;+ pointer.outTarget = event.target;};-goog.exportProperty(- ol.layer.Base.prototype,- 'getMaxResolution',- ol.layer.Base.prototype.getMaxResolution);/**- * @return {number} The minimum resolution of the layer.- * @observable- * @api stable+ * Handler for `touchend`, triggers `pointerup`,+ * `pointerout` and `pointerleave` events.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.layer.Base.prototype.getMinResolution = function() {- return /** @type {number} */ (- this.get(ol.layer.LayerProperty.MIN_RESOLUTION));+ol.pointer.TouchSource.prototype.touchend = function(inEvent) {+ this.dedupSynthMouse_(inEvent);+ this.processTouches_(inEvent, this.upOut_);};-goog.exportProperty(- ol.layer.Base.prototype,- 'getMinResolution',- ol.layer.Base.prototype.getMinResolution);/**- * @return {number} The opacity of the layer.- * @observable- * @api stable+ * @private+ * @param {goog.events.BrowserEvent} browserEvent+ * @param {Object} inPointer*/-ol.layer.Base.prototype.getOpacity = function() {- return /** @type {number} */ (this.get(ol.layer.LayerProperty.OPACITY));+ol.pointer.TouchSource.prototype.upOut_ = function(browserEvent, inPointer) {+ this.dispatcher.up(inPointer, browserEvent);+ this.dispatcher.out(inPointer, browserEvent);+ this.dispatcher.leave(inPointer, browserEvent);+ this.cleanUpPointer_(inPointer);};-goog.exportProperty(- ol.layer.Base.prototype,- 'getOpacity',- ol.layer.Base.prototype.getOpacity);/**- * @return {number} The saturation of the layer.- * @observable- * @api+ * Handler for `touchcancel`, triggers `pointercancel`,+ * `pointerout` and `pointerleave` events.+ *+ * @param {goog.events.BrowserEvent} inEvent*/-ol.layer.Base.prototype.getSaturation = function() {- return /** @type {number} */ (this.get(ol.layer.LayerProperty.SATURATION));+ol.pointer.TouchSource.prototype.touchcancel = function(inEvent) {+ this.processTouches_(inEvent, this.cancelOut_);};-goog.exportProperty(- ol.layer.Base.prototype,- 'getSaturation',- ol.layer.Base.prototype.getSaturation);/**- * @return {ol.source.State} Source state.+ * @private+ * @param {goog.events.BrowserEvent} browserEvent+ * @param {Object} inPointer*/-ol.layer.Base.prototype.getSourceState = goog.abstractMethod;+ol.pointer.TouchSource.prototype.cancelOut_ =+ function(browserEvent, inPointer) {+ this.dispatcher.cancel(inPointer, browserEvent);+ this.dispatcher.out(inPointer, browserEvent);+ this.dispatcher.leave(inPointer, browserEvent);+ this.cleanUpPointer_(inPointer);+};/**- * @return {boolean} The visibility of the layer.- * @observable- * @api stable+ * @private+ * @param {Object} inPointer*/-ol.layer.Base.prototype.getVisible = function() {- return /** @type {boolean} */ (this.get(ol.layer.LayerProperty.VISIBLE));+ol.pointer.TouchSource.prototype.cleanUpPointer_ = function(inPointer) {+ goog.object.remove(this.pointerMap, inPointer.pointerId);+ this.removePrimaryPointer_(inPointer);};-goog.exportProperty(- ol.layer.Base.prototype,- 'getVisible',- ol.layer.Base.prototype.getVisible);/**- * Adjust the layer brightness. A value of -1 will render the layer completely- * black. A value of 0 will leave the brightness unchanged. A value of 1 will- * render the layer completely white. Other values are linear multipliers on- * the effect (values are clamped between -1 and 1).- *- * The filter effects draft [1] says the brightness function is supposed to- * render 0 black, 1 unchanged, and all other values as a linear multiplier.- *- * The current WebKit implementation clamps values between -1 (black) and 1- * (white) [2]. There is a bug open to change the filter effect spec [3].- *- * TODO: revisit this if the spec is still unmodified before we release- *- * [1] https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html- * [2] https://github.com/WebKit/webkit/commit/8f4765e569- * [3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647+ * Prevent synth mouse events from creating pointer events.*- * @param {number} brightness The brightness of the layer.- * @observable- * @api+ * @private+ * @param {goog.events.BrowserEvent} inEvent*/-ol.layer.Base.prototype.setBrightness = function(brightness) {- this.set(ol.layer.LayerProperty.BRIGHTNESS, brightness);+ol.pointer.TouchSource.prototype.dedupSynthMouse_ = function(inEvent) {+ var lts = this.mouseSource.lastTouches;+ var t = inEvent.getBrowserEvent().changedTouches[0];+ // only the primary finger will synth mouse events+ if (this.isPrimaryTouch_(t)) {+ // remember x/y of last touch+ var lt = /** @type {ol.Pixel} */ ([t.clientX, t.clientY]);+ lts.push(lt);++ goog.global.setTimeout(function() {+ // remove touch after timeout+ goog.array.remove(lts, lt);+ }, ol.pointer.TouchSource.DEDUP_TIMEOUT);+ }};-goog.exportProperty(- ol.layer.Base.prototype,- 'setBrightness',- ol.layer.Base.prototype.setBrightness);+// Based on https://github.com/Polymer/PointerEvents-/**- * Adjust the layer contrast. A value of 0 will render the layer completely- * grey. A value of 1 will leave the contrast unchanged. Other values are- * linear multipliers on the effect (and values over 1 are permitted).- *- * @param {number} contrast The contrast of the layer.- * @observable- * @api- */-ol.layer.Base.prototype.setContrast = function(contrast) {- this.set(ol.layer.LayerProperty.CONTRAST, contrast);-};-goog.exportProperty(- ol.layer.Base.prototype,- 'setContrast',- ol.layer.Base.prototype.setContrast);+// Copyright (c) 2013 The Polymer Authors. All rights reserved.+//+// Redistribution and use in source and binary forms, with or without+// modification, are permitted provided that the following conditions are+// met:+//+// * Redistributions of source code must retain the above copyright+// notice, this list of conditions and the following disclaimer.+// * Redistributions in binary form must reproduce the above+// copyright notice, this list of conditions and the following disclaimer+// in the documentation and/or other materials provided with the+// distribution.+// * Neither the name of Google Inc. nor the names of its+// contributors may be used to endorse or promote products derived from+// this software without specific prior written permission.+//+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+goog.provide('ol.pointer.PointerEventHandler');++goog.require('goog.array');+goog.require('goog.events');+goog.require('goog.events.BrowserEvent');+goog.require('goog.events.Event');+goog.require('goog.events.EventTarget');++goog.require('ol.has');+goog.require('ol.pointer.MouseSource');+goog.require('ol.pointer.MsSource');+goog.require('ol.pointer.NativeSource');+goog.require('ol.pointer.PointerEvent');+goog.require('ol.pointer.TouchSource');-/**- * Apply a hue-rotation to the layer. A value of 0 will leave the hue- * unchanged. Other values are radians around the color circle.- * @param {number} hue The hue of the layer.- * @observable- * @api- */-ol.layer.Base.prototype.setHue = function(hue) {- this.set(ol.layer.LayerProperty.HUE, hue);-};-goog.exportProperty(- ol.layer.Base.prototype,- 'setHue',- ol.layer.Base.prototype.setHue);/**- * Set the extent at which the layer is visible. If `undefined`, the layer- * will be visible at all extents.- * @param {ol.Extent|undefined} extent The extent of the layer.- * @observable- * @api stable+ * @constructor+ * @extends {goog.events.EventTarget}+ * @param {Element|HTMLDocument} element Viewport element.*/-ol.layer.Base.prototype.setExtent = function(extent) {- this.set(ol.layer.LayerProperty.EXTENT, extent);+ol.pointer.PointerEventHandler = function(element) {+ goog.base(this);++ /**+ * @const+ * @private+ * @type {Element|HTMLDocument}+ */+ this.element_ = element;++ /**+ * @const+ * @type {Object.<string, goog.events.BrowserEvent|Object>}+ */+ this.pointerMap = {};++ /**+ * @type {Object.<string, function(goog.events.BrowserEvent)>}+ * @private+ */+ this.eventMap_ = {};++ /**+ * @type {Array.<ol.pointer.EventSource>}+ * @private+ */+ this.eventSourceList_ = [];++ this.registerSources();};-goog.exportProperty(- ol.layer.Base.prototype,- 'setExtent',- ol.layer.Base.prototype.setExtent);+goog.inherits(ol.pointer.PointerEventHandler, goog.events.EventTarget);/**- * @param {number} maxResolution The maximum resolution of the layer.- * @observable- * @api stable+ * Set up the event sources (mouse, touch and native pointers)+ * that generate pointer events.*/-ol.layer.Base.prototype.setMaxResolution = function(maxResolution) {- this.set(ol.layer.LayerProperty.MAX_RESOLUTION, maxResolution);+ol.pointer.PointerEventHandler.prototype.registerSources = function() {+ if (ol.has.POINTER) {+ this.registerSource('native', new ol.pointer.NativeSource(this));+ } else if (ol.has.MSPOINTER) {+ this.registerSource('ms', new ol.pointer.MsSource(this));+ } else {+ var mouseSource = new ol.pointer.MouseSource(this);+ this.registerSource('mouse', mouseSource);++ if (ol.has.TOUCH) {+ this.registerSource('touch',+ new ol.pointer.TouchSource(this, mouseSource));+ }+ }++ // register events on the viewport element+ this.register_();};-goog.exportProperty(- ol.layer.Base.prototype,- 'setMaxResolution',- ol.layer.Base.prototype.setMaxResolution);/**- * @param {number} minResolution The minimum resolution of the layer.- * @observable- * @api stable+ * Add a new event source that will generate pointer events.+ *+ * @param {string} name A name for the event source+ * @param {ol.pointer.EventSource} source*/-ol.layer.Base.prototype.setMinResolution = function(minResolution) {- this.set(ol.layer.LayerProperty.MIN_RESOLUTION, minResolution);+ol.pointer.PointerEventHandler.prototype.registerSource =+ function(name, source) {+ var s = source;+ var newEvents = s.getEvents();++ if (newEvents) {+ goog.array.forEach(newEvents, function(e) {+ var handler = s.getHandlerForEvent(e);++ if (handler) {+ this.eventMap_[e] = goog.bind(handler, s);+ }+ }, this);+ this.eventSourceList_.push(s);+ }};-goog.exportProperty(- ol.layer.Base.prototype,- 'setMinResolution',- ol.layer.Base.prototype.setMinResolution);/**- * @param {number} opacity The opacity of the layer.- * @observable- * @api stable+ * Set up the events for all registered event sources.+ * @private*/-ol.layer.Base.prototype.setOpacity = function(opacity) {- this.set(ol.layer.LayerProperty.OPACITY, opacity);+ol.pointer.PointerEventHandler.prototype.register_ = function() {+ var l = this.eventSourceList_.length;+ var eventSource;+ for (var i = 0; i < l; i++) {+ eventSource = this.eventSourceList_[i];+ this.addEvents_(eventSource.getEvents());+ }};-goog.exportProperty(- ol.layer.Base.prototype,- 'setOpacity',- ol.layer.Base.prototype.setOpacity);/**- * Adjust layer saturation. A value of 0 will render the layer completely- * unsaturated. A value of 1 will leave the saturation unchanged. Other- * values are linear multipliers of the effect (and values over 1 are- * permitted).- *- * @param {number} saturation The saturation of the layer.- * @observable- * @api+ * Remove all registered events.+ * @private*/-ol.layer.Base.prototype.setSaturation = function(saturation) {- this.set(ol.layer.LayerProperty.SATURATION, saturation);+ol.pointer.PointerEventHandler.prototype.unregister_ = function() {+ var l = this.eventSourceList_.length;+ var eventSource;+ for (var i = 0; i < l; i++) {+ eventSource = this.eventSourceList_[i];+ this.removeEvents_(eventSource.getEvents());+ }};-goog.exportProperty(- ol.layer.Base.prototype,- 'setSaturation',- ol.layer.Base.prototype.setSaturation);/**- * @param {boolean} visible The visibility of the layer.- * @observable- * @api stable+ * Calls the right handler for a new event.+ * @private+ * @param {goog.events.BrowserEvent} inEvent Browser event.*/-ol.layer.Base.prototype.setVisible = function(visible) {- this.set(ol.layer.LayerProperty.VISIBLE, visible);+ol.pointer.PointerEventHandler.prototype.eventHandler_ = function(inEvent) {+ var type = inEvent.type;+ var handler = this.eventMap_[type];+ if (handler) {+ handler(inEvent);+ }};-goog.exportProperty(- ol.layer.Base.prototype,- 'setVisible',- ol.layer.Base.prototype.setVisible);--goog.provide('ol.layer.Layer');--goog.require('goog.events');-goog.require('goog.events.EventType');-goog.require('goog.object');-goog.require('ol.Object');-goog.require('ol.layer.Base');-goog.require('ol.layer.LayerProperty');-goog.require('ol.source.State');-/**- * @classdesc- * Abstract base class; normally only used for creating subclasses and not- * instantiated in apps.- * A visual representation of raster or vector map data.- * Layers group together those properties that pertain to how the data is to be- * displayed, irrespective of the source of that data.- *- * @constructor- * @extends {ol.layer.Base}- * @fires ol.render.Event- * @fires change Triggered when the state of the source changes.- * @param {olx.layer.LayerOptions} options Layer options.- * @api stable+ * Setup listeners for the given events.+ * @private+ * @param {Array.<string>} events List of events.*/-ol.layer.Layer = function(options) {-- var baseOptions = goog.object.clone(options);- delete baseOptions.source;-- goog.base(this, /** @type {olx.layer.LayerOptions} */ (baseOptions));-- /**- * @private- * @type {goog.events.Key}- */- this.sourceChangeKey_ = null;-- goog.events.listen(this,- ol.Object.getChangeEventType(ol.layer.LayerProperty.SOURCE),- this.handleSourcePropertyChange_, false, this);-- var source = goog.isDef(options.source) ? options.source : null;- this.setSource(source);+ol.pointer.PointerEventHandler.prototype.addEvents_ = function(events) {+ goog.array.forEach(events, function(eventName) {+ goog.events.listen(this.element_, eventName,+ this.eventHandler_, false, this);+ }, this);};-goog.inherits(ol.layer.Layer, ol.layer.Base);/**- * Return `true` if the layer is visible, and if the passed resolution is- * between the layer's minResolution and maxResolution. The comparison is- * inclusive for `minResolution` and exclusive for `maxResolution`.- * @param {ol.layer.LayerState} layerState Layer state.- * @param {number} resolution Resolution.- * @return {boolean} The layer is visible at the given resolution.+ * Unregister listeners for the given events.+ * @private+ * @param {Array.<string>} events List of events.*/-ol.layer.Layer.visibleAtResolution = function(layerState, resolution) {- return layerState.visible && resolution >= layerState.minResolution &&- resolution < layerState.maxResolution;+ol.pointer.PointerEventHandler.prototype.removeEvents_ = function(events) {+ goog.array.forEach(events, function(e) {+ goog.events.unlisten(this.element_, e,+ this.eventHandler_, false, this);+ }, this);};/**- * @inheritDoc+ * Returns a snapshot of inEvent, with writable properties.+ *+ * @param {goog.events.BrowserEvent} browserEvent Browser event.+ * @param {Event|Touch} inEvent An event that contains+ * properties to copy.+ * @return {Object} An object containing shallow copies of+ * `inEvent`'s properties.*/-ol.layer.Layer.prototype.getLayersArray = function(opt_array) {- var array = goog.isDef(opt_array) ? opt_array : [];- array.push(this);- return array;+ol.pointer.PointerEventHandler.prototype.cloneEvent =+ function(browserEvent, inEvent) {+ var eventCopy = {}, p;+ for (var i = 0, ii = ol.pointer.CLONE_PROPS.length; i < ii; i++) {+ p = ol.pointer.CLONE_PROPS[i][0];+ eventCopy[p] =+ browserEvent[p] ||+ inEvent[p] ||+ ol.pointer.CLONE_PROPS[i][1];+ }++ return eventCopy;};+// EVENTS++/**- * @inheritDoc+ * Triggers a 'pointerdown' event.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent*/-ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) {- var states = goog.isDef(opt_states) ? opt_states : [];- states.push(this.getLayerState());- return states;+ol.pointer.PointerEventHandler.prototype.down =+ function(pointerEventData, browserEvent) {+ this.fireEvent(ol.pointer.EventType.POINTERDOWN,+ pointerEventData, browserEvent);};/**- * Get the layer source.- * @return {ol.source.Source} The layer source (or `null` if not yet set).- * @observable- * @api stable+ * Triggers a 'pointermove' event.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent*/-ol.layer.Layer.prototype.getSource = function() {- var source = this.get(ol.layer.LayerProperty.SOURCE);- return goog.isDef(source) ?- /** @type {ol.source.Source} */ (source) : null;+ol.pointer.PointerEventHandler.prototype.move =+ function(pointerEventData, browserEvent) {+ this.fireEvent(ol.pointer.EventType.POINTERMOVE,+ pointerEventData, browserEvent);};-goog.exportProperty(- ol.layer.Layer.prototype,- 'getSource',- ol.layer.Layer.prototype.getSource);/**- * @inheritDoc- */-ol.layer.Layer.prototype.getSourceState = function() {- var source = this.getSource();- return goog.isNull(source) ? ol.source.State.UNDEFINED : source.getState();+ * Triggers a 'pointerup' event.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent+ */+ol.pointer.PointerEventHandler.prototype.up =+ function(pointerEventData, browserEvent) {+ this.fireEvent(ol.pointer.EventType.POINTERUP,+ pointerEventData, browserEvent);};/**- * @private+ * Triggers a 'pointerenter' event.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent*/-ol.layer.Layer.prototype.handleSourceChange_ = function() {- this.changed();+ol.pointer.PointerEventHandler.prototype.enter =+ function(pointerEventData, browserEvent) {+ pointerEventData.bubbles = false;+ this.fireEvent(ol.pointer.EventType.POINTERENTER,+ pointerEventData, browserEvent);};/**- * @private+ * Triggers a 'pointerleave' event.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent*/-ol.layer.Layer.prototype.handleSourcePropertyChange_ = function() {- if (!goog.isNull(this.sourceChangeKey_)) {- goog.events.unlistenByKey(this.sourceChangeKey_);- this.sourceChangeKey_ = null;- }- var source = this.getSource();- if (!goog.isNull(source)) {- this.sourceChangeKey_ = goog.events.listen(source,- goog.events.EventType.CHANGE, this.handleSourceChange_, false, this);- }- this.changed();+ol.pointer.PointerEventHandler.prototype.leave =+ function(pointerEventData, browserEvent) {+ pointerEventData.bubbles = false;+ this.fireEvent(ol.pointer.EventType.POINTERLEAVE,+ pointerEventData, browserEvent);};/**- * Set the layer source.- * @param {ol.source.Source} source The layer source.- * @observable- * @api stable+ * Triggers a 'pointerover' event.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent*/-ol.layer.Layer.prototype.setSource = function(source) {- this.set(ol.layer.LayerProperty.SOURCE, source);+ol.pointer.PointerEventHandler.prototype.over =+ function(pointerEventData, browserEvent) {+ pointerEventData.bubbles = true;+ this.fireEvent(ol.pointer.EventType.POINTEROVER,+ pointerEventData, browserEvent);};-goog.exportProperty(- ol.layer.Layer.prototype,- 'setSource',- ol.layer.Layer.prototype.setSource);--goog.provide('ol.ImageBase');-goog.provide('ol.ImageState');--goog.require('goog.asserts');-goog.require('goog.events.EventTarget');-goog.require('goog.events.EventType');-goog.require('ol.Attribution');-goog.require('ol.Extent');/**- * @enum {number}+ * Triggers a 'pointerout' event.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent*/-ol.ImageState = {- IDLE: 0,- LOADING: 1,- LOADED: 2,- ERROR: 3+ol.pointer.PointerEventHandler.prototype.out =+ function(pointerEventData, browserEvent) {+ pointerEventData.bubbles = true;+ this.fireEvent(ol.pointer.EventType.POINTEROUT,+ pointerEventData, browserEvent);};-/**- * @constructor- * @extends {goog.events.EventTarget}- * @param {ol.Extent} extent Extent.- * @param {number|undefined} resolution Resolution.- * @param {number} pixelRatio Pixel ratio.- * @param {ol.ImageState} state State.- * @param {Array.<ol.Attribution>} attributions Attributions.+ * Triggers a 'pointercancel' event.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent*/-ol.ImageBase = function(extent, resolution, pixelRatio, state, attributions) {-- goog.base(this);-- /**- * @private- * @type {Array.<ol.Attribution>}- */- this.attributions_ = attributions;-- /**- * @protected- * @type {ol.Extent}- */- this.extent = extent;+ol.pointer.PointerEventHandler.prototype.cancel =+ function(pointerEventData, browserEvent) {+ this.fireEvent(ol.pointer.EventType.POINTERCANCEL,+ pointerEventData, browserEvent);+};- /**- * @private- * @type {number}- */- this.pixelRatio_ = pixelRatio;- /**- * @protected- * @type {number|undefined}- */- this.resolution = resolution;+/**+ * Triggers a combination of 'pointerout' and 'pointerleave' events.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent+ */+ol.pointer.PointerEventHandler.prototype.leaveOut =+ function(pointerEventData, browserEvent) {+ this.out(pointerEventData, browserEvent);+ if (!this.contains_(+ pointerEventData.target,+ pointerEventData.relatedTarget)) {+ this.leave(pointerEventData, browserEvent);+ }+};- /**- * @protected- * @type {ol.ImageState}- */- this.state = state;+/**+ * Triggers a combination of 'pointerover' and 'pointerevents' events.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent+ */+ol.pointer.PointerEventHandler.prototype.enterOver =+ function(pointerEventData, browserEvent) {+ this.over(pointerEventData, browserEvent);+ if (!this.contains_(+ pointerEventData.target,+ pointerEventData.relatedTarget)) {+ this.enter(pointerEventData, browserEvent);+ }};-goog.inherits(ol.ImageBase, goog.events.EventTarget);/**- * @protected+ * @private+ * @param {Element} container+ * @param {Element} contained+ * @return {boolean} Returns true if the container element+ * contains the other element.*/-ol.ImageBase.prototype.changed = function() {- this.dispatchEvent(goog.events.EventType.CHANGE);+ol.pointer.PointerEventHandler.prototype.contains_ =+ function(container, contained) {+ return container.contains(contained);};+// EVENT CREATION AND TRACKING/**- * @return {Array.<ol.Attribution>} Attributions.+ * Creates a new Event of type `inType`, based on the information in+ * `pointerEventData`.+ *+ * @param {string} inType A string representing the type of event to create.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent+ * @return {ol.pointer.PointerEvent} A PointerEvent of type `inType`.*/-ol.ImageBase.prototype.getAttributions = function() {- return this.attributions_;+ol.pointer.PointerEventHandler.prototype.makeEvent =+ function(inType, pointerEventData, browserEvent) {+ return new ol.pointer.PointerEvent(inType, browserEvent, pointerEventData);};/**- * @return {ol.Extent} Extent.+ * Make and dispatch an event in one call.+ * @param {string} inType A string representing the type of event.+ * @param {Object} pointerEventData+ * @param {goog.events.BrowserEvent } browserEvent*/-ol.ImageBase.prototype.getExtent = function() {- return this.extent;+ol.pointer.PointerEventHandler.prototype.fireEvent =+ function(inType, pointerEventData, browserEvent) {+ var e = this.makeEvent(inType, pointerEventData, browserEvent);+ this.dispatchEvent(e);};/**- * @param {Object=} opt_context Object.- * @return {HTMLCanvasElement|Image|HTMLVideoElement} Image.+ * Creates a pointer event from a native pointer event+ * and dispatches this event.+ * @param {goog.events.BrowserEvent} nativeEvent A platform event with a target.*/-ol.ImageBase.prototype.getImage = goog.abstractMethod;+ol.pointer.PointerEventHandler.prototype.fireNativeEvent =+ function(nativeEvent) {+ var e = this.makeEvent(nativeEvent.type, nativeEvent.getBrowserEvent(),+ nativeEvent);+ this.dispatchEvent(e);+};/**- * @return {number} PixelRatio.+ * Wrap a native mouse event into a pointer event.+ * This proxy method is required for the legacy IE support.+ * @param {string} eventType The pointer event type.+ * @param {goog.events.BrowserEvent} browserEvent+ * @return {ol.pointer.PointerEvent}*/-ol.ImageBase.prototype.getPixelRatio = function() {- return this.pixelRatio_;+ol.pointer.PointerEventHandler.prototype.wrapMouseEvent =+ function(eventType, browserEvent) {+ var pointerEvent = this.makeEvent(+ eventType,+ ol.pointer.MouseSource.prepareEvent(browserEvent, this),+ browserEvent+ );+ return pointerEvent;};/**- * @return {number} Resolution.+ * @inheritDoc*/-ol.ImageBase.prototype.getResolution = function() {- goog.asserts.assert(goog.isDef(this.resolution), 'resolution not yet set');- return this.resolution;+ol.pointer.PointerEventHandler.prototype.disposeInternal = function() {+ this.unregister_();+ goog.base(this, 'disposeInternal');};/**- * @return {ol.ImageState} State.+ * Constants for event names.+ * @enum {string}*/-ol.ImageBase.prototype.getState = function() {- return this.state;+ol.pointer.EventType = {+ POINTERMOVE: 'pointermove',+ POINTERDOWN: 'pointerdown',+ POINTERUP: 'pointerup',+ POINTEROVER: 'pointerover',+ POINTEROUT: 'pointerout',+ POINTERENTER: 'pointerenter',+ POINTERLEAVE: 'pointerleave',+ POINTERCANCEL: 'pointercancel'};/**- * Load not yet loaded URI.+ * Properties to copy when cloning an event, with default values.+ * @type {Array.<Array>}*/-ol.ImageBase.prototype.load = goog.abstractMethod;+ol.pointer.CLONE_PROPS = [+ // MouseEvent+ ['bubbles', false],+ ['cancelable', false],+ ['view', null],+ ['detail', null],+ ['screenX', 0],+ ['screenY', 0],+ ['clientX', 0],+ ['clientY', 0],+ ['ctrlKey', false],+ ['altKey', false],+ ['shiftKey', false],+ ['metaKey', false],+ ['button', 0],+ ['relatedTarget', null],+ // DOM Level 3+ ['buttons', 0],+ // PointerEvent+ ['pointerId', 0],+ ['width', 0],+ ['height', 0],+ ['pressure', 0],+ ['tiltX', 0],+ ['tiltY', 0],+ ['pointerType', ''],+ ['hwTimestamp', 0],+ ['isPrimary', false],+ // event instance+ ['type', ''],+ ['target', null],+ ['currentTarget', null],+ ['which', 0]+];-goog.provide('ol.Tile');-goog.provide('ol.TileState');+goog.provide('ol.MapBrowserEvent');+goog.provide('ol.MapBrowserEvent.EventType');+goog.provide('ol.MapBrowserEventHandler');+goog.provide('ol.MapBrowserPointerEvent');+goog.require('goog.array');+goog.require('goog.asserts');goog.require('goog.events');+goog.require('goog.events.BrowserEvent');goog.require('goog.events.EventTarget');goog.require('goog.events.EventType');-goog.require('ol.TileCoord');---/**- * @enum {number}- * @api- */-ol.TileState = {- IDLE: 0,- LOADING: 1,- LOADED: 2,- ERROR: 3,- EMPTY: 4-};+goog.require('goog.object');+goog.require('ol');+goog.require('ol.Coordinate');+goog.require('ol.MapEvent');+goog.require('ol.Pixel');+goog.require('ol.pointer.PointerEvent');+goog.require('ol.pointer.PointerEventHandler');/*** @classdesc- * Base class for tiles.+ * Events emitted as map browser events are instances of this type.+ * See {@link ol.Map} for which events trigger a map browser event.** @constructor- * @extends {goog.events.EventTarget}- * @param {ol.TileCoord} tileCoord Tile coordinate.- * @param {ol.TileState} state State.- * @api+ * @extends {ol.MapEvent}+ * @implements {oli.MapBrowserEvent}+ * @param {string} type Event type.+ * @param {ol.Map} map Map.+ * @param {goog.events.BrowserEvent} browserEvent Browser event.+ * @param {boolean=} opt_dragging Is the map currently being dragged?+ * @param {?olx.FrameState=} opt_frameState Frame state.*/-ol.Tile = function(tileCoord, state) {+ol.MapBrowserEvent = function(type, map, browserEvent, opt_dragging,+ opt_frameState) {- goog.base(this);+ goog.base(this, type, map, opt_frameState);/**- * @type {ol.TileCoord}+ * @const+ * @type {goog.events.BrowserEvent}*/- this.tileCoord = tileCoord;+ this.browserEvent = browserEvent;/**- * @api- * @type {ol.TileState}+ * @const+ * @type {Event}+ * @api stable*/- this.state = state;+ this.originalEvent = browserEvent.getBrowserEvent();-};-goog.inherits(ol.Tile, goog.events.EventTarget);+ /**+ * @type {ol.Pixel}+ * @api stable+ */+ this.pixel = map.getEventPixel(this.originalEvent);+ /**+ * @type {ol.Coordinate}+ * @api stable+ */+ this.coordinate = map.getCoordinateFromPixel(this.pixel);++ /**+ * Indicates if the map is currently being dragged. Only set for+ * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.+ *+ * @type {boolean}+ * @api stable+ */+ this.dragging = goog.isDef(opt_dragging) ? opt_dragging : false;-/**- * @api- */-ol.Tile.prototype.changed = function() {- this.dispatchEvent(goog.events.EventType.CHANGE);};+goog.inherits(ol.MapBrowserEvent, ol.MapEvent);/**- * @function- * @param {Object=} opt_context Object.- * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.+ * Prevents the default browser action.+ * @see https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault+ * @override+ * @api stable*/-ol.Tile.prototype.getImage = goog.abstractMethod;+ol.MapBrowserEvent.prototype.preventDefault = function() {+ goog.base(this, 'preventDefault');+ this.browserEvent.preventDefault();+};/**- * @return {string} Key.+ * Prevents further propagation of the current event.+ * @see https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation+ * @override+ * @api stable*/-ol.Tile.prototype.getKey = function() {- return goog.getUid(this).toString();+ol.MapBrowserEvent.prototype.stopPropagation = function() {+ goog.base(this, 'stopPropagation');+ this.browserEvent.stopPropagation();};+/**- * @return {ol.TileCoord}- * @api+ * @constructor+ * @extends {ol.MapBrowserEvent}+ * @param {string} type Event type.+ * @param {ol.Map} map Map.+ * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.+ * @param {boolean=} opt_dragging Is the map currently being dragged?+ * @param {?olx.FrameState=} opt_frameState Frame state.*/-ol.Tile.prototype.getTileCoord = function() {- return this.tileCoord;+ol.MapBrowserPointerEvent = function(type, map, pointerEvent, opt_dragging,+ opt_frameState) {++ goog.base(this, type, map, pointerEvent.browserEvent, opt_dragging,+ opt_frameState);++ /**+ * @const+ * @type {ol.pointer.PointerEvent}+ */+ this.pointerEvent = pointerEvent;+};+goog.inherits(ol.MapBrowserPointerEvent, ol.MapBrowserEvent);+/**- * @return {ol.TileState} State.+ * @param {ol.Map} map The map with the viewport to listen to events on.+ * @constructor+ * @extends {goog.events.EventTarget}*/-ol.Tile.prototype.getState = function() {- return this.state;-};+ol.MapBrowserEventHandler = function(map) {++ goog.base(this);++ /**+ * This is the element that we will listen to the real events on.+ * @type {ol.Map}+ * @private+ */+ this.map_ = map;+ /**+ * @type {number}+ * @private+ */+ this.clickTimeoutId_ = 0;-/**- * FIXME empty description for jsdoc- */-ol.Tile.prototype.load = goog.abstractMethod;+ /**+ * @type {boolean}+ * @private+ */+ this.dragging_ = false;-goog.provide('ol.structs.LRUCache');+ /**+ * @type {Array.<goog.events.Key>}+ * @private+ */+ this.dragListenerKeys_ = null;-goog.require('goog.asserts');-goog.require('goog.object');+ /**+ * @type {goog.events.Key}+ * @private+ */+ this.pointerdownListenerKey_ = null;+ if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE) {+ /**+ * @type {goog.events.Key}+ * @private+ */+ this.ieDblclickListenerKey_ = null;+ }+ /**+ * The most recent "down" type event (or null if none have occurred).+ * Set on pointerdown.+ * @type {ol.pointer.PointerEvent}+ * @private+ */+ this.down_ = null;-/**- * Implements a Least-Recently-Used cache where the keys do not conflict with- * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring- * items from the cache is the responsibility of the user.- * @constructor- * @struct- * @template T- */-ol.structs.LRUCache = function() {+ var element = this.map_.getViewport();/**- * @private* @type {number}+ * @private*/- this.count_ = 0;+ this.activePointers_ = 0;/**+ * @type {Object.<number, boolean>}* @private- * @type {Object.<string, ol.structs.LRUCacheEntry>}*/- this.entries_ = {};+ this.trackedTouches_ = {};/**+ * Event handler which generates pointer events for+ * the viewport element.+ *+ * @type {ol.pointer.PointerEventHandler}* @private- * @type {?ol.structs.LRUCacheEntry}*/- this.oldest_ = null;+ this.pointerEventHandler_ = new ol.pointer.PointerEventHandler(element);/**+ * Event handler which generates pointer events for+ * the document (used when dragging).+ *+ * @type {ol.pointer.PointerEventHandler}* @private- * @type {?ol.structs.LRUCacheEntry}*/- this.newest_ = null;+ this.documentPointerEventHandler_ = null;-};+ this.pointerdownListenerKey_ = goog.events.listen(this.pointerEventHandler_,+ ol.pointer.EventType.POINTERDOWN,+ this.handlePointerDown_, false, this);+ this.relayedListenerKey_ = goog.events.listen(this.pointerEventHandler_,+ ol.pointer.EventType.POINTERMOVE,+ this.relayEvent_, false, this);-/**- * FIXME empty description for jsdoc- */-ol.structs.LRUCache.prototype.assertValid = function() {- if (this.count_ === 0) {- goog.asserts.assert(goog.object.isEmpty(this.entries_));- goog.asserts.assert(goog.isNull(this.oldest_));- goog.asserts.assert(goog.isNull(this.newest_));- } else {- goog.asserts.assert(goog.object.getCount(this.entries_) == this.count_);- goog.asserts.assert(!goog.isNull(this.oldest_));- goog.asserts.assert(goog.isNull(this.oldest_.older));- goog.asserts.assert(!goog.isNull(this.newest_));- goog.asserts.assert(goog.isNull(this.newest_.newer));- var i, entry;- var older = null;- i = 0;- for (entry = this.oldest_; !goog.isNull(entry); entry = entry.newer) {- goog.asserts.assert(entry.older === older);- older = entry;- ++i;- }- goog.asserts.assert(i == this.count_);- var newer = null;- i = 0;- for (entry = this.newest_; !goog.isNull(entry); entry = entry.older) {- goog.asserts.assert(entry.newer === newer);- newer = entry;- ++i;- }- goog.asserts.assert(i == this.count_);+ if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE) {+ /*+ * On legacy IE, double clicks do not produce two mousedown and+ * mouseup events. That is why a separate DBLCLICK event listener+ * is used.+ */+ this.ieDblclickListenerKey_ = goog.events.listen(element,+ goog.events.EventType.DBLCLICK,+ this.emulateClickLegacyIE_, false, this);}-};--/**- * FIXME empty description for jsdoc- */-ol.structs.LRUCache.prototype.clear = function() {- this.count_ = 0;- this.entries_ = {};- this.oldest_ = null;- this.newest_ = null;};+goog.inherits(ol.MapBrowserEventHandler, goog.events.EventTarget);/**- * @param {string} key Key.- * @return {boolean} Contains key.+ * @param {goog.events.BrowserEvent} browserEvent Pointer event.+ * @private*/-ol.structs.LRUCache.prototype.containsKey = function(key) {- return this.entries_.hasOwnProperty(key);+ol.MapBrowserEventHandler.prototype.emulateClickLegacyIE_ =+ function(browserEvent) {+ var pointerEvent = this.pointerEventHandler_.wrapMouseEvent(+ ol.MapBrowserEvent.EventType.POINTERUP,+ browserEvent+ );+ this.emulateClick_(pointerEvent);};/**- * @param {function(this: S, T, string, ol.structs.LRUCache): ?} f The function- * to call for every entry from the oldest to the newer. This function takes- * 3 arguments (the entry value, the entry key and the LRUCache object).- * The return value is ignored.- * @param {S=} opt_this The object to use as `this` in `f`.- * @template S+ * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.+ * @private*/-ol.structs.LRUCache.prototype.forEach = function(f, opt_this) {- var entry = this.oldest_;- while (!goog.isNull(entry)) {- f.call(opt_this, entry.value_, entry.key_, this);- entry = entry.newer;+ol.MapBrowserEventHandler.prototype.emulateClick_ = function(pointerEvent) {+ var newEvent;+ newEvent = new ol.MapBrowserPointerEvent(+ ol.MapBrowserEvent.EventType.CLICK, this.map_, pointerEvent);+ this.dispatchEvent(newEvent);+ if (this.clickTimeoutId_ !== 0) {+ // double-click+ goog.global.clearTimeout(this.clickTimeoutId_);+ this.clickTimeoutId_ = 0;+ newEvent = new ol.MapBrowserPointerEvent(+ ol.MapBrowserEvent.EventType.DBLCLICK, this.map_, pointerEvent);+ this.dispatchEvent(newEvent);+ } else {+ // click+ this.clickTimeoutId_ = goog.global.setTimeout(goog.bind(function() {+ this.clickTimeoutId_ = 0;+ var newEvent = new ol.MapBrowserPointerEvent(+ ol.MapBrowserEvent.EventType.SINGLECLICK, this.map_, pointerEvent);+ this.dispatchEvent(newEvent);+ }, this), 250);}};/**- * @param {string} key Key.- * @return {T} Value.+ * Keeps track on how many pointers are currently active.+ *+ * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.+ * @private*/-ol.structs.LRUCache.prototype.get = function(key) {- var entry = this.entries_[key];- goog.asserts.assert(goog.isDef(entry));- if (entry === this.newest_) {- return entry.value_;- } else if (entry === this.oldest_) {- this.oldest_ = this.oldest_.newer;- this.oldest_.older = null;- } else {- entry.newer.older = entry.older;- entry.older.newer = entry.newer;+ol.MapBrowserEventHandler.prototype.updateActivePointers_ =+ function(pointerEvent) {+ var event = pointerEvent;++ if (event.type == ol.MapBrowserEvent.EventType.POINTERUP ||+ event.type == ol.MapBrowserEvent.EventType.POINTERCANCEL) {+ delete this.trackedTouches_[event.pointerId];+ } else if (event.type == ol.MapBrowserEvent.EventType.POINTERDOWN) {+ this.trackedTouches_[event.pointerId] = true;}- entry.newer = null;- entry.older = this.newest_;- this.newest_.newer = entry;- this.newest_ = entry;- return entry.value_;+ this.activePointers_ = goog.object.getCount(this.trackedTouches_);};/**- * @return {number} Count.+ * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.+ * @private*/-ol.structs.LRUCache.prototype.getCount = function() {- return this.count_;-};+ol.MapBrowserEventHandler.prototype.handlePointerUp_ = function(pointerEvent) {+ this.updateActivePointers_(pointerEvent);+ var newEvent = new ol.MapBrowserPointerEvent(+ ol.MapBrowserEvent.EventType.POINTERUP, this.map_, pointerEvent);+ this.dispatchEvent(newEvent);+ // We emulate click events on left mouse button click, touch contact, and pen+ // contact. isMouseActionButton returns true in these cases (evt.button is set+ // to 0).+ // See http://www.w3.org/TR/pointerevents/#button-states+ if (!this.dragging_ && this.isMouseActionButton_(pointerEvent)) {+ goog.asserts.assert(!goog.isNull(this.down_));+ this.emulateClick_(this.down_);+ }-/**- * @return {Array.<string>} Keys.- */-ol.structs.LRUCache.prototype.getKeys = function() {- var keys = new Array(this.count_);- var i = 0;- var entry;- for (entry = this.newest_; !goog.isNull(entry); entry = entry.older) {- keys[i++] = entry.key_;+ goog.asserts.assert(this.activePointers_ >= 0);+ if (this.activePointers_ === 0) {+ goog.array.forEach(this.dragListenerKeys_, goog.events.unlistenByKey);+ this.dragListenerKeys_ = null;+ this.dragging_ = false;+ this.down_ = null;+ goog.dispose(this.documentPointerEventHandler_);+ this.documentPointerEventHandler_ = null;}- goog.asserts.assert(i == this.count_);- return keys;};/**- * @return {Array.<T>} Values.+ * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.+ * @return {boolean} If the left mouse button was pressed.+ * @private*/-ol.structs.LRUCache.prototype.getValues = function() {- var values = new Array(this.count_);- var i = 0;- var entry;- for (entry = this.newest_; !goog.isNull(entry); entry = entry.older) {- values[i++] = entry.value_;+ol.MapBrowserEventHandler.prototype.isMouseActionButton_ =+ function(pointerEvent) {+ if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE) {+ return pointerEvent.button == 1;+ } else {+ return pointerEvent.button === 0;}- goog.asserts.assert(i == this.count_);- return values;};/**- * @return {T} Last value.+ * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.+ * @private*/-ol.structs.LRUCache.prototype.peekLast = function() {- goog.asserts.assert(!goog.isNull(this.oldest_));- return this.oldest_.value_;-};-+ol.MapBrowserEventHandler.prototype.handlePointerDown_ =+ function(pointerEvent) {+ this.updateActivePointers_(pointerEvent);+ var newEvent = new ol.MapBrowserPointerEvent(+ ol.MapBrowserEvent.EventType.POINTERDOWN, this.map_, pointerEvent);+ this.dispatchEvent(newEvent);-/**- * @return {string} Last key.- */-ol.structs.LRUCache.prototype.peekLastKey = function() {- goog.asserts.assert(!goog.isNull(this.oldest_));- return this.oldest_.key_;-};+ this.down_ = pointerEvent;+ if (goog.isNull(this.dragListenerKeys_)) {+ /* Set up a pointer event handler on the `document`,+ * which is required when the pointer is moved outside+ * the viewport when dragging.+ */+ this.documentPointerEventHandler_ =+ new ol.pointer.PointerEventHandler(document);-/**- * @return {T} value Value.- */-ol.structs.LRUCache.prototype.pop = function() {- goog.asserts.assert(!goog.isNull(this.oldest_));- goog.asserts.assert(!goog.isNull(this.newest_));- var entry = this.oldest_;- goog.asserts.assert(entry.key_ in this.entries_);- delete this.entries_[entry.key_];- if (!goog.isNull(entry.newer)) {- entry.newer.older = null;- }- this.oldest_ = entry.newer;- if (goog.isNull(this.oldest_)) {- this.newest_ = null;+ this.dragListenerKeys_ = [+ goog.events.listen(this.documentPointerEventHandler_,+ ol.MapBrowserEvent.EventType.POINTERMOVE,+ this.handlePointerMove_, false, this),+ goog.events.listen(this.documentPointerEventHandler_,+ ol.MapBrowserEvent.EventType.POINTERUP,+ this.handlePointerUp_, false, this),+ /* Note that the listener for `pointercancel is set up on+ * `pointerEventHandler_` and not `documentPointerEventHandler_` like+ * the `pointerup` and `pointermove` listeners.+ *+ * The reason for this is the following: `TouchSource.vacuumTouches_()`+ * issues `pointercancel` events, when there was no `touchend` for a+ * `touchstart`. Now, let's say a first `touchstart` is registered on+ * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.+ * But `documentPointerEventHandler_` doesn't know about the first+ * `touchstart`. If there is no `touchend` for the `touchstart`, we can+ * only receive a `touchcancel` from `pointerEventHandler_`, because it is+ * only registered there.+ */+ goog.events.listen(this.pointerEventHandler_,+ ol.MapBrowserEvent.EventType.POINTERCANCEL,+ this.handlePointerUp_, false, this)+ ];}- --this.count_;- return entry.value_;};/**- * @param {string} key Key.- * @param {T} value Value.+ * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.+ * @private*/-ol.structs.LRUCache.prototype.set = function(key, value) {- goog.asserts.assert(!(key in {}));- goog.asserts.assert(!(key in this.entries_));- var entry = {- key_: key,- newer: null,- older: this.newest_,- value_: value- };- if (goog.isNull(this.newest_)) {- this.oldest_ = entry;- } else {- this.newest_.newer = entry;+ol.MapBrowserEventHandler.prototype.handlePointerMove_ =+ function(pointerEvent) {+ // Fix IE10 on windows Surface : When you tap the tablet, it triggers+ // multiple pointermove events between pointerdown and pointerup with+ // the exact same coordinates of the pointerdown event. To avoid a+ // 'false' touchmove event to be dispatched , we test if the pointer+ // effectively moved.+ if (this.isMoving_(pointerEvent)) {+ this.dragging_ = true;+ var newEvent = new ol.MapBrowserPointerEvent(+ ol.MapBrowserEvent.EventType.POINTERDRAG, this.map_, pointerEvent,+ this.dragging_);+ this.dispatchEvent(newEvent);}- this.newest_ = entry;- this.entries_[key] = entry;- ++this.count_;++ // Some native android browser triggers mousemove events during small period+ // of time. See: https://code.google.com/p/android/issues/detail?id=5491 or+ // https://code.google.com/p/android/issues/detail?id=19827+ // ex: Galaxy Tab P3110 + Android 4.1.1+ pointerEvent.preventDefault();};/**- * @typedef {{key_: string,- * newer: ol.structs.LRUCacheEntry,- * older: ol.structs.LRUCacheEntry,- * value_: *}}+ * Wrap and relay a pointer event. Note that this requires that the type+ * string for the MapBrowserPointerEvent matches the PointerEvent type.+ * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.+ * @private*/-ol.structs.LRUCacheEntry;--goog.provide('ol.TileCache');--goog.require('ol');-goog.require('ol.TileRange');-goog.require('ol.structs.LRUCache');-goog.require('ol.tilecoord');-+ol.MapBrowserEventHandler.prototype.relayEvent_ = function(pointerEvent) {+ var dragging = !goog.isNull(this.down_) && this.isMoving_(pointerEvent);+ this.dispatchEvent(new ol.MapBrowserPointerEvent(+ pointerEvent.type, this.map_, pointerEvent, dragging));+};/**- * @constructor- * @extends {ol.structs.LRUCache.<ol.Tile>}- * @param {number=} opt_highWaterMark High water mark.- * @struct+ * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.+ * @return {boolean}+ * @private*/-ol.TileCache = function(opt_highWaterMark) {-- goog.base(this);-- /**- * @private- * @type {number}- */- this.highWaterMark_ = goog.isDef(opt_highWaterMark) ?- opt_highWaterMark : ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK;-+ol.MapBrowserEventHandler.prototype.isMoving_ = function(pointerEvent) {+ return pointerEvent.clientX != this.down_.clientX ||+ pointerEvent.clientY != this.down_.clientY;};-goog.inherits(ol.TileCache, ol.structs.LRUCache);/**- * @return {boolean} Can expire cache.+ * @inheritDoc*/-ol.TileCache.prototype.canExpireCache = function() {- return this.getCount() > this.highWaterMark_;+ol.MapBrowserEventHandler.prototype.disposeInternal = function() {+ if (!goog.isNull(this.relayedListenerKey_)) {+ goog.events.unlistenByKey(this.relayedListenerKey_);+ this.relayedListenerKey_ = null;+ }+ if (!goog.isNull(this.pointerdownListenerKey_)) {+ goog.events.unlistenByKey(this.pointerdownListenerKey_);+ this.pointerdownListenerKey_ = null;+ }+ if (!goog.isNull(this.dragListenerKeys_)) {+ goog.array.forEach(this.dragListenerKeys_, goog.events.unlistenByKey);+ this.dragListenerKeys_ = null;+ }+ if (!goog.isNull(this.documentPointerEventHandler_)) {+ goog.dispose(this.documentPointerEventHandler_);+ this.documentPointerEventHandler_ = null;+ }+ if (!goog.isNull(this.pointerEventHandler_)) {+ goog.dispose(this.pointerEventHandler_);+ this.pointerEventHandler_ = null;+ }+ if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE &&+ !goog.isNull(this.ieDblclickListenerKey_)) {+ goog.events.unlistenByKey(this.ieDblclickListenerKey_);+ this.ieDblclickListenerKey_ = null;+ }+ goog.base(this, 'disposeInternal');};/**- * @param {Object.<string, ol.TileRange>} usedTiles Used tiles.+ * Constants for event names.+ * @enum {string}*/-ol.TileCache.prototype.expireCache = function(usedTiles) {- var tile, zKey;- while (this.canExpireCache()) {- tile = /** @type {ol.Tile} */ (this.peekLast());- zKey = tile.tileCoord[0].toString();- if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {- break;- } else {- this.pop().dispose();- }- }+ol.MapBrowserEvent.EventType = {+ // derived event types+ /**+ * A true single click with no dragging and no double click. Note that this+ * event is delayed by 250 ms to ensure that it is not a double click.+ * @event ol.MapBrowserEvent#singleclick+ * @api+ */+ SINGLECLICK: 'singleclick',+ /**+ * A click with no dragging. A double click will fire two of this.+ * @event ol.MapBrowserEvent#click+ * @api+ */+ CLICK: goog.events.EventType.CLICK,+ /**+ * A true double click, with no dragging.+ * @event ol.MapBrowserEvent#dblclick+ * @api+ */+ DBLCLICK: goog.events.EventType.DBLCLICK,+ /**+ * Triggered when a pointer is dragged.+ * @event ol.MapBrowserEvent#pointerdrag+ * @api+ */+ POINTERDRAG: 'pointerdrag',++ // original pointer event types+ /**+ * Triggered when a pointer is moved. Note that on touch devices this is+ * triggered when the map is panned, so is not the same as mousemove.+ * @event ol.MapBrowserEvent#pointermove+ * @api+ */+ POINTERMOVE: 'pointermove',+ POINTERDOWN: 'pointerdown',+ POINTERUP: 'pointerup',+ POINTEROVER: 'pointerover',+ POINTEROUT: 'pointerout',+ POINTERENTER: 'pointerenter',+ POINTERLEAVE: 'pointerleave',+ POINTERCANCEL: 'pointercancel'};+goog.provide('ol.layer.Base');+goog.provide('ol.layer.LayerProperty');+goog.provide('ol.layer.LayerState');++goog.require('goog.events');+goog.require('goog.math');+goog.require('goog.object');+goog.require('ol.Object');+goog.require('ol.source.State');+/**- * Remove a tile range from the cache, e.g. to invalidate tiles.- * @param {ol.TileRange} tileRange The tile range to prune.+ * @enum {string}*/-ol.TileCache.prototype.pruneTileRange = function(tileRange) {- var i = this.getCount(),- key;- while (i--) {- key = this.peekLastKey();- if (tileRange.contains(ol.tilecoord.createFromString(key))) {- this.pop().dispose();- } else {- this.get(key);- }- }+ol.layer.LayerProperty = {+ BRIGHTNESS: 'brightness',+ CONTRAST: 'contrast',+ HUE: 'hue',+ OPACITY: 'opacity',+ SATURATION: 'saturation',+ VISIBLE: 'visible',+ EXTENT: 'extent',+ MAX_RESOLUTION: 'maxResolution',+ MIN_RESOLUTION: 'minResolution',+ SOURCE: 'source'};-goog.provide('ol.tilegrid.TileGrid');-goog.require('goog.array');-goog.require('goog.asserts');-goog.require('goog.functions');-goog.require('ol');-goog.require('ol.Coordinate');-goog.require('ol.TileCoord');-goog.require('ol.TileRange');-goog.require('ol.array');-goog.require('ol.extent');-goog.require('ol.extent.Corner');-goog.require('ol.proj');-goog.require('ol.proj.METERS_PER_UNIT');-goog.require('ol.proj.Projection');-goog.require('ol.proj.Units');-goog.require('ol.tilecoord');+/**+ * @typedef {{layer: ol.layer.Layer,+ * brightness: number,+ * contrast: number,+ * hue: number,+ * opacity: number,+ * saturation: number,+ * sourceState: ol.source.State,+ * visible: boolean,+ * extent: (ol.Extent|undefined),+ * maxResolution: number,+ * minResolution: number}}+ */+ol.layer.LayerState;/*** @classdesc- * Base class for setting the grid pattern for sources accessing tiled-image- * servers.+ * Abstract base class; normally only used for creating subclasses and not+ * instantiated in apps.+ * Note that with `ol.layer.Base` and all its subclasses, any property set in+ * the options is set as a {@link ol.Object} property on the layer object, so+ * is observable, and has get/set accessors.** @constructor- * @param {olx.tilegrid.TileGridOptions} options Tile grid options.- * @struct+ * @extends {ol.Object}+ * @param {olx.layer.BaseOptions} options Layer options.* @api stable*/-ol.tilegrid.TileGrid = function(options) {-- /**- * @protected- * @type {number}- */- this.minZoom = goog.isDef(options.minZoom) ? options.minZoom : 0;+ol.layer.Base = function(options) {- /**- * @private- * @type {!Array.<number>}- */- this.resolutions_ = options.resolutions;- goog.asserts.assert(goog.array.isSorted(this.resolutions_, function(a, b) {- return b - a;- }, true));+ goog.base(this);/**- * @protected- * @type {number}+ * @type {Object.<string, *>}*/- this.maxZoom = this.resolutions_.length - 1;+ var properties = goog.object.clone(options);+ properties[ol.layer.LayerProperty.BRIGHTNESS] =+ goog.isDef(options.brightness) ? options.brightness : 0;+ properties[ol.layer.LayerProperty.CONTRAST] =+ goog.isDef(options.contrast) ? options.contrast : 1;+ properties[ol.layer.LayerProperty.HUE] =+ goog.isDef(options.hue) ? options.hue : 0;+ properties[ol.layer.LayerProperty.OPACITY] =+ goog.isDef(options.opacity) ? options.opacity : 1;+ properties[ol.layer.LayerProperty.SATURATION] =+ goog.isDef(options.saturation) ? options.saturation : 1;+ properties[ol.layer.LayerProperty.VISIBLE] =+ goog.isDef(options.visible) ? options.visible : true;+ properties[ol.layer.LayerProperty.MAX_RESOLUTION] =+ goog.isDef(options.maxResolution) ? options.maxResolution : Infinity;+ properties[ol.layer.LayerProperty.MIN_RESOLUTION] =+ goog.isDef(options.minResolution) ? options.minResolution : 0;- /**- * @private- * @type {ol.Coordinate}- */- this.origin_ = goog.isDef(options.origin) ? options.origin : null;+ this.setProperties(properties);+};+goog.inherits(ol.layer.Base, ol.Object);- /**- * @private- * @type {Array.<ol.Coordinate>}- */- this.origins_ = null;- if (goog.isDef(options.origins)) {- this.origins_ = options.origins;- goog.asserts.assert(this.origins_.length == this.maxZoom + 1);- }- goog.asserts.assert(- (goog.isNull(this.origin_) && !goog.isNull(this.origins_)) ||- (!goog.isNull(this.origin_) && goog.isNull(this.origins_)));- /**- * @private- * @type {Array.<number>}- */- this.tileSizes_ = null;- if (goog.isDef(options.tileSizes)) {- this.tileSizes_ = options.tileSizes;- goog.asserts.assert(this.tileSizes_.length == this.maxZoom + 1);- }+/**+ * @return {number} The brightness of the layer.+ * @observable+ * @api+ */+ol.layer.Base.prototype.getBrightness = function() {+ return /** @type {number} */ (this.get(ol.layer.LayerProperty.BRIGHTNESS));+};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'getBrightness',+ ol.layer.Base.prototype.getBrightness);- /**- * @private- * @type {number|undefined}- */- this.tileSize_ = goog.isDef(options.tileSize) ?- options.tileSize :- goog.isNull(this.tileSizes_) ? ol.DEFAULT_TILE_SIZE : undefined;- goog.asserts.assert(- (!goog.isDef(this.tileSize_) && !goog.isNull(this.tileSizes_)) ||- (goog.isDef(this.tileSize_) && goog.isNull(this.tileSizes_)));+/**+ * @return {number} The contrast of the layer.+ * @observable+ * @api+ */+ol.layer.Base.prototype.getContrast = function() {+ return /** @type {number} */ (this.get(ol.layer.LayerProperty.CONTRAST));};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'getContrast',+ ol.layer.Base.prototype.getContrast);/**- * @private- * @type {ol.TileCoord}+ * @return {number} The hue of the layer.+ * @observable+ * @api*/-ol.tilegrid.TileGrid.tmpTileCoord_ = [0, 0, 0];+ol.layer.Base.prototype.getHue = function() {+ return /** @type {number} */ (this.get(ol.layer.LayerProperty.HUE));+};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'getHue',+ ol.layer.Base.prototype.getHue);/**- * Returns the identity function. May be overridden in subclasses.- * @param {{extent: (ol.Extent|undefined),- * wrapX: (boolean|undefined)}=} opt_options Options.- * @return {function(ol.TileCoord, ol.proj.Projection, ol.TileCoord=):- * ol.TileCoord} Tile coordinate transform.+ * @return {ol.layer.LayerState} Layer state.*/-ol.tilegrid.TileGrid.prototype.createTileCoordTransform =- function(opt_options) {- return goog.functions.identity;+ol.layer.Base.prototype.getLayerState = function() {+ var brightness = this.getBrightness();+ var contrast = this.getContrast();+ var hue = this.getHue();+ var opacity = this.getOpacity();+ var saturation = this.getSaturation();+ var sourceState = this.getSourceState();+ var visible = this.getVisible();+ var extent = this.getExtent();+ var maxResolution = this.getMaxResolution();+ var minResolution = this.getMinResolution();+ return {+ layer: /** @type {ol.layer.Layer} */ (this),+ brightness: goog.math.clamp(brightness, -1, 1),+ contrast: Math.max(contrast, 0),+ hue: hue,+ opacity: goog.math.clamp(opacity, 0, 1),+ saturation: Math.max(saturation, 0),+ sourceState: sourceState,+ visible: visible,+ extent: extent,+ maxResolution: maxResolution,+ minResolution: Math.max(minResolution, 0)+ };};/**- * @param {ol.TileCoord} tileCoord Tile coordinate.- * @param {function(this: T, number, ol.TileRange): boolean} callback Callback.- * @param {T=} opt_this The object to use as `this` in `callback`.- * @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.- * @param {ol.Extent=} opt_extent Temporary ol.Extent object.- * @return {boolean} Callback succeeded.- * @template T+ * @param {Array.<ol.layer.Layer>=} opt_array Array of layers (to be+ * modified in place).+ * @return {Array.<ol.layer.Layer>} Array of layers.*/-ol.tilegrid.TileGrid.prototype.forEachTileCoordParentTileRange =- function(tileCoord, callback, opt_this, opt_tileRange, opt_extent) {- var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);- var z = tileCoord[0] - 1;- while (z >= this.minZoom) {- if (callback.call(opt_this, z,- this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange))) {- return true;- }- --z;- }- return false;-};+ol.layer.Base.prototype.getLayersArray = goog.abstractMethod;/**- * @return {number} Max zoom.- * @api+ * @param {Array.<ol.layer.LayerState>=} opt_states Optional list of layer+ * states (to be modified in place).+ * @return {Array.<ol.layer.LayerState>} List of layer states.*/-ol.tilegrid.TileGrid.prototype.getMaxZoom = function() {- return this.maxZoom;-};+ol.layer.Base.prototype.getLayerStatesArray = goog.abstractMethod;/**- * @return {number} Min zoom.- * @api+ * @return {ol.Extent|undefined} The layer extent.+ * @observable+ * @api stable*/-ol.tilegrid.TileGrid.prototype.getMinZoom = function() {- return this.minZoom;+ol.layer.Base.prototype.getExtent = function() {+ return /** @type {ol.Extent|undefined} */ (+ this.get(ol.layer.LayerProperty.EXTENT));};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'getExtent',+ ol.layer.Base.prototype.getExtent);/**- * @param {number} z Z.- * @return {ol.Coordinate} Origin.+ * @return {number} The maximum resolution of the layer.+ * @observable* @api stable*/-ol.tilegrid.TileGrid.prototype.getOrigin = function(z) {- if (!goog.isNull(this.origin_)) {- return this.origin_;- } else {- goog.asserts.assert(!goog.isNull(this.origins_));- goog.asserts.assert(this.minZoom <= z && z <= this.maxZoom);- return this.origins_[z];- }+ol.layer.Base.prototype.getMaxResolution = function() {+ return /** @type {number} */ (+ this.get(ol.layer.LayerProperty.MAX_RESOLUTION));};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'getMaxResolution',+ ol.layer.Base.prototype.getMaxResolution);/**- * @param {number} z Z.- * @return {number} Resolution.+ * @return {number} The minimum resolution of the layer.+ * @observable* @api stable*/-ol.tilegrid.TileGrid.prototype.getResolution = function(z) {- goog.asserts.assert(this.minZoom <= z && z <= this.maxZoom);- return this.resolutions_[z];+ol.layer.Base.prototype.getMinResolution = function() {+ return /** @type {number} */ (+ this.get(ol.layer.LayerProperty.MIN_RESOLUTION));};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'getMinResolution',+ ol.layer.Base.prototype.getMinResolution);/**- * @return {Array.<number>} Resolutions.+ * @return {number} The opacity of the layer.+ * @observable* @api stable*/-ol.tilegrid.TileGrid.prototype.getResolutions = function() {- return this.resolutions_;+ol.layer.Base.prototype.getOpacity = function() {+ return /** @type {number} */ (this.get(ol.layer.LayerProperty.OPACITY));};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'getOpacity',+ ol.layer.Base.prototype.getOpacity);/**- * @param {ol.TileCoord} tileCoord Tile coordinate.- * @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.- * @param {ol.Extent=} opt_extent Temporary ol.Extent object.- * @return {ol.TileRange} Tile range.+ * @return {number} The saturation of the layer.+ * @observable+ * @api*/-ol.tilegrid.TileGrid.prototype.getTileCoordChildTileRange =- function(tileCoord, opt_tileRange, opt_extent) {- if (tileCoord[0] < this.maxZoom) {- var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);- return this.getTileRangeForExtentAndZ(- tileCoordExtent, tileCoord[0] + 1, opt_tileRange);- } else {- return null;- }+ol.layer.Base.prototype.getSaturation = function() {+ return /** @type {number} */ (this.get(ol.layer.LayerProperty.SATURATION));};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'getSaturation',+ ol.layer.Base.prototype.getSaturation);/**- * @param {number} z Z.- * @param {ol.TileRange} tileRange Tile range.- * @param {ol.Extent=} opt_extent Temporary ol.Extent object.- * @return {ol.Extent} Extent.+ * @return {ol.source.State} Source state.*/-ol.tilegrid.TileGrid.prototype.getTileRangeExtent =- function(z, tileRange, opt_extent) {- var origin = this.getOrigin(z);- var resolution = this.getResolution(z);- var tileSize = this.getTileSize(z);- var minX = origin[0] + tileRange.minX * tileSize * resolution;- var maxX = origin[0] + (tileRange.maxX + 1) * tileSize * resolution;- var minY = origin[1] + tileRange.minY * tileSize * resolution;- var maxY = origin[1] + (tileRange.maxY + 1) * tileSize * resolution;- return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);-};+ol.layer.Base.prototype.getSourceState = goog.abstractMethod;/**- * @param {ol.Extent} extent Extent.- * @param {number} resolution Resolution.- * @param {ol.TileRange=} opt_tileRange Temporary tile range object.- * @return {ol.TileRange} Tile range.+ * @return {boolean} The visibility of the layer.+ * @observable+ * @api stable*/-ol.tilegrid.TileGrid.prototype.getTileRangeForExtentAndResolution =- function(extent, resolution, opt_tileRange) {- var tileCoord = ol.tilegrid.TileGrid.tmpTileCoord_;- this.getTileCoordForXYAndResolution_(- extent[0], extent[1], resolution, false, tileCoord);- var minX = tileCoord[1];- var minY = tileCoord[2];- this.getTileCoordForXYAndResolution_(- extent[2], extent[3], resolution, true, tileCoord);- return ol.TileRange.createOrUpdate(- minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);+ol.layer.Base.prototype.getVisible = function() {+ return /** @type {boolean} */ (this.get(ol.layer.LayerProperty.VISIBLE));};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'getVisible',+ ol.layer.Base.prototype.getVisible);/**- * @param {ol.Extent} extent Extent.- * @param {number} z Z.- * @param {ol.TileRange=} opt_tileRange Temporary tile range object.- * @return {ol.TileRange} Tile range.+ * Adjust the layer brightness. A value of -1 will render the layer completely+ * black. A value of 0 will leave the brightness unchanged. A value of 1 will+ * render the layer completely white. Other values are linear multipliers on+ * the effect (values are clamped between -1 and 1).+ *+ * The filter effects draft [1] says the brightness function is supposed to+ * render 0 black, 1 unchanged, and all other values as a linear multiplier.+ *+ * The current WebKit implementation clamps values between -1 (black) and 1+ * (white) [2]. There is a bug open to change the filter effect spec [3].+ *+ * TODO: revisit this if the spec is still unmodified before we release+ *+ * [1] https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html+ * [2] https://github.com/WebKit/webkit/commit/8f4765e569+ * [3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647+ *+ * @param {number} brightness The brightness of the layer.+ * @observable+ * @api*/-ol.tilegrid.TileGrid.prototype.getTileRangeForExtentAndZ =- function(extent, z, opt_tileRange) {- var resolution = this.getResolution(z);- return this.getTileRangeForExtentAndResolution(- extent, resolution, opt_tileRange);+ol.layer.Base.prototype.setBrightness = function(brightness) {+ this.set(ol.layer.LayerProperty.BRIGHTNESS, brightness);};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'setBrightness',+ ol.layer.Base.prototype.setBrightness);/**- * @param {ol.TileCoord} tileCoord Tile coordinate.- * @return {ol.Coordinate} Tile center.+ * Adjust the layer contrast. A value of 0 will render the layer completely+ * grey. A value of 1 will leave the contrast unchanged. Other values are+ * linear multipliers on the effect (and values over 1 are permitted).+ *+ * @param {number} contrast The contrast of the layer.+ * @observable+ * @api*/-ol.tilegrid.TileGrid.prototype.getTileCoordCenter = function(tileCoord) {- var origin = this.getOrigin(tileCoord[0]);- var resolution = this.getResolution(tileCoord[0]);- var tileSize = this.getTileSize(tileCoord[0]);- return [- origin[0] + (tileCoord[1] + 0.5) * tileSize * resolution,- origin[1] + (tileCoord[2] + 0.5) * tileSize * resolution- ];+ol.layer.Base.prototype.setContrast = function(contrast) {+ this.set(ol.layer.LayerProperty.CONTRAST, contrast);};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'setContrast',+ ol.layer.Base.prototype.setContrast);/**- * @param {ol.TileCoord} tileCoord Tile coordinate.- * @param {ol.Extent=} opt_extent Temporary extent object.- * @return {ol.Extent} Extent.+ * Apply a hue-rotation to the layer. A value of 0 will leave the hue+ * unchanged. Other values are radians around the color circle.+ * @param {number} hue The hue of the layer.+ * @observable+ * @api*/-ol.tilegrid.TileGrid.prototype.getTileCoordExtent =- function(tileCoord, opt_extent) {- var origin = this.getOrigin(tileCoord[0]);- var resolution = this.getResolution(tileCoord[0]);- var tileSize = this.getTileSize(tileCoord[0]);- var minX = origin[0] + tileCoord[1] * tileSize * resolution;- var minY = origin[1] + tileCoord[2] * tileSize * resolution;- var maxX = minX + tileSize * resolution;- var maxY = minY + tileSize * resolution;- return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);+ol.layer.Base.prototype.setHue = function(hue) {+ this.set(ol.layer.LayerProperty.HUE, hue);};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'setHue',+ ol.layer.Base.prototype.setHue);/**- * Get the tile coordinate for the given map coordinate and resolution. This- * method considers that coordinates that intersect tile boundaries should be- * assigned the higher tile coordinate.- *- * @param {ol.Coordinate} coordinate Coordinate.- * @param {number} resolution Resolution.- * @param {ol.TileCoord=} opt_tileCoord Destination ol.TileCoord object.- * @return {ol.TileCoord} Tile coordinate.- * @api+ * Set the extent at which the layer is visible. If `undefined`, the layer+ * will be visible at all extents.+ * @param {ol.Extent|undefined} extent The extent of the layer.+ * @observable+ * @api stable*/-ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndResolution = function(- coordinate, resolution, opt_tileCoord) {- return this.getTileCoordForXYAndResolution_(- coordinate[0], coordinate[1], resolution, false, opt_tileCoord);+ol.layer.Base.prototype.setExtent = function(extent) {+ this.set(ol.layer.LayerProperty.EXTENT, extent);};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'setExtent',+ ol.layer.Base.prototype.setExtent);/**- * @param {number} x X.- * @param {number} y Y.- * @param {number} resolution Resolution.- * @param {boolean} reverseIntersectionPolicy Instead of letting edge- * intersections go to the higher tile coordinate, let edge intersections- * go to the lower tile coordinate.- * @param {ol.TileCoord=} opt_tileCoord Temporary ol.TileCoord object.- * @return {ol.TileCoord} Tile coordinate.- * @private+ * @param {number} maxResolution The maximum resolution of the layer.+ * @observable+ * @api stable*/-ol.tilegrid.TileGrid.prototype.getTileCoordForXYAndResolution_ = function(- x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {- var z = this.getZForResolution(resolution);- var scale = resolution / this.getResolution(z);- var origin = this.getOrigin(z);- var tileSize = this.getTileSize(z);+ol.layer.Base.prototype.setMaxResolution = function(maxResolution) {+ this.set(ol.layer.LayerProperty.MAX_RESOLUTION, maxResolution);+};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'setMaxResolution',+ ol.layer.Base.prototype.setMaxResolution);- var tileCoordX = scale * (x - origin[0]) / (resolution * tileSize);- var tileCoordY = scale * (y - origin[1]) / (resolution * tileSize);- if (reverseIntersectionPolicy) {- tileCoordX = Math.ceil(tileCoordX) - 1;- tileCoordY = Math.ceil(tileCoordY) - 1;- } else {- tileCoordX = Math.floor(tileCoordX);- tileCoordY = Math.floor(tileCoordY);- }+/**+ * @param {number} minResolution The minimum resolution of the layer.+ * @observable+ * @api stable+ */+ol.layer.Base.prototype.setMinResolution = function(minResolution) {+ this.set(ol.layer.LayerProperty.MIN_RESOLUTION, minResolution);+};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'setMinResolution',+ ol.layer.Base.prototype.setMinResolution);+- return ol.tilecoord.createOrUpdate(z, tileCoordX, tileCoordY, opt_tileCoord);+/**+ * @param {number} opacity The opacity of the layer.+ * @observable+ * @api stable+ */+ol.layer.Base.prototype.setOpacity = function(opacity) {+ this.set(ol.layer.LayerProperty.OPACITY, opacity);};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'setOpacity',+ ol.layer.Base.prototype.setOpacity);/**- * @param {ol.Coordinate} coordinate Coordinate.- * @param {number} z Z.- * @param {ol.TileCoord=} opt_tileCoord Destination ol.TileCoord object.- * @return {ol.TileCoord} Tile coordinate.+ * Adjust layer saturation. A value of 0 will render the layer completely+ * unsaturated. A value of 1 will leave the saturation unchanged. Other+ * values are linear multipliers of the effect (and values over 1 are+ * permitted).+ *+ * @param {number} saturation The saturation of the layer.+ * @observable* @api*/-ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndZ =- function(coordinate, z, opt_tileCoord) {- var resolution = this.getResolution(z);- return this.getTileCoordForXYAndResolution_(- coordinate[0], coordinate[1], resolution, false, opt_tileCoord);+ol.layer.Base.prototype.setSaturation = function(saturation) {+ this.set(ol.layer.LayerProperty.SATURATION, saturation);};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'setSaturation',+ ol.layer.Base.prototype.setSaturation);/**- * @param {ol.TileCoord} tileCoord Tile coordinate.- * @return {number} Tile resolution.+ * @param {boolean} visible The visibility of the layer.+ * @observable+ * @api stable*/-ol.tilegrid.TileGrid.prototype.getTileCoordResolution = function(tileCoord) {- goog.asserts.assert(- this.minZoom <= tileCoord[0] && tileCoord[0] <= this.maxZoom);- return this.resolutions_[tileCoord[0]];+ol.layer.Base.prototype.setVisible = function(visible) {+ this.set(ol.layer.LayerProperty.VISIBLE, visible);};+goog.exportProperty(+ ol.layer.Base.prototype,+ 'setVisible',+ ol.layer.Base.prototype.setVisible);++goog.provide('ol.layer.Layer');++goog.require('goog.events');+goog.require('goog.events.EventType');+goog.require('goog.object');+goog.require('ol.Object');+goog.require('ol.layer.Base');+goog.require('ol.layer.LayerProperty');+goog.require('ol.source.State');+/**- * @param {number} z Z.- * @return {number} Tile size.+ * @classdesc+ * Abstract base class; normally only used for creating subclasses and not+ * instantiated in apps.+ * A visual representation of raster or vector map data.+ * Layers group together those properties that pertain to how the data is to be+ * displayed, irrespective of the source of that data.+ *+ * @constructor+ * @extends {ol.layer.Base}+ * @fires ol.render.Event+ * @fires change Triggered when the state of the source changes.+ * @param {olx.layer.LayerOptions} options Layer options.* @api stable*/-ol.tilegrid.TileGrid.prototype.getTileSize = function(z) {- if (goog.isDef(this.tileSize_)) {- return this.tileSize_;- } else {- goog.asserts.assert(!goog.isNull(this.tileSizes_));- goog.asserts.assert(this.minZoom <= z && z <= this.maxZoom);- return this.tileSizes_[z];- }+ol.layer.Layer = function(options) {++ var baseOptions = goog.object.clone(options);+ delete baseOptions.source;++ goog.base(this, /** @type {olx.layer.LayerOptions} */ (baseOptions));++ /**+ * @private+ * @type {goog.events.Key}+ */+ this.sourceChangeKey_ = null;++ goog.events.listen(this,+ ol.Object.getChangeEventType(ol.layer.LayerProperty.SOURCE),+ this.handleSourcePropertyChange_, false, this);++ var source = goog.isDef(options.source) ? options.source : null;+ this.setSource(source);};+goog.inherits(ol.layer.Layer, ol.layer.Base);/**+ * Return `true` if the layer is visible, and if the passed resolution is+ * between the layer's minResolution and maxResolution. The comparison is+ * inclusive for `minResolution` and exclusive for `maxResolution`.+ * @param {ol.layer.LayerState} layerState Layer state.* @param {number} resolution Resolution.- * @return {number} Z.+ * @return {boolean} The layer is visible at the given resolution.*/-ol.tilegrid.TileGrid.prototype.getZForResolution = function(resolution) {- return ol.array.linearFindNearest(this.resolutions_, resolution, 0);+ol.layer.Layer.visibleAtResolution = function(layerState, resolution) {+ return layerState.visible && resolution >= layerState.minResolution &&+ resolution < layerState.maxResolution;};/**- * @param {ol.proj.Projection} projection Projection.- * @return {ol.tilegrid.TileGrid} Default tile grid for the passed projection.+ * @inheritDoc*/-ol.tilegrid.getForProjection = function(projection) {- var tileGrid = projection.getDefaultTileGrid();- if (goog.isNull(tileGrid)) {- tileGrid = ol.tilegrid.createForProjection(projection);- projection.setDefaultTileGrid(tileGrid);- }- return tileGrid;+ol.layer.Layer.prototype.getLayersArray = function(opt_array) {+ var array = goog.isDef(opt_array) ? opt_array : [];+ array.push(this);+ return array;};/**- * @param {ol.Extent} extent Extent.- * @param {number=} opt_maxZoom Maximum zoom level (default is- * ol.DEFAULT_MAX_ZOOM).- * @param {number=} opt_tileSize Tile size (default uses ol.DEFAULT_TILE_SIZE).- * @param {ol.extent.Corner=} opt_corner Extent corner (default is- * ol.extent.Corner.BOTTOM_LEFT).- * @return {ol.tilegrid.TileGrid} TileGrid instance.+ * @inheritDoc*/-ol.tilegrid.createForExtent =- function(extent, opt_maxZoom, opt_tileSize, opt_corner) {- var tileSize = goog.isDef(opt_tileSize) ?- opt_tileSize : ol.DEFAULT_TILE_SIZE;-- var corner = goog.isDef(opt_corner) ?- opt_corner : ol.extent.Corner.BOTTOM_LEFT;-- var resolutions = ol.tilegrid.resolutionsFromExtent(- extent, opt_maxZoom, tileSize);-- return new ol.tilegrid.TileGrid({- origin: ol.extent.getCorner(extent, corner),- resolutions: resolutions,- tileSize: tileSize- });+ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) {+ var states = goog.isDef(opt_states) ? opt_states : [];+ states.push(this.getLayerState());+ return states;};/**- * Create a resolutions array from an extent. A zoom factor of 2 is assumed.- * @param {ol.Extent} extent Extent.- * @param {number=} opt_maxZoom Maximum zoom level (default is- * ol.DEFAULT_MAX_ZOOM).- * @param {number=} opt_tileSize Tile size (default uses ol.DEFAULT_TILE_SIZE).- * @return {!Array.<number>} Resolutions array.+ * Get the layer source.+ * @return {ol.source.Source} The layer source (or `null` if not yet set).+ * @observable+ * @api stable*/-ol.tilegrid.resolutionsFromExtent =- function(extent, opt_maxZoom, opt_tileSize) {- var maxZoom = goog.isDef(opt_maxZoom) ?- opt_maxZoom : ol.DEFAULT_MAX_ZOOM;-- var height = ol.extent.getHeight(extent);- var width = ol.extent.getWidth(extent);+ol.layer.Layer.prototype.getSource = function() {+ var source = this.get(ol.layer.LayerProperty.SOURCE);+ return goog.isDef(source) ?+ /** @type {ol.source.Source} */ (source) : null;+};+goog.exportProperty(+ ol.layer.Layer.prototype,+ 'getSource',+ ol.layer.Layer.prototype.getSource);- var tileSize = goog.isDef(opt_tileSize) ?- opt_tileSize : ol.DEFAULT_TILE_SIZE;- var maxResolution = Math.max(- width / tileSize, height / tileSize);- var length = maxZoom + 1;- var resolutions = new Array(length);- for (var z = 0; z < length; ++z) {- resolutions[z] = maxResolution / Math.pow(2, z);- }- return resolutions;+/**+ * @inheritDoc+ */+ol.layer.Layer.prototype.getSourceState = function() {+ var source = this.getSource();+ return goog.isNull(source) ? ol.source.State.UNDEFINED : source.getState();};/**- * @param {ol.proj.ProjectionLike} projection Projection.- * @param {number=} opt_maxZoom Maximum zoom level (default is- * ol.DEFAULT_MAX_ZOOM).- * @param {number=} opt_tileSize Tile size (default uses ol.DEFAULT_TILE_SIZE).- * @param {ol.extent.Corner=} opt_corner Extent corner (default is- * ol.extent.Corner.BOTTOM_LEFT).- * @return {ol.tilegrid.TileGrid} TileGrid instance.+ * @private*/-ol.tilegrid.createForProjection =- function(projection, opt_maxZoom, opt_tileSize, opt_corner) {- var extent = ol.tilegrid.extentFromProjection(projection);- return ol.tilegrid.createForExtent(- extent, opt_maxZoom, opt_tileSize, opt_corner);+ol.layer.Layer.prototype.handleSourceChange_ = function() {+ this.changed();};/**- * Generate a tile grid extent from a projection. If the projection has an- * extent, it is used. If not, a global extent is assumed.- * @param {ol.proj.ProjectionLike} projection Projection.- * @return {ol.Extent} Extent.+ * @private*/-ol.tilegrid.extentFromProjection = function(projection) {- projection = ol.proj.get(projection);- var extent = projection.getExtent();- if (goog.isNull(extent)) {- var half = 180 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /- projection.getMetersPerUnit();- extent = ol.extent.createOrUpdate(-half, -half, half, half);+ol.layer.Layer.prototype.handleSourcePropertyChange_ = function() {+ if (!goog.isNull(this.sourceChangeKey_)) {+ goog.events.unlistenByKey(this.sourceChangeKey_);+ this.sourceChangeKey_ = null;}- return extent;+ var source = this.getSource();+ if (!goog.isNull(source)) {+ this.sourceChangeKey_ = goog.events.listen(source,+ goog.events.EventType.CHANGE, this.handleSourceChange_, false, this);+ }+ this.changed();};-goog.provide('ol.source.Tile');-goog.provide('ol.source.TileOptions');-goog.require('goog.events.Event');+/**+ * Set the layer source.+ * @param {ol.source.Source} source The layer source.+ * @observable+ * @api stable+ */+ol.layer.Layer.prototype.setSource = function(source) {+ this.set(ol.layer.LayerProperty.SOURCE, source);+};+goog.exportProperty(+ ol.layer.Layer.prototype,+ 'setSource',+ ol.layer.Layer.prototype.setSource);++goog.provide('ol.ImageBase');+goog.provide('ol.ImageState');++goog.require('goog.asserts');+goog.require('goog.events.EventTarget');+goog.require('goog.events.EventType');goog.require('ol.Attribution');goog.require('ol.Extent');-goog.require('ol.TileCache');-goog.require('ol.TileRange');-goog.require('ol.TileState');-goog.require('ol.source.Source');-goog.require('ol.tilecoord');-goog.require('ol.tilegrid.TileGrid');/**- * @typedef {{attributions: (Array.<ol.Attribution>|undefined),- * extent: (ol.Extent|undefined),- * logo: (string|olx.LogoOptions|undefined),- * opaque: (boolean|undefined),- * tilePixelRatio: (number|undefined),- * projection: ol.proj.ProjectionLike,- * state: (ol.source.State|undefined),- * tileGrid: (ol.tilegrid.TileGrid|undefined)}}+ * @enum {number}*/-ol.source.TileOptions;+ol.ImageState = {+ IDLE: 0,+ LOADING: 1,+ LOADED: 2,+ ERROR: 3+};/**- * @classdesc- * Abstract base class; normally only used for creating subclasses and not- * instantiated in apps.- * Base class for sources providing images divided into a tile grid.- ** @constructor- * @extends {ol.source.Source}- * @param {ol.source.TileOptions} options Tile source options.- * @api+ * @extends {goog.events.EventTarget}+ * @param {ol.Extent} extent Extent.+ * @param {number|undefined} resolution Resolution.+ * @param {number} pixelRatio Pixel ratio.+ * @param {ol.ImageState} state State.+ * @param {Array.<ol.Attribution>} attributions Attributions.*/-ol.source.Tile = function(options) {+ol.ImageBase = function(extent, resolution, pixelRatio, state, attributions) {- goog.base(this, {- attributions: options.attributions,- extent: options.extent,- logo: options.logo,- projection: options.projection,- state: options.state- });+ goog.base(this);/*** @private- * @type {boolean}+ * @type {Array.<ol.Attribution>}*/- this.opaque_ = goog.isDef(options.opaque) ? options.opaque : false;+ this.attributions_ = attributions;++ /**+ * @protected+ * @type {ol.Extent}+ */+ this.extent = extent;/*** @private* @type {number}*/- this.tilePixelRatio_ = goog.isDef(options.tilePixelRatio) ?- options.tilePixelRatio : 1;+ this.pixelRatio_ = pixelRatio;/*** @protected- * @type {ol.tilegrid.TileGrid}+ * @type {number|undefined}*/- this.tileGrid = goog.isDef(options.tileGrid) ? options.tileGrid : null;+ this.resolution = resolution;/*** @protected- * @type {ol.TileCache}+ * @type {ol.ImageState}*/- this.tileCache = new ol.TileCache();--};-goog.inherits(ol.source.Tile, ol.source.Source);---/**- * @return {boolean} Can expire cache.- */-ol.source.Tile.prototype.canExpireCache = function() {- return this.tileCache.canExpireCache();-};---/**- * @param {Object.<string, ol.TileRange>} usedTiles Used tiles.- */-ol.source.Tile.prototype.expireCache = function(usedTiles) {- this.tileCache.expireCache(usedTiles);-};---/**- * @param {number} z Zoom level.- * @param {ol.TileRange} tileRange Tile range.- * @param {function(ol.Tile):(boolean|undefined)} callback Called with each- * loaded tile. If the callback returns `false`, the tile will not be- * considered loaded.- * @return {boolean} The tile range is fully covered with loaded tiles.- */-ol.source.Tile.prototype.forEachLoadedTile = function(z, tileRange, callback) {- var covered = true;- var tile, tileCoordKey, loaded;- for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {- for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {- tileCoordKey = this.getKeyZXY(z, x, y);- loaded = false;- if (this.tileCache.containsKey(tileCoordKey)) {- tile = /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));- loaded = tile.getState() === ol.TileState.LOADED;- if (loaded) {- loaded = (callback(tile) !== false);- }- }- if (!loaded) {- covered = false;- }- }- }- return covered;-};-+ this.state = state;-/**- * @return {number} Gutter.- */-ol.source.Tile.prototype.getGutter = function() {- return 0;};+goog.inherits(ol.ImageBase, goog.events.EventTarget);/**- * @param {number} z Z.- * @param {number} x X.- * @param {number} y Y.- * @return {string} Key.* @protected*/-ol.source.Tile.prototype.getKeyZXY = ol.tilecoord.getKeyZXY;---/**- * @return {boolean} Opaque.- */-ol.source.Tile.prototype.getOpaque = function() {- return this.opaque_;+ol.ImageBase.prototype.changed = function() {+ this.dispatchEvent(goog.events.EventType.CHANGE);};/**- * @inheritDoc+ * @return {Array.<ol.Attribution>} Attributions.*/-ol.source.Tile.prototype.getResolutions = function() {- return this.tileGrid.getResolutions();+ol.ImageBase.prototype.getAttributions = function() {+ return this.attributions_;};/**- * @param {number} z Tile coordinate z.- * @param {number} x Tile coordinate x.- * @param {number} y Tile coordinate y.- * @param {number} pixelRatio Pixel ratio.- * @param {ol.proj.Projection=} opt_projection Projection.- * @return {!ol.Tile} Tile.- */-ol.source.Tile.prototype.getTile = goog.abstractMethod;---/**- * @return {ol.tilegrid.TileGrid} Tile grid.- * @api stable+ * @return {ol.Extent} Extent.*/-ol.source.Tile.prototype.getTileGrid = function() {- return this.tileGrid;+ol.ImageBase.prototype.getExtent = function() {+ return this.extent;};/**- * @param {ol.proj.Projection} projection Projection.- * @return {ol.tilegrid.TileGrid} Tile grid.+ * @param {Object=} opt_context Object.+ * @return {HTMLCanvasElement|Image|HTMLVideoElement} Image.*/-ol.source.Tile.prototype.getTileGridForProjection = function(projection) {- if (goog.isNull(this.tileGrid)) {- return ol.tilegrid.getForProjection(projection);- } else {- return this.tileGrid;- }-};+ol.ImageBase.prototype.getImage = goog.abstractMethod;/**- * @param {number} z Z.- * @param {number} pixelRatio Pixel ratio.- * @param {ol.proj.Projection} projection Projection.- * @return {number} Tile size.+ * @return {number} PixelRatio.*/-ol.source.Tile.prototype.getTilePixelSize =- function(z, pixelRatio, projection) {- var tileGrid = this.getTileGridForProjection(projection);- return tileGrid.getTileSize(z) * this.tilePixelRatio_;+ol.ImageBase.prototype.getPixelRatio = function() {+ return this.pixelRatio_;};/**- * Marks a tile coord as being used, without triggering a load.- * @param {number} z Tile coordinate z.- * @param {number} x Tile coordinate x.- * @param {number} y Tile coordinate y.+ * @return {number} Resolution.*/-ol.source.Tile.prototype.useTile = goog.nullFunction;-+ol.ImageBase.prototype.getResolution = function() {+ goog.asserts.assert(goog.isDef(this.resolution), 'resolution not yet set');+ return this.resolution;+};/**- * @classdesc- * Events emitted by {@link ol.source.Tile} instances are instances of this- * type.- *- * @constructor- * @extends {goog.events.Event}- * @implements {oli.source.TileEvent}- * @param {string} type Type.- * @param {ol.Tile} tile The tile.+ * @return {ol.ImageState} State.*/-ol.source.TileEvent = function(type, tile) {-- goog.base(this, type);-- /**- * The tile related to the event.- * @type {ol.Tile}- * @api- */- this.tile = tile;-+ol.ImageBase.prototype.getState = function() {+ return this.state;};-goog.inherits(ol.source.TileEvent, goog.events.Event);/**- * @enum {string}+ * Load not yet loaded URI.*/-ol.source.TileEventType = {-- /**- * Triggered when a tile starts loading.- * @event ol.source.TileEvent#tileloadstart- * @api- */- TILELOADSTART: 'tileloadstart',-- /**- * Triggered when a tile finishes loading.- * @event ol.source.TileEvent#tileloadend- * @api- */- TILELOADEND: 'tileloadend',-- /**- * Triggered if tile loading results in an error.- * @event ol.source.TileEvent#tileloaderror- * @api- */- TILELOADERROR: 'tileloaderror'--};+ol.ImageBase.prototype.load = goog.abstractMethod;goog.provide('ol.vec.Mat4');@@ -47308,7 +47532,6 @@ ol.vec.Mat4.multVec2 = function(mat, vec, resultVec) {goog.provide('ol.renderer.Layer');-goog.require('goog.Disposable');goog.require('goog.asserts');goog.require('goog.events');goog.require('goog.events.EventType');@@ -47459,7 +47682,7 @@ ol.renderer.Layer.prototype.loadImage = function(image) {// listener (a noop if the listener was already registered)goog.asserts.assert(imageState == ol.ImageState.IDLE ||imageState == ol.ImageState.LOADING);- goog.events.listenOnce(image, goog.events.EventType.CHANGE,+ goog.events.listen(image, goog.events.EventType.CHANGE,this.handleImageChange_, false, this);}if (imageState == ol.ImageState.IDLE) {@@ -50139,13 +50362,10 @@ ol.interaction.Pointer.handleEvent = function(mapBrowserEvent) {var stopEvent = false;this.updateTrackedPointers_(mapBrowserEvent);if (this.handlingDownUpSequence) {- if (mapBrowserEvent.type ==- ol.MapBrowserEvent.EventType.POINTERDRAG) {+ if (mapBrowserEvent.type == ol.MapBrowserEvent.EventType.POINTERDRAG) {this.handleDragEvent_(mapBrowserEvent);- } else if (mapBrowserEvent.type ==- ol.MapBrowserEvent.EventType.POINTERUP) {- this.handlingDownUpSequence =- this.handleUpEvent_(mapBrowserEvent);+ } else if (mapBrowserEvent.type == ol.MapBrowserEvent.EventType.POINTERUP) {+ this.handlingDownUpSequence = this.handleUpEvent_(mapBrowserEvent);}}if (mapBrowserEvent.type == ol.MapBrowserEvent.EventType.POINTERDOWN) {@@ -50842,10 +51062,9 @@ ol.geom.SimpleGeometry.getLayoutForStride_ = function(stride) {/*** @param {ol.geom.GeometryLayout} layout Layout.- * @private* @return {number} Stride.*/-ol.geom.SimpleGeometry.getStrideForLayout_ = function(layout) {+ol.geom.SimpleGeometry.getStrideForLayout = function(layout) {if (layout == ol.geom.GeometryLayout.XY) {return 2;} else if (layout == ol.geom.GeometryLayout.XYZ) {@@ -50978,7 +51197,7 @@ ol.geom.SimpleGeometry.prototype.getStride = function() {*/ol.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal =function(layout, flatCoordinates) {- this.stride = ol.geom.SimpleGeometry.getStrideForLayout_(layout);+ this.stride = ol.geom.SimpleGeometry.getStrideForLayout(layout);this.layout = layout;this.flatCoordinates = flatCoordinates;};@@ -50995,7 +51214,7 @@ ol.geom.SimpleGeometry.prototype.setLayout =/** @type {number} */var stride;if (goog.isDef(layout)) {- stride = ol.geom.SimpleGeometry.getStrideForLayout_(layout);+ stride = ol.geom.SimpleGeometry.getStrideForLayout(layout);} else {var i;for (i = 0; i < nesting; ++i) {@@ -52569,20 +52788,22 @@ goog.provide('ol.geom.flat.segments');* @param {number} offset Offset.* @param {number} end End.* @param {number} stride Stride.- * @param {function(ol.Coordinate, ol.Coordinate): T} callback Function+ * @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function* called for each segment.+ * @param {S=} opt_this The object to be used as the value of 'this'+ * within callback.* @return {T|boolean} Value.- * @template T+ * @template T,S*/ol.geom.flat.segments.forEach =- function(flatCoordinates, offset, end, stride, callback) {+ function(flatCoordinates, offset, end, stride, callback, opt_this) {var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];var point2 = [];var ret;for (; (offset + stride) < end; offset += stride) {point2[0] = flatCoordinates[offset + stride];point2[1] = flatCoordinates[offset + stride + 1];- ret = callback(point1, point2);+ ret = callback.call(opt_this, point1, point2);if (ret) {return ret;}@@ -52801,22 +53022,34 @@ ol.geom.flat.orient.linearRingIsClockwise =/**+ * Determines if linear rings are oriented. By default, left-hand orientation+ * is tested (first ring must be clockwise, remaining rings counter-clockwise).+ * To test for right-hand orientation, use the `opt_right` argument.+ ** @param {Array.<number>} flatCoordinates Flat coordinates.* @param {number} offset Offset.- * @param {Array.<number>} ends Ends.+ * @param {Array.<number>} ends Array of end indexes.* @param {number} stride Stride.- * @return {boolean} `true` if all rings are correctly oriented, `false`- * otherwise.+ * @param {boolean=} opt_right Test for right-hand orientation+ * (counter-clockwise exterior ring and clockwise interior rings).+ * @return {boolean} Rings are correctly oriented.*/ol.geom.flat.orient.linearRingsAreOriented =- function(flatCoordinates, offset, ends, stride) {+ function(flatCoordinates, offset, ends, stride, opt_right) {+ var right = goog.isDef(opt_right) ? opt_right : false;var i, ii;for (i = 0, ii = ends.length; i < ii; ++i) {var end = ends[i];var isClockwise = ol.geom.flat.orient.linearRingIsClockwise(flatCoordinates, offset, end, stride);- if (i === 0 ? !isClockwise : isClockwise) {- return false;+ if (i === 0) {+ if ((right && isClockwise) || (!right && !isClockwise)) {+ return false;+ }+ } else {+ if ((right && !isClockwise) || (!right && isClockwise)) {+ return false;+ }}offset = end;}@@ -52825,19 +53058,24 @@ ol.geom.flat.orient.linearRingsAreOriented =/**+ * Determines if linear rings are oriented. By default, left-hand orientation+ * is tested (first ring must be clockwise, remaining rings counter-clockwise).+ * To test for right-hand orientation, use the `opt_right` argument.+ ** @param {Array.<number>} flatCoordinates Flat coordinates.* @param {number} offset Offset.- * @param {Array.<Array.<number>>} endss Endss.+ * @param {Array.<Array.<number>>} endss Array of array of end indexes.* @param {number} stride Stride.- * @return {boolean} `true` if all rings are correctly oriented, `false`- * otherwise.+ * @param {boolean=} opt_right Test for right-hand orientation+ * (counter-clockwise exterior ring and clockwise interior rings).+ * @return {boolean} Rings are correctly oriented.*/-ol.geom.flat.linearRingssAreOriented =- function(flatCoordinates, offset, endss, stride) {+ol.geom.flat.orient.linearRingssAreOriented =+ function(flatCoordinates, offset, endss, stride, opt_right) {var i, ii;for (i = 0, ii = endss.length; i < ii; ++i) {if (!ol.geom.flat.orient.linearRingsAreOriented(- flatCoordinates, offset, endss[i], stride)) {+ flatCoordinates, offset, endss[i], stride, opt_right)) {return false;}}@@ -52846,20 +53084,29 @@ ol.geom.flat.linearRingssAreOriented =/**+ * Orient coordinates in a flat array of linear rings. By default, rings+ * are oriented following the left-hand rule (clockwise for exterior and+ * counter-clockwise for interior rings). To orient according to the+ * right-hand rule, use the `opt_right` argument.+ ** @param {Array.<number>} flatCoordinates Flat coordinates.* @param {number} offset Offset.* @param {Array.<number>} ends Ends.* @param {number} stride Stride.+ * @param {boolean=} opt_right Follow the right-hand rule for orientation.* @return {number} End.*/ol.geom.flat.orient.orientLinearRings =- function(flatCoordinates, offset, ends, stride) {+ function(flatCoordinates, offset, ends, stride, opt_right) {+ var right = goog.isDef(opt_right) ? opt_right : false;var i, ii;for (i = 0, ii = ends.length; i < ii; ++i) {var end = ends[i];var isClockwise = ol.geom.flat.orient.linearRingIsClockwise(flatCoordinates, offset, end, stride);- var reverse = i === 0 ? !isClockwise : isClockwise;+ var reverse = i === 0 ?+ (right && isClockwise) || (!right && !isClockwise) :+ (right && !isClockwise) || (!right && isClockwise);if (reverse) {ol.geom.flat.reverse.coordinates(flatCoordinates, offset, end, stride);}@@ -52870,18 +53117,24 @@ ol.geom.flat.orient.orientLinearRings =/**+ * Orient coordinates in a flat array of linear rings. By default, rings+ * are oriented following the left-hand rule (clockwise for exterior and+ * counter-clockwise for interior rings). To orient according to the+ * right-hand rule, use the `opt_right` argument.+ ** @param {Array.<number>} flatCoordinates Flat coordinates.* @param {number} offset Offset.- * @param {Array.<Array.<number>>} endss Endss.+ * @param {Array.<Array.<number>>} endss Array of array of end indexes.* @param {number} stride Stride.+ * @param {boolean=} opt_right Follow the right-hand rule for orientation.* @return {number} End.*/ol.geom.flat.orient.orientLinearRingss =- function(flatCoordinates, offset, endss, stride) {+ function(flatCoordinates, offset, endss, stride, opt_right) {var i, ii;for (i = 0, ii = endss.length; i < ii; ++i) {offset = ol.geom.flat.orient.orientLinearRings(- flatCoordinates, offset, endss[i], stride);+ flatCoordinates, offset, endss[i], stride, opt_right);}return offset;};@@ -53039,12 +53292,30 @@ ol.geom.Polygon.prototype.getArea = function() {/**+ * Get the coordinate array for this geometry. This array has the structure+ * of a GeoJSON coordinate array for polygons.+ *+ * @param {boolean=} opt_right Orient coordinates according to the right-hand+ * rule (counter-clockwise for exterior and clockwise for interior rings).+ * If `false`, coordinates will be oriented according to the left-hand rule+ * (clockwise for exterior and counter-clockwise for interior rings).+ * By default, coordinate orientation will depend on how the geometry was+ * constructed.* @return {Array.<Array.<ol.Coordinate>>} Coordinates.* @api stable*/-ol.geom.Polygon.prototype.getCoordinates = function() {+ol.geom.Polygon.prototype.getCoordinates = function(opt_right) {+ var flatCoordinates;+ if (goog.isDef(opt_right)) {+ flatCoordinates = this.getOrientedFlatCoordinates().slice();+ ol.geom.flat.orient.orientLinearRings(+ flatCoordinates, 0, this.ends_, this.stride, opt_right);+ } else {+ flatCoordinates = this.flatCoordinates;+ }+return ol.geom.flat.inflate.coordinatess(- this.flatCoordinates, 0, this.ends_, this.stride);+ flatCoordinates, 0, this.ends_, this.stride);};@@ -55712,6 +55983,12 @@ ol.style.createDefaultEditingStyles = function() {styles[ol.geom.GeometryType.MULTI_LINE_STRING] =styles[ol.geom.GeometryType.LINE_STRING];+ styles[ol.geom.GeometryType.CIRCLE] =+ styles[ol.geom.GeometryType.POLYGON].concat(+ styles[ol.geom.GeometryType.LINE_STRING]+ );++styles[ol.geom.GeometryType.POINT] = [new ol.style.Style({image: new ol.style.Circle({@@ -61544,6 +61821,7 @@ goog.require('ol.geom.flat.inflate');goog.require('ol.geom.flat.interpolate');goog.require('ol.geom.flat.intersectsextent');goog.require('ol.geom.flat.length');+goog.require('ol.geom.flat.segments');goog.require('ol.geom.flat.simplify');@@ -61640,6 +61918,25 @@ ol.geom.LineString.prototype.closestPointXY =};+/**+ * Iterate over each segment, calling the provided callback.+ * If the callback returns a truthy value the function returns that+ * value immediately. Otherwise the function returns `false`.+ *+ * @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function+ * called for each segment.+ * @param {S=} opt_this The object to be used as the value of 'this'+ * within callback.+ * @return {T|boolean} Value.+ * @template T,S+ * @api+ */+ol.geom.LineString.prototype.forEachSegment = function(callback, opt_this) {+ return ol.geom.flat.segments.forEach(this.flatCoordinates, 0,+ this.flatCoordinates.length, this.stride, callback, opt_this);+};++/*** Returns the coordinate at `m` using linear interpolation, or `null` if no* such coordinate exists.@@ -62472,12 +62769,30 @@ ol.geom.MultiPolygon.prototype.getArea = function() {/**+ * Get the coordinate array for this geometry. This array has the structure+ * of a GeoJSON coordinate array for multi-polygons.+ *+ * @param {boolean=} opt_right Orient coordinates according to the right-hand+ * rule (counter-clockwise for exterior and clockwise for interior rings).+ * If `false`, coordinates will be oriented according to the left-hand rule+ * (clockwise for exterior and counter-clockwise for interior rings).+ * By default, coordinate orientation will depend on how the geometry was+ * constructed.* @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinates.* @api stable*/-ol.geom.MultiPolygon.prototype.getCoordinates = function() {+ol.geom.MultiPolygon.prototype.getCoordinates = function(opt_right) {+ var flatCoordinates;+ if (goog.isDef(opt_right)) {+ flatCoordinates = this.getOrientedFlatCoordinates().slice();+ ol.geom.flat.orient.orientLinearRingss(+ flatCoordinates, 0, this.endss_, this.stride, opt_right);+ } else {+ flatCoordinates = this.flatCoordinates;+ }+return ol.geom.flat.inflate.coordinatesss(- this.flatCoordinates, 0, this.endss_, this.stride);+ flatCoordinates, 0, this.endss_, this.stride);};@@ -62523,7 +62838,7 @@ ol.geom.MultiPolygon.prototype.getInteriorPoints = function() {ol.geom.MultiPolygon.prototype.getOrientedFlatCoordinates = function() {if (this.orientedRevision_ != this.getRevision()) {var flatCoordinates = this.flatCoordinates;- if (ol.geom.flat.linearRingssAreOriented(+ if (ol.geom.flat.orient.linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)) {this.orientedFlatCoordinates_ = flatCoordinates;} else {@@ -63104,8 +63419,10 @@ goog.provide('ol.source.Image');goog.require('goog.array');goog.require('goog.asserts');+goog.require('goog.events.Event');goog.require('ol.Attribution');goog.require('ol.Extent');+goog.require('ol.ImageState');goog.require('ol.array');goog.require('ol.source.Source');@@ -63192,6 +63509,33 @@ ol.source.Image.prototype.findNearestResolution =ol.source.Image.prototype.getImage = goog.abstractMethod;+/**+ * Handle image change events.+ * @param {goog.events.Event} event Event.+ * @protected+ */+ol.source.Image.prototype.handleImageChange = function(event) {+ var image = /** @type {ol.Image} */ (event.target);+ switch (image.getState()) {+ case ol.ImageState.LOADING:+ this.dispatchEvent(+ new ol.source.ImageEvent(ol.source.ImageEventType.IMAGELOADSTART,+ image));+ break;+ case ol.ImageState.LOADED:+ this.dispatchEvent(+ new ol.source.ImageEvent(ol.source.ImageEventType.IMAGELOADEND,+ image));+ break;+ case ol.ImageState.ERROR:+ this.dispatchEvent(+ new ol.source.ImageEvent(ol.source.ImageEventType.IMAGELOADERROR,+ image));+ break;+ }+};++/*** Default image load function for image sources that use ol.Image image* instances.@@ -63202,6 +63546,62 @@ ol.source.Image.defaultImageLoadFunction = function(image, src) {image.getImage().src = src;};+++/**+ * @classdesc+ * Events emitted by {@link ol.source.Image} instances are instances of this+ * type.+ *+ * @constructor+ * @extends {goog.events.Event}+ * @implements {oli.source.ImageEvent}+ * @param {string} type Type.+ * @param {ol.Image} image The image.+ */+ol.source.ImageEvent = function(type, image) {++ goog.base(this, type);++ /**+ * The image related to the event.+ * @type {ol.Image}+ * @api+ */+ this.image = image;++};+goog.inherits(ol.source.ImageEvent, goog.events.Event);+++/**+ * @enum {string}+ */+ol.source.ImageEventType = {++ /**+ * Triggered when an image starts loading.+ * @event ol.source.ImageEvent#imageloadstart+ * @api+ */+ IMAGELOADSTART: 'imageloadstart',++ /**+ * Triggered when an image finishes loading.+ * @event ol.source.ImageEvent#imageloadend+ * @api+ */+ IMAGELOADEND: 'imageloadend',++ /**+ * Triggered if image loading results in an error.+ * @event ol.source.ImageEvent#imageloaderror+ * @api+ */+ IMAGELOADERROR: 'imageloaderror'++};+goog.provide('ol.source.ImageCanvas');goog.require('ol.CanvasFunctionType');@@ -63791,7 +64191,7 @@ function enlargedArea(a, b) {(Math.max(b[3], a[3]) - Math.min(b[1], a[1]));}-function intersectionArea (a, b) {+function intersectionArea(a, b) {var minX = Math.max(a[0], b[0]),minY = Math.max(a[1], b[1]),maxX = Math.min(a[2], b[2]),@@ -63808,7 +64208,7 @@ function contains(a, b) {b[3] <= a[3];}-function intersects (a, b) {+function intersects(a, b) {return b[0] <= a[2] &&b[1] <= a[3] &&b[2] >= a[0] &&@@ -63885,7 +64285,7 @@ function swap(arr, i, j) {// export as AMD/CommonJS module or global variable-if (typeof define === 'function' && define.amd) define(function() { return rbush; });+if (typeof define === 'function' && define.amd) define('rbush', function() { return rbush; });else if (typeof module !== 'undefined') module.exports = rbush;else if (typeof self !== 'undefined') self.rbush = rbush;else window.rbush = rbush;@@ -75619,13 +76019,7 @@ ol.Map.prototype.handleTargetChanged_ = function() {// If it's not now an Element we remove the viewport from the DOM.// If it's an Element we append the viewport element to it.- var target = this.getTarget();-- /**- * @type {Element}- */- var targetElement = goog.isDef(target) ?- goog.dom.getElement(target) : null;+ var targetElement = this.getTargetElement();this.keyHandler_.detach();@@ -76026,12 +76420,7 @@ ol.Map.prototype.skipFeature = function(feature) {* @api stable*/ol.Map.prototype.updateSize = function() {- var target = this.getTarget();-- /**- * @type {Element}- */- var targetElement = goog.isDef(target) ? goog.dom.getElement(target) : null;+ var targetElement = this.getTargetElement();if (goog.isNull(targetElement)) {this.setSize(undefined);@@ -76307,7 +76696,9 @@ ol.Overlay = function(options) {* @private* @type {Element}*/- this.element_ = goog.dom.createElement(goog.dom.TagName.DIV);+ this.element_ = goog.dom.createDom(goog.dom.TagName.DIV, {+ 'class': 'ol-overlay-container'+ });this.element_.style.position = 'absolute';/**@@ -77302,6 +77693,7 @@ goog.require('ol.TransformFunction');goog.require('ol.control.Control');goog.require('ol.css');goog.require('ol.proj');+goog.require('ol.proj.METERS_PER_UNIT');goog.require('ol.proj.Units');goog.require('ol.sphere.NORMAL');@@ -77516,20 +77908,18 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {pointResolution *= Math.PI * cosLatitude * ol.sphere.NORMAL.radius / 180;projectionUnits = ol.proj.Units.METERS;- } else if ((projectionUnits == ol.proj.Units.FEET ||- projectionUnits == ol.proj.Units.METERS) &&+ } else if (projectionUnits != ol.proj.Units.DEGREES &&units == ol.control.ScaleLineUnits.DEGREES) {- // Convert pointResolution from meters or feet to degrees+ // Convert pointResolution from other units to degreesif (goog.isNull(this.toEPSG4326_)) {this.toEPSG4326_ = ol.proj.getTransformFromProjections(projection, ol.proj.get('EPSG:4326'));}cosLatitude = Math.cos(goog.math.toRadians(this.toEPSG4326_(center)[1]));var radius = ol.sphere.NORMAL.radius;- if (projectionUnits == ol.proj.Units.FEET) {- radius /= 0.3048;- }+ goog.asserts.assert(goog.isDef(ol.proj.METERS_PER_UNIT[projectionUnits]));+ radius /= ol.proj.METERS_PER_UNIT[projectionUnits];pointResolution *= 180 / (Math.PI * cosLatitude * radius);projectionUnits = ol.proj.Units.DEGREES;@@ -82395,7 +82785,8 @@ ol.format.Feature.prototype.adaptOptions = function(options) {updatedOptions = {featureProjection: options.featureProjection,dataProjection: goog.isDefAndNotNull(options.dataProjection) ?- options.dataProjection : this.defaultDataProjection+ options.dataProjection : this.defaultDataProjection,+ rightHanded: options.rightHanded};}return updatedOptions;@@ -83354,7 +83745,8 @@ ol.format.GeoJSON.writeGeometry_ = function(geometry, opt_options) {var geometryWriter = ol.format.GeoJSON.GEOMETRY_WRITERS_[geometry.getType()];goog.asserts.assert(goog.isDef(geometryWriter));return geometryWriter(/** @type {ol.geom.Geometry} */ (- ol.format.Feature.transformWithOptions(geometry, true, opt_options)));+ ol.format.Feature.transformWithOptions(geometry, true, opt_options)),+ opt_options);};@@ -83393,10 +83785,11 @@ ol.format.GeoJSON.writeGeometryCollectionGeometry_ = function(/*** @param {ol.geom.Geometry} geometry Geometry.+ * @param {olx.format.WriteOptions=} opt_options Write options.* @private* @return {GeoJSONGeometry} GeoJSON geometry.*/-ol.format.GeoJSON.writeLineStringGeometry_ = function(geometry) {+ol.format.GeoJSON.writeLineStringGeometry_ = function(geometry, opt_options) {goog.asserts.assertInstanceof(geometry, ol.geom.LineString);return /** @type {GeoJSONGeometry} */ ({'type': 'LineString',@@ -83407,10 +83800,12 @@ ol.format.GeoJSON.writeLineStringGeometry_ = function(geometry) {/*** @param {ol.geom.Geometry} geometry Geometry.+ * @param {olx.format.WriteOptions=} opt_options Write options.* @private* @return {GeoJSONGeometry} GeoJSON geometry.*/-ol.format.GeoJSON.writeMultiLineStringGeometry_ = function(geometry) {+ol.format.GeoJSON.writeMultiLineStringGeometry_ =+ function(geometry, opt_options) {goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString);goog.asserts.assert(geometry.getType() == ol.geom.GeometryType.MULTI_LINE_STRING);@@ -83423,10 +83818,11 @@ ol.format.GeoJSON.writeMultiLineStringGeometry_ = function(geometry) {/*** @param {ol.geom.Geometry} geometry Geometry.+ * @param {olx.format.WriteOptions=} opt_options Write options.* @private* @return {GeoJSONGeometry} GeoJSON geometry.*/-ol.format.GeoJSON.writeMultiPointGeometry_ = function(geometry) {+ol.format.GeoJSON.writeMultiPointGeometry_ = function(geometry, opt_options) {goog.asserts.assertInstanceof(geometry, ol.geom.MultiPoint);return /** @type {GeoJSONGeometry} */ ({'type': 'MultiPoint',@@ -83437,24 +83833,30 @@ ol.format.GeoJSON.writeMultiPointGeometry_ = function(geometry) {/*** @param {ol.geom.Geometry} geometry Geometry.+ * @param {olx.format.WriteOptions=} opt_options Write options.* @private* @return {GeoJSONGeometry} GeoJSON geometry.*/-ol.format.GeoJSON.writeMultiPolygonGeometry_ = function(geometry) {+ol.format.GeoJSON.writeMultiPolygonGeometry_ = function(geometry, opt_options) {goog.asserts.assertInstanceof(geometry, ol.geom.MultiPolygon);+ var right;+ if (goog.isDef(opt_options)) {+ right = opt_options.rightHanded;+ }return /** @type {GeoJSONGeometry} */ ({'type': 'MultiPolygon',- 'coordinates': geometry.getCoordinates()+ 'coordinates': geometry.getCoordinates(right)});};/*** @param {ol.geom.Geometry} geometry Geometry.+ * @param {olx.format.WriteOptions=} opt_options Write options.* @private* @return {GeoJSONGeometry} GeoJSON geometry.*/-ol.format.GeoJSON.writePointGeometry_ = function(geometry) {+ol.format.GeoJSON.writePointGeometry_ = function(geometry, opt_options) {goog.asserts.assertInstanceof(geometry, ol.geom.Point);return /** @type {GeoJSONGeometry} */ ({'type': 'Point',@@ -83465,14 +83867,19 @@ ol.format.GeoJSON.writePointGeometry_ = function(geometry) {/*** @param {ol.geom.Geometry} geometry Geometry.+ * @param {olx.format.WriteOptions=} opt_options Write options.* @private* @return {GeoJSONGeometry} GeoJSON geometry.*/-ol.format.GeoJSON.writePolygonGeometry_ = function(geometry) {+ol.format.GeoJSON.writePolygonGeometry_ = function(geometry, opt_options) {goog.asserts.assertInstanceof(geometry, ol.geom.Polygon);+ var right;+ if (goog.isDef(opt_options)) {+ right = opt_options.rightHanded;+ }return /** @type {GeoJSONGeometry} */ ({'type': 'Polygon',- 'coordinates': geometry.getCoordinates()+ 'coordinates': geometry.getCoordinates(right)});};@@ -83496,7 +83903,7 @@ ol.format.GeoJSON.GEOMETRY_READERS_ = {/*** @const* @private- * @type {Object.<string, function(ol.geom.Geometry): (GeoJSONGeometry|GeoJSONGeometryCollection)>}+ * @type {Object.<string, function(ol.geom.Geometry, olx.format.WriteOptions=): (GeoJSONGeometry|GeoJSONGeometryCollection)>}*/ol.format.GeoJSON.GEOMETRY_WRITERS_ = {'Point': ol.format.GeoJSON.writePointGeometry_,@@ -83658,7 +84065,7 @@ ol.format.GeoJSON.prototype.readProjectionFromObject = function(object) {** @function* @param {ol.Feature} feature Feature.- * @param {olx.format.WriteOptions} options Write options.+ * @param {olx.format.WriteOptions=} opt_options Write options.* @return {string} GeoJSON.* @api stable*/@@ -83692,6 +84099,8 @@ ol.format.GeoJSON.prototype.writeFeatureObject = function(goog.object.remove(properties, feature.getGeometryName());if (!goog.object.isEmpty(properties)) {object['properties'] = properties;+ } else {+ object['properties'] = null;}return object;};@@ -83702,7 +84111,7 @@ ol.format.GeoJSON.prototype.writeFeatureObject = function(** @function* @param {Array.<ol.Feature>} features Features.- * @param {olx.format.WriteOptions} options Write options.+ * @param {olx.format.WriteOptions=} opt_options Write options.* @return {string} GeoJSON.* @api stable*/@@ -83737,7 +84146,7 @@ ol.format.GeoJSON.prototype.writeFeaturesObject =** @function* @param {ol.geom.Geometry} geometry Geometry.- * @param {olx.format.WriteOptions} options Write options.+ * @param {olx.format.WriteOptions=} opt_options Write options.* @return {string} GeoJSON.* @api stable*/@@ -85018,13 +85427,13 @@ ol.format.GMLBase = function(opt_options) {/*** @protected- * @type {string}+ * @type {Array.<string>|string|undefined}*/this.featureType = options.featureType;/*** @protected- * @type {string}+ * @type {Object.<string, string>|string|undefined}*/this.featureNS = options.featureNS;@@ -85080,18 +85489,52 @@ ol.format.GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {var context = objectStack[0];goog.asserts.assert(goog.isObject(context));var featureType = context['featureType'];- if (!goog.isDef(featureType) && !goog.isNull(node.firstElementChild)) {- var member = node.firstElementChild;- featureType = member.nodeName.split(':').pop();+ var featureNS = context['featureNS'];+ var i, ii, prefix = 'p', defaultPrefix = 'p0';+ if (!goog.isDef(featureType) && goog.isDefAndNotNull(node.childNodes)) {+ featureType = [], featureNS = {};+ for (i = 0, ii = node.childNodes.length; i < ii; ++i) {+ var child = node.childNodes[i];+ if (child.nodeType === 1) {+ var ft = child.nodeName.split(':').pop();+ if (goog.array.indexOf(featureType, ft) === -1) {+ var key;+ if (!goog.object.contains(featureNS, child.namespaceURI)) {+ key = prefix + goog.object.getCount(featureNS);+ featureNS[key] = child.namespaceURI;+ } else {+ key = goog.object.findKey(featureNS, function(value) {+ return value === child.namespaceURI;+ });+ }+ featureType.push(key + ':' + ft);+ }+ }+ }context['featureType'] = featureType;- context['featureNS'] = member.namespaceURI;+ context['featureNS'] = featureNS;+ }+ if (goog.isString(featureNS)) {+ var ns = featureNS;+ featureNS = {};+ featureNS[defaultPrefix] = ns;}- var parsers = {};var parsersNS = {};- parsers[featureType] = (localName == 'featureMembers') ?- ol.xml.makeArrayPusher(this.readFeatureElement, this) :- ol.xml.makeReplacer(this.readFeatureElement, this);- parsersNS[context['featureNS']] = parsers;+ var featureTypes = goog.isArray(featureType) ? featureType : [featureType];+ for (var p in featureNS) {+ var parsers = {};+ for (i = 0, ii = featureTypes.length; i < ii; ++i) {+ var featurePrefix = featureTypes[i].indexOf(':') === -1 ?+ defaultPrefix : featureTypes[i].split(':')[0];+ if (featurePrefix === p) {+ parsers[featureTypes[i].split(':').pop()] =+ (localName == 'featureMembers') ?+ ol.xml.makeArrayPusher(this.readFeatureElement, this) :+ ol.xml.makeReplacer(this.readFeatureElement, this);+ }+ }+ parsersNS[featureNS[p]] = parsers;+ }features = ol.xml.pushParseAndPop([], parsersNS, node, objectStack);}if (!goog.isDef(features)) {@@ -95153,6 +95596,7 @@ goog.require('ol.Feature');goog.require('ol.format.Feature');goog.require('ol.format.TextFeature');goog.require('ol.geom.LineString');+goog.require('ol.geom.SimpleGeometry');goog.require('ol.geom.flat.flip');goog.require('ol.geom.flat.inflate');goog.require('ol.proj');@@ -95186,6 +95630,13 @@ ol.format.Polyline = function(opt_options) {* @type {number}*/this.factor_ = goog.isDef(options.factor) ? options.factor : 1e5;++ /**+ * @private+ * @type {ol.geom.GeometryLayout}+ */+ this.geometryLayout_ = goog.isDef(options.geometryLayout) ?+ options.geometryLayout : ol.geom.GeometryLayout.XY;};goog.inherits(ol.format.Polyline, ol.format.TextFeature);@@ -95464,15 +95915,17 @@ ol.format.Polyline.prototype.readGeometry;*/ol.format.Polyline.prototype.readGeometryFromText =function(text, opt_options) {- var flatCoordinates = ol.format.Polyline.decodeDeltas(text, 2, this.factor_);+ var stride = ol.geom.SimpleGeometry.getStrideForLayout(this.geometryLayout_);+ var flatCoordinates = ol.format.Polyline.decodeDeltas(+ text, stride, this.factor_);ol.geom.flat.flip.flipXY(- flatCoordinates, 0, flatCoordinates.length, 2, flatCoordinates);+ flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);var coordinates = ol.geom.flat.inflate.coordinates(- flatCoordinates, 0, flatCoordinates.length, 2);+ flatCoordinates, 0, flatCoordinates.length, stride);return /** @type {ol.geom.Geometry} */ (ol.format.Feature.transformWithOptions(- new ol.geom.LineString(coordinates), false,+ new ol.geom.LineString(coordinates, this.geometryLayout_), false,this.adaptOptions(opt_options)));};@@ -95983,13 +96436,13 @@ ol.format.WFS = function(opt_options) {/*** @private- * @type {string}+ * @type {Array.<string>|string|undefined}*/this.featureType_ = options.featureType;/*** @private- * @type {string}+ * @type {Object.<string, string>|string|undefined}*/this.featureNS_ = options.featureNS;@@ -100120,6 +100573,7 @@ ol.Image.prototype.handleImageLoad_ = function() {ol.Image.prototype.load = function() {if (this.state == ol.ImageState.IDLE) {this.state = ol.ImageState.LOADING;+ this.changed();goog.asserts.assert(goog.isNull(this.imageListenerKeys_));this.imageListenerKeys_ = [goog.events.listenOnce(this.image_, goog.events.EventType.ERROR,@@ -100247,7 +100701,9 @@ goog.inherits(ol.ImageTile, ol.Tile);* @inheritDoc*/ol.ImageTile.prototype.disposeInternal = function() {- this.unlistenImage_();+ if (this.state == ol.TileState.LOADING) {+ this.unlistenImage_();+ }goog.base(this, 'disposeInternal');};@@ -104131,11 +104587,11 @@ goog.require('ol.Collection');goog.require('ol.Coordinate');goog.require('ol.Feature');goog.require('ol.FeatureOverlay');-goog.require('ol.Map');goog.require('ol.MapBrowserEvent');goog.require('ol.MapBrowserEvent.EventType');goog.require('ol.Object');goog.require('ol.events.condition');+goog.require('ol.geom.Circle');goog.require('ol.geom.GeometryType');goog.require('ol.geom.LineString');goog.require('ol.geom.MultiLineString');@@ -104369,10 +104825,6 @@ ol.interaction.Draw.prototype.setMap = function(map) {* @api*/ol.interaction.Draw.handleEvent = function(mapBrowserEvent) {- var map = mapBrowserEvent.map;- if (!map.isDef()) {- return true;- }var pass = true;if (mapBrowserEvent.type === ol.MapBrowserEvent.EventType.POINTERMOVE) {pass = this.handlePointerMove_(mapBrowserEvent);@@ -104417,6 +104869,8 @@ ol.interaction.Draw.handleUpEvent_ = function(event) {if (goog.isNull(this.finishCoordinate_)) {this.startDrawing_(event);} else if (this.mode_ === ol.interaction.DrawMode.POINT ||+ this.mode_ === ol.interaction.DrawMode.CIRCLE &&+ !goog.isNull(this.finishCoordinate_) ||this.atFinish_(event)) {this.finishDrawing();} else {@@ -104525,6 +104979,10 @@ ol.interaction.Draw.prototype.startDrawing_ = function(event) {start.slice()]));this.sketchPolygonCoords_ = [[start.slice(), start.slice()]];geometry = new ol.geom.Polygon(this.sketchPolygonCoords_);+ } else if (this.mode_ === ol.interaction.DrawMode.CIRCLE) {+ geometry = new ol.geom.Circle(start.slice(), 0);+ this.sketchLine_ = new ol.Feature(new ol.geom.LineString([start.slice(),+ start.slice()]));}}goog.asserts.assert(goog.isDef(geometry));@@ -104547,7 +105005,7 @@ ol.interaction.Draw.prototype.startDrawing_ = function(event) {ol.interaction.Draw.prototype.modifyDrawing_ = function(event) {var coordinate = event.coordinate;var geometry = this.sketchFeature_.getGeometry();- var coordinates, last;+ var coordinates, last, sketchLineGeom;if (this.mode_ === ol.interaction.DrawMode.POINT) {goog.asserts.assertInstanceof(geometry, ol.geom.Point);last = geometry.getCoordinates();@@ -104561,6 +105019,9 @@ ol.interaction.Draw.prototype.modifyDrawing_ = function(event) {} else if (this.mode_ === ol.interaction.DrawMode.POLYGON) {goog.asserts.assertInstanceof(geometry, ol.geom.Polygon);coordinates = this.sketchPolygonCoords_[0];+ } else if (this.mode_ === ol.interaction.DrawMode.CIRCLE) {+ goog.asserts.assertInstanceof(geometry, ol.geom.Circle);+ coordinates = geometry.getCenter();}if (this.atFinish_(event)) {// snap to finish@@ -104576,11 +105037,17 @@ ol.interaction.Draw.prototype.modifyDrawing_ = function(event) {goog.asserts.assertInstanceof(geometry, ol.geom.LineString);geometry.setCoordinates(coordinates);} else if (this.mode_ === ol.interaction.DrawMode.POLYGON) {- var sketchLineGeom = this.sketchLine_.getGeometry();+ sketchLineGeom = this.sketchLine_.getGeometry();goog.asserts.assertInstanceof(sketchLineGeom, ol.geom.LineString);sketchLineGeom.setCoordinates(coordinates);goog.asserts.assertInstanceof(geometry, ol.geom.Polygon);geometry.setCoordinates(this.sketchPolygonCoords_);+ } else if (this.mode_ === ol.interaction.DrawMode.CIRCLE) {+ goog.asserts.assertInstanceof(geometry, ol.geom.Circle);+ sketchLineGeom = this.sketchLine_.getGeometry();+ goog.asserts.assertInstanceof(sketchLineGeom, ol.geom.LineString);+ sketchLineGeom.setCoordinates([geometry.getCenter(), coordinate]);+ geometry.setRadius(sketchLineGeom.getLength());}}this.updateSketchFeatures_();@@ -104684,7 +105151,7 @@ ol.interaction.Draw.prototype.shouldStopEvent = goog.functions.FALSE;/**- * Redraw the skecth features.+ * Redraw the sketch features.* @private*/ol.interaction.Draw.prototype.updateSketchFeatures_ = function() {@@ -104733,6 +105200,8 @@ ol.interaction.Draw.getMode_ = function(type) {} else if (type === ol.geom.GeometryType.POLYGON ||type === ol.geom.GeometryType.MULTI_POLYGON) {mode = ol.interaction.DrawMode.POLYGON;+ } else if (type === ol.geom.GeometryType.CIRCLE) {+ mode = ol.interaction.DrawMode.CIRCLE;}goog.asserts.assert(goog.isDef(mode));return mode;@@ -104747,7 +105216,8 @@ ol.interaction.Draw.getMode_ = function(type) {ol.interaction.DrawMode = {POINT: 'Point',LINE_STRING: 'LineString',- POLYGON: 'Polygon'+ POLYGON: 'Polygon',+ CIRCLE: 'Circle'};goog.provide('ol.interaction.Modify');@@ -105143,6 +105613,17 @@ ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ =};+/**+ * @param {ol.interaction.SegmentDataType} a+ * @param {ol.interaction.SegmentDataType} b+ * @return {number}+ * @private+ */+ol.interaction.Modify.compareIndexes_ = function(a, b) {+ return a.index - b.index;+};++/*** @param {ol.MapBrowserPointerEvent} evt Event.* @return {boolean} Start drag sequence?@@ -105155,18 +105636,44 @@ ol.interaction.Modify.handleDownEvent_ = function(evt) {var vertexFeature = this.vertexFeature_;if (!goog.isNull(vertexFeature)) {var insertVertices = [];- var geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());+ var geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());var vertex = geometry.getCoordinates();var vertexExtent = ol.extent.boundingExtent([vertex]);var segmentDataMatches = this.rBush_.getInExtent(vertexExtent);+ var componentSegments = {};+ segmentDataMatches.sort(ol.interaction.Modify.compareIndexes_);for (var i = 0, ii = segmentDataMatches.length; i < ii; ++i) {var segmentDataMatch = segmentDataMatches[i];var segment = segmentDataMatch.segment;- if (ol.coordinate.equals(segment[0], vertex)) {+ var uid = goog.getUid(segmentDataMatch.feature);+ var depth = segmentDataMatch.depth;+ if (depth) {+ uid += '-' + depth.join('-'); // separate feature components+ }+ if (!componentSegments[uid]) {+ componentSegments[uid] = new Array(2);+ }+ if (ol.coordinate.equals(segment[0], vertex) &&+ !componentSegments[uid][0]) {this.dragSegments_.push([segmentDataMatch, 0]);- } else if (ol.coordinate.equals(segment[1], vertex)) {+ componentSegments[uid][0] = segmentDataMatch;+ } else if (ol.coordinate.equals(segment[1], vertex) &&+ !componentSegments[uid][1]) {++ // prevent dragging closed linestrings by the connecting node+ if ((segmentDataMatch.geometry.getType() ===+ ol.geom.GeometryType.LINE_STRING ||+ segmentDataMatch.geometry.getType() ===+ ol.geom.GeometryType.MULTI_LINE_STRING) &&+ componentSegments[uid][0] &&+ componentSegments[uid][0].index === 0) {+ continue;+ }+this.dragSegments_.push([segmentDataMatch, 1]);- } else if (goog.getUid(segment) in this.vertexSegments_) {+ componentSegments[uid][1] = segmentDataMatch;+ } else if (goog.getUid(segment) in this.vertexSegments_ &&+ (!componentSegments[uid][0] && !componentSegments[uid][1])) {insertVertices.push([segmentDataMatch, vertex]);}}@@ -105226,8 +105733,8 @@ ol.interaction.Modify.handleDragEvent_ = function(evt) {}geometry.setCoordinates(coordinates);- this.createOrUpdateVertexFeature_(vertex);}+ this.createOrUpdateVertexFeature_(vertex);};@@ -105257,10 +105764,11 @@ ol.interaction.Modify.handleUpEvent_ = function(evt) {ol.interaction.Modify.handleEvent = function(mapBrowserEvent) {var handled;if (!mapBrowserEvent.map.getView().getHints()[ol.ViewHint.INTERACTING] &&- mapBrowserEvent.type == ol.MapBrowserEvent.EventType.POINTERMOVE) {+ mapBrowserEvent.type == ol.MapBrowserEvent.EventType.POINTERMOVE &&+ !this.handlingDownUpSequence) {this.handlePointerMove_(mapBrowserEvent);}- if (!goog.isNull(this.vertexFeature_) && this.snappedToVertex_ &&+ if (!goog.isNull(this.vertexFeature_) &&this.deleteCondition_(mapBrowserEvent)) {var geometry = this.vertexFeature_.getGeometry();goog.asserts.assertInstanceof(geometry, ol.geom.Point);@@ -105426,15 +105934,18 @@ ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {ol.interaction.Modify.prototype.removeVertex_ = function() {var dragSegments = this.dragSegments_;var segmentsByFeature = {};- var deleted = false;var component, coordinates, dragSegment, geometry, i, index, left;- var newIndex, newSegment, right, segmentData, uid;+ var newIndex, newSegment, right, segmentData, uid, deleted;for (i = dragSegments.length - 1; i >= 0; --i) {dragSegment = dragSegments[i];segmentData = dragSegment[0];geometry = segmentData.geometry;coordinates = geometry.getCoordinates();uid = goog.getUid(segmentData.feature);+ if (segmentData.depth) {+ // separate feature components+ uid += '-' + segmentData.depth.join('-');+ }left = right = index = undefined;if (dragSegment[1] === 0) {right = segmentData;@@ -105508,7 +106019,7 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {}}}- return deleted;+ return true;};@@ -105580,6 +106091,7 @@ ol.SelectEventType = {* @param {string} type The event type.* @param {Array.<ol.Feature>} selected Selected features.* @param {Array.<ol.Feature>} deselected Deselected features.+ * @implements {oli.SelectEvent}* @extends {goog.events.Event}* @constructor*/@@ -105742,7 +106254,8 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {*/function(feature, layer) {selected.push(feature);- }, undefined, this.layerFilter_);+ return !this.multi_;+ }, this, this.layerFilter_);if (selected.length > 0 && features.getLength() == 1 &&features.item(0) == selected[0]) {// No change@@ -105752,11 +106265,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {deselected = Array.prototype.concat(features.getArray());features.clear();}- if (this.multi_) {- features.extend(selected);- } else if (selected.length > 0) {- features.push(selected[0]);- }+ features.extend(selected);}} else {// Modify the currently selected feature(s).@@ -107135,7 +107644,8 @@ ol.source.TileImage = function(options) {state: goog.isDef(options.state) ?/** @type {ol.source.State} */ (options.state) : undefined,tileGrid: options.tileGrid,- tilePixelRatio: options.tilePixelRatio+ tilePixelRatio: options.tilePixelRatio,+ wrapX: options.wrapX});/**@@ -107192,7 +107702,9 @@ ol.source.TileImage.prototype.getTile =} else {goog.asserts.assert(projection);var tileCoord = [z, x, y];- var tileUrl = this.tileUrlFunction(tileCoord, pixelRatio, projection);+ var urlTileCoord = this.getWrapXTileCoord(tileCoord, projection);+ var tileUrl = goog.isNull(urlTileCoord) ? undefined :+ this.tileUrlFunction(urlTileCoord, pixelRatio, projection);var tile = new this.tileClass(tileCoord,goog.isDef(tileUrl) ? ol.TileState.IDLE : ol.TileState.EMPTY,@@ -107334,7 +107846,6 @@ ol.tilegrid.XYZ.prototype.createTileCoordTransform = function(opt_options) {var options = goog.isDef(opt_options) ? opt_options : {};var minZ = this.minZoom;var maxZ = this.maxZoom;- var wrapX = goog.isDef(options.wrapX) ? options.wrapX : true;/** @type {Array.<ol.TileRange>} */var tileRangeByZ = null;if (goog.isDef(options.extent)) {@@ -107362,11 +107873,6 @@ ol.tilegrid.XYZ.prototype.createTileCoordTransform = function(opt_options) {}var n = Math.pow(2, z);var x = tileCoord[1];- if (wrapX) {- x = goog.math.modulo(x, n);- } else if (x < 0 || n <= x) {- return null;- }var y = tileCoord[2];if (y < -n || -1 < y) {return null;@@ -107452,7 +107958,8 @@ ol.source.BingMaps = function(options) {opaque: true,projection: ol.proj.get('EPSG:3857'),state: ol.source.State.LOADING,- tileLoadFunction: options.tileLoadFunction+ tileLoadFunction: options.tileLoadFunction,+ wrapX: goog.isDef(options.wrapX) ? options.wrapX : true});/**@@ -107467,12 +107974,6 @@ ol.source.BingMaps = function(options) {*/this.maxZoom_ = goog.isDef(options.maxZoom) ? options.maxZoom : -1;- /**- * @private- * @type {boolean}- */- this.wrapX_ = goog.isDef(options.wrapX) ? options.wrapX : true;-var protocol = ol.IS_HTTPS ? 'https:' : 'http:';var uri = new goog.Uri(protocol + '//dev.virtualearth.net/REST/v1/Imagery/Metadata/' +@@ -107536,7 +108037,7 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =var culture = this.culture_;this.tileUrlFunction = ol.TileUrlFunction.withTileCoordTransform(- tileGrid.createTileCoordTransform({wrapX: this.wrapX_}),+ tileGrid.createTileCoordTransform(),ol.TileUrlFunction.createFromTileUrlFunctions(goog.array.map(resource.imageUrlSubdomains,@@ -110443,6 +110944,8 @@ goog.inherits(ol.source.IGC, ol.source.StaticVector);goog.provide('ol.source.ImageMapGuide');+goog.require('goog.events');+goog.require('goog.events.EventType');goog.require('goog.object');goog.require('goog.uri.utils');goog.require('ol.Image');@@ -110458,6 +110961,7 @@ goog.require('ol.source.Image');* Source for images from Mapguide servers** @constructor+ * @fires ol.source.ImageEvent* @extends {ol.source.Image}* @param {olx.source.ImageMapGuideOptions} options Options.* @api stable@@ -110593,6 +111097,8 @@ ol.source.ImageMapGuide.prototype.getImage =image = new ol.Image(extent, resolution, pixelRatio,this.getAttributions(), imageUrl, this.crossOrigin_,this.imageLoadFunction_);+ goog.events.listen(image, goog.events.EventType.CHANGE,+ this.handleImageChange, false, this);} else {image = null;}@@ -110776,6 +111282,8 @@ ol.source.wms.ServerType = {goog.provide('ol.source.ImageWMS');goog.require('goog.asserts');+goog.require('goog.events');+goog.require('goog.events.EventType');goog.require('goog.object');goog.require('goog.string');goog.require('goog.uri.utils');@@ -110795,6 +111303,7 @@ goog.require('ol.source.wms.ServerType');* Source for WMS servers providing single, untiled images.** @constructor+ * @fires ol.source.ImageEvent* @extends {ol.source.Image}* @param {olx.source.ImageWMSOptions=} opt_options Options.* @api stable@@ -111020,6 +111529,9 @@ ol.source.ImageWMS.prototype.getImage =this.renderedRevision_ = this.getRevision();+ goog.events.listen(this.image_, goog.events.EventType.CHANGE,+ this.handleImageChange, false, this);+return this.image_;};@@ -111223,16 +111735,15 @@ ol.source.XYZ = function(options) {tileGrid: tileGrid,tileLoadFunction: options.tileLoadFunction,tilePixelRatio: options.tilePixelRatio,- tileUrlFunction: ol.TileUrlFunction.nullTileUrlFunction+ tileUrlFunction: ol.TileUrlFunction.nullTileUrlFunction,+ wrapX: goog.isDef(options.wrapX) ? options.wrapX : true});/*** @private* @type {ol.TileCoordTransformType}*/- this.tileCoordTransform_ = tileGrid.createTileCoordTransform({- wrapX: options.wrapX- });+ this.tileCoordTransform_ = tileGrid.createTileCoordTransform();if (goog.isDef(options.tileUrlFunction)) {this.setTileUrlFunction(options.tileUrlFunction);@@ -111774,7 +112285,8 @@ ol.source.TileArcGISRest = function(opt_options) {projection: options.projection,tileGrid: options.tileGrid,tileLoadFunction: options.tileLoadFunction,- tileUrlFunction: goog.bind(this.tileUrlFunction_, this)+ tileUrlFunction: goog.bind(this.tileUrlFunction_, this),+ wrapX: goog.isDef(options.wrapX) ? options.wrapX : true});var urls = options.urls;@@ -111841,6 +112353,7 @@ ol.source.TileArcGISRest.prototype.getRequestUrl_ =params['BBOX'] = tileExtent.join(',');params['BBOXSR'] = srid;params['IMAGESR'] = srid;+ params['DPI'] = 90 * pixelRatio;var url;if (urls.length == 1) {@@ -111869,6 +112382,23 @@ ol.source.TileArcGISRest.prototype.getRequestUrl_ =};+/**+ * @param {number} z Z.+ * @param {number} pixelRatio Pixel ratio.+ * @param {ol.proj.Projection} projection Projection.+ * @return {number} Size.+ */+ol.source.TileArcGISRest.prototype.getTilePixelSize =+ function(z, pixelRatio, projection) {+ var tileSize = goog.base(this, 'getTilePixelSize', z, pixelRatio, projection);+ if (pixelRatio == 1) {+ return tileSize;+ } else {+ return (tileSize * pixelRatio + 0.5) | 0;+ }+};++/*** Return the URLs used for this ArcGIS source.* @return {!Array.<string>} URLs.@@ -112096,15 +112626,10 @@ ol.source.TileJSON = function(options) {crossOrigin: options.crossOrigin,projection: ol.proj.get('EPSG:3857'),state: ol.source.State.LOADING,- tileLoadFunction: options.tileLoadFunction+ tileLoadFunction: options.tileLoadFunction,+ wrapX: goog.isDef(options.wrapX) ? options.wrapX : true});- /**- * @type {boolean|undefined}- * @private- */- this.wrapX_ = options.wrapX;-var request = new goog.net.Jsonp(options.url);request.send(undefined, goog.bind(this.handleTileJSONResponse, this));@@ -112141,10 +112666,7 @@ ol.source.TileJSON.prototype.handleTileJSONResponse = function(tileJSON) {this.tileGrid = tileGrid;this.tileUrlFunction = ol.TileUrlFunction.withTileCoordTransform(- tileGrid.createTileCoordTransform({- extent: extent,- wrapX: this.wrapX_- }),+ tileGrid.createTileCoordTransform({extent: extent}),ol.TileUrlFunction.createFromTemplates(tileJSON.tiles));if (goog.isDef(tileJSON.attribution) &&@@ -112916,7 +113438,8 @@ ol.source.TileWMS = function(opt_options) {projection: options.projection,tileGrid: options.tileGrid,tileLoadFunction: options.tileLoadFunction,- tileUrlFunction: goog.bind(this.tileUrlFunction_, this)+ tileUrlFunction: goog.bind(this.tileUrlFunction_, this),+ wrapX: options.wrapX});var urls = options.urls;@@ -113361,7 +113884,8 @@ ol.tilegrid.WMTS = function(options) {origins: options.origins,resolutions: options.resolutions,tileSize: options.tileSize,- tileSizes: options.tileSizes+ tileSizes: options.tileSizes,+ widths: options.widths});};@@ -113404,6 +113928,8 @@ ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet =var origins = [];/** @type {!Array.<number>} */var tileSizes = [];+ /** @type {!Array.<number>} */+ var widths = [];var supportedCRSPropName = 'SupportedCRS';var matrixIdsPropName = 'TileMatrix';@@ -113439,13 +113965,15 @@ ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet =var tileHeight = elt[tileHeightPropName];goog.asserts.assert(tileWidth == tileHeight);tileSizes.push(tileWidth);+ widths.push(elt['MatrixWidth']);});return new ol.tilegrid.WMTS({origins: origins,resolutions: resolutions,matrixIds: matrixIds,- tileSizes: tileSizes+ tileSizes: tileSizes,+ widths: widths});};@@ -113454,7 +113982,6 @@ goog.provide('ol.source.WMTSRequestEncoding');goog.require('goog.array');goog.require('goog.asserts');-goog.require('goog.math');goog.require('goog.object');goog.require('goog.string');goog.require('goog.uri.utils');@@ -113492,7 +114019,7 @@ ol.source.WMTS = function(options) {// TODO: add support for TileMatrixLimits- var wrapX = goog.isDef(options.wrapX) ? options.wrapX : true;+ //var wrapX = goog.isDef(options.wrapX) ? options.wrapX : true;/*** @private* @type {string}@@ -113622,7 +114149,6 @@ ol.source.WMTS = function(options) {}var tmpExtent = ol.extent.createEmpty();- var tmpTileCoord = [0, 0, 0];tileUrlFunction = ol.TileUrlFunction.withTileCoordTransform(/*** @param {ol.TileCoord} tileCoord Tile coordinate.@@ -113640,6 +114166,8 @@ ol.source.WMTS = function(options) {var tileExtent = tileGrid.getTileCoordExtent(tileCoord, tmpExtent);var extent = projection.getExtent();+/*+<<<<<<< HEADif (wrapX && !goog.isNull(extent) && projection.isGlobal()) {var numCols = Math.ceil(ol.extent.getWidth(extent) /@@ -113650,6 +114178,9 @@ ol.source.WMTS = function(options) {tmpTileCoord[2] = tileCoord[2];tileExtent = tileGrid.getTileCoordExtent(tmpTileCoord, tmpExtent);}+=======+>>>>>>> v3.4.0+*/if (!ol.extent.intersects(tileExtent, extent) ||ol.extent.touches(tileExtent, extent)) {return null;@@ -113667,7 +114198,8 @@ ol.source.WMTS = function(options) {tileGrid: tileGrid,tileLoadFunction: options.tileLoadFunction,tilePixelRatio: options.tilePixelRatio,- tileUrlFunction: tileUrlFunction+ tileUrlFunction: tileUrlFunction,+ wrapX: goog.isDef(options.wrapX) ? options.wrapX : false});};@@ -113800,7 +114332,7 @@ ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, config) {goog.asserts.assert(!goog.isNull(l));goog.asserts.assert(l['TileMatrixSetLink'].length > 0);- var idx, matrixSet;+ var idx, matrixSet, wrapX;if (l['TileMatrixSetLink'].length > 1) {idx = goog.array.findIndex(l['TileMatrixSetLink'],function(elt, index, array) {@@ -113824,6 +114356,13 @@ ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, config) {goog.asserts.assert(!goog.isNull(matrixSet));+ var wgs84BoundingBox = l['WGS84BoundingBox'];+ if (goog.isDef(wgs84BoundingBox)) {+ var wgs84ProjectionExtent = ol.proj.get('EPSG:4326').getExtent();+ wrapX = (wgs84BoundingBox[0] == wgs84ProjectionExtent[0] &&+ wgs84BoundingBox[2] == wgs84ProjectionExtent[2]);+ }+var format = /** @type {string} */ (l['Format'][0]);if (goog.isDef(config['format'])) {format = config['format'];@@ -113915,7 +114454,8 @@ ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, config) {requestEncoding: requestEncoding,tileGrid: tileGrid,style: style,- dimensions: dimensions+ dimensions: dimensions,+ wrapX: wrapX};/* jshint +W069 */@@ -117129,6 +117669,11 @@ goog.exportSymbol(ol.source.Image,OPENLAYERS);+goog.exportProperty(+ ol.source.ImageEvent.prototype,+ 'image',+ ol.source.ImageEvent.prototype.image);+goog.exportSymbol('ol.source.ImageStatic',ol.source.ImageStatic,@@ -117759,6 +118304,11 @@ goog.exportProperty('isGlobal',ol.proj.Projection.prototype.isGlobal);+goog.exportProperty(+ ol.proj.Projection.prototype,+ 'setGlobal',+ ol.proj.Projection.prototype.setGlobal);+goog.exportProperty(ol.proj.Projection.prototype,'setExtent',@@ -117769,6 +118319,16 @@ goog.exportProperty('setWorldExtent',ol.proj.Projection.prototype.setWorldExtent);+goog.exportProperty(+ ol.proj.Projection.prototype,+ 'setGetPointResolution',+ ol.proj.Projection.prototype.setGetPointResolution);++goog.exportProperty(+ ol.proj.Projection.prototype,+ 'getPointResolution',+ ol.proj.Projection.prototype.getPointResolution);+goog.exportSymbol('ol.proj.addEquivalentProjections',ol.proj.addEquivalentProjections,@@ -118404,6 +118964,11 @@ goog.exportProperty('clone',ol.geom.LineString.prototype.clone);+goog.exportProperty(+ ol.geom.LineString.prototype,+ 'forEachSegment',+ ol.geom.LineString.prototype.forEachSegment);+goog.exportProperty(ol.geom.LineString.prototype,'getCoordinateAtM',diff --git a/web/ext/map/openlayers-3.4.0.wv1/ol.css b/web/ext/map/openlayers-3.4.0.wv1/ol.cssnew file mode 100644index 000000000..2b52dc141--- /dev/null+++ b/web/ext/map/openlayers-3.4.0.wv1/ol.css@@ -0,0 +1 @@+.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:#95b9e6;background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width}.ol-overlay-container{will-change:left,right,top,bottom}.ol-unsupported{display:none}.ol-viewport .ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-control{position:absolute;background-color:#eee;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px}.ol-control:hover{background-color:rgba(255,255,255,.6)}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}@media print{.ol-control{display:none}}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:#7b98bc;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:focus,.ol-control button:hover{text-decoration:none;background-color:#4c6079;background-color:rgba(0,60,136,.7)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em)}.ol-attribution ul{margin:0;padding:0 .5em;font-size:.7rem;line-height:1.375em;color:#000;text-shadow:0 0 2px #fff}.ol-attribution li{display:inline;list-style:none;line-height:inherit}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit}.ol-attribution button,.ol-attribution ul{display:inline-block}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution.ol-logo-only ul{display:block}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0;height:1.1em;line-height:1em}.ol-attribution.ol-logo-only{background:0 0;bottom:.4em;height:1.1em;line-height:1em}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-logo-only button,.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{position:absolute;top:4.5em;left:.5em;background:#eee;background:rgba(255,255,255,.4);width:24px;height:200px}.ol-zoomslider-thumb{position:absolute;background:#7b98bc;background:rgba(0,60,136,.5);border-radius:2px;cursor:pointer;height:10px;width:22px;margin:3px}.ol-touch .ol-zoomslider{top:5.5em;width:2.052em}.ol-touch .ol-zoomslider-thumb{width:1.8em}.ol-overviewmap{position:absolute;left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:inline-block}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:1px;left:2px;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-overviewmap-box{border:2px dotted rgba(0,60,136,.7)}\ No newline at end of filediff --git a/web/ext/map/openlayers-3.4.0.wv1/ol.js b/web/ext/map/openlayers-3.4.0.wv1/ol.jsnew file mode 100644index 000000000..31dc38a7f--- /dev/null+++ b/web/ext/map/openlayers-3.4.0.wv1/ol.js@@ -0,0 +1,966 @@+// OpenLayers 3. See http://openlayers.org/+// License: https://raw.githubusercontent.com/openlayers/ol3/master/LICENSE.md+// Version: v3.3.0-5-g7753644++(function (root, factory) {+ if (typeof define === "function" && define.amd) {+ define([], factory);+ } else if (typeof exports === "object") {+ module.exports = factory();+ } else {+ root.ol = factory();+ }+}(this, function () {+ var OPENLAYERS = {};+ var l,aa=aa||{},ba=this;function m(a){return void 0!==a}function t(a,b,d){a=a.split(".");d=d||ba;a[0]in d||!d.execScript||d.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)!a.length&&m(b)?d[e]=b:d[e]?d=d[e]:d=d[e]={}}function ca(){}function da(a){a.Ua=function(){return a.Bf?a.Bf:a.Bf=new a}}+function ea(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;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"==b&&"undefined"==typeof a.call)return"object";return b}function fa(a){return null===a}function ga(a){return"array"==ea(a)}function ha(a){var b=ea(a);return"array"==b||"object"==b&&"number"==typeof a.length}function ia(a){return"string"==typeof a}function ja(a){return"number"==typeof a}function ka(a){return"function"==ea(a)}function la(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ma(a){return a[na]||(a[na]=++oa)}+var na="closure_uid_"+(1E9*Math.random()>>>0),oa=0;function pa(a,b,d){return a.call.apply(a.bind,arguments)}function qa(a,b,d){if(!a)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,e);return a.apply(b,d)}}return function(){return a.apply(b,arguments)}}+function ra(a,b,d){ra=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?pa:qa;return ra.apply(null,arguments)}function sa(a,b){var d=Array.prototype.slice.call(arguments,1);return function(){var b=d.slice();b.push.apply(b,arguments);return a.apply(this,b)}}var ta=Date.now||function(){return+new Date};+function v(a,b){function d(){}d.prototype=b.prototype;a.X=b.prototype;a.prototype=new d;a.prototype.constructor=a;a.Um=function(a,d,g){for(var h=Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[d].apply(a,h)}};var ua,va;function wa(a){if(Error.captureStackTrace)Error.captureStackTrace(this,wa);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}v(wa,Error);wa.prototype.name="CustomError";var xa;function ya(a,b){var d=a.length-b.length;return 0<=d&&a.indexOf(b,d)==d}function za(a,b){for(var d=a.split("%s"),e="",f=Array.prototype.slice.call(arguments,1);f.length&&1<d.length;)e+=d.shift()+f.shift();return e+d.join("%s")}var Aa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};+function Ba(a){if(!Da.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ea,"&"));-1!=a.indexOf("<")&&(a=a.replace(Fa,"<"));-1!=a.indexOf(">")&&(a=a.replace(Ga,">"));-1!=a.indexOf('"')&&(a=a.replace(Ha,"""));-1!=a.indexOf("'")&&(a=a.replace(Ia,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(Ja,"�"));return a}var Ea=/&/g,Fa=/</g,Ga=/>/g,Ha=/"/g,Ia=/'/g,Ja=/\x00/g,Da=/[\x00&<>"']/;+function Ka(a){a=m(void 0)?a.toFixed(void 0):String(a);var b=a.indexOf(".");-1==b&&(b=a.length);b=Math.max(0,2-b);return Array(b+1).join("0")+a}+function La(a,b){for(var d=0,e=Aa(String(a)).split("."),f=Aa(String(b)).split("."),g=Math.max(e.length,f.length),h=0;0==d&&h<g;h++){var k=e[h]||"",n=f[h]||"",p=RegExp("(\\d*)(\\D*)","g"),q=RegExp("(\\d*)(\\D*)","g");do{var r=p.exec(k)||["","",""],s=q.exec(n)||["","",""];if(0==r[0].length&&0==s[0].length)break;d=Na(0==r[1].length?0:parseInt(r[1],10),0==s[1].length?0:parseInt(s[1],10))||Na(0==r[2].length,0==s[2].length)||Na(r[2],s[2])}while(0==d)}return d}function Na(a,b){return a<b?-1:a>b?1:0};var Oa=Array.prototype;function Pa(a,b){return Oa.indexOf.call(a,b,void 0)}function Qa(a,b,d){Oa.forEach.call(a,b,d)}function Ra(a,b){return Oa.filter.call(a,b,void 0)}function Sa(a,b,d){return Oa.map.call(a,b,d)}function Ta(a,b){return Oa.some.call(a,b,void 0)}function Ua(a,b){var d=Va(a,b,void 0);return 0>d?null:ia(a)?a.charAt(d):a[d]}function Va(a,b,d){for(var e=a.length,f=ia(a)?a.split(""):a,g=0;g<e;g++)if(g in f&&b.call(d,f[g],g,a))return g;return-1}function Wa(a,b){return 0<=Pa(a,b)}+function Xa(a,b){var d=Pa(a,b),e;(e=0<=d)&&Oa.splice.call(a,d,1);return e}function Ya(a){return Oa.concat.apply(Oa,arguments)}function Za(a){var b=a.length;if(0<b){for(var d=Array(b),e=0;e<b;e++)d[e]=a[e];return d}return[]}function ab(a,b){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(ha(e)){var f=a.length||0,g=e.length||0;a.length=f+g;for(var h=0;h<g;h++)a[f+h]=e[h]}else a.push(e)}}function bb(a,b,d,e){Oa.splice.apply(a,cb(arguments,1))}+function cb(a,b,d){return 2>=arguments.length?Oa.slice.call(a,b):Oa.slice.call(a,b,d)}function db(a,b){a.sort(b||fb)}function gb(a,b){if(!ha(a)||!ha(b)||a.length!=b.length)return!1;for(var d=a.length,e=hb,f=0;f<d;f++)if(!e(a[f],b[f]))return!1;return!0}function fb(a,b){return a>b?1:a<b?-1:0}function hb(a,b){return a===b};var ib;a:{var jb=ba.navigator;if(jb){var kb=jb.userAgent;if(kb){ib=kb;break a}}ib=""}function lb(a){return-1!=ib.indexOf(a)};function mb(a,b,d){for(var e in a)b.call(d,a[e],e,a)}function ob(a,b){for(var d in a)if(b.call(void 0,a[d],d,a))return!0;return!1}function pb(a){var b=0,d;for(d in a)b++;return b}function qb(a){var b=[],d=0,e;for(e in a)b[d++]=a[e];return b}function rb(a){var b=[],d=0,e;for(e in a)b[d++]=e;return b}function tb(a,b){return b in a}function ub(a,b){for(var d in a)if(a[d]==b)return!0;return!1}function vb(a,b){for(var d in a)if(b.call(void 0,a[d],d,a))return d}+function wb(a){for(var b in a)return!1;return!0}function xb(a){for(var b in a)delete a[b]}function yb(a,b){b in a&&delete a[b]}function zb(a,b,d){return b in a?a[b]:d}function Ab(a,b){var d=[];return b in a?a[b]:a[b]=d}function Bb(a){var b={},d;for(d in a)b[d]=a[d];return b}var Cb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");+function Db(a,b){for(var d,e,f=1;f<arguments.length;f++){e=arguments[f];for(d in e)a[d]=e[d];for(var g=0;g<Cb.length;g++)d=Cb[g],Object.prototype.hasOwnProperty.call(e,d)&&(a[d]=e[d])}}function Eb(a){var b=arguments.length;if(1==b&&ga(arguments[0]))return Eb.apply(null,arguments[0]);for(var d={},e=0;e<b;e++)d[arguments[e]]=!0;return d};var Fb=lb("Opera")||lb("OPR"),Gb=lb("Trident")||lb("MSIE"),Hb=lb("Gecko")&&-1==ib.toLowerCase().indexOf("webkit")&&!(lb("Trident")||lb("MSIE")),Ib=-1!=ib.toLowerCase().indexOf("webkit"),Jb=lb("Macintosh"),Kb=lb("Windows"),Lb=lb("Linux")||lb("CrOS");function Mb(){var a=ba.document;return a?a.documentMode:void 0}+var Nb=function(){var a="",b;if(Fb&&ba.opera)return a=ba.opera.version,ka(a)?a():a;Hb?b=/rv\:([^\);]+)(\)|;)/:Gb?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:Ib&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(ib))?a[1]:"");return Gb&&(b=Mb(),b>parseFloat(a))?String(b):a}(),Ob={};function Pb(a){return Ob[a]||(Ob[a]=0<=La(Nb,a))}var Qb=ba.document,Rb=Qb&&Gb?Mb()||("CSS1Compat"==Qb.compatMode?parseInt(Nb,10):5):void 0;var Sb="https:"===ba.location.protocol,Tb=Gb&&!Pb("9.0")&&""!==Nb;function Vb(a,b,d){return Math.min(Math.max(a,b),d)}function Wb(a,b){var d=a%b;return 0>d*b?d+b:d}function Xb(a,b,d){return a+d*(b-a)}function Yb(a){return a*Math.PI/180};function Zb(a){return function(b){if(m(b))return[Vb(b[0],a[0],a[2]),Vb(b[1],a[1],a[3])]}}function $b(a){return a};function ac(a,b,d){var e=a.length;if(a[0]<=b)return 0;if(!(b<=a[e-1]))if(0<d)for(d=1;d<e;++d){if(a[d]<b)return d-1}else if(0>d)for(d=1;d<e;++d){if(a[d]<=b)return d}else for(d=1;d<e;++d){if(a[d]==b)return d;if(a[d]<b)return a[d-1]-b<b-a[d]?d-1:d}return e-1};function bc(a){return function(b,d,e){if(m(b))return b=ac(a,b,e),b=Vb(b+d,0,a.length-1),a[b]}}function cc(a,b,d){return function(e,f,g){if(m(e))return g=0<g?0:0>g?1:.5,e=Math.floor(Math.log(b/e)/Math.log(a)+g),f=Math.max(e+f,0),m(d)&&(f=Math.min(f,d)),b/Math.pow(a,f)}};function dc(a){if(m(a))return 0}function ec(a,b){if(m(a))return a+b}function fc(a){var b=2*Math.PI/a;return function(a,e){if(m(a))return a=Math.floor((a+e)/b+.5)*b}}function gc(){var a=Yb(5);return function(b,d){if(m(b))return Math.abs(b+d)<=a?0:b+d}};function hc(a,b,d){this.center=a;this.resolution=b;this.rotation=d};var ic=!Gb||Gb&&9<=Rb,jc=!Gb||Gb&&9<=Rb,kc=Gb&&!Pb("9");!Ib||Pb("528");Hb&&Pb("1.9b")||Gb&&Pb("8")||Fb&&Pb("9.5")||Ib&&Pb("528");Hb&&!Pb("8")||Gb&&Pb("9");function lc(){0!=mc&&(nc[ma(this)]=this);this.sa=this.sa;this.ua=this.ua}var mc=0,nc={};lc.prototype.sa=!1;lc.prototype.Nc=function(){if(!this.sa&&(this.sa=!0,this.T(),0!=mc)){var a=ma(this);delete nc[a]}};function oc(a,b){var d=sa(pc,b);a.sa?d.call(void 0):(a.ua||(a.ua=[]),a.ua.push(m(void 0)?ra(d,void 0):d))}lc.prototype.T=function(){if(this.ua)for(;this.ua.length;)this.ua.shift()()};function pc(a){a&&"function"==typeof a.Nc&&a.Nc()};function qc(a,b){this.type=a;this.d=this.target=b;this.i=!1;this.sg=!0}qc.prototype.tb=function(){this.i=!0};qc.prototype.preventDefault=function(){this.sg=!1};function rc(a){a.tb()}function tc(a){a.preventDefault()};var uc=Gb?"focusout":"DOMFocusOut";function vc(a){vc[" "](a);return a}vc[" "]=ca;function wc(a,b){qc.call(this,a?a.type:"");this.relatedTarget=this.d=this.target=null;this.l=this.j=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.n=this.e=this.f=this.p=!1;this.state=null;this.k=!1;this.c=null;a&&xc(this,a,b)}v(wc,qc);var yc=[1,4,2];+function xc(a,b,d){a.c=b;var e=a.type=b.type;a.target=b.target||b.srcElement;a.d=d;if(d=b.relatedTarget){if(Hb){var f;a:{try{vc(d.nodeName);f=!0;break a}catch(g){}f=!1}f||(d=null)}}else"mouseover"==e?d=b.fromElement:"mouseout"==e&&(d=b.toElement);a.relatedTarget=d;Object.defineProperties?Object.defineProperties(a,{offsetX:{configurable:!0,enumerable:!0,get:a.sf,set:a.gm},offsetY:{configurable:!0,enumerable:!0,get:a.tf,set:a.hm}}):(a.offsetX=a.sf(),a.offsetY=a.tf());a.clientX=void 0!==b.clientX?b.clientX:+b.pageX;a.clientY=void 0!==b.clientY?b.clientY:b.pageY;a.screenX=b.screenX||0;a.screenY=b.screenY||0;a.button=b.button;a.j=b.keyCode||0;a.l=b.charCode||("keypress"==e?b.keyCode:0);a.p=b.ctrlKey;a.f=b.altKey;a.e=b.shiftKey;a.n=b.metaKey;a.k=Jb?b.metaKey:b.ctrlKey;a.state=b.state;b.defaultPrevented&&a.preventDefault()}function zc(a){return(ic?0==a.c.button:"click"==a.type?!0:!!(a.c.button&yc[0]))&&!(Ib&&Jb&&a.p)}l=wc.prototype;+l.tb=function(){wc.X.tb.call(this);this.c.stopPropagation?this.c.stopPropagation():this.c.cancelBubble=!0};l.preventDefault=function(){wc.X.preventDefault.call(this);var a=this.c;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,kc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};l.zh=function(){return this.c};l.sf=function(){return Ib||void 0!==this.c.offsetX?this.c.offsetX:this.c.layerX};+l.gm=function(a){Object.defineProperties(this,{offsetX:{writable:!0,enumerable:!0,configurable:!0,value:a}})};l.tf=function(){return Ib||void 0!==this.c.offsetY?this.c.offsetY:this.c.layerY};l.hm=function(a){Object.defineProperties(this,{offsetY:{writable:!0,enumerable:!0,configurable:!0,value:a}})};var Ac="closure_listenable_"+(1E6*Math.random()|0);function Bc(a){return!(!a||!a[Ac])}var Cc=0;function Dc(a,b,d,e,f){this.dc=a;this.c=null;this.src=b;this.type=d;this.Fc=!!e;this.Cd=f;this.key=++Cc;this.yc=this.gd=!1}function Ec(a){a.yc=!0;a.dc=null;a.c=null;a.src=null;a.Cd=null};function Fc(a){this.src=a;this.c={};this.f=0}Fc.prototype.add=function(a,b,d,e,f){var g=a.toString();a=this.c[g];a||(a=this.c[g]=[],this.f++);var h=Gc(a,b,e,f);-1<h?(b=a[h],d||(b.gd=!1)):(b=new Dc(b,this.src,g,!!e,f),b.gd=d,a.push(b));return b};Fc.prototype.remove=function(a,b,d,e){a=a.toString();if(!(a in this.c))return!1;var f=this.c[a];b=Gc(f,b,d,e);return-1<b?(Ec(f[b]),Oa.splice.call(f,b,1),0==f.length&&(delete this.c[a],this.f--),!0):!1};+function Hc(a,b){var d=b.type;if(!(d in a.c))return!1;var e=Xa(a.c[d],b);e&&(Ec(b),0==a.c[d].length&&(delete a.c[d],a.f--));return e}function Ic(a,b,d,e,f){a=a.c[b.toString()];b=-1;a&&(b=Gc(a,d,e,f));return-1<b?a[b]:null}function Jc(a,b,d){var e=m(b),f=e?b.toString():"",g=m(d);return ob(a.c,function(a){for(var b=0;b<a.length;++b)if(!(e&&a[b].type!=f||g&&a[b].Fc!=d))return!0;return!1})}+function Gc(a,b,d,e){for(var f=0;f<a.length;++f){var g=a[f];if(!g.yc&&g.dc==b&&g.Fc==!!d&&g.Cd==e)return f}return-1};var Kc="closure_lm_"+(1E6*Math.random()|0),Lc={},Nc=0;function w(a,b,d,e,f){if(ga(b)){for(var g=0;g<b.length;g++)w(a,b[g],d,e,f);return null}d=Oc(d);return Bc(a)?a.Wa(b,d,e,f):Pc(a,b,d,!1,e,f)}function Pc(a,b,d,e,f,g){if(!b)throw Error("Invalid event type");var h=!!f,k=Qc(a);k||(a[Kc]=k=new Fc(a));d=k.add(b,d,e,f,g);if(d.c)return d;e=Rc();d.c=e;e.src=a;e.dc=d;a.addEventListener?a.addEventListener(b.toString(),e,h):a.attachEvent(Sc(b.toString()),e);Nc++;return d}+function Rc(){var a=Tc,b=jc?function(d){return a.call(b.src,b.dc,d)}:function(d){d=a.call(b.src,b.dc,d);if(!d)return d};return b}function Uc(a,b,d,e,f){if(ga(b)){for(var g=0;g<b.length;g++)Uc(a,b[g],d,e,f);return null}d=Oc(d);return Bc(a)?a.qb.add(String(b),d,!0,e,f):Pc(a,b,d,!0,e,f)}function Vc(a,b,d,e,f){if(ga(b))for(var g=0;g<b.length;g++)Vc(a,b[g],d,e,f);else d=Oc(d),Bc(a)?a.Qe(b,d,e,f):a&&(a=Qc(a))&&(b=Ic(a,b,d,!!e,f))&&Wc(b)}+function Wc(a){if(ja(a)||!a||a.yc)return!1;var b=a.src;if(Bc(b))return Hc(b.qb,a);var d=a.type,e=a.c;b.removeEventListener?b.removeEventListener(d,e,a.Fc):b.detachEvent&&b.detachEvent(Sc(d),e);Nc--;(d=Qc(b))?(Hc(d,a),0==d.f&&(d.src=null,b[Kc]=null)):Ec(a);return!0}function Sc(a){return a in Lc?Lc[a]:Lc[a]="on"+a}function Xc(a,b,d,e){var f=!0;if(a=Qc(a))if(b=a.c[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var g=b[a];g&&g.Fc==d&&!g.yc&&(g=Yc(g,e),f=f&&!1!==g)}return f}+function Yc(a,b){var d=a.dc,e=a.Cd||a.src;a.gd&&Wc(a);return d.call(e,b)}+function Tc(a,b){if(a.yc)return!0;if(!jc){var d;if(!(d=b))a:{d=["window","event"];for(var e=ba,f;f=d.shift();)if(null!=e[f])e=e[f];else{d=null;break a}d=e}f=d;d=new wc(f,this);e=!0;if(!(0>f.keyCode||void 0!=f.returnValue)){a:{var g=!1;if(0==f.keyCode)try{f.keyCode=-1;break a}catch(h){g=!0}if(g||void 0==f.returnValue)f.returnValue=!0}f=[];for(g=d.d;g;g=g.parentNode)f.push(g);for(var g=a.type,k=f.length-1;!d.i&&0<=k;k--){d.d=f[k];var n=Xc(f[k],g,!0,d),e=e&&n}for(k=0;!d.i&&k<f.length;k++)d.d=f[k],n=+Xc(f[k],g,!1,d),e=e&&n}return e}return Yc(a,new wc(b,this))}function Qc(a){a=a[Kc];return a instanceof Fc?a:null}var Zc="__closure_events_fn_"+(1E9*Math.random()>>>0);function Oc(a){if(ka(a))return a;a[Zc]||(a[Zc]=function(b){return a.handleEvent(b)});return a[Zc]};function $c(a){return function(){return a}}var ad=$c(!1),bd=$c(!0),cd=$c(null);function dd(a){return a}function ed(a){var b;b=b||0;return function(){return a.apply(this,Array.prototype.slice.call(arguments,0,b))}}function fd(a){var b=arguments,d=b.length;return function(){for(var a,f=0;f<d;f++)a=b[f].apply(this,arguments);return a}}function gd(a){var b=arguments,d=b.length;return function(){for(var a=0;a<d;a++)if(!b[a].apply(this,arguments))return!1;return!0}};function hd(){lc.call(this);this.qb=new Fc(this);this.mi=this;this.le=null}v(hd,lc);hd.prototype[Ac]=!0;l=hd.prototype;l.addEventListener=function(a,b,d,e){w(this,a,b,d,e)};l.removeEventListener=function(a,b,d,e){Vc(this,a,b,d,e)};+l.dispatchEvent=function(a){var b,d=this.le;if(d)for(b=[];d;d=d.le)b.push(d);var d=this.mi,e=a.type||a;if(ia(a))a=new qc(a,d);else if(a instanceof qc)a.target=a.target||d;else{var f=a;a=new qc(e,d);Db(a,f)}var f=!0,g;if(b)for(var h=b.length-1;!a.i&&0<=h;h--)g=a.d=b[h],f=id(g,e,!0,a)&&f;a.i||(g=a.d=d,f=id(g,e,!0,a)&&f,a.i||(f=id(g,e,!1,a)&&f));if(b)for(h=0;!a.i&&h<b.length;h++)g=a.d=b[h],f=id(g,e,!1,a)&&f;return f};+l.T=function(){hd.X.T.call(this);if(this.qb){var a=this.qb,b=0,d;for(d in a.c){for(var e=a.c[d],f=0;f<e.length;f++)++b,Ec(e[f]);delete a.c[d];a.f--}}this.le=null};l.Wa=function(a,b,d,e){return this.qb.add(String(a),b,!1,d,e)};l.Qe=function(a,b,d,e){return this.qb.remove(String(a),b,d,e)};+function id(a,b,d,e){b=a.qb.c[String(b)];if(!b)return!0;b=b.concat();for(var f=!0,g=0;g<b.length;++g){var h=b[g];if(h&&!h.yc&&h.Fc==d){var k=h.dc,n=h.Cd||h.src;h.gd&&Hc(a.qb,h);f=!1!==k.call(n,e)&&f}}return f&&0!=e.sg}function jd(a,b,d){return Jc(a.qb,m(b)?String(b):void 0,d)};function kd(){hd.call(this);this.f=0}v(kd,hd);function ld(a){Wc(a)}l=kd.prototype;l.q=function(){++this.f;this.dispatchEvent("change")};l.C=function(){return this.f};l.A=function(a,b,d){return w(this,a,b,!1,d)};l.D=function(a,b,d){return Uc(this,a,b,!1,d)};l.B=function(a,b,d){Vc(this,a,b,!1,d)};l.G=ld;function md(a,b,d){qc.call(this,a);this.key=b;this.oldValue=d}v(md,qc);function nd(a,b,d,e){this.source=a;this.target=b;this.d=d;this.f=e;this.e=this.c=dd}nd.prototype.transform=function(a,b){var d=od(this.source,this.d);this.c=a;this.e=b;pd(this.source,this.d,d)};function qd(a){kd.call(this);ma(this);this.p={};this.Ha={};this.ke={};m(a)&&this.I(a)}v(qd,kd);var rd={},sd={},td={};function ud(a){return rd.hasOwnProperty(a)?rd[a]:rd[a]="change:"+a}+function od(a,b){var d=sd.hasOwnProperty(b)?sd[b]:sd[b]="get"+(String(b.charAt(0)).toUpperCase()+String(b.substr(1)).toLowerCase()),d=a[d];return m(d)?d.call(a):a.get(b)}l=qd.prototype;l.O=function(a,b,d){d=d||a;this.P(a);var e=ud(d);this.ke[a]=w(b,e,function(b){pd(this,a,b.oldValue)},void 0,this);b=new nd(this,b,a,d);this.Ha[a]=b;pd(this,a,this.p[a]);return b};l.get=function(a){var b,d=this.Ha;d.hasOwnProperty(a)?(a=d[a],b=od(a.target,a.f),b=a.e(b)):this.p.hasOwnProperty(a)&&(b=this.p[a]);return b};+l.K=function(){var a=this.Ha,b;if(wb(this.p)){if(wb(a))return[];b=a}else if(wb(a))b=this.p;else{b={};for(var d in this.p)b[d]=!0;for(d in a)b[d]=!0}return rb(b)};l.M=function(){var a={},b;for(b in this.p)a[b]=this.p[b];for(b in this.Ha)a[b]=this.get(b);return a};function pd(a,b,d){var e;e=ud(b);a.dispatchEvent(new md(e,b,d));a.dispatchEvent(new md("propertychange",b,d))}+l.set=function(a,b){var d=this.Ha;if(d.hasOwnProperty(a)){var e=d[a];b=e.c(b);var d=e.target,e=e.f,f=b,g=td.hasOwnProperty(e)?td[e]:td[e]="set"+(String(e.charAt(0)).toUpperCase()+String(e.substr(1)).toLowerCase()),g=d[g];m(g)?g.call(d,f):d.set(e,f)}else d=this.p[a],this.p[a]=b,pd(this,a,d)};l.I=function(a){for(var b in a)this.set(b,a[b])};l.P=function(a){var b=this.ke,d=b[a];d&&(delete b[a],Wc(d),b=this.get(a),delete this.Ha[a],this.p[a]=b)};l.Q=function(){for(var a in this.ke)this.P(a)};function vd(a,b){a[0]+=b[0];a[1]+=b[1];return a}function wd(a,b){var d=a[0],e=a[1],f=b[0],g=b[1],h=f[0],f=f[1],k=g[0],g=g[1],n=k-h,p=g-f,d=0===n&&0===p?0:(n*(d-h)+p*(e-f))/(n*n+p*p||0);0>=d||(1<=d?(h=k,f=g):(h+=d*n,f+=d*p));return[h,f]}function xd(a,b){var d=Wb(a+180,360)-180,e=Math.abs(Math.round(3600*d));return Math.floor(e/3600)+"\u00b0 "+Math.floor(e/60%60)+"\u2032 "+Math.floor(e%60)+"\u2033 "+b.charAt(0>d?1:0)}+function yd(a,b,d){return m(a)?b.replace("{x}",a[0].toFixed(d)).replace("{y}",a[1].toFixed(d)):""}function zd(a,b){for(var d=!0,e=a.length-1;0<=e;--e)if(a[e]!=b[e]){d=!1;break}return d}function Ad(a,b){var d=Math.cos(b),e=Math.sin(b),f=a[1]*d+a[0]*e;a[0]=a[0]*d-a[1]*e;a[1]=f;return a}function Bd(a,b){var d=a[0]-b[0],e=a[1]-b[1];return d*d+e*e}function Cd(a,b){return yd(a,"{x}, {y}",b)};function Dd(a){this.length=a.length||a;for(var b=0;b<this.length;b++)this[b]=a[b]||0}Dd.prototype.c=4;Dd.prototype.set=function(a,b){b=b||0;for(var d=0;d<a.length&&b+d<this.length;d++)this[b+d]=a[d]};Dd.prototype.toString=Array.prototype.join;"undefined"==typeof Float32Array&&(Dd.BYTES_PER_ELEMENT=4,Dd.prototype.BYTES_PER_ELEMENT=Dd.prototype.c,Dd.prototype.set=Dd.prototype.set,Dd.prototype.toString=Dd.prototype.toString,t("Float32Array",Dd,void 0));function Ed(a){this.length=a.length||a;for(var b=0;b<this.length;b++)this[b]=a[b]||0}Ed.prototype.c=8;Ed.prototype.set=function(a,b){b=b||0;for(var d=0;d<a.length&&b+d<this.length;d++)this[b+d]=a[d]};Ed.prototype.toString=Array.prototype.join;if("undefined"==typeof Float64Array){try{Ed.BYTES_PER_ELEMENT=8}catch(Fd){}Ed.prototype.BYTES_PER_ELEMENT=Ed.prototype.c;Ed.prototype.set=Ed.prototype.set;Ed.prototype.toString=Ed.prototype.toString;t("Float64Array",Ed,void 0)};function Gd(a,b,d,e,f){a[0]=b;a[1]=d;a[2]=e;a[3]=f};function Hd(){var a=Array(16);Id(a,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return a}function Jd(){var a=Array(16);Id(a,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return a}function Id(a,b,d,e,f,g,h,k,n,p,q,r,s,u,y,z,A){a[0]=b;a[1]=d;a[2]=e;a[3]=f;a[4]=g;a[5]=h;a[6]=k;a[7]=n;a[8]=p;a[9]=q;a[10]=r;a[11]=s;a[12]=u;a[13]=y;a[14]=z;a[15]=A}+function Kd(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];a[6]=b[6];a[7]=b[7];a[8]=b[8];a[9]=b[9];a[10]=b[10];a[11]=b[11];a[12]=b[12];a[13]=b[13];a[14]=b[14];a[15]=b[15]}function Ld(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1}+function Md(a,b,d){var e=a[0],f=a[1],g=a[2],h=a[3],k=a[4],n=a[5],p=a[6],q=a[7],r=a[8],s=a[9],u=a[10],y=a[11],z=a[12],A=a[13],E=a[14];a=a[15];var x=b[0],Q=b[1],N=b[2],L=b[3],U=b[4],Ca=b[5],eb=b[6],R=b[7],Ma=b[8],sb=b[9],$a=b[10],Ub=b[11],nb=b[12],Mc=b[13],sc=b[14];b=b[15];d[0]=e*x+k*Q+r*N+z*L;d[1]=f*x+n*Q+s*N+A*L;d[2]=g*x+p*Q+u*N+E*L;d[3]=h*x+q*Q+y*N+a*L;d[4]=e*U+k*Ca+r*eb+z*R;d[5]=f*U+n*Ca+s*eb+A*R;d[6]=g*U+p*Ca+u*eb+E*R;d[7]=h*U+q*Ca+y*eb+a*R;d[8]=e*Ma+k*sb+r*$a+z*Ub;d[9]=f*Ma+n*sb+s*$a+A*Ub;d[10]=+g*Ma+p*sb+u*$a+E*Ub;d[11]=h*Ma+q*sb+y*$a+a*Ub;d[12]=e*nb+k*Mc+r*sc+z*b;d[13]=f*nb+n*Mc+s*sc+A*b;d[14]=g*nb+p*Mc+u*sc+E*b;d[15]=h*nb+q*Mc+y*sc+a*b}+function Nd(a,b){var d=a[0],e=a[1],f=a[2],g=a[3],h=a[4],k=a[5],n=a[6],p=a[7],q=a[8],r=a[9],s=a[10],u=a[11],y=a[12],z=a[13],A=a[14],E=a[15],x=d*k-e*h,Q=d*n-f*h,N=d*p-g*h,L=e*n-f*k,U=e*p-g*k,Ca=f*p-g*n,eb=q*z-r*y,R=q*A-s*y,Ma=q*E-u*y,sb=r*A-s*z,$a=r*E-u*z,Ub=s*E-u*A,nb=x*Ub-Q*$a+N*sb+L*Ma-U*R+Ca*eb;0!=nb&&(nb=1/nb,b[0]=(k*Ub-n*$a+p*sb)*nb,b[1]=(-e*Ub+f*$a-g*sb)*nb,b[2]=(z*Ca-A*U+E*L)*nb,b[3]=(-r*Ca+s*U-u*L)*nb,b[4]=(-h*Ub+n*Ma-p*R)*nb,b[5]=(d*Ub-f*Ma+g*R)*nb,b[6]=(-y*Ca+A*N-E*Q)*nb,b[7]=(q*Ca-s*N+u*+Q)*nb,b[8]=(h*$a-k*Ma+p*eb)*nb,b[9]=(-d*$a+e*Ma-g*eb)*nb,b[10]=(y*U-z*N+E*x)*nb,b[11]=(-q*U+r*N-u*x)*nb,b[12]=(-h*sb+k*R-n*eb)*nb,b[13]=(d*sb-e*R+f*eb)*nb,b[14]=(-y*L+z*Q-A*x)*nb,b[15]=(q*L-r*Q+s*x)*nb)}function Od(a,b,d){var e=a[1]*b+a[5]*d+0*a[9]+a[13],f=a[2]*b+a[6]*d+0*a[10]+a[14],g=a[3]*b+a[7]*d+0*a[11]+a[15];a[12]=a[0]*b+a[4]*d+0*a[8]+a[12];a[13]=e;a[14]=f;a[15]=g}+function Pd(a,b,d){Id(a,a[0]*b,a[1]*b,a[2]*b,a[3]*b,a[4]*d,a[5]*d,a[6]*d,a[7]*d,1*a[8],1*a[9],1*a[10],1*a[11],a[12],a[13],a[14],a[15])}function Qd(a,b){var d=a[0],e=a[1],f=a[2],g=a[3],h=a[4],k=a[5],n=a[6],p=a[7],q=Math.cos(b),r=Math.sin(b);a[0]=d*q+h*r;a[1]=e*q+k*r;a[2]=f*q+n*r;a[3]=g*q+p*r;a[4]=d*-r+h*q;a[5]=e*-r+k*q;a[6]=f*-r+n*q;a[7]=g*-r+p*q}new Float64Array(3);new Float64Array(3);new Float64Array(4);new Float64Array(4);new Float64Array(4);new Float64Array(16);function Rd(a){for(var b=Sd(),d=0,e=a.length;d<e;++d)Td(b,a[d]);return b}function Ud(a,b,d){var e=Math.min.apply(null,a),f=Math.min.apply(null,b);a=Math.max.apply(null,a);b=Math.max.apply(null,b);return Vd(e,f,a,b,d)}function Wd(a,b,d){return m(d)?(d[0]=a[0]-b,d[1]=a[1]-b,d[2]=a[2]+b,d[3]=a[3]+b,d):[a[0]-b,a[1]-b,a[2]+b,a[3]+b]}function Xd(a,b){return m(b)?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b):a.slice()}+function Yd(a,b,d){b=b<a[0]?a[0]-b:a[2]<b?b-a[2]:0;a=d<a[1]?a[1]-d:a[3]<d?d-a[3]:0;return b*b+a*a}function Zd(a,b){return a[0]<=b[0]&&b[2]<=a[2]&&a[1]<=b[1]&&b[3]<=a[3]}function $d(a,b,d){return a[0]<=b&&b<=a[2]&&a[1]<=d&&d<=a[3]}function ae(a,b){var d=a[1],e=a[2],f=a[3],g=b[0],h=b[1],k=0;g<a[0]?k=k|16:g>e&&(k=k|4);h<d?k|=8:h>f&&(k|=2);0===k&&(k=1);return k}function Sd(){return[Infinity,Infinity,-Infinity,-Infinity]}function Vd(a,b,d,e,f){return m(f)?(f[0]=a,f[1]=b,f[2]=d,f[3]=e,f):[a,b,d,e]}+function be(a,b){var d=a[0],e=a[1];return Vd(d,e,d,e,b)}function ce(a,b){return a[0]==b[0]&&a[2]==b[2]&&a[1]==b[1]&&a[3]==b[3]}function de(a,b){b[0]<a[0]&&(a[0]=b[0]);b[2]>a[2]&&(a[2]=b[2]);b[1]<a[1]&&(a[1]=b[1]);b[3]>a[3]&&(a[3]=b[3]);return a}function Td(a,b){b[0]<a[0]&&(a[0]=b[0]);b[0]>a[2]&&(a[2]=b[0]);b[1]<a[1]&&(a[1]=b[1]);b[1]>a[3]&&(a[3]=b[1])}+function ee(a,b,d,e,f){for(;d<e;d+=f){var g=a,h=b[d],k=b[d+1];g[0]=Math.min(g[0],h);g[1]=Math.min(g[1],k);g[2]=Math.max(g[2],h);g[3]=Math.max(g[3],k)}return a}function fe(a,b){var d;return(d=b.call(void 0,ge(a)))||(d=b.call(void 0,he(a)))||(d=b.call(void 0,ie(a)))?d:(d=b.call(void 0,je(a)))?d:!1}function ge(a){return[a[0],a[1]]}function he(a){return[a[2],a[1]]}function ke(a){return[(a[0]+a[2])/2,(a[1]+a[3])/2]}+function le(a,b){var d;"bottom-left"===b?d=ge(a):"bottom-right"===b?d=he(a):"top-left"===b?d=je(a):"top-right"===b&&(d=ie(a));return d}function me(a,b,d,e){var f=b*e[0]/2;e=b*e[1]/2;b=Math.cos(d);d=Math.sin(d);f=[-f,-f,f,f];e=[-e,e,-e,e];var g,h,k;for(g=0;4>g;++g)h=f[g],k=e[g],f[g]=a[0]+h*b-k*d,e[g]=a[1]+h*d+k*b;return Ud(f,e,void 0)}function ne(a){return a[3]-a[1]}+function oe(a,b,d){d=m(d)?d:Sd();pe(a,b)&&(d[0]=a[0]>b[0]?a[0]:b[0],d[1]=a[1]>b[1]?a[1]:b[1],d[2]=a[2]<b[2]?a[2]:b[2],d[3]=a[3]<b[3]?a[3]:b[3]);return d}function je(a){return[a[0],a[3]]}function ie(a){return[a[2],a[3]]}function qe(a){return a[2]-a[0]}function pe(a,b){return a[0]<=b[2]&&a[2]>=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function re(a){return a[2]<a[0]||a[3]<a[1]}function se(a,b){var d=(a[2]-a[0])/2*(b-1),e=(a[3]-a[1])/2*(b-1);a[0]-=d;a[2]+=d;a[1]-=e;a[3]+=e}+function te(a,b,d){a=[a[0],a[1],a[0],a[3],a[2],a[1],a[2],a[3]];b(a,a,2);return Ud([a[0],a[2],a[4],a[6]],[a[1],a[3],a[5],a[7]],d)};/*++ Latitude/longitude spherical geodesy formulae taken from+ http://www.movable-type.co.uk/scripts/latlong.html+ Licensed under CC-BY-3.0.+*/+function ue(a){this.radius=a}ue.prototype.f=function(a){for(var b=0,d=a.length,e=a[d-1][0],f=a[d-1][1],g=0;g<d;g++)var h=a[g][0],k=a[g][1],b=b+Yb(h-e)*(2+Math.sin(Yb(f))+Math.sin(Yb(k))),e=h,f=k;return b*this.radius*this.radius/2};ue.prototype.c=function(a,b){var d=Yb(a[1]),e=Yb(b[1]),f=(e-d)/2,g=Yb(b[0]-a[0])/2,d=Math.sin(f)*Math.sin(f)+Math.sin(g)*Math.sin(g)*Math.cos(d)*Math.cos(e);return 2*this.radius*Math.atan2(Math.sqrt(d),Math.sqrt(1-d))};+ue.prototype.offset=function(a,b,d){var e=Yb(a[1]);b/=this.radius;var f=Math.asin(Math.sin(e)*Math.cos(b)+Math.cos(e)*Math.sin(b)*Math.cos(d));return[180*(Yb(a[0])+Math.atan2(Math.sin(d)*Math.sin(b)*Math.cos(e),Math.cos(b)-Math.sin(e)*Math.sin(f)))/Math.PI,180*f/Math.PI]};var ve=new ue(6370997);var we={};we.degrees=2*Math.PI*ve.radius/360;we.ft=.3048;we.m=1;we["us-ft"]=1200/3937;+function xe(a){this.c=a.code;this.f=a.units;this.p=m(a.extent)?a.extent:null;this.j=m(a.worldExtent)?a.worldExtent:null;this.d=m(a.axisOrientation)?a.axisOrientation:"enu";this.e=m(a.global)?a.global:!1;this.k=m(a.getPointResolution)?a.getPointResolution:this.$h;this.i=null;if("function"==typeof proj4){var b=a.code,d=proj4.defs(b);if(m(d)){m(d.axis)&&!m(a.axisOrientation)&&(this.d=d.axis);m(a.units)||(a=d.units,!m(a)&&m(d.to_meter)&&(a=d.to_meter.toString(),we[a]=d.to_meter),this.f=a);a=ye;var e,+f;for(e in a)f=proj4.defs(e),m(f)&&(a=ze(e),f===d?Ae([a,this]):(f=proj4(e,b),Be(a,this,f.forward,f.inverse)))}}}l=xe.prototype;l.Ah=function(){return this.c};l.N=function(){return this.p};l.Vj=function(){return this.f};l.sd=function(){return we[this.f]};l.ii=function(){return this.j};function Ce(a){return a.d}l.Wj=function(){return this.e};l.cm=function(a){this.e=a};l.Xj=function(a){this.p=a};l.nm=function(a){this.j=a};l.bm=function(a){this.k=a};+l.$h=function(a,b){if("degrees"==this.f)return a;var d=De(this,ze("EPSG:4326")),e=[b[0]-a/2,b[1],b[0]+a/2,b[1],b[0],b[1]-a/2,b[0],b[1]+a/2],e=d(e,e,2),d=(ve.c(e.slice(0,2),e.slice(2,4))+ve.c(e.slice(4,6),e.slice(6,8)))/2,e=this.sd();m(e)&&(d/=e);return d};l.getPointResolution=function(a,b){return this.k(a,b)};var ye={},Ee={};function Ae(a){Fe(a);Qa(a,function(b){Qa(a,function(a){b!==a&&Ge(b,a,He)})})}function Ie(){var a=Je,b=Ke,d=Le;Qa(Me,function(e){Qa(a,function(a){Ge(e,a,b);Ge(a,e,d)})})}+function Ne(a){ye[a.c]=a;Ge(a,a,He)}function Fe(a){var b=[];Qa(a,function(a){b.push(Ne(a))})}function Oe(a){return null!=a?ia(a)?ze(a):a:ze("EPSG:3857")}function Ge(a,b,d){a=a.c;b=b.c;a in Ee||(Ee[a]={});Ee[a][b]=d}function Be(a,b,d,e){a=ze(a);b=ze(b);Ge(a,b,Pe(d));Ge(b,a,Pe(e))}function Pe(a){return function(b,d,e){var f=b.length;e=m(e)?e:2;d=m(d)?d:Array(f);var g,h;for(h=0;h<f;h+=e)for(g=a([b[h],b[h+1]]),d[h]=g[0],d[h+1]=g[1],g=e-1;2<=g;--g)d[h+g]=b[h+g];return d}}+function ze(a){var b;a instanceof xe?b=a:ia(a)?(b=ye[a],!m(b)&&"function"==typeof proj4&&m(proj4.defs(a))&&(b=new xe({code:a}),Ne(b))):b=null;return b}function Re(a,b){return a===b?!0:a.f!=b.f?!1:De(a,b)===He}function Se(a,b){var d=ze(a),e=ze(b);return De(d,e)}function De(a,b){var d=a.c,e=b.c,f;d in Ee&&e in Ee[d]&&(f=Ee[d][e]);m(f)||(f=Te);return f}function Te(a,b){if(m(b)&&a!==b){for(var d=0,e=a.length;d<e;++d)b[d]=a[d];a=b}return a}+function He(a,b){var d;if(m(b)){d=0;for(var e=a.length;d<e;++d)b[d]=a[d];d=b}else d=a.slice();return d}function Ue(a,b,d){b=Se(b,d);return te(a,b)};function B(a){qd.call(this);a=m(a)?a:{};this.u=[0,0];var b={};b.center=m(a.center)?a.center:null;this.t=Oe(a.projection);var d,e,f,g=m(a.minZoom)?a.minZoom:0;d=m(a.maxZoom)?a.maxZoom:28;var h=m(a.zoomFactor)?a.zoomFactor:2;if(m(a.resolutions))d=a.resolutions,e=d[0],f=d[d.length-1],d=bc(d);else{e=Oe(a.projection);f=e.N();var k=(null===f?360*we.degrees/we[e.f]:Math.max(qe(f),ne(f)))/256/Math.pow(2,0),n=k/Math.pow(2,28);e=a.maxResolution;m(e)?g=0:e=k/Math.pow(h,g);f=a.minResolution;m(f)||(f=m(a.maxZoom)?+m(a.maxResolution)?e/Math.pow(h,d):k/Math.pow(h,d):n);d=g+Math.floor(Math.log(e/f)/Math.log(h));f=e/Math.pow(h,d-g);d=cc(h,e,d-g)}this.i=e;this.L=f;this.s=g;g=m(a.extent)?Zb(a.extent):$b;(m(a.enableRotation)?a.enableRotation:1)?(e=a.constrainRotation,e=m(e)&&!0!==e?!1===e?ec:ja(e)?fc(e):ec:gc()):e=dc;this.J=new hc(g,d,e);m(a.resolution)?b.resolution=a.resolution:m(a.zoom)&&(b.resolution=this.constrainResolution(this.i,a.zoom-this.s));b.rotation=m(a.rotation)?a.rotation:0;this.I(b)}v(B,qd);+B.prototype.l=function(a){return this.J.center(a)};B.prototype.constrainResolution=function(a,b,d){return this.J.resolution(a,b||0,d||0)};B.prototype.constrainRotation=function(a,b){return this.J.rotation(a,b||0)};B.prototype.d=function(){return this.get("center")};B.prototype.getCenter=B.prototype.d;B.prototype.k=function(a){var b=this.d(),d=this.c();return[b[0]-d*a[0]/2,b[1]-d*a[1]/2,b[0]+d*a[0]/2,b[1]+d*a[1]/2]};B.prototype.R=function(){return this.t};B.prototype.c=function(){return this.get("resolution")};+B.prototype.getResolution=B.prototype.c;B.prototype.n=function(a,b){return Math.max(qe(a)/b[0],ne(a)/b[1])};function Ve(a){var b=a.i,d=Math.log(b/a.L)/Math.log(2);return function(a){return b/Math.pow(2,a*d)}}B.prototype.e=function(){return this.get("rotation")};B.prototype.getRotation=B.prototype.e;function We(a){var b=a.i,d=Math.log(b/a.L)/Math.log(2);return function(a){return Math.log(b/a)/Math.log(2)/d}}+function Xe(a){var b=a.d(),d=a.t,e=a.c();a=a.e();return{center:b.slice(),projection:m(d)?d:null,resolution:e,rotation:a}}l=B.prototype;l.ki=function(){var a,b=this.c();if(m(b)){var d,e=0;do{d=this.constrainResolution(this.i,e);if(d==b){a=e;break}++e}while(d>this.L)}return m(a)?this.s+a:a};l.te=function(a,b){if(!re(a)){this.Ma(ke(a));var d=this.n(a,b),e=this.constrainResolution(d,0,0);e<d&&(e=this.constrainResolution(e,-1,0));this.j(e)}};+l.wh=function(a,b,d){var e=m(d)?d:{};d=m(e.padding)?e.padding:[0,0,0,0];var f=m(e.constrainResolution)?e.constrainResolution:!0,g=m(e.nearest)?e.nearest:!1,h;m(e.minResolution)?h=e.minResolution:m(e.maxZoom)?h=this.constrainResolution(this.i,e.maxZoom-this.s,0):h=0;var k=a.o,n=this.e(),e=Math.cos(-n),n=Math.sin(-n),p=Infinity,q=Infinity,r=-Infinity,s=-Infinity;a=a.H;for(var u=0,y=k.length;u<y;u+=a)var z=k[u]*e-k[u+1]*n,A=k[u]*n+k[u+1]*e,p=Math.min(p,z),q=Math.min(q,A),r=Math.max(r,z),s=Math.max(s,+A);b=this.n([p,q,r,s],[b[0]-d[1]-d[3],b[1]-d[0]-d[2]]);b=isNaN(b)?h:Math.max(b,h);f&&(h=this.constrainResolution(b,0,0),!g&&h<b&&(h=this.constrainResolution(h,-1,0)),b=h);this.j(b);n=-n;g=(p+r)/2+(d[1]-d[3])/2*b;d=(q+s)/2+(d[0]-d[2])/2*b;this.Ma([g*e-d*n,d*e+g*n])};l.rh=function(a,b,d){var e=this.e(),f=Math.cos(-e),e=Math.sin(-e),g=a[0]*f-a[1]*e;a=a[1]*f+a[0]*e;var h=this.c(),g=g+(b[0]/2-d[0])*h;a+=(d[1]-b[1]/2)*h;e=-e;this.Ma([g*f-a*e,a*f+g*e])};+l.rotate=function(a,b){if(m(b)){var d,e=this.d();m(e)&&(d=[e[0]-b[0],e[1]-b[1]],Ad(d,a-this.e()),vd(d,b));this.Ma(d)}this.v(a)};l.Ma=function(a){this.set("center",a)};B.prototype.setCenter=B.prototype.Ma;function Ye(a,b){a.u[1]+=b}B.prototype.j=function(a){this.set("resolution",a)};B.prototype.setResolution=B.prototype.j;B.prototype.v=function(a){this.set("rotation",a)};B.prototype.setRotation=B.prototype.v;B.prototype.V=function(a){a=this.constrainResolution(this.i,a-this.s,0);this.j(a)};function Ze(a){return 1-Math.pow(1-a,3)};function $e(a){return 3*a*a-2*a*a*a}function af(a){return a}function bf(a){return.5>a?$e(2*a):1-$e(2*(a-.5))};function cf(a){var b=a.source,d=m(a.start)?a.start:ta(),e=b[0],f=b[1],g=m(a.duration)?a.duration:1E3,h=m(a.easing)?a.easing:$e;return function(a,b){if(b.time<d)return b.animate=!0,b.viewHints[0]+=1,!0;if(b.time<d+g){var p=1-h((b.time-d)/g),q=e-b.viewState.center[0],r=f-b.viewState.center[1];b.animate=!0;b.viewState.center[0]+=p*q;b.viewState.center[1]+=p*r;b.viewHints[0]+=1;return!0}return!1}}+function df(a){var b=m(a.rotation)?a.rotation:0,d=m(a.start)?a.start:ta(),e=m(a.duration)?a.duration:1E3,f=m(a.easing)?a.easing:$e,g=m(a.anchor)?a.anchor:null;return function(a,k){if(k.time<d)return k.animate=!0,k.viewHints[0]+=1,!0;if(k.time<d+e){var n=1-f((k.time-d)/e),n=(b-k.viewState.rotation)*n;k.animate=!0;k.viewState.rotation+=n;if(null!==g){var p=k.viewState.center;p[0]-=g[0];p[1]-=g[1];Ad(p,n);vd(p,g)}k.viewHints[0]+=1;return!0}return!1}}+function ef(a){var b=a.resolution,d=m(a.start)?a.start:ta(),e=m(a.duration)?a.duration:1E3,f=m(a.easing)?a.easing:$e;return function(a,h){if(h.time<d)return h.animate=!0,h.viewHints[0]+=1,!0;if(h.time<d+e){var k=1-f((h.time-d)/e),n=b-h.viewState.resolution;h.animate=!0;h.viewState.resolution+=k*n;h.viewHints[0]+=1;return!0}return!1}};function ff(a,b,d,e){return m(e)?(e[0]=a,e[1]=b,e[2]=d,e):[a,b,d]}function gf(a,b,d){return a+"/"+b+"/"+d}function hf(a){var b=a[0],d=Array(b),e=1<<b-1,f,g;for(f=0;f<b;++f)g=48,a[1]&e&&(g+=1),a[2]&e&&(g+=2),d[f]=String.fromCharCode(g),e>>=1;return d.join("")}function jf(a){return gf(a[0],a[1],a[2])};function kf(a,b,d,e){this.c=a;this.e=b;this.d=d;this.f=e}function lf(a,b,d,e,f){return m(f)?(f.c=a,f.e=b,f.d=d,f.f=e,f):new kf(a,b,d,e)}kf.prototype.contains=function(a){return mf(this,a[1],a[2])};function mf(a,b,d){return a.c<=b&&b<=a.e&&a.d<=d&&d<=a.f}function nf(a,b){return a.c==b.c&&a.d==b.d&&a.e==b.e&&a.f==b.f}function of(a){return a.e-a.c+1}function pf(a,b){return a.c<=b.e&&a.e>=b.c&&a.d<=b.f&&a.f>=b.d};function qf(a){this.f=a.html;this.c=m(a.tileRanges)?a.tileRanges:null}qf.prototype.d=function(){return this.f};var rf=!Gb||Gb&&9<=Rb;!Hb&&!Gb||Gb&&Gb&&9<=Rb||Hb&&Pb("1.9.1");Gb&&Pb("9");Eb("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));Eb("action","cite","data","formaction","href","manifest","poster","src");Eb("embed","iframe","link","object","script","style","template");function sf(a,b){this.x=m(a)?a:0;this.y=m(b)?b:0}l=sf.prototype;l.clone=function(){return new sf(this.x,this.y)};l.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};l.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};l.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};l.scale=function(a,b){var d=ja(b)?b:a;this.x*=a;this.y*=d;return this};function tf(a,b){this.width=a;this.height=b}l=tf.prototype;l.clone=function(){return new tf(this.width,this.height)};l.pa=function(){return!(this.width*this.height)};l.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};l.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};+l.scale=function(a,b){var d=ja(b)?b:a;this.width*=a;this.height*=d;return this};function uf(a){return a?new vf(wf(a)):xa||(xa=new vf)}function xf(a){var b=document;return ia(a)?b.getElementById(a):a}function yf(a,b){mb(b,function(b,e){"style"==e?a.style.cssText=b:"class"==e?a.className=b:"for"==e?a.htmlFor=b:e in zf?a.setAttribute(zf[e],b):0==e.lastIndexOf("aria-",0)||0==e.lastIndexOf("data-",0)?a.setAttribute(e,b):a[e]=b})}+var zf={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function Af(a){a=a.document.documentElement;return new tf(a.clientWidth,a.clientHeight)}+function Bf(a,b,d){var e=arguments,f=document,g=e[0],h=e[1];if(!rf&&h&&(h.name||h.type)){g=["<",g];h.name&&g.push(' name="',Ba(h.name),'"');if(h.type){g.push(' type="',Ba(h.type),'"');var k={};Db(k,h);delete k.type;h=k}g.push(">");g=g.join("")}g=f.createElement(g);h&&(ia(h)?g.className=h:ga(h)?g.className=h.join(" "):yf(g,h));2<e.length&&Cf(f,g,e,2);return g}+function Cf(a,b,d,e){function f(d){d&&b.appendChild(ia(d)?a.createTextNode(d):d)}for(;e<d.length;e++){var g=d[e];!ha(g)||la(g)&&0<g.nodeType?f(g):Qa(Df(g)?Za(g):g,f)}}function Ef(a){return document.createElement(a)}function Ff(a,b){Cf(wf(a),a,arguments,1)}function Gf(a){for(var b;b=a.firstChild;)a.removeChild(b)}function Hf(a,b,d){a.insertBefore(b,a.childNodes[d]||null)}function If(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function Jf(a,b){var d=b.parentNode;d&&d.replaceChild(a,b)}+function Kf(a){if(void 0!=a.firstElementChild)a=a.firstElementChild;else for(a=a.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}function wf(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function Df(a){if(a&&"number"==typeof a.length){if(la(a))return"function"==typeof a.item||"string"==typeof a.item;if(ka(a))return"function"==typeof a.item}return!1}function vf(a){this.c=a||ba.document||document}function Lf(){return!0}+function Mf(a){var b=a.c;a=Ib?b.body||b.documentElement:b.documentElement;b=b.parentWindow||b.defaultView;return Gb&&Pb("10")&&b.pageYOffset!=a.scrollTop?new sf(a.scrollLeft,a.scrollTop):new sf(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}vf.prototype.appendChild=function(a,b){a.appendChild(b)};+vf.prototype.contains=function(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};function Nf(a,b){var d=Ef("CANVAS");m(a)&&(d.width=a);m(b)&&(d.height=b);return d.getContext("2d")}+var Of=function(){var a;return function(){if(!m(a))if(ba.getComputedStyle){var b=Ef("P"),d,e={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.appendChild(b);for(var f in e)f in b.style&&(b.style[f]="translate(1px,1px)",d=ba.getComputedStyle(b).getPropertyValue(e[f]));If(b);a=d&&"none"!==d}else a=!1;return a}}(),Pf=function(){var a;return function(){if(!m(a))if(ba.getComputedStyle){var b=Ef("P"),+d,e={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.appendChild(b);for(var f in e)f in b.style&&(b.style[f]="translate3d(1px,1px,1px)",d=ba.getComputedStyle(b).getPropertyValue(e[f]));If(b);a=d&&"none"!==d}else a=!1;return a}}();function Qf(a,b){var d=a.style;d.WebkitTransform=b;d.MozTransform=b;d.c=b;d.msTransform=b;d.transform=b;Gb&&!Tb&&(a.style.transformOrigin="0 0")}+function Rf(a,b){var d;if(Pf()){if(m(6)){var e=Array(16);for(d=0;16>d;++d)e[d]=b[d].toFixed(6);d=e.join(",")}else d=b.join(",");Qf(a,"matrix3d("+d+")")}else if(Of()){e=[b[0],b[1],b[4],b[5],b[12],b[13]];if(m(6)){var f=Array(6);for(d=0;6>d;++d)f[d]=e[d].toFixed(6);d=f.join(",")}else d=e.join(",");Qf(a,"matrix("+d+")")}else a.style.left=Math.round(b[12])+"px",a.style.top=Math.round(b[13])+"px"};var Sf=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Tf(a,b){var d,e,f=Sf.length;for(e=0;e<f;++e)try{if(d=a.getContext(Sf[e],b),null!==d)return d}catch(g){}return null};var Uf,Vf=ba.devicePixelRatio||1,Wf="ArrayBuffer"in ba,Yf=!1,Zf=function(){if(!("HTMLCanvasElement"in ba))return!1;try{var a=Nf();if(null===a)return!1;m(a.setLineDash)&&(Yf=!0);return!0}catch(b){return!1}}(),$f="DeviceOrientationEvent"in ba,ag="geolocation"in ba.navigator,bg="ontouchstart"in ba,cg="PointerEvent"in ba,dg=!!ba.navigator.msPointerEnabled,eg=!1,fg,gg=[];+if("WebGLRenderingContext"in ba)try{var hg=Ef("CANVAS"),ig=Tf(hg,{vh:!0});null!==ig&&(eg=!0,fg=ig.getParameter(ig.MAX_TEXTURE_SIZE),gg=ig.getSupportedExtensions())}catch(jg){}Uf=eg;va=gg;ua=fg;function kg(a,b,d){qc.call(this,a,d);this.element=b}v(kg,qc);function lg(a){qd.call(this);this.c=m(a)?a:[];mg(this)}v(lg,qd);l=lg.prototype;l.clear=function(){for(;0<this.Mb();)this.pop()};l.Be=function(a){var b,d;b=0;for(d=a.length;b<d;++b)this.push(a[b]);return this};l.forEach=function(a,b){Qa(this.c,a,b)};l.nj=function(){return this.c};l.item=function(a){return this.c[a]};l.Mb=function(){return this.get("length")};l.Dd=function(a,b){bb(this.c,a,0,b);mg(this);this.dispatchEvent(new kg("add",b,this))};+l.pop=function(){return this.Oe(this.Mb()-1)};l.push=function(a){var b=this.c.length;this.Dd(b,a);return b};l.remove=function(a){var b=this.c,d,e;d=0;for(e=b.length;d<e;++d)if(b[d]===a)return this.Oe(d)};l.Oe=function(a){var b=this.c[a];Oa.splice.call(this.c,a,1);mg(this);this.dispatchEvent(new kg("remove",b,this));return b};+l.Zl=function(a,b){var d=this.Mb();if(a<d)d=this.c[a],this.c[a]=b,this.dispatchEvent(new kg("remove",d,this)),this.dispatchEvent(new kg("add",b,this));else{for(;d<a;++d)this.Dd(d,void 0);this.Dd(a,b)}};function mg(a){a.set("length",a.c.length)};var ng=/^#(?:[0-9a-f]{3}){1,2}$/i,og=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,pg=/^(?: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 qg(a){return ga(a)?a:rg(a)}function sg(a){if(!ia(a)){var b=a[0];b!=(b|0)&&(b=b+.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("+b+","+d+","+e+","+a[3]+")"}return a}+var rg=function(){var a={},b=0;return function(d){var e;if(a.hasOwnProperty(d))e=a[d];else{if(1024<=b){e=0;for(var f in a)0===(e++&3)&&(delete a[f],--b)}var g,h;ng.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=pg.exec(d))?(e=Number(h[1]),f=Number(h[2]),g=Number(h[3]),h=Number(h[4]),e=[e,f,g,h],e=tg(e,e)):(h=og.exec(d))?(e=Number(h[1]),f=Number(h[2]),g=Number(h[3]),+e=[e,f,g,1],e=tg(e,e)):e=void 0;a[d]=e;++b}return e}}();function tg(a,b){var d=m(b)?b:[];d[0]=Vb(a[0]+.5|0,0,255);d[1]=Vb(a[1]+.5|0,0,255);d[2]=Vb(a[2]+.5|0,0,255);d[3]=Vb(a[3],0,1);return d};function ug(){this.k=Hd();this.f=void 0;this.c=Hd();this.e=void 0;this.d=Hd();this.i=void 0;this.j=Hd();this.l=void 0;this.p=Hd()}+function vg(a,b,d,e,f){var g=!1;m(b)&&b!==a.f&&(g=a.c,Ld(g),g[12]=b,g[13]=b,g[14]=b,g[15]=1,a.f=b,g=!0);if(m(d)&&d!==a.e){g=a.d;Ld(g);g[0]=d;g[5]=d;g[10]=d;g[15]=1;var h=-.5*d+.5;g[12]=h;g[13]=h;g[14]=h;g[15]=1;a.e=d;g=!0}m(e)&&e!==a.i&&(g=Math.cos(e),h=Math.sin(e),Id(a.j,.213+.787*g-.213*h,.213-.213*g+.143*h,.213-.213*g-.787*h,0,.715-.715*g-.715*h,.715+.285*g+.14*h,.715-.715*g+.715*h,0,.072-.072*g+.928*h,.072-.072*g-.283*h,.072+.928*g+.072*h,0,0,0,0,1),a.i=e,g=!0);m(f)&&f!==a.l&&(Id(a.p,.213+.787*+f,.213-.213*f,.213-.213*f,0,.715-.715*f,.715+.285*f,.715-.715*f,0,.072-.072*f,.072-.072*f,.072+.928*f,0,0,0,0,1),a.l=f,g=!0);g&&(g=a.k,Ld(g),m(d)&&Md(g,a.d,g),m(b)&&Md(g,a.c,g),m(f)&&Md(g,a.p,g),m(e)&&Md(g,a.j,g));return a.k};function wg(a){if(a.classList)return a.classList;a=a.className;return ia(a)&&a.match(/\S+/g)||[]}function xg(a,b){return a.classList?a.classList.contains(b):Wa(wg(a),b)}function yg(a,b){a.classList?a.classList.add(b):xg(a,b)||(a.className+=0<a.className.length?" "+b:b)}function zg(a,b){a.classList?a.classList.remove(b):xg(a,b)&&(a.className=Ra(wg(a),function(a){return a!=b}).join(" "))}function Ag(a,b){xg(a,b)?zg(a,b):yg(a,b)};function Bg(a,b,d,e){this.top=a;this.right=b;this.bottom=d;this.left=e}l=Bg.prototype;l.clone=function(){return new Bg(this.top,this.right,this.bottom,this.left)};l.contains=function(a){return this&&a?a instanceof Bg?a.left>=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,b){var d=ja(b)?b:a;this.left*=a;this.right*=a;this.top*=d;this.bottom*=d;return this};function Cg(a,b,d,e){this.left=a;this.top=b;this.width=d;this.height=e}l=Cg.prototype;l.clone=function(){return new Cg(this.left,this.top,this.width,this.height)};l.contains=function(a){return a instanceof Cg?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};+function Dg(a,b){var d=b.x<a.left?a.left-b.x:Math.max(b.x-(a.left+a.width),0),e=b.y<a.top?a.top-b.y:Math.max(b.y-(a.top+a.height),0);return d*d+e*e}l.distance=function(a){return Math.sqrt(Dg(this,a))};l.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};+l.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};l.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};l.scale=function(a,b){var d=ja(b)?b:a;this.left*=a;this.width*=a;this.top*=d;this.height*=d;return this};function Eg(a,b){var d=wf(a);return d.defaultView&&d.defaultView.getComputedStyle&&(d=d.defaultView.getComputedStyle(a,null))?d[b]||d.getPropertyValue(b)||"":""}function Fg(a,b){return Eg(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}function Gg(a,b,d){var e;b instanceof sf?(e=b.x,b=b.y):(e=b,b=d);a.style.left=Hg(e);a.style.top=Hg(b)}+function Ig(a){var b;try{b=a.getBoundingClientRect()}catch(d){return{left:0,top:0,right:0,bottom:0}}Gb&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}+function Jg(a){if(1==a.nodeType)return a=Ig(a),new sf(a.left,a.top);var b=ka(a.zh),d=a;a.targetTouches&&a.targetTouches.length?d=a.targetTouches[0]:b&&a.c.targetTouches&&a.c.targetTouches.length&&(d=a.c.targetTouches[0]);return new sf(d.clientX,d.clientY)}function Hg(a){"number"==typeof a&&(a=a+"px");return a}+function Kg(a){var b=Lg;if("none"!=Fg(a,"display"))return b(a);var d=a.style,e=d.display,f=d.visibility,g=d.position;d.visibility="hidden";d.position="absolute";d.display="inline";a=b(a);d.display=e;d.position=g;d.visibility=f;return a}function Lg(a){var b=a.offsetWidth,d=a.offsetHeight,e=Ib&&!b&&!d;return m(b)&&!e||!a.getBoundingClientRect?new tf(b,d):(a=Ig(a),new tf(a.right-a.left,a.bottom-a.top))}function Mg(a,b){a.style.display=b?"":"none"}+function Ng(a,b,d,e){if(/^\d+px?$/.test(b))return parseInt(b,10);var f=a.style[d],g=a.runtimeStyle[d];a.runtimeStyle[d]=a.currentStyle[d];a.style[d]=b;b=a.style[e];a.style[d]=f;a.runtimeStyle[d]=g;return b}function Og(a,b){var d=a.currentStyle?a.currentStyle[b]:null;return d?Ng(a,d,"left","pixelLeft"):0}+function Pg(a,b){if(Gb){var d=Og(a,b+"Left"),e=Og(a,b+"Right"),f=Og(a,b+"Top"),g=Og(a,b+"Bottom");return new Bg(f,e,g,d)}d=Eg(a,b+"Left");e=Eg(a,b+"Right");f=Eg(a,b+"Top");g=Eg(a,b+"Bottom");return new Bg(parseFloat(f),parseFloat(e),parseFloat(g),parseFloat(d))}var Qg={thin:2,medium:4,thick:6};function Rg(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var d=a.currentStyle?a.currentStyle[b+"Width"]:null;return d in Qg?Qg[d]:Ng(a,d,"left","pixelLeft")}+function Sg(a){if(Gb&&!(Gb&&9<=Rb)){var b=Rg(a,"borderLeft"),d=Rg(a,"borderRight"),e=Rg(a,"borderTop");a=Rg(a,"borderBottom");return new Bg(e,d,a,b)}b=Eg(a,"borderLeftWidth");d=Eg(a,"borderRightWidth");e=Eg(a,"borderTopWidth");a=Eg(a,"borderBottomWidth");return new Bg(parseFloat(e),parseFloat(d),parseFloat(a),parseFloat(b))};function Tg(a,b,d){qc.call(this,a);this.map=b;this.frameState=m(d)?d:null}v(Tg,qc);function Ug(a){qd.call(this);this.element=m(a.element)?a.element:null;this.c=this.l=null;this.u=[];this.render=m(a.render)?a.render:ca;m(a.target)&&this.d(a.target)}v(Ug,qd);Ug.prototype.T=function(){If(this.element);Ug.X.T.call(this)};Ug.prototype.j=function(){return this.c};+Ug.prototype.setMap=function(a){null===this.c||If(this.element);0!=this.u.length&&(Qa(this.u,Wc),this.u.length=0);this.c=a;null!==this.c&&((null===this.l?a.L:this.l).appendChild(this.element),this.render!==ca&&this.u.push(w(a,"postrender",this.render,!1,this)),a.render())};Ug.prototype.d=function(a){this.l=xf(a)};function Vg(){this.d=0;this.e={};this.f=this.c=null}l=Vg.prototype;l.clear=function(){this.d=0;this.e={};this.f=this.c=null};function Wg(a,b){return a.e.hasOwnProperty(b)}l.forEach=function(a,b){for(var d=this.c;null!==d;)a.call(b,d.lc,d.Gd,this),d=d.ib};l.get=function(a){a=this.e[a];if(a===this.f)return a.lc;a===this.c?(this.c=this.c.ib,this.c.Qb=null):(a.ib.Qb=a.Qb,a.Qb.ib=a.ib);a.ib=null;a.Qb=this.f;this.f=this.f.ib=a;return a.lc};l.Xb=function(){return this.d};+l.K=function(){var a=Array(this.d),b=0,d;for(d=this.f;null!==d;d=d.Qb)a[b++]=d.Gd;return a};l.sb=function(){var a=Array(this.d),b=0,d;for(d=this.f;null!==d;d=d.Qb)a[b++]=d.lc;return a};l.pop=function(){var a=this.c;delete this.e[a.Gd];null!==a.ib&&(a.ib.Qb=null);this.c=a.ib;null===this.c&&(this.f=null);--this.d;return a.lc};l.set=function(a,b){var d={Gd:a,ib:null,Qb:this.f,lc:b};null===this.f?this.c=d:this.f.ib=d;this.f=d;this.e[a]=d;++this.d};function Xg(a){Vg.call(this);this.j=m(a)?a:2048}v(Xg,Vg);function Yg(a){return a.Xb()>a.j};function Zg(a,b){hd.call(this);this.c=a;this.state=b}v(Zg,hd);Zg.prototype.d=function(){this.dispatchEvent("change")};Zg.prototype.ub=function(){return ma(this).toString()};Zg.prototype.i=function(){return this.c};function $g(a){qd.call(this);this.i=ze(a.projection);this.j=m(a.attributions)?a.attributions:null;this.J=a.logo;this.u=m(a.state)?a.state:"ready"}v($g,qd);l=$g.prototype;l.Nd=ca;l.ba=function(){return this.j};l.aa=function(){return this.J};l.ca=function(){return this.i};l.da=function(){return this.u};function ah(a,b){a.u=b;a.q()};function bh(a){this.minZoom=m(a.minZoom)?a.minZoom:0;this.c=a.resolutions;this.maxZoom=this.c.length-1;this.j=m(a.origin)?a.origin:null;this.k=null;m(a.origins)&&(this.k=a.origins);this.f=null;m(a.tileSizes)&&(this.f=a.tileSizes);this.i=m(a.tileSize)?a.tileSize:null===this.f?256:void 0;this.d=null;m(a.widths)&&(this.d=a.widths)}var ch=[0,0,0];l=bh.prototype;l.Hb=function(){return dd};l.ld=function(a,b,d,e,f){f=dh(this,a,f);for(a=a[0]-1;a>=this.minZoom;){if(b.call(d,a,eh(this,f,a,e)))return!0;--a}return!1};+l.rd=function(){return this.maxZoom};l.td=function(){return this.minZoom};l.Pb=function(a){return null===this.j?this.k[a]:this.j};l.ra=function(a){return this.c[a]};l.Ud=function(){return this.c};l.xd=function(a,b,d){return a[0]<this.maxZoom?(d=dh(this,a,d),eh(this,d,a[0]+1,b)):null};function fh(a,b,d,e){gh(a,b[0],b[1],d,!1,ch);var f=ch[1],g=ch[2];gh(a,b[2],b[3],d,!0,ch);return lf(f,ch[1],g,ch[2],e)}function eh(a,b,d,e){return fh(a,b,a.ra(d),e)}+function hh(a,b){var d=a.Pb(b[0]),e=a.ra(b[0]),f=a.ta(b[0]);return[d[0]+(b[1]+.5)*f*e,d[1]+(b[2]+.5)*f*e]}function dh(a,b,d){var e=a.Pb(b[0]),f=a.ra(b[0]);a=a.ta(b[0]);var g=e[0]+b[1]*a*f;b=e[1]+b[2]*a*f;return Vd(g,b,g+a*f,b+a*f,d)}l.$b=function(a,b,d){return gh(this,a[0],a[1],b,!1,d)};function gh(a,b,d,e,f,g){var h=ih(a,e),k=e/a.ra(h),n=a.Pb(h);a=a.ta(h);b=k*(b-n[0])/(e*a);d=k*(d-n[1])/(e*a);f?(b=Math.ceil(b)-1,d=Math.ceil(d)-1):(b=Math.floor(b),d=Math.floor(d));return ff(h,b,d,g)}+l.Rc=function(a,b,d){return gh(this,a[0],a[1],this.ra(b),!1,d)};function jh(a,b,d){d=eh(a,kh(d),b);a=lh(a,b);m(a)||(a=of(d));return lf(0,a-1,0,d.f-d.d+1,void 0)}l.ta=function(a){return m(this.i)?this.i:this.f[a]};function lh(a,b){if(null!==a.d)return a.d[b]}function ih(a,b){var d=ac(a.c,b,0);return Vb(d,a.minZoom,a.maxZoom)}+function mh(a){var b=a.i;if(null===b){for(var b=kh(a),d=m(void 0)?void 0:256,e=m(void 0)?void 0:"bottom-left",f=nh(b,void 0,d),g=Array(f.length),h=qe(b),k=f.length-1;0<=k;--k)g[k]=h/d/f[k];b=new bh({origin:le(b,e),resolutions:f,tileSize:d,widths:g});a.i=b}return b}function nh(a,b,d){b=m(b)?b:42;d=m(d)?d:256;a=Math.max(qe(a)/d,ne(a)/d);b+=1;d=Array(b);for(var e=0;e<b;++e)d[e]=a/Math.pow(2,e);return d}function kh(a){a=ze(a);var b=a.N();null===b&&(a=180*we.degrees/a.sd(),b=Vd(-a,-a,a,a));return b};function oh(a){$g.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.R=m(a.opaque)?a.opaque:!1;this.V=m(a.tilePixelRatio)?a.tilePixelRatio:1;this.tileGrid=m(a.tileGrid)?a.tileGrid:null;this.c=new Xg;this.L=a.wrapX}v(oh,$g);function ph(a,b,d,e){for(var f=!0,g,h,k=d.c;k<=d.e;++k)for(var n=d.d;n<=d.f;++n)g=a.rb(b,k,n),h=!1,Wg(a.c,g)&&(g=a.c.get(g),(h=2===g.state)&&(h=!1!==e(g))),h||(f=!1);return f}l=oh.prototype;l.od=function(){return 0};+l.rb=gf;l.Ba=function(){return this.tileGrid};function qh(a,b){return null===a.tileGrid?mh(b):a.tileGrid}l.ac=function(a,b,d){return qh(this,d).ta(a)*this.V};l.Se=ca;function rh(a,b){qc.call(this,a);this.tile=b}v(rh,qc);function sh(a){a=m(a)?a:{};this.v=Ef("UL");this.s=Ef("LI");this.v.appendChild(this.s);Mg(this.s,!1);this.e=m(a.collapsed)?a.collapsed:!0;this.k=m(a.collapsible)?a.collapsible:!0;this.k||(this.e=!1);var b=m(a.className)?a.className:"ol-attribution",d=m(a.tipLabel)?a.tipLabel:"Attributions",e=m(a.collapseLabel)?a.collapseLabel:"\u00bb";this.J=ia(e)?Bf("SPAN",{},e):e;e=m(a.label)?a.label:"i";this.L=ia(e)?Bf("SPAN",{},e):e;d=Bf("BUTTON",{type:"button",title:d},this.k&&!this.e?this.J:this.L);w(d,"click",+this.Hj,!1,this);w(d,["mouseout",uc],function(){this.blur()},!1);b=Bf("DIV",b+" ol-unselectable ol-control"+(this.e&&this.k?" ol-collapsed":"")+(this.k?"":" ol-uncollapsible"),this.v,d);Ug.call(this,{element:b,render:m(a.render)?a.render:th,target:a.target});this.t=!0;this.n={};this.i={};this.R={}}v(sh,Ug);+function th(a){a=a.frameState;if(null===a)this.t&&(Mg(this.element,!1),this.t=!1);else{var b,d,e,f,g,h,k,n,p,q,r,s=a.layerStatesArray,u=Bb(a.attributions),y={},z=a.viewState.projection;d=0;for(b=s.length;d<b;d++)if(h=s[d].layer.c(),null!==h&&(q=ma(h).toString(),p=h.j,null!==p))for(e=0,f=p.length;e<f;e++)if(k=p[e],n=ma(k).toString(),!(n in u)){g=a.usedTiles[q];if(m(g)){var A=qh(h,z);a:{r=k;var E=z;if(null===r.c)r=!0;else{var x=void 0,Q=void 0,N=void 0,L=void 0;for(L in g)if(L in r.c)for(var N=g[L],+U,x=0,Q=r.c[L].length;x<Q;++x){U=r.c[L][x];if(pf(U,N)){r=!0;break a}var Ca=jh(A,parseInt(L,10),E),eb=of(Ca);if(N.c<Ca.c||N.e>Ca.e)if(pf(U,new kf(Wb(N.c,eb),Wb(N.e,eb),N.d,N.f))||of(N)>eb&&pf(U,Ca)){r=!0;break a}}r=!1}}}else r=!1;r?(n in y&&delete y[n],u[n]=k):y[n]=k}b=[u,y];d=b[0];b=b[1];for(var R in this.n)R in d?(this.i[R]||(Mg(this.n[R],!0),this.i[R]=!0),delete d[R]):R in b?(this.i[R]&&(Mg(this.n[R],!1),delete this.i[R]),delete b[R]):(If(this.n[R]),delete this.n[R],delete this.i[R]);for(R in d)e=+Ef("LI"),e.innerHTML=d[R].f,this.v.appendChild(e),this.n[R]=e,this.i[R]=!0;for(R in b)e=Ef("LI"),e.innerHTML=b[R].f,Mg(e,!1),this.v.appendChild(e),this.n[R]=e;R=!wb(this.i)||!wb(a.logos);this.t!=R&&(Mg(this.element,R),this.t=R);R&&wb(this.i)?yg(this.element,"ol-logo-only"):zg(this.element,"ol-logo-only");var Ma;a=a.logos;R=this.R;for(Ma in R)Ma in a||(If(R[Ma]),delete R[Ma]);for(var sb in a)sb in R||(Ma=new Image,Ma.src=sb,d=a[sb],""===d?d=Ma:(d=Bf("A",{href:d}),d.appendChild(Ma)),this.s.appendChild(d),+R[sb]=d);Mg(this.s,!wb(a))}}l=sh.prototype;l.Hj=function(a){a.preventDefault();uh(this)};function uh(a){Ag(a.element,"ol-collapsed");a.e?Jf(a.J,a.L):Jf(a.L,a.J);a.e=!a.e}l.Gj=function(){return this.k};l.Jj=function(a){this.k!==a&&(this.k=a,Ag(this.element,"ol-uncollapsible"),!a&&this.e&&uh(this))};l.Ij=function(a){this.k&&this.e!==a&&uh(this)};l.Fj=function(){return this.e};function vh(a){a=m(a)?a:{};var b=m(a.className)?a.className:"ol-rotate",d=m(a.label)?a.label:"\u21e7";this.e=null;ia(d)?this.e=Bf("SPAN","ol-compass",d):(this.e=d,yg(this.e,"ol-compass"));d=Bf("BUTTON",{"class":b+"-reset",type:"button",title:m(a.tipLabel)?a.tipLabel:"Reset rotation"},this.e);w(d,"click",vh.prototype.s,!1,this);w(d,["mouseout",uc],function(){this.blur()},!1);b=Bf("DIV",b+" ol-unselectable ol-control",d);Ug.call(this,{element:b,render:m(a.render)?a.render:wh,target:a.target});this.k=+m(a.duration)?a.duration:250;this.i=m(a.autoHide)?a.autoHide:!0;this.n=void 0;this.i&&yg(this.element,"ol-hidden")}v(vh,Ug);vh.prototype.s=function(a){a.preventDefault();a=this.c;var b=a.c();if(null!==b){for(var d=b.e();d<-Math.PI;)d+=2*Math.PI;for(;d>Math.PI;)d-=2*Math.PI;m(d)&&(0<this.k&&a.Qa(df({rotation:d,duration:this.k,easing:Ze})),b.v(0))}};+function wh(a){a=a.frameState;if(null!==a){a=a.viewState.rotation;if(a!=this.n){var b="rotate("+180*a/Math.PI+"deg)";if(this.i){var d=this.element;0===a?yg(d,"ol-hidden"):zg(d,"ol-hidden")}this.e.style.msTransform=b;this.e.style.webkitTransform=b;this.e.style.transform=b}this.n=a}};function xh(a){a=m(a)?a:{};var b=m(a.className)?a.className:"ol-zoom",d=m(a.delta)?a.delta:1,e=m(a.zoomOutLabel)?a.zoomOutLabel:"\u2212",f=m(a.zoomOutTipLabel)?a.zoomOutTipLabel:"Zoom out",g=Bf("BUTTON",{"class":b+"-in",type:"button",title:m(a.zoomInTipLabel)?a.zoomInTipLabel:"Zoom in"},m(a.zoomInLabel)?a.zoomInLabel:"+");w(g,"click",sa(xh.prototype.i,d),!1,this);w(g,["mouseout",uc],function(){this.blur()},!1);e=Bf("BUTTON",{"class":b+"-out",type:"button",title:f},e);w(e,"click",sa(xh.prototype.i,+-d),!1,this);w(e,["mouseout",uc],function(){this.blur()},!1);b=Bf("DIV",b+" ol-unselectable ol-control",g,e);Ug.call(this,{element:b,target:a.target});this.e=m(a.duration)?a.duration:250}v(xh,Ug);xh.prototype.i=function(a,b){b.preventDefault();var d=this.c,e=d.c();if(null!==e){var f=e.c();m(f)&&(0<this.e&&d.Qa(ef({resolution:f,duration:this.e,easing:Ze})),d=e.constrainResolution(f,a),e.j(d))}};function yh(a){a=m(a)?a:{};var b=new lg;(m(a.zoom)?a.zoom:1)&&b.push(new xh(a.zoomOptions));(m(a.rotate)?a.rotate:1)&&b.push(new vh(a.rotateOptions));(m(a.attribution)?a.attribution:1)&&b.push(new sh(a.attributionOptions));return b};var zh=Ib?"webkitfullscreenchange":Hb?"mozfullscreenchange":Gb?"MSFullscreenChange":"fullscreenchange";function Ah(){var a=uf().c,b=a.body;return!!(b.webkitRequestFullscreen||b.mozRequestFullScreen&&a.mozFullScreenEnabled||b.msRequestFullscreen&&a.msFullscreenEnabled||b.requestFullscreen&&a.fullscreenEnabled)}+function Bh(a){a.webkitRequestFullscreen?a.webkitRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.msRequestFullscreen?a.msRequestFullscreen():a.requestFullscreen&&a.requestFullscreen()}function Ch(){var a=uf().c;return!!(a.webkitIsFullScreen||a.mozFullScreen||a.msFullscreenElement||a.fullscreenElement)};function Dh(a){a=m(a)?a:{};this.e=m(a.className)?a.className:"ol-full-screen";var b=m(a.label)?a.label:"\u2194";this.i=ia(b)?document.createTextNode(String(b)):b;b=m(a.labelActive)?a.labelActive:"\u00d7";this.k=ia(b)?document.createTextNode(String(b)):b;b=m(a.tipLabel)?a.tipLabel:"Toggle full-screen";b=Bf("BUTTON",{"class":this.e+"-"+Ch(),type:"button",title:b},this.i);w(b,"click",this.t,!1,this);w(b,["mouseout",uc],function(){this.blur()},!1);w(ba.document,zh,this.n,!1,this);var d=this.e+" ol-unselectable ol-control "++(Ah()?"":"ol-unsupported"),b=Bf("DIV",d,b);Ug.call(this,{element:b,target:a.target});this.s=m(a.keys)?a.keys:!1}v(Dh,Ug);+Dh.prototype.t=function(a){a.preventDefault();Ah()&&(a=this.c,null!==a&&(Ch()?(a=uf().c,a.webkitCancelFullScreen?a.webkitCancelFullScreen():a.mozCancelFullScreen?a.mozCancelFullScreen():a.msExitFullscreen?a.msExitFullscreen():a.exitFullscreen&&a.exitFullscreen()):(a=a.Jd(),a=xf(a),this.s?a.mozRequestFullScreenWithKeys?a.mozRequestFullScreenWithKeys():a.webkitRequestFullscreen?a.webkitRequestFullscreen():Bh(a):Bh(a))))};+Dh.prototype.n=function(){var a=this.e+"-true",b=this.e+"-false",d=Kf(this.element),e=this.c;Ch()?(xg(d,b)&&(zg(d,b),yg(d,a)),Jf(this.k,this.i)):(xg(d,a)&&(zg(d,a),yg(d,b)),Jf(this.i,this.k));null===e||e.u()};function Eh(a){a=m(a)?a:{};var b=Bf("DIV",m(a.className)?a.className:"ol-mouse-position");Ug.call(this,{element:b,render:m(a.render)?a.render:Fh,target:a.target});w(this,ud("projection"),this.V,!1,this);m(a.coordinateFormat)&&this.J(a.coordinateFormat);m(a.projection)&&this.v(ze(a.projection));this.Y=m(a.undefinedHTML)?a.undefinedHTML:"";this.s=b.innerHTML;this.k=this.i=this.e=null}v(Eh,Ug);+function Fh(a){a=a.frameState;null===a?this.e=null:this.e!=a.viewState.projection&&(this.e=a.viewState.projection,this.i=null);Gh(this,this.k)}Eh.prototype.V=function(){this.i=null};Eh.prototype.n=function(){return this.get("coordinateFormat")};Eh.prototype.getCoordinateFormat=Eh.prototype.n;Eh.prototype.t=function(){return this.get("projection")};Eh.prototype.getProjection=Eh.prototype.t;Eh.prototype.L=function(a){this.k=this.c.md(a.c);Gh(this,this.k)};+Eh.prototype.R=function(){Gh(this,null);this.k=null};Eh.prototype.setMap=function(a){Eh.X.setMap.call(this,a);null!==a&&(a=a.d,this.u.push(w(a,"mousemove",this.L,!1,this),w(a,"mouseout",this.R,!1,this)))};Eh.prototype.J=function(a){this.set("coordinateFormat",a)};Eh.prototype.setCoordinateFormat=Eh.prototype.J;Eh.prototype.v=function(a){this.set("projection",a)};Eh.prototype.setProjection=Eh.prototype.v;+function Gh(a,b){var d=a.Y;if(null!==b&&null!==a.e){if(null===a.i){var e=a.t();a.i=m(e)?De(a.e,e):Te}e=a.c.wa(b);null!==e&&(a.i(e,e),d=a.n(),d=m(d)?d(e):e.toString())}m(a.s)&&d==a.s||(a.element.innerHTML=d,a.s=d)};function Hh(a,b,d){lc.call(this);this.e=a;this.d=d;this.c=b||window;this.f=ra(this.kf,this)}v(Hh,lc);l=Hh.prototype;l.ea=null;l.Te=!1;l.start=function(){Ih(this);this.Te=!1;var a=Jh(this),b=Kh(this);a&&!b&&this.c.mozRequestAnimationFrame?(this.ea=w(this.c,"MozBeforePaint",this.f),this.c.mozRequestAnimationFrame(null),this.Te=!0):this.ea=a&&b?a.call(this.c,this.f):this.c.setTimeout(ed(this.f),20)};+function Ih(a){if(null!=a.ea){var b=Jh(a),d=Kh(a);b&&!d&&a.c.mozRequestAnimationFrame?Wc(a.ea):b&&d?d.call(a.c,a.ea):a.c.clearTimeout(a.ea)}a.ea=null}l.kf=function(){this.Te&&this.ea&&Wc(this.ea);this.ea=null;this.e.call(this.d,ta())};l.T=function(){Ih(this);Hh.X.T.call(this)};function Jh(a){a=a.c;return a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||null}+function Kh(a){a=a.c;return a.cancelAnimationFrame||a.cancelRequestAnimationFrame||a.webkitCancelRequestAnimationFrame||a.mozCancelRequestAnimationFrame||a.oCancelRequestAnimationFrame||a.msCancelRequestAnimationFrame||null};function Lh(a){ba.setTimeout(function(){throw a;},0)}function Mh(a,b){var d=a;b&&(d=ra(a,b));d=Nh(d);!ka(ba.setImmediate)||ba.Window&&ba.Window.prototype.setImmediate==ba.setImmediate?(Oh||(Oh=Ph()),Oh(d)):ba.setImmediate(d)}var Oh;+function Ph(){var a=ba.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&(a=function(){var a=document.createElement("iframe");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var d="callImmediate"+Math.random(),e="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,a=ra(function(a){if(("*"==e||a.origin==e)&&a.data==d)this.port1.onmessage()},+this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(d,e)}}});if("undefined"!==typeof a&&!lb("Trident")&&!lb("MSIE")){var b=new a,d={},e=d;b.port1.onmessage=function(){if(m(d.next)){d=d.next;var a=d.ef;d.ef=null;a()}};return function(a){e.next={ef:a};e=e.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("script")?function(a){var b=document.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=+null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){ba.setTimeout(a,0)}}var Nh=dd;function Qh(a){if("function"==typeof a.sb)return a.sb();if(ia(a))return a.split("");if(ha(a)){for(var b=[],d=a.length,e=0;e<d;e++)b.push(a[e]);return b}return qb(a)}+function Rh(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(ha(a)||ia(a))Qa(a,b,void 0);else{var d;if("function"==typeof a.K)d=a.K();else if("function"!=typeof a.sb)if(ha(a)||ia(a)){d=[];for(var e=a.length,f=0;f<e;f++)d.push(f)}else d=rb(a);else d=void 0;for(var e=Qh(a),f=e.length,g=0;g<f;g++)b.call(void 0,e[g],d&&d[g],a)}};function Sh(a,b){this.f={};this.c=[];this.d=0;var d=arguments.length;if(1<d){if(d%2)throw Error("Uneven number of arguments");for(var e=0;e<d;e+=2)this.set(arguments[e],arguments[e+1])}else if(a){a instanceof Sh?(d=a.K(),e=a.sb()):(d=rb(a),e=qb(a));for(var f=0;f<d.length;f++)this.set(d[f],e[f])}}l=Sh.prototype;l.Xb=function(){return this.d};l.sb=function(){Th(this);for(var a=[],b=0;b<this.c.length;b++)a.push(this.f[this.c[b]]);return a};l.K=function(){Th(this);return this.c.concat()};+l.pa=function(){return 0==this.d};l.clear=function(){this.f={};this.d=this.c.length=0};l.remove=function(a){return Uh(this.f,a)?(delete this.f[a],this.d--,this.c.length>2*this.d&&Th(this),!0):!1};function Th(a){if(a.d!=a.c.length){for(var b=0,d=0;b<a.c.length;){var e=a.c[b];Uh(a.f,e)&&(a.c[d++]=e);b++}a.c.length=d}if(a.d!=a.c.length){for(var f={},d=b=0;b<a.c.length;)e=a.c[b],Uh(f,e)||(a.c[d++]=e,f[e]=1),b++;a.c.length=d}}l.get=function(a,b){return Uh(this.f,a)?this.f[a]:b};+l.set=function(a,b){Uh(this.f,a)||(this.d++,this.c.push(a));this.f[a]=b};l.forEach=function(a,b){for(var d=this.K(),e=0;e<d.length;e++){var f=d[e],g=this.get(f);a.call(b,g,f,this)}};l.clone=function(){return new Sh(this)};function Uh(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Vh(){this.c=ta()}new Vh;Vh.prototype.set=function(a){this.c=a};Vh.prototype.get=function(){return this.c};function Wh(a){hd.call(this);this.$c=a||window;this.yd=w(this.$c,"resize",this.Ni,!1,this);this.zd=Af(this.$c||window)}v(Wh,hd);l=Wh.prototype;l.yd=null;l.$c=null;l.zd=null;l.T=function(){Wh.X.T.call(this);this.yd&&(Wc(this.yd),this.yd=null);this.zd=this.$c=null};l.Ni=function(){var a=Af(this.$c||window),b=this.zd;a==b||a&&b&&a.width==b.width&&a.height==b.height||(this.zd=a,this.dispatchEvent("resize"))};function Xh(a,b,d,e,f){if(!(Gb||Ib&&Pb("525")))return!0;if(Jb&&f)return Yh(a);if(f&&!e)return!1;ja(b)&&(b=$h(b));if(!d&&(17==b||18==b||Jb&&91==b))return!1;if(Ib&&e&&d)switch(a){case 220:case 219:case 221:case 192:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:return!1}if(Gb&&e&&b==a)return!1;switch(a){case 13:return!0;case 27:return!Ib}return Yh(a)}+function Yh(a){if(48<=a&&57>=a||96<=a&&106>=a||65<=a&&90>=a||Ib&&0==a)return!0;switch(a){case 32:case 63:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:return!0;default:return!1}}function $h(a){if(Hb)a=ai(a);else if(Jb&&Ib)a:switch(a){case 93:a=91;break a}return a}+function ai(a){switch(a){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return a}};function bi(a,b){hd.call(this);a&&ci(this,a,b)}v(bi,hd);l=bi.prototype;l.fa=null;l.Ed=null;l.ye=null;l.Fd=null;l.Va=-1;l.Kb=-1;l.ne=!1;+var di={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},ei={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},fi=Gb||Ib&&Pb("525"),gi=Jb&&Hb;+bi.prototype.c=function(a){Ib&&(17==this.Va&&!a.p||18==this.Va&&!a.f||Jb&&91==this.Va&&!a.n)&&(this.Kb=this.Va=-1);-1==this.Va&&(a.p&&17!=a.j?this.Va=17:a.f&&18!=a.j?this.Va=18:a.n&&91!=a.j&&(this.Va=91));fi&&!Xh(a.j,this.Va,a.e,a.p,a.f)?this.handleEvent(a):(this.Kb=$h(a.j),gi&&(this.ne=a.f))};bi.prototype.f=function(a){this.Kb=this.Va=-1;this.ne=a.f};+bi.prototype.handleEvent=function(a){var b=a.c,d,e,f=b.altKey;Gb&&"keypress"==a.type?(d=this.Kb,e=13!=d&&27!=d?b.keyCode:0):Ib&&"keypress"==a.type?(d=this.Kb,e=0<=b.charCode&&63232>b.charCode&&Yh(d)?b.charCode:0):Fb?(d=this.Kb,e=Yh(d)?b.keyCode:0):(d=b.keyCode||this.Kb,e=b.charCode||0,gi&&(f=this.ne),Jb&&63==e&&224==d&&(d=191));var g=d=$h(d),h=b.keyIdentifier;d?63232<=d&&d in di?g=di[d]:25==d&&a.e&&(g=9):h&&h in ei&&(g=ei[h]);this.Va=g;a=new hi(g,e,0,b);a.f=f;this.dispatchEvent(a)};+function ci(a,b,d){a.Fd&&ii(a);a.fa=b;a.Ed=w(a.fa,"keypress",a,d);a.ye=w(a.fa,"keydown",a.c,d,a);a.Fd=w(a.fa,"keyup",a.f,d,a)}function ii(a){a.Ed&&(Wc(a.Ed),Wc(a.ye),Wc(a.Fd),a.Ed=null,a.ye=null,a.Fd=null);a.fa=null;a.Va=-1;a.Kb=-1}bi.prototype.T=function(){bi.X.T.call(this);ii(this)};function hi(a,b,d,e){wc.call(this,e);this.type="key";this.j=a;this.l=b}v(hi,wc);function ji(a,b){hd.call(this);var d=this.fa=a;(d=la(d)&&1==d.nodeType?this.fa:this.fa?this.fa.body:null)&&Fg(d,"direction");this.c=w(this.fa,Hb?"DOMMouseScroll":"mousewheel",this,b)}v(ji,hd);+ji.prototype.handleEvent=function(a){var b=0,d=0,e=0;a=a.c;if("mousewheel"==a.type){d=1;if(Gb||Ib&&(Kb||Pb("532.0")))d=40;e=ki(-a.wheelDelta,d);m(a.wheelDeltaX)?(b=ki(-a.wheelDeltaX,d),d=ki(-a.wheelDeltaY,d)):d=e}else e=a.detail,100<e?e=3:-100>e&&(e=-3),m(a.axis)&&a.axis===a.HORIZONTAL_AXIS?b=e:d=e;ja(this.f)&&Vb(b,-this.f,this.f);ja(this.d)&&(d=Vb(d,-this.d,this.d));b=new li(e,a,0,d);this.dispatchEvent(b)};function ki(a,b){return Ib&&(Jb||Lb)&&0!=a%b?a:a/b}+ji.prototype.T=function(){ji.X.T.call(this);Wc(this.c);this.c=null};function li(a,b,d,e){wc.call(this,b);this.type="mousewheel";this.detail=a;this.u=e}v(li,wc);function mi(a,b,d){qc.call(this,a);this.c=b;a=m(d)?d:{};this.buttons=ni(a);this.pressure=oi(a,this.buttons);this.bubbles=zb(a,"bubbles",!1);this.cancelable=zb(a,"cancelable",!1);this.view=zb(a,"view",null);this.detail=zb(a,"detail",null);this.screenX=zb(a,"screenX",0);this.screenY=zb(a,"screenY",0);this.clientX=zb(a,"clientX",0);this.clientY=zb(a,"clientY",0);this.button=zb(a,"button",0);this.relatedTarget=zb(a,"relatedTarget",null);this.pointerId=zb(a,"pointerId",0);this.width=zb(a,"width",0);this.height=+zb(a,"height",0);this.pointerType=zb(a,"pointerType","");this.isPrimary=zb(a,"isPrimary",!1);b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})}v(mi,qc);function ni(a){if(a.buttons||pi)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a}function oi(a,b){var d=0;a.pressure?d=a.pressure:d=b?.5:0;return d}var pi=!1;try{pi=1===(new MouseEvent("click",{buttons:1})).buttons}catch(qi){};function ri(a,b){this.c=a;this.j=b};function si(a){ri.call(this,a,{mousedown:this.$i,mousemove:this.aj,mouseup:this.dj,mouseover:this.cj,mouseout:this.bj});this.f=a.f;this.d=[]}v(si,ri);function ti(a,b){for(var d=a.d,e=b.clientX,f=b.clientY,g=0,h=d.length,k;g<h&&(k=d[g]);g++){var n=Math.abs(f-k[1]);if(25>=Math.abs(e-k[0])&&25>=n)return!0}return!1}function ui(a){var b=vi(a,a.c),d=b.preventDefault;b.preventDefault=function(){a.preventDefault();d()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}l=si.prototype;+l.$i=function(a){if(!ti(this,a)){(1).toString()in this.f&&this.cancel(a);var b=ui(a);this.f[(1).toString()]=a;wi(this.c,xi,b,a)}};l.aj=function(a){if(!ti(this,a)){var b=ui(a);wi(this.c,yi,b,a)}};l.dj=function(a){if(!ti(this,a)){var b=this.f[(1).toString()];b&&b.button===a.button&&(b=ui(a),wi(this.c,zi,b,a),yb(this.f,(1).toString()))}};l.cj=function(a){if(!ti(this,a)){var b=ui(a);Ai(this.c,b,a)}};l.bj=function(a){if(!ti(this,a)){var b=ui(a);Bi(this.c,b,a)}};+l.cancel=function(a){var b=ui(a);this.c.cancel(b,a);yb(this.f,(1).toString())};function Ci(a){ri.call(this,a,{MSPointerDown:this.ij,MSPointerMove:this.jj,MSPointerUp:this.mj,MSPointerOut:this.kj,MSPointerOver:this.lj,MSPointerCancel:this.hj,MSGotPointerCapture:this.fj,MSLostPointerCapture:this.gj});this.f=a.f;this.d=["","unavailable","touch","pen","mouse"]}v(Ci,ri);function Di(a,b){var d=b;ja(b.c.pointerType)&&(d=vi(b,b.c),d.pointerType=a.d[b.c.pointerType]);return d}l=Ci.prototype;l.ij=function(a){this.f[a.c.pointerId]=a;var b=Di(this,a);wi(this.c,xi,b,a)};+l.jj=function(a){var b=Di(this,a);wi(this.c,yi,b,a)};l.mj=function(a){var b=Di(this,a);wi(this.c,zi,b,a);yb(this.f,a.c.pointerId)};l.kj=function(a){var b=Di(this,a);Bi(this.c,b,a)};l.lj=function(a){var b=Di(this,a);Ai(this.c,b,a)};l.hj=function(a){var b=Di(this,a);this.c.cancel(b,a);yb(this.f,a.c.pointerId)};l.gj=function(a){this.c.dispatchEvent(new mi("lostpointercapture",a,a.c))};l.fj=function(a){this.c.dispatchEvent(new mi("gotpointercapture",a,a.c))};function Ei(a){ri.call(this,a,{pointerdown:this.ul,pointermove:this.vl,pointerup:this.yl,pointerout:this.wl,pointerover:this.xl,pointercancel:this.tl,gotpointercapture:this.li,lostpointercapture:this.Zi})}v(Ei,ri);l=Ei.prototype;l.ul=function(a){Fi(this.c,a)};l.vl=function(a){Fi(this.c,a)};l.yl=function(a){Fi(this.c,a)};l.wl=function(a){Fi(this.c,a)};l.xl=function(a){Fi(this.c,a)};l.tl=function(a){Fi(this.c,a)};l.Zi=function(a){Fi(this.c,a)};l.li=function(a){Fi(this.c,a)};function Gi(a,b){ri.call(this,a,{touchstart:this.tm,touchmove:this.sm,touchend:this.rm,touchcancel:this.qm});this.f=a.f;this.k=b;this.d=void 0;this.i=0;this.e=void 0}v(Gi,ri);l=Gi.prototype;l.rg=function(){this.i=0;this.e=void 0};+function Hi(a,b,d){b=vi(b,d);b.pointerId=d.identifier+2;b.bubbles=!0;b.cancelable=!0;b.detail=a.i;b.button=0;b.buttons=1;b.width=d.webkitRadiusX||d.radiusX||0;b.height=d.webkitRadiusY||d.radiusY||0;b.pressure=d.webkitForce||d.force||.5;b.isPrimary=a.d===d.identifier;b.pointerType="touch";b.clientX=d.clientX;b.clientY=d.clientY;b.screenX=d.screenX;b.screenY=d.screenY;return b}+function Ii(a,b,d){function e(){b.preventDefault()}var f=Array.prototype.slice.call(b.c.changedTouches),g=f.length,h,k;for(h=0;h<g;++h)k=Hi(a,b,f[h]),k.preventDefault=e,d.call(a,b,k)}+l.tm=function(a){var b=a.c.touches,d=rb(this.f),e=d.length;if(e>=b.length){var f=[],g,h,k;for(g=0;g<e;++g){h=d[g];k=this.f[h];var n;if(!(n=1==h))a:{n=b.length;for(var p=void 0,q=0;q<n;q++)if(p=b[q],p.identifier===h-2){n=!0;break a}n=!1}n||f.push(k.hc)}for(g=0;g<f.length;++g)this.oe(a,f[g])}b=pb(this.f);if(0===b||1===b&&(1).toString()in this.f)this.d=a.c.changedTouches[0].identifier,m(this.e)&&ba.clearTimeout(this.e);Ji(this,a);this.i++;Ii(this,a,this.pl)};+l.pl=function(a,b){this.f[b.pointerId]={target:b.target,hc:b,cg:b.target};var d=this.c;b.bubbles=!0;wi(d,Ki,b,a);d=this.c;b.bubbles=!1;wi(d,Li,b,a);wi(this.c,xi,b,a)};l.sm=function(a){a.preventDefault();Ii(this,a,this.ej)};l.ej=function(a,b){var d=this.f[b.pointerId];if(d){var e=d.hc,f=d.cg;wi(this.c,yi,b,a);e&&f!==b.target&&(e.relatedTarget=b.target,b.relatedTarget=f,e.target=f,b.target?(Bi(this.c,e,a),Ai(this.c,b,a)):(b.target=f,b.relatedTarget=null,this.oe(a,b)));d.hc=b;d.cg=b.target}};+l.rm=function(a){Ji(this,a);Ii(this,a,this.um)};l.um=function(a,b){wi(this.c,zi,b,a);this.c.hc(b,a);var d=this.c;b.bubbles=!1;wi(d,Mi,b,a);yb(this.f,b.pointerId);b.isPrimary&&(this.d=void 0,this.e=ba.setTimeout(ra(this.rg,this),200))};l.qm=function(a){Ii(this,a,this.oe)};l.oe=function(a,b){this.c.cancel(b,a);this.c.hc(b,a);var d=this.c;b.bubbles=!1;wi(d,Mi,b,a);yb(this.f,b.pointerId);b.isPrimary&&(this.d=void 0,this.e=ba.setTimeout(ra(this.rg,this),200))};+function Ji(a,b){var d=a.k.d,e=b.c.changedTouches[0];if(a.d===e.identifier){var f=[e.clientX,e.clientY];d.push(f);ba.setTimeout(function(){Xa(d,f)},2500)}};function Ni(a){hd.call(this);this.fa=a;this.f={};this.d={};this.c=[];cg?Oi(this,new Ei(this)):dg?Oi(this,new Ci(this)):(a=new si(this),Oi(this,a),bg&&Oi(this,new Gi(this,a)));a=this.c.length;for(var b,d=0;d<a;d++)b=this.c[d],Pi(this,rb(b.j))}v(Ni,hd);function Oi(a,b){var d=rb(b.j);d&&(Qa(d,function(a){var d=b.j[a];d&&(this.d[a]=ra(d,b))},a),a.c.push(b))}Ni.prototype.e=function(a){var b=this.d[a.type];b&&b(a)};function Pi(a,b){Qa(b,function(a){w(this.fa,a,this.e,!1,this)},a)}+function Qi(a,b){Qa(b,function(a){Vc(this.fa,a,this.e,!1,this)},a)}function vi(a,b){for(var d={},e,f=0,g=Ri.length;f<g;f++)e=Ri[f][0],d[e]=a[e]||b[e]||Ri[f][1];return d}Ni.prototype.hc=function(a,b){a.bubbles=!0;wi(this,Si,a,b)};Ni.prototype.cancel=function(a,b){wi(this,Ti,a,b)};function Bi(a,b,d){a.hc(b,d);b.target.contains(b.relatedTarget)||(b.bubbles=!1,wi(a,Mi,b,d))}function Ai(a,b,d){b.bubbles=!0;wi(a,Ki,b,d);b.target.contains(b.relatedTarget)||(b.bubbles=!1,wi(a,Li,b,d))}+function wi(a,b,d,e){a.dispatchEvent(new mi(b,e,d))}function Fi(a,b){a.dispatchEvent(new mi(b.type,b,b.c))}Ni.prototype.T=function(){for(var a=this.c.length,b,d=0;d<a;d++)b=this.c[d],Qi(this,rb(b.j));Ni.X.T.call(this)};+var yi="pointermove",xi="pointerdown",zi="pointerup",Ki="pointerover",Si="pointerout",Li="pointerenter",Mi="pointerleave",Ti="pointercancel",Ri=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",+!1],["type",""],["target",null],["currentTarget",null],["which",0]];function Ui(a,b,d,e,f){Tg.call(this,a,b,f);this.c=d;this.originalEvent=d.c;this.pixel=b.md(this.originalEvent);this.coordinate=b.wa(this.pixel);this.dragging=m(e)?e:!1}v(Ui,Tg);Ui.prototype.preventDefault=function(){Ui.X.preventDefault.call(this);this.c.preventDefault()};Ui.prototype.tb=function(){Ui.X.tb.call(this);this.c.tb()};function Vi(a,b,d,e,f){Ui.call(this,a,b,d.c,e,f);this.f=d}v(Vi,Ui);+function Wi(a){hd.call(this);this.d=a;this.i=0;this.k=!1;this.f=this.p=this.e=null;a=this.d.d;this.u=0;this.n={};this.j=new Ni(a);this.c=null;this.p=w(this.j,xi,this.Ji,!1,this);this.l=w(this.j,yi,this.Pl,!1,this)}v(Wi,hd);function Xi(a,b){var d;d=new Vi(Yi,a.d,b);a.dispatchEvent(d);0!==a.i?(ba.clearTimeout(a.i),a.i=0,d=new Vi(Zi,a.d,b),a.dispatchEvent(d)):a.i=ba.setTimeout(ra(function(){this.i=0;var a=new Vi($i,this.d,b);this.dispatchEvent(a)},a),250)}+function aj(a,b){b.type==bj||b.type==cj?delete a.n[b.pointerId]:b.type==dj&&(a.n[b.pointerId]=!0);a.u=pb(a.n)}l=Wi.prototype;l.yf=function(a){aj(this,a);var b=new Vi(bj,this.d,a);this.dispatchEvent(b);!this.k&&0===a.button&&Xi(this,this.f);0===this.u&&(Qa(this.e,Wc),this.e=null,this.k=!1,this.f=null,pc(this.c),this.c=null)};+l.Ji=function(a){aj(this,a);var b=new Vi(dj,this.d,a);this.dispatchEvent(b);this.f=a;null===this.e&&(this.c=new Ni(document),this.e=[w(this.c,ej,this.Bj,!1,this),w(this.c,bj,this.yf,!1,this),w(this.j,cj,this.yf,!1,this)])};l.Bj=function(a){if(a.clientX!=this.f.clientX||a.clientY!=this.f.clientY){this.k=!0;var b=new Vi(fj,this.d,a,this.k);this.dispatchEvent(b)}a.preventDefault()};l.Pl=function(a){this.dispatchEvent(new Vi(a.type,this.d,a,null!==this.f&&(a.clientX!=this.f.clientX||a.clientY!=this.f.clientY)))};+l.T=function(){null!==this.l&&(Wc(this.l),this.l=null);null!==this.p&&(Wc(this.p),this.p=null);null!==this.e&&(Qa(this.e,Wc),this.e=null);null!==this.c&&(pc(this.c),this.c=null);null!==this.j&&(pc(this.j),this.j=null);Wi.X.T.call(this)};var $i="singleclick",Yi="click",Zi="dblclick",fj="pointerdrag",ej="pointermove",dj="pointerdown",bj="pointerup",cj="pointercancel",gj={Sm:$i,Hm:Yi,Im:Zi,Lm:fj,Om:ej,Km:dj,Rm:bj,Qm:"pointerover",Pm:"pointerout",Mm:"pointerenter",Nm:"pointerleave",Jm:cj};function C(a){qd.call(this);var b=Bb(a);b.brightness=m(a.brightness)?a.brightness:0;b.contrast=m(a.contrast)?a.contrast:1;b.hue=m(a.hue)?a.hue:0;b.opacity=m(a.opacity)?a.opacity:1;b.saturation=m(a.saturation)?a.saturation:1;b.visible=m(a.visible)?a.visible:!0;b.maxResolution=m(a.maxResolution)?a.maxResolution:Infinity;b.minResolution=m(a.minResolution)?a.minResolution:0;this.I(b)}v(C,qd);C.prototype.e=function(){return this.get("brightness")};C.prototype.getBrightness=C.prototype.e;+C.prototype.j=function(){return this.get("contrast")};C.prototype.getContrast=C.prototype.j;C.prototype.i=function(){return this.get("hue")};C.prototype.getHue=C.prototype.i;function hj(a){var b=a.e(),d=a.j(),e=a.i(),f=a.u(),g=a.n(),h=a.ob(),k=a.d(),n=a.N(),p=a.k(),q=a.l();return{layer:a,brightness:Vb(b,-1,1),contrast:Math.max(d,0),hue:e,opacity:Vb(f,0,1),saturation:Math.max(g,0),zc:h,visible:k,extent:n,maxResolution:p,minResolution:Math.max(q,0)}}C.prototype.N=function(){return this.get("extent")};+C.prototype.getExtent=C.prototype.N;C.prototype.k=function(){return this.get("maxResolution")};C.prototype.getMaxResolution=C.prototype.k;C.prototype.l=function(){return this.get("minResolution")};C.prototype.getMinResolution=C.prototype.l;C.prototype.u=function(){return this.get("opacity")};C.prototype.getOpacity=C.prototype.u;C.prototype.n=function(){return this.get("saturation")};C.prototype.getSaturation=C.prototype.n;C.prototype.d=function(){return this.get("visible")};+C.prototype.getVisible=C.prototype.d;C.prototype.J=function(a){this.set("brightness",a)};C.prototype.setBrightness=C.prototype.J;C.prototype.L=function(a){this.set("contrast",a)};C.prototype.setContrast=C.prototype.L;C.prototype.R=function(a){this.set("hue",a)};C.prototype.setHue=C.prototype.R;C.prototype.s=function(a){this.set("extent",a)};C.prototype.setExtent=C.prototype.s;C.prototype.V=function(a){this.set("maxResolution",a)};C.prototype.setMaxResolution=C.prototype.V;+C.prototype.Y=function(a){this.set("minResolution",a)};C.prototype.setMinResolution=C.prototype.Y;C.prototype.t=function(a){this.set("opacity",a)};C.prototype.setOpacity=C.prototype.t;C.prototype.ga=function(a){this.set("saturation",a)};C.prototype.setSaturation=C.prototype.ga;C.prototype.ha=function(a){this.set("visible",a)};C.prototype.setVisible=C.prototype.ha;function D(a){var b=Bb(a);delete b.source;C.call(this,b);this.za=null;w(this,ud("source"),this.Xi,!1,this);this.ja(m(a.source)?a.source:null)}v(D,C);function ij(a,b){return a.visible&&b>=a.minResolution&&b<a.maxResolution}D.prototype.ab=function(a){a=m(a)?a:[];a.push(hj(this));return a};D.prototype.c=function(){var a=this.get("source");return m(a)?a:null};D.prototype.getSource=D.prototype.c;D.prototype.ob=function(){var a=this.c();return null===a?"undefined":a.u};D.prototype.Yi=function(){this.q()};+D.prototype.Xi=function(){null!==this.za&&(Wc(this.za),this.za=null);var a=this.c();null!==a&&(this.za=w(a,"change",this.Yi,!1,this));this.q()};D.prototype.ja=function(a){this.set("source",a)};D.prototype.setSource=D.prototype.ja;function jj(a,b,d,e,f){hd.call(this);this.i=f;this.extent=a;this.j=d;this.resolution=b;this.state=e}v(jj,hd);jj.prototype.N=function(){return this.extent};function kj(a,b,d,e,f,g,h,k){Ld(a);0===b&&0===d||Od(a,b,d);1==e&&1==f||Pd(a,e,f);0!==g&&Qd(a,g);0===h&&0===k||Od(a,h,k);return a}function lj(a,b){return a[0]==b[0]&&a[1]==b[1]&&a[4]==b[4]&&a[5]==b[5]&&a[12]==b[12]&&a[13]==b[13]}function mj(a,b,d){var e=a[1],f=a[5],g=a[13],h=b[0];b=b[1];d[0]=a[0]*h+a[4]*b+a[12];d[1]=e*h+f*b+g;return d};function nj(a){kd.call(this);this.c=a}v(nj,kd);l=nj.prototype;l.Ya=ca;l.gc=function(a,b,d,e){a=a.slice();mj(b.pixelToCoordinateMatrix,a,a);if(this.Ya(a,b,bd,this))return d.call(e,this.c)};l.Ld=ad;l.jd=function(a,b){return function(d,e){return ph(a,d,e,function(a){b[d]||(b[d]={});b[d][a.c.toString()]=a})}};l.Yj=function(a){2===a.target.state&&oj(this)};function pj(a,b){var d=b.state;2!=d&&3!=d&&w(b,"change",a.Yj,!1,a);0==d&&(b.load(),d=b.state);return 2==d}+function oj(a){var b=a.c;b.d()&&"ready"==b.ob()&&a.q()}function rj(a,b){Yg(b.c)&&a.postRenderFunctions.push(sa(function(a,b,f){b=ma(a).toString();a=a.c;f=f.usedTiles[b];for(var g;Yg(a)&&!(b=a.c.lc,g=b.c[0].toString(),g in f&&f[g].contains(b.c));)a.pop().Nc()},b))}function sj(a,b){if(null!=b){var d,e,f;e=0;for(f=b.length;e<f;++e)d=b[e],a[ma(d).toString()]=d}}function tj(a,b){var d=b.J;m(d)&&(ia(d)?a.logos[d]="":la(d)&&(a.logos[d.src]=d.href))}+function uj(a,b,d,e){b=ma(b).toString();d=d.toString();b in a?d in a[b]?(a=a[b][d],e.c<a.c&&(a.c=e.c),e.e>a.e&&(a.e=e.e),e.d<a.d&&(a.d=e.d),e.f>a.f&&(a.f=e.f)):a[b][d]=e:(a[b]={},a[b][d]=e)}function vj(a,b,d){return[b*(Math.round(a[0]/b)+d[0]%2/2),b*(Math.round(a[1]/b)+d[1]%2/2)]}+function wj(a,b,d,e,f,g,h,k,n,p){var q=ma(b).toString();q in a.wantedTiles||(a.wantedTiles[q]={});var r=a.wantedTiles[q];a=a.tileQueue;var s=d.minZoom,u,y,z,A,E,x;for(x=h;x>=s;--x)for(y=eh(d,g,x,y),z=d.ra(x),A=y.c;A<=y.e;++A)for(E=y.d;E<=y.f;++E)h-x<=k?(u=b.Zb(x,A,E,e,f),0==u.state&&(r[jf(u.c)]=!0,u.ub()in a.d||xj(a,[u,q,hh(d,u.c),z])),m(n)&&n.call(p,u)):b.Se(x,A,E)};function yj(a){this.s=a.opacity;this.t=a.rotateWithView;this.l=a.rotation;this.n=a.scale;this.v=a.snapToPixel}l=yj.prototype;l.Pd=function(){return this.s};l.vd=function(){return this.t};l.Qd=function(){return this.l};l.Rd=function(){return this.n};l.wd=function(){return this.v};l.Sd=function(a){this.l=a};l.Td=function(a){this.n=a};function zj(a){a=m(a)?a:{};this.j=m(a.anchor)?a.anchor:[.5,.5];this.e=null;this.f=m(a.anchorOrigin)?a.anchorOrigin:"top-left";this.k=m(a.anchorXUnits)?a.anchorXUnits:"fraction";this.p=m(a.anchorYUnits)?a.anchorYUnits:"fraction";var b=m(a.crossOrigin)?a.crossOrigin:null,d=m(a.img)?a.img:null,e=a.src;m(e)&&0!==e.length||null===d||(e=d.src);var f=m(a.src)?0:2,g=Aj.Ua(),h=g.get(e,b);null===h&&(h=new Bj(d,e,b,f),g.set(e,b,h));this.c=h;this.J=m(a.offset)?a.offset:[0,0];this.d=m(a.offsetOrigin)?a.offsetOrigin:+"top-left";this.i=null;this.u=m(a.size)?a.size:null;yj.call(this,{opacity:m(a.opacity)?a.opacity:1,rotation:m(a.rotation)?a.rotation:0,scale:m(a.scale)?a.scale:1,snapToPixel:m(a.snapToPixel)?a.snapToPixel:!0,rotateWithView:m(a.rotateWithView)?a.rotateWithView:!1})}v(zj,yj);l=zj.prototype;+l.Ab=function(){if(null!==this.e)return this.e;var a=this.j,b=this.kb();if("fraction"==this.k||"fraction"==this.p){if(null===b)return null;a=this.j.slice();"fraction"==this.k&&(a[0]*=b[0]);"fraction"==this.p&&(a[1]*=b[1])}if("top-left"!=this.f){if(null===b)return null;a===this.j&&(a=this.j.slice());if("top-right"==this.f||"bottom-right"==this.f)a[0]=-a[0]+b[0];if("bottom-left"==this.f||"bottom-right"==this.f)a[1]=-a[1]+b[1]}return this.e=a};l.Fb=function(){return this.c.c};l.pd=function(){return this.c.f};+l.Tc=function(){return this.c.d};l.Od=function(){var a=this.c;if(null===a.j)if(a.p){var b=a.f[0],d=a.f[1],e=Nf(b,d);e.fillRect(0,0,b,d);a.j=e.canvas}else a.j=a.c;return a.j};l.Gb=function(){if(null!==this.i)return this.i;var a=this.J;if("top-left"!=this.d){var b=this.kb(),d=this.c.f;if(null===b||null===d)return null;a=a.slice();if("top-right"==this.d||"bottom-right"==this.d)a[0]=d[0]-b[0]-a[0];if("bottom-left"==this.d||"bottom-right"==this.d)a[1]=d[1]-b[1]-a[1]}return this.i=a};l.Kk=function(){return this.c.i};+l.kb=function(){return null===this.u?this.c.f:this.u};l.Ae=function(a,b){return w(this.c,"change",a,!1,b)};l.load=function(){this.c.load()};l.Re=function(a,b){Vc(this.c,"change",a,!1,b)};function Bj(a,b,d,e){hd.call(this);this.j=null;this.c=null===a?new Image:a;null!==d&&(this.c.crossOrigin=d);this.e=null;this.d=e;this.f=null;this.i=b;this.p=!1}v(Bj,hd);Bj.prototype.k=function(){this.d=3;Qa(this.e,Wc);this.e=null;this.dispatchEvent("change")};+Bj.prototype.l=function(){this.d=2;this.f=[this.c.width,this.c.height];Qa(this.e,Wc);this.e=null;var a=Nf(1,1);a.drawImage(this.c,0,0);try{a.getImageData(0,0,1,1)}catch(b){this.p=!0}this.dispatchEvent("change")};Bj.prototype.load=function(){if(0==this.d){this.d=1;this.e=[Uc(this.c,"error",this.k,!1,this),Uc(this.c,"load",this.l,!1,this)];try{this.c.src=this.i}catch(a){this.k()}}};function Aj(){this.c={};this.f=0}da(Aj);Aj.prototype.clear=function(){this.c={};this.f=0};+Aj.prototype.get=function(a,b){var d=b+":"+a;return d in this.c?this.c[d]:null};Aj.prototype.set=function(a,b,d){this.c[b+":"+a]=d;++this.f};function Cj(a,b){lc.call(this);this.k=b;this.d=null;this.i={};this.u={}}v(Cj,lc);function Dj(a){var b=a.viewState,d=a.coordinateToPixelMatrix;kj(d,a.size[0]/2,a.size[1]/2,1/b.resolution,-1/b.resolution,-b.rotation,-b.center[0],-b.center[1]);Nd(d,a.pixelToCoordinateMatrix)}l=Cj.prototype;l.T=function(){mb(this.i,pc);Cj.X.T.call(this)};+function Ej(){var a=Aj.Ua();if(32<a.f){var b=0,d,e;for(d in a.c){e=a.c[d];var f;if(f=0===(b++&3))Bc(e)?e=jd(e,void 0,void 0):(e=Qc(e),e=!!e&&Jc(e,void 0,void 0)),f=!e;f&&(delete a.c[d],--a.f)}}}+l.Ce=function(a,b,d,e,f,g){var h,k=b.viewState,n=k.resolution,k=k.rotation;if(null!==this.d){var p={};if(h=this.d.d(a,n,k,{},function(a){var b=ma(a).toString();if(!(b in p))return p[b]=!0,d.call(e,a,null)}))return h}var k=b.layerStatesArray,q;for(q=k.length-1;0<=q;--q){h=k[q];var r=h.layer;if(ij(h,n)&&f.call(g,r)&&(h=Fj(this,r).Ya(a,b,d,e)))return h}};+l.Of=function(a,b,d,e,f,g){var h,k=b.viewState,n=k.resolution,k=k.rotation;if(null!==this.d){var p=this.k.wa(a);if(this.d.d(p,n,k,{},bd)&&(h=d.call(e,null)))return h}k=b.layerStatesArray;for(p=k.length-1;0<=p;--p){h=k[p];var q=h.layer;if(ij(h,n)&&f.call(g,q)&&(h=Fj(this,q).gc(a,b,d,e)))return h}};l.Pf=function(a,b,d,e){a=this.Ce(a,b,bd,this,d,e);return m(a)};function Fj(a,b){var d=ma(b).toString();if(d in a.i)return a.i[d];var e=a.re(b);a.i[d]=e;a.u[d]=w(e,"change",a.Bi,!1,a);return e}l.Bi=function(){this.k.render()};+l.be=ca;l.Ul=function(a,b){for(var d in this.i)if(!(null!==b&&d in b.layerStates)){var e=d,f=this.i[e];delete this.i[e];Wc(this.u[e]);delete this.u[e];pc(f)}};function Gj(a,b){for(var d in a.i)if(!(d in b.layerStates)){b.postRenderFunctions.push(ra(a.Ul,a));break}};function Hj(a,b){this.i=a;this.j=b;this.c=[];this.f=[];this.d={}}Hj.prototype.clear=function(){this.c.length=0;this.f.length=0;xb(this.d)};function Ij(a){var b=a.c,d=a.f,e=b[0];1==b.length?(b.length=0,d.length=0):(b[0]=b.pop(),d[0]=d.pop(),Jj(a,0));b=a.j(e);delete a.d[b];return e}function xj(a,b){var d=a.i(b);Infinity!=d&&(a.c.push(b),a.f.push(d),a.d[a.j(b)]=!0,Kj(a,0,a.c.length-1))}Hj.prototype.Xb=function(){return this.c.length};Hj.prototype.pa=function(){return 0===this.c.length};+function Jj(a,b){for(var d=a.c,e=a.f,f=d.length,g=d[b],h=e[b],k=b;b<f>>1;){var n=2*b+1,p=2*b+2,n=p<f&&e[p]<e[n]?p:n;d[b]=d[n];e[b]=e[n];b=n}d[b]=g;e[b]=h;Kj(a,k,b)}function Kj(a,b,d){var e=a.c;a=a.f;for(var f=e[d],g=a[d];d>b;){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 Lj(a){var b=a.i,d=a.c,e=a.f,f=0,g=d.length,h,k,n;for(k=0;k<g;++k)h=d[k],n=b(h),Infinity==n?delete a.d[a.j(h)]:(e[f]=n,d[f++]=h);d.length=f;e.length=f;for(b=(a.c.length>>1)-1;0<=b;b--)Jj(a,b)};function Mj(a,b){Hj.call(this,function(b){return a.apply(null,b)},function(a){return a[0].ub()});this.p=b;this.e=0}v(Mj,Hj);Mj.prototype.k=function(a){a=a.target.state;if(2===a||3===a||4===a)--this.e,this.p()};function Nj(a,b,d){this.e=a;this.d=b;this.i=d;this.c=[];this.f=this.j=0}Nj.prototype.update=function(a,b){this.c.push(a,b,ta())};function Oj(a,b){var d=a.e,e=a.f,f=a.d-e,g=Pj(a);return cf({source:b,duration:g,easing:function(a){return e*(Math.exp(d*a*g)-1)/f}})}function Pj(a){return Math.log(a.d/a.f)/a.e};function Qj(a){qd.call(this);this.n=null;this.e(!0);this.handleEvent=a.handleEvent}v(Qj,qd);Qj.prototype.d=function(){return this.get("active")};Qj.prototype.getActive=Qj.prototype.d;Qj.prototype.e=function(a){this.set("active",a)};Qj.prototype.setActive=Qj.prototype.e;Qj.prototype.setMap=function(a){this.n=a};function Rj(a,b,d,e,f){if(null!=d){var g=b.e(),h=b.d();m(g)&&m(h)&&m(f)&&0<f&&(a.Qa(df({rotation:g,duration:f,easing:Ze})),m(e)&&a.Qa(cf({source:h,duration:f,easing:Ze})));b.rotate(d,e)}}+function Sj(a,b,d,e,f){var g=b.c();d=b.constrainResolution(g,d,0);Tj(a,b,d,e,f)}function Tj(a,b,d,e,f){if(null!=d){var g=b.c(),h=b.d();m(g)&&m(h)&&m(f)&&0<f&&(a.Qa(ef({resolution:g,duration:f,easing:Ze})),m(e)&&a.Qa(cf({source:h,duration:f,easing:Ze})));if(null!=e){var k;a=b.d();f=b.c();m(a)&&m(f)&&(k=[e[0]-d*(e[0]-a[0])/f,e[1]-d*(e[1]-a[1])/f]);b.Ma(k)}b.j(d)}};function Uj(a){a=m(a)?a:{};this.c=m(a.delta)?a.delta:1;Qj.call(this,{handleEvent:Vj});this.j=m(a.duration)?a.duration:250}v(Uj,Qj);function Vj(a){var b=!1,d=a.c;if(a.type==Zi){var b=a.map,e=a.coordinate,d=d.e?-this.c:this.c,f=b.c();Sj(b,f,d,e,this.j);a.preventDefault();b=!0}return!b};function Wj(a){a=a.c;return a.f&&!a.k&&a.e}function Xj(a){return"pointermove"==a.type}function Yj(a){return a.type==$i}function Zj(a){a=a.c;return!a.f&&!a.k&&!a.e}function ak(a){a=a.c;return!a.f&&!a.k&&a.e}function bk(a){a=a.c.target.tagName;return"INPUT"!==a&&"SELECT"!==a&&"TEXTAREA"!==a}function ck(a){return 1==a.f.pointerId};function dk(a){a=m(a)?a:{};Qj.call(this,{handleEvent:m(a.handleEvent)?a.handleEvent:ek});this.ma=m(a.handleDownEvent)?a.handleDownEvent:ad;this.oa=m(a.handleDragEvent)?a.handleDragEvent:ca;this.za=m(a.handleMoveEvent)?a.handleMoveEvent:ca;this.Ia=m(a.handleUpEvent)?a.handleUpEvent:ad;this.u=!1;this.J={};this.j=[]}v(dk,Qj);function fk(a){for(var b=a.length,d=0,e=0,f=0;f<b;f++)d+=a[f].clientX,e+=a[f].clientY;return[d/b,e/b]}+function ek(a){if(!(a instanceof Vi))return!0;var b=!1,d=a.type;if(d===dj||d===fj||d===bj)d=a.f,a.type==bj?delete this.J[d.pointerId]:a.type==dj?this.J[d.pointerId]=d:d.pointerId in this.J&&(this.J[d.pointerId]=d),this.j=qb(this.J);this.u&&(a.type==fj?this.oa(a):a.type==bj&&(this.u=this.Ia(a)));a.type==dj?(this.u=a=this.ma(a),b=this.v(a)):a.type==ej&&this.za(a);return!b}dk.prototype.v=dd;function gk(a){dk.call(this,{handleDownEvent:hk,handleDragEvent:ik,handleUpEvent:jk});a=m(a)?a:{};this.c=a.kinetic;this.i=this.k=null;this.s=m(a.condition)?a.condition:Zj;this.l=!1}v(gk,dk);function ik(a){var b=fk(this.j);this.c&&this.c.update(b[0],b[1]);if(null!==this.i){var d=this.i[0]-b[0],e=b[1]-this.i[1];a=a.map;var f=a.c(),g=Xe(f),e=d=[d,e],h=g.resolution;e[0]*=h;e[1]*=h;Ad(d,g.rotation);vd(d,g.center);d=f.l(d);a.render();f.Ma(d)}this.i=b}+function jk(a){a=a.map;var b=a.c();if(0===this.j.length){var d;if(d=!this.l&&this.c)if(d=this.c,6>d.c.length)d=!1;else{var e=ta()-d.i,f=d.c.length-3;if(d.c[f+2]<e)d=!1;else{for(var g=f-3;0<g&&d.c[g+2]>e;)g-=3;var e=d.c[f+2]-d.c[g+2],h=d.c[f]-d.c[g],f=d.c[f+1]-d.c[g+1];d.j=Math.atan2(f,h);d.f=Math.sqrt(h*h+f*f)/e;d=d.f>d.d}}d&&(d=this.c,d=(d.d-d.f)/d.e,f=this.c.j,g=b.d(),this.k=Oj(this.c,g),a.Qa(this.k),g=a.i(g),d=a.wa([g[0]-d*Math.cos(f),g[1]-d*Math.sin(f)]),d=b.l(d),b.Ma(d));Ye(b,-1);a.render();+return!1}this.i=null;return!0}function hk(a){if(0<this.j.length&&this.s(a)){var b=a.map,d=b.c();this.i=null;this.u||Ye(d,1);b.render();null!==this.k&&Xa(b.R,this.k)&&(d.Ma(a.frameState.viewState.center),this.k=null);this.c&&(a=this.c,a.c.length=0,a.j=0,a.f=0);this.l=1<this.j.length;return!0}return!1}gk.prototype.v=ad;function kk(a){a=m(a)?a:{};dk.call(this,{handleDownEvent:lk,handleDragEvent:mk,handleUpEvent:nk});this.i=m(a.condition)?a.condition:Wj;this.c=void 0}v(kk,dk);function mk(a){if(ck(a)){var b=a.map,d=b.j();a=a.pixel;d=Math.atan2(d[1]/2-a[1],a[0]-d[0]/2);if(m(this.c)){a=d-this.c;var e=b.c(),f=e.e();b.render();Rj(b,e,f-a)}this.c=d}}function nk(a){if(!ck(a))return!0;a=a.map;var b=a.c();Ye(b,-1);var d=b.e(),d=b.constrainRotation(d,0);Rj(a,b,d,void 0,250);return!1}+function lk(a){return ck(a)&&zc(a.c)&&this.i(a)?(a=a.map,Ye(a.c(),1),a.render(),this.c=void 0,!0):!1}kk.prototype.v=ad;function ok(){kd.call(this);this.n=Sd();this.u=-1;this.i={};this.l=this.k=0}v(ok,kd);ok.prototype.j=function(a,b){var d=m(b)?b:[NaN,NaN];this.bb(a[0],a[1],d,Infinity);return d};ok.prototype.Nb=ad;ok.prototype.N=function(a){this.u!=this.f&&(this.n=this.hd(this.n),this.u=this.f);var b=this.n;m(a)?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):a=b;return a};ok.prototype.transform=function(a,b){this.va(Se(a,b));return this};function pk(a,b,d,e,f,g){var h=f[0],k=f[1],n=f[4],p=f[5],q=f[12];f=f[13];for(var r=m(g)?g:[],s=0;b<d;b+=e){var u=a[b],y=a[b+1];r[s++]=h*u+n*y+q;r[s++]=k*u+p*y+f}m(g)&&r.length!=s&&(r.length=s);return r};function qk(){ok.call(this);this.c="XY";this.H=2;this.o=null}v(qk,ok);function rk(a){if("XY"==a)return 2;if("XYZ"==a||"XYM"==a)return 3;if("XYZM"==a)return 4}l=qk.prototype;l.Nb=ad;l.hd=function(a){var b=this.o,d=this.o.length,e=this.H;a=Vd(Infinity,Infinity,-Infinity,-Infinity,a);return ee(a,b,0,d,e)};l.Cb=function(){return this.o.slice(0,this.H)};l.Db=function(){return this.o.slice(this.o.length-this.H)};l.Eb=function(){return this.c};+l.xe=function(a){this.l!=this.f&&(xb(this.i),this.k=0,this.l=this.f);if(0>a||0!==this.k&&a<=this.k)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var d=this.sc(a);if(d.o.length<this.o.length)return this.i[b]=d;this.k=a;return this};l.sc=function(){return this};function sk(a,b,d){a.H=rk(b);a.c=b;a.o=d}+function tk(a,b,d,e){if(m(b))d=rk(b);else{for(b=0;b<e;++b){if(0===d.length){a.c="XY";a.H=2;return}d=d[0]}d=d.length;b=2==d?"XY":3==d?"XYZ":4==d?"XYZM":void 0}a.c=b;a.H=d}l.va=function(a){null!==this.o&&(a(this.o,this.o,this.H),this.q())};l.Na=function(a,b){var d=this.o;if(null!==d){var e=d.length,f=this.H,g=m(d)?d:[],h=0,k,n;for(k=0;k<e;k+=f)for(g[h++]=d[k]+a,g[h++]=d[k+1]+b,n=k+2;n<k+f;++n)g[h++]=d[n];m(d)&&g.length!=h&&(g.length=h);this.q()}};function uk(a,b,d,e){for(var f=0,g=a[d-e],h=a[d-e+1];b<d;b+=e)var k=a[b],n=a[b+1],f=f+(h*k-g*n),g=k,h=n;return f/2}function vk(a,b,d,e){var f=0,g,h;g=0;for(h=d.length;g<h;++g){var k=d[g],f=f+uk(a,b,k,e);b=k}return f};function wk(a,b,d,e,f,g){var h=f-d,k=g-e;if(0!==h||0!==k){var n=((a-d)*h+(b-e)*k)/(h*h+k*k);1<n?(d=f,e=g):0<n&&(d+=h*n,e+=k*n)}return xk(a,b,d,e)}function xk(a,b,d,e){a=d-a;b=e-b;return a*a+b*b};function yk(a,b,d,e,f,g,h){var k=a[b],n=a[b+1],p=a[d]-k,q=a[d+1]-n;if(0!==p||0!==q)if(g=((f-k)*p+(g-n)*q)/(p*p+q*q),1<g)b=d;else if(0<g){for(f=0;f<e;++f)h[f]=Xb(a[b+f],a[d+f],g);h.length=e;return}for(f=0;f<e;++f)h[f]=a[b+f];h.length=e}function zk(a,b,d,e,f){var g=a[b],h=a[b+1];for(b+=e;b<d;b+=e){var k=a[b],n=a[b+1],g=xk(g,h,k,n);g>f&&(f=g);g=k;h=n}return f}function Ak(a,b,d,e,f){var g,h;g=0;for(h=d.length;g<h;++g){var k=d[g];f=zk(a,b,k,e,f);b=k}return f}+function Bk(a,b,d,e,f,g,h,k,n,p,q){if(b==d)return p;var r;if(0===f){r=xk(h,k,a[b],a[b+1]);if(r<p){for(q=0;q<e;++q)n[q]=a[b+q];n.length=e;return r}return p}for(var s=m(q)?q:[NaN,NaN],u=b+e;u<d;)if(yk(a,u-e,u,e,h,k,s),r=xk(h,k,s[0],s[1]),r<p){p=r;for(q=0;q<e;++q)n[q]=s[q];n.length=e;u+=e}else u+=e*Math.max((Math.sqrt(r)-Math.sqrt(p))/f|0,1);if(g&&(yk(a,d-e,b,e,h,k,s),r=xk(h,k,s[0],s[1]),r<p)){p=r;for(q=0;q<e;++q)n[q]=s[q];n.length=e}return p}+function Ck(a,b,d,e,f,g,h,k,n,p,q){q=m(q)?q:[NaN,NaN];var r,s;r=0;for(s=d.length;r<s;++r){var u=d[r];p=Bk(a,b,u,e,f,g,h,k,n,p,q);b=u}return p};function Dk(a,b){var d=0,e,f;e=0;for(f=b.length;e<f;++e)a[d++]=b[e];return d}function Ek(a,b,d,e){var f,g;f=0;for(g=d.length;f<g;++f){var h=d[f],k;for(k=0;k<e;++k)a[b++]=h[k]}return b}function Fk(a,b,d,e,f){f=m(f)?f:[];var g=0,h,k;h=0;for(k=d.length;h<k;++h)b=Ek(a,b,d[h],e),f[g++]=b;f.length=g;return f};function Gk(a,b,d,e,f){f=m(f)?f:[];for(var g=0;b<d;b+=e)f[g++]=a.slice(b,b+e);f.length=g;return f}function Hk(a,b,d,e,f){f=m(f)?f:[];var g=0,h,k;h=0;for(k=d.length;h<k;++h){var n=d[h];f[g++]=Gk(a,b,n,e,f[g]);b=n}f.length=g;return f};function Ik(a,b,d,e,f,g,h){var k=(d-b)/e;if(3>k){for(;b<d;b+=e)g[h++]=a[b],g[h++]=a[b+1];return h}var n=Array(k);n[0]=1;n[k-1]=1;d=[b,d-e];for(var p=0,q;0<d.length;){var r=d.pop(),s=d.pop(),u=0,y=a[s],z=a[s+1],A=a[r],E=a[r+1];for(q=s+e;q<r;q+=e){var x=wk(a[q],a[q+1],y,z,A,E);x>u&&(p=q,u=x)}u>f&&(n[(p-b)/e]=1,s+e<p&&d.push(s,p),p+e<r&&d.push(p,r))}for(q=0;q<k;++q)n[q]&&(g[h++]=a[b+q*e],g[h++]=a[b+q*e+1]);return h}+function Jk(a,b,d,e,f,g,h,k){var n,p;n=0;for(p=d.length;n<p;++n){var q=d[n];a:{var r=a,s=q,u=e,y=f,z=g;if(b!=s){var A=y*Math.round(r[b]/y),E=y*Math.round(r[b+1]/y);b+=u;z[h++]=A;z[h++]=E;var x=void 0,Q=void 0;do if(x=y*Math.round(r[b]/y),Q=y*Math.round(r[b+1]/y),b+=u,b==s){z[h++]=x;z[h++]=Q;break a}while(x==A&&Q==E);for(;b<s;){var N,L;N=y*Math.round(r[b]/y);L=y*Math.round(r[b+1]/y);b+=u;if(N!=x||L!=Q){var U=x-A,Ca=Q-E,eb=N-A,R=L-E;U*R==Ca*eb&&(0>U&&eb<U||U==eb||0<U&&eb>U)&&(0>Ca&&R<Ca||Ca==R||0<Ca&&+R>Ca)||(z[h++]=x,z[h++]=Q,A=x,E=Q);x=N;Q=L}}z[h++]=x;z[h++]=Q}}k.push(h);b=q}return h};function Kk(a,b){qk.call(this);this.d=this.p=-1;this.$(a,b)}v(Kk,qk);l=Kk.prototype;l.clone=function(){var a=new Kk(null);Lk(a,this.c,this.o.slice());return a};l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;this.d!=this.f&&(this.p=Math.sqrt(zk(this.o,0,this.o.length,this.H,0)),this.d=this.f);return Bk(this.o,0,this.o.length,this.H,this.p,!0,a,b,d,e)};l.Rj=function(){return uk(this.o,0,this.o.length,this.H)};l.U=function(){return Gk(this.o,0,this.o.length,this.H)};+l.sc=function(a){var b=[];b.length=Ik(this.o,0,this.o.length,this.H,a,b,0);a=new Kk(null);Lk(a,"XY",b);return a};l.S=function(){return"LinearRing"};l.$=function(a,b){null===a?Lk(this,"XY",null):(tk(this,b,a,1),null===this.o&&(this.o=[]),this.o.length=Ek(this.o,0,a,this.H),this.q())};function Lk(a,b,d){sk(a,b,d);a.q()};function Mk(a,b){qk.call(this);this.$(a,b)}v(Mk,qk);l=Mk.prototype;l.clone=function(){var a=new Mk(null);Nk(a,this.c,this.o.slice());return a};l.bb=function(a,b,d,e){var f=this.o;a=xk(a,b,f[0],f[1]);if(a<e){e=this.H;for(b=0;b<e;++b)d[b]=f[b];d.length=e;return a}return e};l.U=function(){return null===this.o?[]:this.o.slice()};l.hd=function(a){return be(this.o,a)};l.S=function(){return"Point"};l.na=function(a){return $d(a,this.o[0],this.o[1])};+l.$=function(a,b){null===a?Nk(this,"XY",null):(tk(this,b,a,0),null===this.o&&(this.o=[]),this.o.length=Dk(this.o,a),this.q())};function Nk(a,b,d){sk(a,b,d);a.q()};function Ok(a,b,d,e,f){return!fe(f,function(f){return!Pk(a,b,d,e,f[0],f[1])})}function Pk(a,b,d,e,f,g){for(var h=!1,k=a[d-e],n=a[d-e+1];b<d;b+=e){var p=a[b],q=a[b+1];n>g!=q>g&&f<(p-k)*(g-n)/(q-n)+k&&(h=!h);k=p;n=q}return h}function Qk(a,b,d,e,f,g){if(0===d.length||!Pk(a,b,d[0],e,f,g))return!1;var h;b=1;for(h=d.length;b<h;++b)if(Pk(a,d[b-1],d[b],e,f,g))return!1;return!0};function Rk(a,b,d,e,f,g,h){var k,n,p,q,r,s=f[g+1],u=[],y=d[0];p=a[y-e];r=a[y-e+1];for(k=b;k<y;k+=e){q=a[k];n=a[k+1];if(s<=r&&n<=s||r<=s&&s<=n)p=(s-r)/(n-r)*(q-p)+p,u.push(p);p=q;r=n}y=NaN;r=-Infinity;u.sort();p=u[0];k=1;for(n=u.length;k<n;++k){q=u[k];var z=Math.abs(q-p);z>r&&(p=(p+q)/2,Qk(a,b,d,e,p,s)&&(y=p,r=z));p=q}isNaN(y)&&(y=f[g]);return m(h)?(h.push(y,s),h):[y,s]};function Sk(a,b,d,e,f,g){for(var h=[a[b],a[b+1]],k=[],n;b+e<d;b+=e){k[0]=a[b+e];k[1]=a[b+e+1];if(n=f.call(g,h,k))return n;h[0]=k[0];h[1]=k[1]}return!1};function Tk(a,b,d,e,f){var g=ee(Sd(),a,b,d,e);return pe(f,g)?Zd(f,g)||g[0]>=f[0]&&g[2]<=f[2]||g[1]>=f[1]&&g[3]<=f[3]?!0:Sk(a,b,d,e,function(a,b){var d=!1,e=ae(f,a),g=ae(f,b);if(1===e||1===g)d=!0;else{var r=f[0],s=f[1],u=f[2],y=f[3],z=b[0],A=b[1],E=(A-a[1])/(z-a[0]);g&2&&!(e&2)?(s=z-(A-y)/E,d=s>=r&&s<=u):g&4&&!(e&4)?(r=A-(z-u)*E,d=r>=s&&r<=y):g&8&&!(e&8)?(s=z-(A-s)/E,d=s>=r&&s<=u):g&16&&!(e&16)&&(r=A-(z-r)*E,d=r>=s&&r<=y)}return d}):!1}+function Uk(a,b,d,e,f){var g=d[0];if(!(Tk(a,b,g,e,f)||Pk(a,b,g,e,f[0],f[1])||Pk(a,b,g,e,f[0],f[3])||Pk(a,b,g,e,f[2],f[1])||Pk(a,b,g,e,f[2],f[3])))return!1;if(1===d.length)return!0;b=1;for(g=d.length;b<g;++b)if(Ok(a,d[b-1],d[b],e,f))return!1;return!0};function Vk(a,b,d,e){for(var f=0,g=a[d-e],h=a[d-e+1];b<d;b+=e)var k=a[b],n=a[b+1],f=f+(k-g)*(n+h),g=k,h=n;return 0<f}function Wk(a,b,d,e){var f=0;e=m(e)?e:!1;var g,h;g=0;for(h=b.length;g<h;++g){var k=b[g],f=Vk(a,f,k,d);if(0===g){if(e&&f||!e&&!f)return!1}else if(e&&!f||!e&&f)return!1;f=k}return!0}+function Xk(a,b,d,e,f){f=m(f)?f:!1;var g,h;g=0;for(h=d.length;g<h;++g){var k=d[g],n=Vk(a,b,k,e);if(0===g?f&&n||!f&&!n:f&&!n||!f&&n)for(var n=a,p=k,q=e;b<p-q;){var r;for(r=0;r<q;++r){var s=n[b+r];n[b+r]=n[p-q+r];n[p-q+r]=s}b+=q;p-=q}b=k}return b}function Yk(a,b,d,e){var f=0,g,h;g=0;for(h=b.length;g<h;++g)f=Xk(a,f,b[g],d,e);return f};function F(a,b){qk.call(this);this.d=[];this.s=-1;this.t=null;this.L=this.v=this.J=-1;this.p=null;this.$(a,b)}v(F,qk);l=F.prototype;l.nh=function(a){null===this.o?this.o=a.o.slice():ab(this.o,a.o);this.d.push(this.o.length);this.q()};l.clone=function(){var a=new F(null);Zk(a,this.c,this.o.slice(),this.d.slice());return a};+l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;this.v!=this.f&&(this.J=Math.sqrt(Ak(this.o,0,this.d,this.H,0)),this.v=this.f);return Ck(this.o,0,this.d,this.H,this.J,!0,a,b,d,e)};l.Nb=function(a,b){return Qk($k(this),0,this.d,this.H,a,b)};l.Uj=function(){return vk($k(this),0,this.d,this.H)};l.U=function(a){var b;m(a)?(b=$k(this).slice(),Xk(b,0,this.d,this.H,a)):b=this.o;return Hk(b,0,this.d,this.H)};+function al(a){if(a.s!=a.f){var b=ke(a.N());a.t=Rk($k(a),0,a.d,a.H,b,0);a.s=a.f}return a.t}l.Lh=function(){return new Mk(al(this))};l.Rh=function(){return this.d.length};l.Qh=function(a){if(0>a||this.d.length<=a)return null;var b=new Kk(null);Lk(b,this.c,this.o.slice(0===a?0:this.d[a-1],this.d[a]));return b};l.qd=function(){var a=this.c,b=this.o,d=this.d,e=[],f=0,g,h;g=0;for(h=d.length;g<h;++g){var k=d[g],n=new Kk(null);Lk(n,a,b.slice(f,k));e.push(n);f=k}return e};+function $k(a){if(a.L!=a.f){var b=a.o;Wk(b,a.d,a.H)?a.p=b:(a.p=b.slice(),a.p.length=Xk(a.p,0,a.d,a.H));a.L=a.f}return a.p}l.sc=function(a){var b=[],d=[];b.length=Jk(this.o,0,this.d,this.H,Math.sqrt(a),b,0,d);a=new F(null);Zk(a,"XY",b,d);return a};l.S=function(){return"Polygon"};l.na=function(a){return Uk($k(this),0,this.d,this.H,a)};+l.$=function(a,b){if(null===a)Zk(this,"XY",null,this.d);else{tk(this,b,a,2);null===this.o&&(this.o=[]);var d=Fk(this.o,0,a,this.H,this.d);this.o.length=0===d.length?0:d[d.length-1];this.q()}};function Zk(a,b,d,e){sk(a,b,d);a.d=e;a.q()}function bl(a,b,d,e){var f=m(e)?e:32;e=[];var g;for(g=0;g<f;++g)ab(e,a.offset(b,d,2*Math.PI*g/f));e.push(e[0],e[1]);a=new F(null);Zk(a,"XY",e,[e.length]);return a};function cl(a,b,d,e,f,g,h){qc.call(this,a,b);this.vectorContext=d;this.c=e;this.frameState=f;this.context=g;this.glContext=h}v(cl,qc);function dl(a){this.d=this.f=this.j=this.e=this.c=null;this.i=a}v(dl,lc);function el(a){var b=a.j,d=a.f;a=Sa([b,[b[0],d[1]],d,[d[0],b[1]]],a.c.wa,a.c);a[4]=a[0].slice();return new F([a])}dl.prototype.T=function(){this.setMap(null)};dl.prototype.k=function(a){var b=this.d,d=this.i;a.vectorContext.oc(Infinity,function(a){a.Fa(d.j,d.d);a.Ga(d.f);a.Vb(b,null)})};dl.prototype.W=function(){return this.d};function fl(a){null===a.c||null===a.j||null===a.f||a.c.render()}+dl.prototype.setMap=function(a){null!==this.e&&(Wc(this.e),this.e=null,this.c.render(),this.c=null);this.c=a;null!==this.c&&(this.e=w(a,"postcompose",this.k,!1,this),fl(this))};function gl(a,b){qc.call(this,a);this.coordinate=b}v(gl,qc);function hl(a){dk.call(this,{handleDownEvent:il,handleDragEvent:jl,handleUpEvent:kl});a=m(a)?a:{};this.i=new dl(m(a.style)?a.style:null);this.c=null;this.l=m(a.condition)?a.condition:bd}v(hl,dk);function jl(a){if(ck(a)){var b=this.i;a=a.pixel;b.j=this.c;b.f=a;b.d=el(b);fl(b)}}hl.prototype.W=function(){return this.i.W()};hl.prototype.k=ca;+function kl(a){if(!ck(a))return!0;this.i.setMap(null);var b=a.pixel[0]-this.c[0],d=a.pixel[1]-this.c[1];64<=b*b+d*d&&(this.k(a),this.dispatchEvent(new gl("boxend",a.coordinate)));return!1}function il(a){if(ck(a)&&zc(a.c)&&this.l(a)){this.c=a.pixel;this.i.setMap(a.map);var b=this.i,d=this.c;b.j=this.c;b.f=d;b.d=el(b);fl(b);this.dispatchEvent(new gl("boxstart",a.coordinate));return!0}return!1};function ll(){this.f=-1};function ml(){this.f=-1;this.f=64;this.c=Array(4);this.j=Array(this.f);this.e=this.d=0;this.c[0]=1732584193;this.c[1]=4023233417;this.c[2]=2562383102;this.c[3]=271733878;this.e=this.d=0}v(ml,ll);+function nl(a,b,d){d||(d=0);var e=Array(16);if(ia(b))for(var f=0;16>f;++f)e[f]=b.charCodeAt(d++)|b.charCodeAt(d++)<<8|b.charCodeAt(d++)<<16|b.charCodeAt(d++)<<24;else for(f=0;16>f;++f)e[f]=b[d++]|b[d++]<<8|b[d++]<<16|b[d++]<<24;b=a.c[0];d=a.c[1];var f=a.c[2],g=a.c[3],h=0,h=b+(g^d&(f^g))+e[0]+3614090360&4294967295;b=d+(h<<7&4294967295|h>>>25);h=g+(f^b&(d^f))+e[1]+3905402710&4294967295;g=b+(h<<12&4294967295|h>>>20);h=f+(d^g&(b^d))+e[2]+606105819&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(b^f&(g^+b))+e[3]+3250441966&4294967295;d=f+(h<<22&4294967295|h>>>10);h=b+(g^d&(f^g))+e[4]+4118548399&4294967295;b=d+(h<<7&4294967295|h>>>25);h=g+(f^b&(d^f))+e[5]+1200080426&4294967295;g=b+(h<<12&4294967295|h>>>20);h=f+(d^g&(b^d))+e[6]+2821735955&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(b^f&(g^b))+e[7]+4249261313&4294967295;d=f+(h<<22&4294967295|h>>>10);h=b+(g^d&(f^g))+e[8]+1770035416&4294967295;b=d+(h<<7&4294967295|h>>>25);h=g+(f^b&(d^f))+e[9]+2336552879&4294967295;g=b+(h<<12&4294967295|h>>>20);h=f++(d^g&(b^d))+e[10]+4294925233&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(b^f&(g^b))+e[11]+2304563134&4294967295;d=f+(h<<22&4294967295|h>>>10);h=b+(g^d&(f^g))+e[12]+1804603682&4294967295;b=d+(h<<7&4294967295|h>>>25);h=g+(f^b&(d^f))+e[13]+4254626195&4294967295;g=b+(h<<12&4294967295|h>>>20);h=f+(d^g&(b^d))+e[14]+2792965006&4294967295;f=g+(h<<17&4294967295|h>>>15);h=d+(b^f&(g^b))+e[15]+1236535329&4294967295;d=f+(h<<22&4294967295|h>>>10);h=b+(f^g&(d^f))+e[1]+4129170786&4294967295;b=d+(h<<5&4294967295|+h>>>27);h=g+(d^f&(b^d))+e[6]+3225465664&4294967295;g=b+(h<<9&4294967295|h>>>23);h=f+(b^d&(g^b))+e[11]+643717713&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^b&(f^g))+e[0]+3921069994&4294967295;d=f+(h<<20&4294967295|h>>>12);h=b+(f^g&(d^f))+e[5]+3593408605&4294967295;b=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(b^d))+e[10]+38016083&4294967295;g=b+(h<<9&4294967295|h>>>23);h=f+(b^d&(g^b))+e[15]+3634488961&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^b&(f^g))+e[4]+3889429448&4294967295;d=f+(h<<20&4294967295|+h>>>12);h=b+(f^g&(d^f))+e[9]+568446438&4294967295;b=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(b^d))+e[14]+3275163606&4294967295;g=b+(h<<9&4294967295|h>>>23);h=f+(b^d&(g^b))+e[3]+4107603335&4294967295;f=g+(h<<14&4294967295|h>>>18);h=d+(g^b&(f^g))+e[8]+1163531501&4294967295;d=f+(h<<20&4294967295|h>>>12);h=b+(f^g&(d^f))+e[13]+2850285829&4294967295;b=d+(h<<5&4294967295|h>>>27);h=g+(d^f&(b^d))+e[2]+4243563512&4294967295;g=b+(h<<9&4294967295|h>>>23);h=f+(b^d&(g^b))+e[7]+1735328473&4294967295;f=g+(h<<14&4294967295|+h>>>18);h=d+(g^b&(f^g))+e[12]+2368359562&4294967295;d=f+(h<<20&4294967295|h>>>12);h=b+(d^f^g)+e[5]+4294588738&4294967295;b=d+(h<<4&4294967295|h>>>28);h=g+(b^d^f)+e[8]+2272392833&4294967295;g=b+(h<<11&4294967295|h>>>21);h=f+(g^b^d)+e[11]+1839030562&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^b)+e[14]+4259657740&4294967295;d=f+(h<<23&4294967295|h>>>9);h=b+(d^f^g)+e[1]+2763975236&4294967295;b=d+(h<<4&4294967295|h>>>28);h=g+(b^d^f)+e[4]+1272893353&4294967295;g=b+(h<<11&4294967295|h>>>21);h=f+(g^+b^d)+e[7]+4139469664&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^b)+e[10]+3200236656&4294967295;d=f+(h<<23&4294967295|h>>>9);h=b+(d^f^g)+e[13]+681279174&4294967295;b=d+(h<<4&4294967295|h>>>28);h=g+(b^d^f)+e[0]+3936430074&4294967295;g=b+(h<<11&4294967295|h>>>21);h=f+(g^b^d)+e[3]+3572445317&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^b)+e[6]+76029189&4294967295;d=f+(h<<23&4294967295|h>>>9);h=b+(d^f^g)+e[9]+3654602809&4294967295;b=d+(h<<4&4294967295|h>>>28);h=g+(b^d^f)+e[12]+3873151461&4294967295;+g=b+(h<<11&4294967295|h>>>21);h=f+(g^b^d)+e[15]+530742520&4294967295;f=g+(h<<16&4294967295|h>>>16);h=d+(f^g^b)+e[2]+3299628645&4294967295;d=f+(h<<23&4294967295|h>>>9);h=b+(f^(d|~g))+e[0]+4096336452&4294967295;b=d+(h<<6&4294967295|h>>>26);h=g+(d^(b|~f))+e[7]+1126891415&4294967295;g=b+(h<<10&4294967295|h>>>22);h=f+(b^(g|~d))+e[14]+2878612391&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~b))+e[5]+4237533241&4294967295;d=f+(h<<21&4294967295|h>>>11);h=b+(f^(d|~g))+e[12]+1700485571&4294967295;b=d++(h<<6&4294967295|h>>>26);h=g+(d^(b|~f))+e[3]+2399980690&4294967295;g=b+(h<<10&4294967295|h>>>22);h=f+(b^(g|~d))+e[10]+4293915773&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~b))+e[1]+2240044497&4294967295;d=f+(h<<21&4294967295|h>>>11);h=b+(f^(d|~g))+e[8]+1873313359&4294967295;b=d+(h<<6&4294967295|h>>>26);h=g+(d^(b|~f))+e[15]+4264355552&4294967295;g=b+(h<<10&4294967295|h>>>22);h=f+(b^(g|~d))+e[6]+2734768916&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~b))+e[13]+1309151649&4294967295;+d=f+(h<<21&4294967295|h>>>11);h=b+(f^(d|~g))+e[4]+4149444226&4294967295;b=d+(h<<6&4294967295|h>>>26);h=g+(d^(b|~f))+e[11]+3174756917&4294967295;g=b+(h<<10&4294967295|h>>>22);h=f+(b^(g|~d))+e[2]+718787259&4294967295;f=g+(h<<15&4294967295|h>>>17);h=d+(g^(f|~b))+e[9]+3951481745&4294967295;a.c[0]=a.c[0]+b&4294967295;a.c[1]=a.c[1]+(f+(h<<21&4294967295|h>>>11))&4294967295;a.c[2]=a.c[2]+f&4294967295;a.c[3]=a.c[3]+g&4294967295}+ml.prototype.update=function(a,b){m(b)||(b=a.length);for(var d=b-this.f,e=this.j,f=this.d,g=0;g<b;){if(0==f)for(;g<=d;)nl(this,a,g),g+=this.f;if(ia(a))for(;g<b;){if(e[f++]=a.charCodeAt(g++),f==this.f){nl(this,e);f=0;break}}else for(;g<b;)if(e[f++]=a[g++],f==this.f){nl(this,e);f=0;break}}this.d=f;this.e+=b};function pl(a){a=m(a)?a:{};this.c=m(a.color)?a.color:null;this.e=a.lineCap;this.d=m(a.lineDash)?a.lineDash:null;this.j=a.lineJoin;this.i=a.miterLimit;this.f=a.width;this.k=void 0}l=pl.prototype;l.Qk=function(){return this.c};l.Nh=function(){return this.e};l.Rk=function(){return this.d};l.Oh=function(){return this.j};l.Uh=function(){return this.i};l.Sk=function(){return this.f};l.Tk=function(a){this.c=a;this.k=void 0};l.dm=function(a){this.e=a;this.k=void 0};l.Uk=function(a){this.d=a;this.k=void 0};+l.em=function(a){this.j=a;this.k=void 0};l.fm=function(a){this.i=a;this.k=void 0};l.mm=function(a){this.f=a;this.k=void 0};+l.Bb=function(){if(!m(this.k)){var a="s"+(null===this.c?"-":sg(this.c))+","+(m(this.e)?this.e.toString():"-")+","+(null===this.d?"-":this.d.toString())+","+(m(this.j)?this.j:"-")+","+(m(this.i)?this.i.toString():"-")+","+(m(this.f)?this.f.toString():"-"),b=new ml;b.update(a);var d=Array((56>b.d?b.f:2*b.f)-b.d);d[0]=128;for(a=1;a<d.length-8;++a)d[a]=0;for(var e=8*b.e,a=d.length-8;a<d.length;++a)d[a]=e&255,e/=256;b.update(d);d=Array(16);for(a=e=0;4>a;++a)for(var f=0;32>f;f+=8)d[e++]=b.c[a]>>>f&255;+if(8192>d.length)b=String.fromCharCode.apply(null,d);else for(b="",a=0;a<d.length;a+=8192)b+=String.fromCharCode.apply(null,cb(d,a,a+8192));this.k=b}return this.k};var ql=[0,0,0,1],rl=[],sl=[0,0,0,1];function tl(a){a=m(a)?a:{};this.c=m(a.color)?a.color:null;this.f=void 0}tl.prototype.d=function(){return this.c};tl.prototype.e=function(a){this.c=a;this.f=void 0};tl.prototype.Bb=function(){m(this.f)||(this.f="f"+(null===this.c?"-":sg(this.c)));return this.f};function ul(a){a=m(a)?a:{};this.i=this.c=this.j=null;this.e=m(a.fill)?a.fill:null;this.f=m(a.stroke)?a.stroke:null;this.d=a.radius;this.u=[0,0];this.p=this.J=this.k=null;var b=a.atlasManager,d,e=null,f,g=0;null!==this.f&&(f=sg(this.f.c),g=this.f.f,m(g)||(g=1),e=this.f.d,Yf||(e=null));var h=2*(this.d+g)+1;f={strokeStyle:f,Yc:g,size:h,lineDash:e};m(b)?(h=Math.round(h),(e=null===this.e)&&(d=ra(this.Vf,this,f)),g=this.Bb(),f=b.add(g,h,h,ra(this.Wf,this,f),d),this.c=f.image,this.u=[f.offsetX,f.offsetY],+d=f.image.width,this.i=e?f.Af:this.c):(this.c=Ef("CANVAS"),this.c.height=h,this.c.width=h,d=h=this.c.width,b=this.c.getContext("2d"),this.Wf(f,b,0,0),null===this.e?(b=this.i=Ef("CANVAS"),b.height=f.size,b.width=f.size,b=b.getContext("2d"),this.Vf(f,b,0,0)):this.i=this.c);this.k=[h/2,h/2];this.J=[h,h];this.p=[d,d];yj.call(this,{opacity:1,rotateWithView:!1,rotation:0,scale:1,snapToPixel:m(a.snapToPixel)?a.snapToPixel:!0})}v(ul,yj);l=ul.prototype;l.Ab=function(){return this.k};l.Hk=function(){return this.e};+l.Od=function(){return this.i};l.Fb=function(){return this.c};l.Tc=function(){return 2};l.pd=function(){return this.p};l.Gb=function(){return this.u};l.Ik=function(){return this.d};l.kb=function(){return this.J};l.Jk=function(){return this.f};l.Ae=ca;l.load=ca;l.Re=ca;+l.Wf=function(a,b,d,e){b.setTransform(1,0,0,1,0,0);b.translate(d,e);b.beginPath();b.arc(a.size/2,a.size/2,this.d,0,2*Math.PI,!0);null!==this.e&&(b.fillStyle=sg(this.e.c),b.fill());null!==this.f&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Yc,null===a.lineDash||b.setLineDash(a.lineDash),b.stroke());b.closePath()};+l.Vf=function(a,b,d,e){b.setTransform(1,0,0,1,0,0);b.translate(d,e);b.beginPath();b.arc(a.size/2,a.size/2,this.d,0,2*Math.PI,!0);b.fillStyle=ql;b.fill();null!==this.f&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Yc,null===a.lineDash||b.setLineDash(a.lineDash),b.stroke());b.closePath()};l.Bb=function(){var a=null===this.f?"-":this.f.Bb(),b=null===this.e?"-":this.e.Bb();if(null===this.j||a!=this.j[1]||b!=this.j[2]||this.d!=this.j[3])this.j=["c"+a+b+(m(this.d)?this.d.toString():"-"),a,b,this.d];return this.j[0]};function vl(a){a=m(a)?a:{};this.k=null;this.e=wl;m(a.geometry)&&this.Zf(a.geometry);this.j=m(a.fill)?a.fill:null;this.i=m(a.image)?a.image:null;this.d=m(a.stroke)?a.stroke:null;this.f=m(a.text)?a.text:null;this.c=a.zIndex}l=vl.prototype;l.W=function(){return this.k};l.Hh=function(){return this.e};l.Vk=function(){return this.j};l.Wk=function(){return this.i};l.Xk=function(){return this.d};l.Yk=function(){return this.f};l.ji=function(){return this.c};+l.Zf=function(a){ka(a)?this.e=a:ia(a)?this.e=function(b){return b.get(a)}:null===a?this.e=wl:m(a)&&(this.e=function(){return a});this.k=a};l.om=function(a){this.c=a};function xl(a){ka(a)||(a=ga(a)?a:[a],a=$c(a));return a}function yl(){var a=new tl({color:"rgba(255,255,255,0.4)"}),b=new pl({color:"#3399CC",width:1.25}),d=[new vl({image:new ul({fill:a,stroke:b,radius:5}),fill:a,stroke:b})];yl=function(){return d};return d}+function zl(){var a={},b=[255,255,255,1],d=[0,153,255,1];a.Polygon=[new vl({fill:new tl({color:[255,255,255,.5]})})];a.MultiPolygon=a.Polygon;a.LineString=[new vl({stroke:new pl({color:b,width:5})}),new vl({stroke:new pl({color:d,width:3})})];a.MultiLineString=a.LineString;a.Circle=a.Polygon.concat(a.LineString);a.Point=[new vl({image:new ul({radius:6,fill:new tl({color:d}),stroke:new pl({color:b,width:1.5})}),zIndex:Infinity})];a.MultiPoint=a.Point;a.GeometryCollection=a.Polygon.concat(a.Point);+return a}function wl(a){return a.W()};function Al(a){var b=m(a)?a:{};a=m(b.condition)?b.condition:ak;b=m(b.style)?b.style:new vl({stroke:new pl({color:[0,0,255,1]})});hl.call(this,{condition:a,style:b})}v(Al,hl);Al.prototype.k=function(){var a=this.n,b=a.c(),d=this.W().N(),e=ke(d),f=a.j(),d=b.n(d,f),d=b.constrainResolution(d,0,void 0);Tj(a,b,d,e,200)};function Bl(a){Qj.call(this,{handleEvent:Cl});a=m(a)?a:{};this.c=m(a.condition)?a.condition:gd(Zj,bk);this.j=m(a.pixelDelta)?a.pixelDelta:128}v(Bl,Qj);+function Cl(a){var b=!1;if("key"==a.type){var d=a.c.j;if(this.c(a)&&(40==d||37==d||39==d||38==d)){var e=a.map,b=e.c(),f=Xe(b),g=f.resolution*this.j,h=0,k=0;40==d?k=-g:37==d?h=-g:39==d?h=g:k=g;d=[h,k];Ad(d,f.rotation);f=b.d();m(f)&&(m(100)&&e.Qa(cf({source:f,duration:100,easing:af})),e=b.l([f[0]+d[0],f[1]+d[1]]),b.Ma(e));a.preventDefault();b=!0}}return!b};function Dl(a){Qj.call(this,{handleEvent:El});a=m(a)?a:{};this.j=m(a.condition)?a.condition:bk;this.c=m(a.delta)?a.delta:1;this.i=m(a.duration)?a.duration:100}v(Dl,Qj);function El(a){var b=!1;if("key"==a.type){var d=a.c.l;if(this.j(a)&&(43==d||45==d)){b=a.map;d=43==d?this.c:-this.c;b.render();var e=b.c();Sj(b,e,d,void 0,this.i);a.preventDefault();b=!0}}return!b};function Fl(a){Qj.call(this,{handleEvent:Gl});a=m(a)?a:{};this.c=0;this.u=m(a.duration)?a.duration:250;this.i=null;this.k=this.j=void 0}v(Fl,Qj);function Gl(a){var b=!1;if("mousewheel"==a.type){var b=a.map,d=a.c;this.i=a.coordinate;this.c+=d.u;m(this.j)||(this.j=ta());d=Math.max(80-(ta()-this.j),0);ba.clearTimeout(this.k);this.k=ba.setTimeout(ra(this.l,this,b),d);a.preventDefault();b=!0}return!b}+Fl.prototype.l=function(a){var b=Vb(this.c,-1,1),d=a.c();a.render();Sj(a,d,-b,this.i,this.u);this.c=0;this.i=null;this.k=this.j=void 0};function Hl(a){dk.call(this,{handleDownEvent:Il,handleDragEvent:Jl,handleUpEvent:Kl});a=m(a)?a:{};this.i=null;this.k=void 0;this.c=!1;this.l=0;this.s=m(a.threshold)?a.threshold:.3}v(Hl,dk);+function Jl(a){var b=0,d=this.j[0],e=this.j[1],d=Math.atan2(e.clientY-d.clientY,e.clientX-d.clientX);m(this.k)&&(b=d-this.k,this.l+=b,!this.c&&Math.abs(this.l)>this.s&&(this.c=!0));this.k=d;a=a.map;d=Jg(a.d);e=fk(this.j);e[0]-=d.x;e[1]-=d.y;this.i=a.wa(e);this.c&&(d=a.c(),e=d.e(),a.render(),Rj(a,d,e+b,this.i))}function Kl(a){if(2>this.j.length){a=a.map;var b=a.c();Ye(b,-1);if(this.c){var d=b.e(),e=this.i,d=b.constrainRotation(d,0);Rj(a,b,d,e,250)}return!1}return!0}+function Il(a){return 2<=this.j.length?(a=a.map,this.i=null,this.k=void 0,this.c=!1,this.l=0,this.u||Ye(a.c(),1),a.render(),!0):!1}Hl.prototype.v=ad;function Ll(a){dk.call(this,{handleDownEvent:Ml,handleDragEvent:Nl,handleUpEvent:Ol});a=m(a)?a:{};this.i=null;this.l=m(a.duration)?a.duration:400;this.c=void 0;this.k=1}v(Ll,dk);function Nl(a){var b=1,d=this.j[0],e=this.j[1],f=d.clientX-e.clientX,d=d.clientY-e.clientY,f=Math.sqrt(f*f+d*d);m(this.c)&&(b=this.c/f);this.c=f;1!=b&&(this.k=b);a=a.map;var f=a.c(),d=f.c(),e=Jg(a.d),g=fk(this.j);g[0]-=e.x;g[1]-=e.y;this.i=a.wa(g);a.render();Tj(a,f,d*b,this.i)}+function Ol(a){if(2>this.j.length){a=a.map;var b=a.c();Ye(b,-1);var d=b.c(),e=this.i,f=this.l,d=b.constrainResolution(d,0,this.k-1);Tj(a,b,d,e,f);return!1}return!0}function Ml(a){return 2<=this.j.length?(a=a.map,this.i=null,this.c=void 0,this.k=1,this.u||Ye(a.c(),1),a.render(),!0):!1}Ll.prototype.v=ad;function Pl(a){a=m(a)?a:{};var b=new lg,d=new Nj(-.005,.05,100);(m(a.altShiftDragRotate)?a.altShiftDragRotate:1)&&b.push(new kk);(m(a.doubleClickZoom)?a.doubleClickZoom:1)&&b.push(new Uj({delta:a.zoomDelta,duration:a.zoomDuration}));(m(a.dragPan)?a.dragPan:1)&&b.push(new gk({kinetic:d}));(m(a.pinchRotate)?a.pinchRotate:1)&&b.push(new Hl);(m(a.pinchZoom)?a.pinchZoom:1)&&b.push(new Ll({duration:a.zoomDuration}));if(m(a.keyboard)?a.keyboard:1)b.push(new Bl),b.push(new Dl({delta:a.zoomDelta,duration:a.zoomDuration}));+(m(a.mouseWheelZoom)?a.mouseWheelZoom:1)&&b.push(new Fl({duration:a.zoomDuration}));(m(a.shiftDragZoom)?a.shiftDragZoom:1)&&b.push(new Al);return b};function G(a){var b=m(a)?a:{};a=Bb(b);delete a.layers;b=b.layers;C.call(this,a);this.c=null;w(this,ud("layers"),this.Di,!1,this);null!=b?ga(b)&&(b=new lg(b.slice())):b=new lg;this.v(b)}v(G,C);l=G.prototype;l.wf=function(){this.d()&&this.q()};+l.Di=function(){null!==this.c&&(Qa(qb(this.c),Wc),this.c=null);var a=this.ec();if(null!=a){this.c={add:w(a,"add",this.Ci,!1,this),remove:w(a,"remove",this.Ei,!1,this)};var a=a.c,b,d,e;b=0;for(d=a.length;b<d;b++)e=a[b],this.c[ma(e).toString()]=w(e,["propertychange","change"],this.wf,!1,this)}this.q()};l.Ci=function(a){a=a.element;this.c[ma(a).toString()]=w(a,["propertychange","change"],this.wf,!1,this);this.q()};l.Ei=function(a){a=ma(a.element).toString();Wc(this.c[a]);delete this.c[a];this.q()};+l.ec=function(){return this.get("layers")};G.prototype.getLayers=G.prototype.ec;G.prototype.v=function(a){this.set("layers",a)};G.prototype.setLayers=G.prototype.v;+G.prototype.ab=function(a){var b=m(a)?a:[],d=b.length;this.ec().forEach(function(a){a.ab(b)});a=hj(this);var e,f;for(e=b.length;d<e;d++)f=b[d],f.brightness=Vb(f.brightness+a.brightness,-1,1),f.contrast*=a.contrast,f.hue+=a.hue,f.opacity*=a.opacity,f.saturation*=a.saturation,f.visible=f.visible&&a.visible,f.maxResolution=Math.min(f.maxResolution,a.maxResolution),f.minResolution=Math.max(f.minResolution,a.minResolution),m(a.extent)&&(f.extent=m(f.extent)?oe(f.extent,a.extent):a.extent);return b};+G.prototype.ob=function(){return"ready"};function Ql(a){xe.call(this,{code:a,units:"m",extent:Rl,global:!0,worldExtent:Sl})}v(Ql,xe);Ql.prototype.getPointResolution=function(a,b){var d=b[1]/6378137;return a/((Math.exp(d)+Math.exp(-d))/2)};var Tl=6378137*Math.PI,Rl=[-Tl,-Tl,Tl,Tl],Sl=[-180,-85,180,85],Je=Sa("EPSG:3857 EPSG:102100 EPSG:102113 EPSG:900913 urn:ogc:def:crs:EPSG:6.18:3:3857 urn:ogc:def:crs:EPSG::3857 http://www.opengis.net/gml/srs/epsg.xml#3857".split(" "),function(a){return new Ql(a)});+function Ke(a,b,d){var e=a.length;d=1<d?d:2;m(b)||(2<d?b=a.slice():b=Array(e));for(var f=0;f<e;f+=d)b[f]=6378137*Math.PI*a[f]/180,b[f+1]=6378137*Math.log(Math.tan(Math.PI*(a[f+1]+90)/360));return b}function Le(a,b,d){var e=a.length;d=1<d?d:2;m(b)||(2<d?b=a.slice():b=Array(e));for(var f=0;f<e;f+=d)b[f]=180*a[f]/(6378137*Math.PI),b[f+1]=360*Math.atan(Math.exp(a[f+1]/6378137))/Math.PI-90;return b};function Ul(a,b){xe.call(this,{code:a,units:"degrees",extent:Vl,axisOrientation:b,global:!0,worldExtent:Vl})}v(Ul,xe);Ul.prototype.getPointResolution=function(a){return a};+var Vl=[-180,-90,180,90],Me=[new Ul("CRS:84"),new Ul("EPSG:4326","neu"),new Ul("urn:ogc:def:crs:EPSG::4326","neu"),new Ul("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Ul("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ul("urn:ogc:def:crs:OGC:2:84"),new Ul("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ul("urn:x-ogc:def:crs:EPSG:4326","neu")];function Wl(){Ae(Je);Ae(Me);Ie()};function H(a){D.call(this,m(a)?a:{})}v(H,D);function I(a){a=m(a)?a:{};var b=Bb(a);delete b.preload;delete b.useInterimTilesOnError;D.call(this,b);this.ma(m(a.preload)?a.preload:0);this.oa(m(a.useInterimTilesOnError)?a.useInterimTilesOnError:!0)}v(I,D);I.prototype.v=function(){return this.get("preload")};I.prototype.getPreload=I.prototype.v;I.prototype.ma=function(a){this.set("preload",a)};I.prototype.setPreload=I.prototype.ma;I.prototype.ia=function(){return this.get("useInterimTilesOnError")};I.prototype.getUseInterimTilesOnError=I.prototype.ia;+I.prototype.oa=function(a){this.set("useInterimTilesOnError",a)};I.prototype.setUseInterimTilesOnError=I.prototype.oa;function J(a){a=m(a)?a:{};var b=Bb(a);delete b.style;delete b.renderBuffer;delete b.updateWhileAnimating;D.call(this,b);this.ia=m(a.renderBuffer)?a.renderBuffer:100;this.Ac=null;this.v=void 0;this.oa(a.style);this.Ec=m(a.updateWhileAnimating)?a.updateWhileAnimating:!1}v(J,D);J.prototype.lf=function(){return this.Ac};J.prototype.nf=function(){return this.v};J.prototype.oa=function(a){this.Ac=m(a)?a:yl;this.v=null===a?void 0:xl(this.Ac);this.q()};function Xl(a,b,d,e,f){this.s={};this.d=a;this.v=b;this.j=d;this.L=e;this.ob=f;this.i=this.c=this.f=this.ja=this.ua=this.sa=null;this.ia=this.Ha=this.u=this.Y=this.V=this.R=0;this.ma=!1;this.k=this.oa=0;this.za=!1;this.ga=0;this.e="";this.l=this.J=this.Ja=this.Ia=0;this.ha=this.n=this.p=null;this.t=[];this.ab=Hd()}+function Yl(a,b,d){if(null!==a.i){b=pk(b,0,d,2,a.L,a.t);d=a.d;var e=a.ab,f=d.globalAlpha;1!=a.u&&(d.globalAlpha=f*a.u);var g=a.oa;a.ma&&(g+=a.ob);var h,k;h=0;for(k=b.length;h<k;h+=2){var n=b[h]-a.R,p=b[h+1]-a.V;a.za&&(n=n+.5|0,p=p+.5|0);if(0!==g||1!=a.k){var q=n+a.R,r=p+a.V;kj(e,q,r,a.k,a.k,g,-q,-r);d.setTransform(e[0],e[1],e[4],e[5],e[12],e[13])}d.drawImage(a.i,a.Ha,a.ia,a.ga,a.Y,n,p,a.ga,a.Y)}0===g&&1==a.k||d.setTransform(1,0,0,1,0,0);1!=a.u&&(d.globalAlpha=f)}}+function Zl(a,b,d,e){var f=0;if(null!==a.ha&&""!==a.e){null===a.p||$l(a,a.p);null===a.n||am(a,a.n);var g=a.ha,h=a.d,k=a.ja;null===k?(h.font=g.font,h.textAlign=g.textAlign,h.textBaseline=g.textBaseline,a.ja={font:g.font,textAlign:g.textAlign,textBaseline:g.textBaseline}):(k.font!=g.font&&(k.font=h.font=g.font),k.textAlign!=g.textAlign&&(k.textAlign=h.textAlign=g.textAlign),k.textBaseline!=g.textBaseline&&(k.textBaseline=h.textBaseline=g.textBaseline));b=pk(b,f,d,e,a.L,a.t);for(g=a.d;f<d;f+=e){h=b[f]++a.Ia;k=b[f+1]+a.Ja;if(0!==a.J||1!=a.l){var n=kj(a.ab,h,k,a.l,a.l,a.J,-h,-k);g.setTransform(n[0],n[1],n[4],n[5],n[12],n[13])}null===a.n||g.strokeText(a.e,h,k);null===a.p||g.fillText(a.e,h,k)}0===a.J&&1==a.l||g.setTransform(1,0,0,1,0,0)}}function bm(a,b,d,e,f,g){var h=a.d;a=pk(b,d,e,f,a.L,a.t);h.moveTo(a[0],a[1]);for(b=2;b<a.length;b+=2)h.lineTo(a[b],a[b+1]);g&&h.lineTo(a[0],a[1]);return e}function cm(a,b,d,e,f){var g=a.d,h,k;h=0;for(k=e.length;h<k;++h)d=bm(a,b,d,e[h],f,!0),g.closePath();return d}+l=Xl.prototype;l.oc=function(a,b){var d=a.toString(),e=this.s[d];m(e)?e.push(b):this.s[d]=[b]};l.pc=function(a){if(pe(this.j,a.N())){if(null!==this.f||null!==this.c){null===this.f||$l(this,this.f);null===this.c||am(this,this.c);var b;b=a.o;b=null===b?null:pk(b,0,b.length,a.H,this.L,this.t);var d=b[2]-b[0],e=b[3]-b[1],d=Math.sqrt(d*d+e*e),e=this.d;e.beginPath();e.arc(b[0],b[1],d,0,2*Math.PI);null===this.f||e.fill();null===this.c||e.stroke()}""!==this.e&&Zl(this,a.Sc(),2,2)}};+l.se=function(a,b){var d=(0,b.e)(a);if(null!=d&&pe(this.j,d.N())){var e=b.c;m(e)||(e=0);this.oc(e,function(a){a.Fa(b.j,b.d);a.mb(b.i);a.Ga(b.f);dm[d.S()].call(a,d,null)})}};l.kd=function(a,b){var d=a.e,e,f;e=0;for(f=d.length;e<f;++e){var g=d[e];dm[g.S()].call(this,g,b)}};l.yb=function(a){var b=a.o;a=a.H;null===this.i||Yl(this,b,b.length);""!==this.e&&Zl(this,b,b.length,a)};l.xb=function(a){var b=a.o;a=a.H;null===this.i||Yl(this,b,b.length);""!==this.e&&Zl(this,b,b.length,a)};+l.Ib=function(a){if(pe(this.j,a.N())){if(null!==this.c){am(this,this.c);var b=this.d,d=a.o;b.beginPath();bm(this,d,0,d.length,a.H,!1);b.stroke()}""!==this.e&&(a=em(a),Zl(this,a,2,2))}};l.qc=function(a){var b=a.N();if(pe(this.j,b)){if(null!==this.c){am(this,this.c);var b=this.d,d=a.o,e=0,f=a.d,g=a.H;b.beginPath();var h,k;h=0;for(k=f.length;h<k;++h)e=bm(this,d,e,f[h],g,!1);b.stroke()}""!==this.e&&(a=fm(a),Zl(this,a,a.length,2))}};+l.Vb=function(a){if(pe(this.j,a.N())){if(null!==this.c||null!==this.f){null===this.f||$l(this,this.f);null===this.c||am(this,this.c);var b=this.d;b.beginPath();cm(this,$k(a),0,a.d,a.H);null===this.f||b.fill();null===this.c||b.stroke()}""!==this.e&&(a=al(a),Zl(this,a,2,2))}};+l.rc=function(a){if(pe(this.j,a.N())){if(null!==this.c||null!==this.f){null===this.f||$l(this,this.f);null===this.c||am(this,this.c);var b=this.d,d=hm(a),e=0,f=a.d,g=a.H,h,k;h=0;for(k=f.length;h<k;++h){var n=f[h];b.beginPath();e=cm(this,d,e,n,g);null===this.f||b.fill();null===this.c||b.stroke()}}""!==this.e&&(a=im(a),Zl(this,a,a.length,2))}};function jm(a){var b=Sa(rb(a.s),Number);db(b);var d,e,f,g,h;d=0;for(e=b.length;d<e;++d)for(f=a.s[b[d].toString()],g=0,h=f.length;g<h;++g)f[g](a)}+function $l(a,b){var d=a.d,e=a.sa;null===e?(d.fillStyle=b.fillStyle,a.sa={fillStyle:b.fillStyle}):e.fillStyle!=b.fillStyle&&(e.fillStyle=d.fillStyle=b.fillStyle)}+function am(a,b){var d=a.d,e=a.ua;null===e?(d.lineCap=b.lineCap,Yf&&d.setLineDash(b.lineDash),d.lineJoin=b.lineJoin,d.lineWidth=b.lineWidth,d.miterLimit=b.miterLimit,d.strokeStyle=b.strokeStyle,a.ua={lineCap:b.lineCap,lineDash:b.lineDash,lineJoin:b.lineJoin,lineWidth:b.lineWidth,miterLimit:b.miterLimit,strokeStyle:b.strokeStyle}):(e.lineCap!=b.lineCap&&(e.lineCap=d.lineCap=b.lineCap),Yf&&!gb(e.lineDash,b.lineDash)&&d.setLineDash(e.lineDash=b.lineDash),e.lineJoin!=b.lineJoin&&(e.lineJoin=d.lineJoin=+b.lineJoin),e.lineWidth!=b.lineWidth&&(e.lineWidth=d.lineWidth=b.lineWidth),e.miterLimit!=b.miterLimit&&(e.miterLimit=d.miterLimit=b.miterLimit),e.strokeStyle!=b.strokeStyle&&(e.strokeStyle=d.strokeStyle=b.strokeStyle))}+l.Fa=function(a,b){if(null===a)this.f=null;else{var d=a.c;this.f={fillStyle:sg(null===d?ql:d)}}if(null===b)this.c=null;else{var d=b.c,e=b.e,f=b.d,g=b.j,h=b.f,k=b.i;this.c={lineCap:m(e)?e:"round",lineDash:null!=f?f:rl,lineJoin:m(g)?g:"round",lineWidth:this.v*(m(h)?h:1),miterLimit:m(k)?k:10,strokeStyle:sg(null===d?sl:d)}}};+l.mb=function(a){if(null===a)this.i=null;else{var b=a.Ab(),d=a.Fb(1),e=a.Gb(),f=a.kb();this.R=b[0];this.V=b[1];this.Y=f[1];this.i=d;this.u=a.s;this.Ha=e[0];this.ia=e[1];this.ma=a.t;this.oa=a.l;this.k=a.n;this.za=a.v;this.ga=f[0]}};+l.Ga=function(a){if(null===a)this.e="";else{var b=a.c;null===b?this.p=null:(b=b.c,this.p={fillStyle:sg(null===b?ql:b)});var d=a.i;if(null===d)this.n=null;else{var b=d.c,e=d.e,f=d.d,g=d.j,h=d.f,d=d.i;this.n={lineCap:m(e)?e:"round",lineDash:null!=f?f:rl,lineJoin:m(g)?g:"round",lineWidth:m(h)?h:1,miterLimit:m(d)?d:10,strokeStyle:sg(null===b?sl:b)}}var b=a.e,e=a.l,f=a.n,g=a.j,h=a.f,d=a.d,k=a.k;a=a.p;this.ha={font:m(b)?b:"10px sans-serif",textAlign:m(k)?k:"center",textBaseline:m(a)?a:"middle"};this.e=+m(d)?d:"";this.Ia=m(e)?this.v*e:0;this.Ja=m(f)?this.v*f:0;this.J=m(g)?g:0;this.l=this.v*(m(h)?h:1)}};var dm={Point:Xl.prototype.yb,LineString:Xl.prototype.Ib,Polygon:Xl.prototype.Vb,MultiPoint:Xl.prototype.xb,MultiLineString:Xl.prototype.qc,MultiPolygon:Xl.prototype.rc,GeometryCollection:Xl.prototype.kd,Circle:Xl.prototype.pc};var km=["Polygon","LineString","Image","Text"];function lm(a,b,d){this.ja=a;this.ga=b;this.e=null;this.j=0;this.resolution=d;this.V=this.R=null;this.f=[];this.coordinates=[];this.sa=Hd();this.c=[];this.ha=[];this.ua=Hd()}+function mm(a,b,d,e,f,g){var h=a.coordinates.length,k=a.ve(),n=[b[d],b[d+1]],p=[NaN,NaN],q=!0,r,s,u;for(r=d+f;r<e;r+=f)p[0]=b[r],p[1]=b[r+1],u=ae(k,p),u!==s?(q&&(a.coordinates[h++]=n[0],a.coordinates[h++]=n[1]),a.coordinates[h++]=p[0],a.coordinates[h++]=p[1],q=!1):1===u?(a.coordinates[h++]=p[0],a.coordinates[h++]=p[1],q=!1):q=!0,n[0]=p[0],n[1]=p[1],s=u;r===d+f&&(a.coordinates[h++]=n[0],a.coordinates[h++]=n[1]);g&&(a.coordinates[h++]=b[d],a.coordinates[h++]=b[d+1]);return h}+function nm(a,b){a.R=[0,b,0];a.f.push(a.R);a.V=[0,b,0];a.c.push(a.V)}+function om(a,b,d,e,f,g,h,k,n){var p;lj(e,a.sa)?p=a.ha:(p=pk(a.coordinates,0,a.coordinates.length,2,e,a.ha),Kd(a.sa,e));e=0;var q=h.length,r=0,s;for(a=a.ua;e<q;){var u=h[e],y,z,A,E;switch(u[0]){case 0:r=u[1];s=ma(r).toString();m(g[s])?e=u[2]:m(n)&&!pe(n,r.W().N())?e=u[2]:++e;break;case 1:b.beginPath();++e;break;case 2:r=u[1];s=p[r];var x=p[r+1],Q=p[r+2]-s,r=p[r+3]-x;b.arc(s,x,Math.sqrt(Q*Q+r*r),0,2*Math.PI,!0);++e;break;case 3:b.closePath();++e;break;case 4:r=u[1];s=u[2];y=u[3];A=u[4]*d;var N=u[5]*+d,L=u[6];z=u[7];var U=u[8],Ca=u[9],x=u[11],Q=u[12],eb=u[13],R=u[14];for(u[10]&&(x+=f);r<s;r+=2){u=p[r]-A;E=p[r+1]-N;eb&&(u=u+.5|0,E=E+.5|0);if(1!=Q||0!==x){var Ma=u+A,sb=E+N;kj(a,Ma,sb,Q,Q,x,-Ma,-sb);b.setTransform(a[0],a[1],a[4],a[5],a[12],a[13])}Ma=b.globalAlpha;1!=z&&(b.globalAlpha=Ma*z);b.drawImage(y,U,Ca,R,L,u,E,R*d,L*d);1!=z&&(b.globalAlpha=Ma);1==Q&&0===x||b.setTransform(1,0,0,1,0,0)}++e;break;case 5:r=u[1];s=u[2];A=u[3];N=u[4]*d;L=u[5]*d;x=u[6];Q=u[7]*d;y=u[8];for(z=u[9];r<s;r+=2){u=p[r]++N;E=p[r+1]+L;if(1!=Q||0!==x)kj(a,u,E,Q,Q,x,-u,-E),b.setTransform(a[0],a[1],a[4],a[5],a[12],a[13]);z&&b.strokeText(A,u,E);y&&b.fillText(A,u,E);1==Q&&0===x||b.setTransform(1,0,0,1,0,0)}++e;break;case 6:if(m(k)&&(r=u[1],r=k(r)))return r;++e;break;case 7:b.fill();++e;break;case 8:r=u[1];s=u[2];b.moveTo(p[r],p[r+1]);for(r+=2;r<s;r+=2)b.lineTo(p[r],p[r+1]);++e;break;case 9:b.fillStyle=u[1];++e;break;case 10:r=m(u[7])?u[7]:!0;s=u[2];b.strokeStyle=u[1];b.lineWidth=r?s*d:s;b.lineCap=u[3];b.lineJoin=u[4];b.miterLimit=+u[5];Yf&&b.setLineDash(u[6]);++e;break;case 11:b.font=u[1];b.textAlign=u[2];b.textBaseline=u[3];++e;break;case 12:b.stroke();++e;break;default:++e}}}lm.prototype.fc=function(a,b,d,e,f){om(this,a,b,d,e,f,this.f,void 0)};function pm(a){var b=a.c;b.reverse();var d,e=b.length,f,g,h=-1;for(d=0;d<e;++d)if(f=b[d],g=f[0],6==g)h=d;else if(0==g){f[2]=d;f=a.c;for(g=d;h<g;){var k=f[h];f[h]=f[g];f[g]=k;++h;--g}h=-1}}+function qm(a,b){a.R[2]=a.f.length;a.R=null;a.V[2]=a.c.length;a.V=null;var d=[6,b];a.f.push(d);a.c.push(d)}lm.prototype.Ob=ca;lm.prototype.ve=function(){return this.ga};function rm(a,b,d){lm.call(this,a,b,d);this.p=this.Y=null;this.L=this.J=this.v=this.t=this.s=this.u=this.n=this.l=this.k=this.i=this.d=void 0}v(rm,lm);+rm.prototype.yb=function(a,b){if(null!==this.p){nm(this,b);var d=a.o,e=this.coordinates.length,d=mm(this,d,0,d.length,a.H,!1);this.f.push([4,e,d,this.p,this.d,this.i,this.k,this.l,this.n,this.u,this.s,this.t,this.v,this.J,this.L]);this.c.push([4,e,d,this.Y,this.d,this.i,this.k,this.l,this.n,this.u,this.s,this.t,this.v,this.J,this.L]);qm(this,b)}};+rm.prototype.xb=function(a,b){if(null!==this.p){nm(this,b);var d=a.o,e=this.coordinates.length,d=mm(this,d,0,d.length,a.H,!1);this.f.push([4,e,d,this.p,this.d,this.i,this.k,this.l,this.n,this.u,this.s,this.t,this.v,this.J,this.L]);this.c.push([4,e,d,this.Y,this.d,this.i,this.k,this.l,this.n,this.u,this.s,this.t,this.v,this.J,this.L]);qm(this,b)}};rm.prototype.Ob=function(){pm(this);this.i=this.d=void 0;this.p=this.Y=null;this.L=this.J=this.t=this.s=this.u=this.n=this.l=this.v=this.k=void 0};+rm.prototype.mb=function(a){var b=a.Ab(),d=a.kb(),e=a.Od(1),f=a.Fb(1),g=a.Gb();this.d=b[0];this.i=b[1];this.Y=e;this.p=f;this.k=d[1];this.l=a.s;this.n=g[0];this.u=g[1];this.s=a.t;this.t=a.l;this.v=a.n;this.J=a.v;this.L=d[0]};function sm(a,b,d){lm.call(this,a,b,d);this.d={Mc:void 0,Hc:void 0,Ic:null,Jc:void 0,Kc:void 0,Lc:void 0,ze:0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(sm,lm);+function tm(a,b,d,e,f){var g=a.coordinates.length;b=mm(a,b,d,e,f,!1);g=[8,g,b];a.f.push(g);a.c.push(g);return e}l=sm.prototype;l.ve=function(){null===this.e&&(this.e=Xd(this.ga),0<this.j&&Wd(this.e,this.resolution*(this.j+1)/2,this.e));return this.e};+function um(a){var b=a.d,d=b.strokeStyle,e=b.lineCap,f=b.lineDash,g=b.lineJoin,h=b.lineWidth,k=b.miterLimit;b.Mc==d&&b.Hc==e&&gb(b.Ic,f)&&b.Jc==g&&b.Kc==h&&b.Lc==k||(b.ze!=a.coordinates.length&&(a.f.push([12]),b.ze=a.coordinates.length),a.f.push([10,d,h,e,g,k,f],[1]),b.Mc=d,b.Hc=e,b.Ic=f,b.Jc=g,b.Kc=h,b.Lc=k)}+l.Ib=function(a,b){var d=this.d,e=d.lineWidth;m(d.strokeStyle)&&m(e)&&(um(this),nm(this,b),this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash],[1]),d=a.o,tm(this,d,0,d.length,a.H),this.c.push([12]),qm(this,b))};+l.qc=function(a,b){var d=this.d,e=d.lineWidth;if(m(d.strokeStyle)&&m(e)){um(this);nm(this,b);this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash],[1]);var d=a.d,e=a.o,f=a.H,g=0,h,k;h=0;for(k=d.length;h<k;++h)g=tm(this,e,g,d[h],f);this.c.push([12]);qm(this,b)}};l.Ob=function(){this.d.ze!=this.coordinates.length&&this.f.push([12]);pm(this);this.d=null};+l.Fa=function(a,b){var d=b.c;this.d.strokeStyle=sg(null===d?sl:d);d=b.e;this.d.lineCap=m(d)?d:"round";d=b.d;this.d.lineDash=null===d?rl:d;d=b.j;this.d.lineJoin=m(d)?d:"round";d=b.f;this.d.lineWidth=m(d)?d:1;d=b.i;this.d.miterLimit=m(d)?d:10;this.d.lineWidth>this.j&&(this.j=this.d.lineWidth,this.e=null)};+function vm(a,b,d){lm.call(this,a,b,d);this.d={ff:void 0,Mc:void 0,Hc:void 0,Ic:null,Jc:void 0,Kc:void 0,Lc:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(vm,lm);+function wm(a,b,d,e,f){var g=a.d,h=[1];a.f.push(h);a.c.push(h);var k,h=0;for(k=e.length;h<k;++h){var n=e[h],p=a.coordinates.length;d=mm(a,b,d,n,f,!0);d=[8,p,d];p=[3];a.f.push(d,p);a.c.push(d,p);d=n}b=[7];a.c.push(b);m(g.fillStyle)&&a.f.push(b);m(g.strokeStyle)&&(g=[12],a.f.push(g),a.c.push(g));return d}l=vm.prototype;+l.pc=function(a,b){var d=this.d,e=d.strokeStyle;if(m(d.fillStyle)||m(e)){xm(this);nm(this,b);this.c.push([9,sg(ql)]);m(d.strokeStyle)&&this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash]);var f=a.o,e=this.coordinates.length;mm(this,f,0,f.length,a.H,!1);f=[1];e=[2,e];this.f.push(f,e);this.c.push(f,e);e=[7];this.c.push(e);m(d.fillStyle)&&this.f.push(e);m(d.strokeStyle)&&(d=[12],this.f.push(d),this.c.push(d));qm(this,b)}};+l.Vb=function(a,b){var d=this.d,e=d.strokeStyle;if(m(d.fillStyle)||m(e))xm(this),nm(this,b),this.c.push([9,sg(ql)]),m(d.strokeStyle)&&this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash]),d=a.d,e=$k(a),wm(this,e,0,d,a.H),qm(this,b)};+l.rc=function(a,b){var d=this.d,e=d.strokeStyle;if(m(d.fillStyle)||m(e)){xm(this);nm(this,b);this.c.push([9,sg(ql)]);m(d.strokeStyle)&&this.c.push([10,d.strokeStyle,d.lineWidth,d.lineCap,d.lineJoin,d.miterLimit,d.lineDash]);var d=a.d,e=hm(a),f=a.H,g=0,h,k;h=0;for(k=d.length;h<k;++h)g=wm(this,e,g,d[h],f);qm(this,b)}};l.Ob=function(){pm(this);this.d=null;var a=this.ja;if(0!==a){var b=this.coordinates,d,e;d=0;for(e=b.length;d<e;++d)b[d]=a*Math.round(b[d]/a)}};+l.ve=function(){null===this.e&&(this.e=Xd(this.ga),0<this.j&&Wd(this.e,this.resolution*(this.j+1)/2,this.e));return this.e};+l.Fa=function(a,b){var d=this.d;if(null===a)d.fillStyle=void 0;else{var e=a.c;d.fillStyle=sg(null===e?ql:e)}null===b?(d.strokeStyle=void 0,d.lineCap=void 0,d.lineDash=null,d.lineJoin=void 0,d.lineWidth=void 0,d.miterLimit=void 0):(e=b.c,d.strokeStyle=sg(null===e?sl:e),e=b.e,d.lineCap=m(e)?e:"round",e=b.d,d.lineDash=null===e?rl:e.slice(),e=b.j,d.lineJoin=m(e)?e:"round",e=b.f,d.lineWidth=m(e)?e:1,e=b.i,d.miterLimit=m(e)?e:10,d.lineWidth>this.j&&(this.j=d.lineWidth,this.e=null))};+function xm(a){var b=a.d,d=b.fillStyle,e=b.strokeStyle,f=b.lineCap,g=b.lineDash,h=b.lineJoin,k=b.lineWidth,n=b.miterLimit;m(d)&&b.ff!=d&&(a.f.push([9,d]),b.ff=b.fillStyle);!m(e)||b.Mc==e&&b.Hc==f&&b.Ic==g&&b.Jc==h&&b.Kc==k&&b.Lc==n||(a.f.push([10,e,k,f,h,n,g]),b.Mc=e,b.Hc=f,b.Ic=g,b.Jc=h,b.Kc=k,b.Lc=n)}function ym(a,b,d){lm.call(this,a,b,d);this.J=this.v=this.t=null;this.p="";this.s=this.u=this.n=this.l=0;this.k=this.i=this.d=null}v(ym,lm);+ym.prototype.zb=function(a,b,d,e,f,g){if(""!==this.p&&null!==this.k&&(null!==this.d||null!==this.i)){if(null!==this.d){f=this.d;var h=this.t;if(null===h||h.fillStyle!=f.fillStyle){var k=[9,f.fillStyle];this.f.push(k);this.c.push(k);null===h?this.t={fillStyle:f.fillStyle}:h.fillStyle=f.fillStyle}}null!==this.i&&(f=this.i,h=this.v,null===h||h.lineCap!=f.lineCap||h.lineDash!=f.lineDash||h.lineJoin!=f.lineJoin||h.lineWidth!=f.lineWidth||h.miterLimit!=f.miterLimit||h.strokeStyle!=f.strokeStyle)&&(k=[10,+f.strokeStyle,f.lineWidth,f.lineCap,f.lineJoin,f.miterLimit,f.lineDash,!1],this.f.push(k),this.c.push(k),null===h?this.v={lineCap:f.lineCap,lineDash:f.lineDash,lineJoin:f.lineJoin,lineWidth:f.lineWidth,miterLimit:f.miterLimit,strokeStyle:f.strokeStyle}:(h.lineCap=f.lineCap,h.lineDash=f.lineDash,h.lineJoin=f.lineJoin,h.lineWidth=f.lineWidth,h.miterLimit=f.miterLimit,h.strokeStyle=f.strokeStyle));f=this.k;h=this.J;if(null===h||h.font!=f.font||h.textAlign!=f.textAlign||h.textBaseline!=f.textBaseline)k=+[11,f.font,f.textAlign,f.textBaseline],this.f.push(k),this.c.push(k),null===h?this.J={font:f.font,textAlign:f.textAlign,textBaseline:f.textBaseline}:(h.font=f.font,h.textAlign=f.textAlign,h.textBaseline=f.textBaseline);nm(this,g);f=this.coordinates.length;a=mm(this,a,b,d,e,!1);a=[5,f,a,this.p,this.l,this.n,this.u,this.s,null!==this.d,null!==this.i];this.f.push(a);this.c.push(a);qm(this,g)}};+ym.prototype.Ga=function(a){if(null===a)this.p="";else{var b=a.c;null===b?this.d=null:(b=b.c,b=sg(null===b?ql:b),null===this.d?this.d={fillStyle:b}:this.d.fillStyle=b);var d=a.i;if(null===d)this.i=null;else{var b=d.c,e=d.e,f=d.d,g=d.j,h=d.f,d=d.i,e=m(e)?e:"round",f=null!=f?f.slice():rl,g=m(g)?g:"round",h=m(h)?h:1,d=m(d)?d:10,b=sg(null===b?sl:b);if(null===this.i)this.i={lineCap:e,lineDash:f,lineJoin:g,lineWidth:h,miterLimit:d,strokeStyle:b};else{var k=this.i;k.lineCap=e;k.lineDash=f;k.lineJoin=g;k.lineWidth=+h;k.miterLimit=d;k.strokeStyle=b}}var n=a.e,b=a.l,e=a.n,f=a.j,h=a.f,d=a.d,g=a.k,k=a.p;a=m(n)?n:"10px sans-serif";g=m(g)?g:"center";k=m(k)?k:"middle";null===this.k?this.k={font:a,textAlign:g,textBaseline:k}:(n=this.k,n.font=a,n.textAlign=g,n.textBaseline=k);this.p=m(d)?d:"";this.l=m(b)?b:0;this.n=m(e)?e:0;this.u=m(f)?f:0;this.s=m(h)?h:1}};function zm(a,b,d,e){this.l=a;this.e=b;this.p=d;this.j=e;this.f={};this.i=Nf(1,1);this.k=Hd()}+function Am(a){for(var b in a.f){var d=a.f[b],e;for(e in d)d[e].Ob()}}zm.prototype.d=function(a,b,d,e,f){var g=this.k;kj(g,.5,.5,1/b,-1/b,-d,-a[0],-a[1]);var h=this.i;h.clearRect(0,0,1,1);var k;m(this.j)&&(k=Sd(),Td(k,a),Wd(k,b*this.j,k));return Bm(this,h,g,d,e,function(a){if(0<h.getImageData(0,0,1,1).data[3]){if(a=f(a))return a;h.clearRect(0,0,1,1)}},k)};+zm.prototype.c=function(a,b){var d=m(a)?a.toString():"0",e=this.f[d];m(e)||(e={},this.f[d]=e);d=e[b];m(d)||(d=new Cm[b](this.l,this.e,this.p),e[b]=d);return d};zm.prototype.pa=function(){return wb(this.f)};+function Dm(a,b,d,e,f,g){var h=Sa(rb(a.f),Number);db(h);var k=a.e,n=k[0],p=k[1],q=k[2],k=k[3],n=[n,p,n,k,q,k,q,p];pk(n,0,8,2,e,n);b.save();b.beginPath();b.moveTo(n[0],n[1]);b.lineTo(n[2],n[3]);b.lineTo(n[4],n[5]);b.lineTo(n[6],n[7]);b.closePath();b.clip();for(var r,s,n=0,p=h.length;n<p;++n)for(r=a.f[h[n].toString()],q=0,k=km.length;q<k;++q)s=r[km[q]],m(s)&&s.fc(b,d,e,f,g);b.restore()}+function Bm(a,b,d,e,f,g,h){var k=Sa(rb(a.f),Number);db(k,function(a,b){return b-a});var n,p,q,r,s;n=0;for(p=k.length;n<p;++n)for(r=a.f[k[n].toString()],q=km.length-1;0<=q;--q)if(s=r[km[q]],m(s)&&(s=om(s,b,1,d,e,f,s.c,g,h)))return s}var Cm={Image:rm,LineString:sm,Polygon:vm,Text:ym};function Em(a){nj.call(this,a);this.v=Hd()}v(Em,nj);+Em.prototype.u=function(a,b,d){Fm(this,"precompose",d,a,void 0);var e=this.Md();if(null!==e){var f=b.extent,g=m(f);if(g){var h=a.pixelRatio,k=je(f),n=ie(f),p=he(f),f=ge(f);mj(a.coordinateToPixelMatrix,k,k);mj(a.coordinateToPixelMatrix,n,n);mj(a.coordinateToPixelMatrix,p,p);mj(a.coordinateToPixelMatrix,f,f);d.save();d.beginPath();d.moveTo(k[0]*h,k[1]*h);d.lineTo(n[0]*h,n[1]*h);d.lineTo(p[0]*h,p[1]*h);d.lineTo(f[0]*h,f[1]*h);d.clip()}h=this.rf();k=d.globalAlpha;d.globalAlpha=b.opacity;0===a.viewState.rotation?+(b=h[13],n=e.width*h[0],p=e.height*h[5],d.drawImage(e,0,0,+e.width,+e.height,Math.round(h[12]),Math.round(b),Math.round(n),Math.round(p))):(d.setTransform(h[0],h[1],h[4],h[5],h[12],h[13]),d.drawImage(e,0,0),d.setTransform(1,0,0,1,0,0));d.globalAlpha=k;g&&d.restore()}Fm(this,"postcompose",d,a,void 0)};function Fm(a,b,d,e,f){var g=a.c;jd(g,b)&&(a=m(f)?f:Gm(a,e),a=new Xl(d,e.pixelRatio,e.extent,a,e.viewState.rotation),g.dispatchEvent(new cl(b,g,a,null,e,d,null)),jm(a))}+function Gm(a,b){var d=b.viewState,e=b.pixelRatio;return kj(a.v,e*b.size[0]/2,e*b.size[1]/2,e/d.resolution,-e/d.resolution,-d.rotation,-d.center[0],-d.center[1])}function Hm(a,b){var d=[0,0];mj(b,a,d);return d}+var Im=function(){var a=null,b=null;return function(d){if(null===a){a=Nf(1,1);b=a.createImageData(1,1);var e=b.data;e[0]=42;e[1]=84;e[2]=126;e[3]=255}var e=a.canvas,f=d[0]<=e.width&&d[1]<=e.height;f||(e.width=d[0],e.height=d[1],e=d[0]-1,d=d[1]-1,a.putImageData(b,e,d),d=a.getImageData(e,d,1,1),f=gb(b.data,d.data));return f}}();function Jm(a,b,d){qk.call(this);this.ug(a,m(b)?b:0,d)}v(Jm,qk);l=Jm.prototype;l.clone=function(){var a=new Jm(null);sk(a,this.c,this.o.slice());a.q();return a};l.bb=function(a,b,d,e){var f=this.o;a-=f[0];var g=b-f[1];b=a*a+g*g;if(b<e){if(0===b)for(e=0;e<this.H;++e)d[e]=f[e];else for(e=this.Kf()/Math.sqrt(b),d[0]=f[0]+e*a,d[1]=f[1]+e*g,e=2;e<this.H;++e)d[e]=f[e];d.length=this.H;return b}return e};l.Nb=function(a,b){var d=this.o,e=a-d[0],d=b-d[1];return e*e+d*d<=Km(this)};+l.Sc=function(){return this.o.slice(0,this.H)};l.hd=function(a){var b=this.o,d=b[this.H]-b[0];return Vd(b[0]-d,b[1]-d,b[0]+d,b[1]+d,a)};l.Kf=function(){return Math.sqrt(Km(this))};function Km(a){var b=a.o[a.H]-a.o[0];a=a.o[a.H+1]-a.o[1];return b*b+a*a}l.S=function(){return"Circle"};l.Pj=function(a){var b=this.H,d=a.slice();d[b]=d[0]+(this.o[b]-this.o[0]);var e;for(e=1;e<b;++e)d[b+e]=a[e];sk(this,this.c,d);this.q()};+l.ug=function(a,b,d){if(null===a)sk(this,"XY",null);else{tk(this,d,a,0);null===this.o&&(this.o=[]);d=this.o;a=Dk(d,a);d[a++]=d[0]+b;var e;b=1;for(e=this.H;b<e;++b)d[a++]=d[b];d.length=a}this.q()};l.Lf=function(a){this.o[this.H]=this.o[0]+a;this.q()};function Lm(a){ok.call(this);this.e=m(a)?a:null;Mm(this)}v(Lm,ok);function Nm(a){var b=[],d,e;d=0;for(e=a.length;d<e;++d)b.push(a[d].clone());return b}function Om(a){var b,d;if(null!==a.e)for(b=0,d=a.e.length;b<d;++b)Vc(a.e[b],"change",a.q,!1,a)}function Mm(a){var b,d;if(null!==a.e)for(b=0,d=a.e.length;b<d;++b)w(a.e[b],"change",a.q,!1,a)}l=Lm.prototype;l.clone=function(){var a=new Lm(null);a.vg(this.e);return a};+l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;var f=this.e,g,h;g=0;for(h=f.length;g<h;++g)e=f[g].bb(a,b,d,e);return e};l.Nb=function(a,b){var d=this.e,e,f;e=0;for(f=d.length;e<f;++e)if(d[e].Nb(a,b))return!0;return!1};l.hd=function(a){Vd(Infinity,Infinity,-Infinity,-Infinity,a);for(var b=this.e,d=0,e=b.length;d<e;++d)de(a,b[d].N());return a};l.qf=function(){return Nm(this.e)};+l.xe=function(a){this.l!=this.f&&(xb(this.i),this.k=0,this.l=this.f);if(0>a||0!==this.k&&a<this.k)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var d=[],e=this.e,f=!1,g,h;g=0;for(h=e.length;g<h;++g){var k=e[g],n=k.xe(a);d.push(n);n!==k&&(f=!0)}if(f)return a=new Lm(null),Om(a),a.e=d,Mm(a),a.q(),this.i[b]=a;this.k=a;return this};l.S=function(){return"GeometryCollection"};l.na=function(a){var b=this.e,d,e;d=0;for(e=b.length;d<e;++d)if(b[d].na(a))return!0;return!1};+l.pa=function(){return 0==this.e.length};l.vg=function(a){a=Nm(a);Om(this);this.e=a;Mm(this);this.q()};l.va=function(a){var b=this.e,d,e;d=0;for(e=b.length;d<e;++d)b[d].va(a);this.q()};l.Na=function(a,b){var d=this.e,e,f;e=0;for(f=d.length;e<f;++e)d[e].Na(a,b);this.q()};l.T=function(){Om(this);Lm.X.T.call(this)};function Pm(a,b,d,e,f){var g=NaN,h=NaN,k=(d-b)/e;if(0!==k)if(1==k)g=a[b],h=a[b+1];else if(2==k)g=.5*a[b]+.5*a[b+e],h=.5*a[b+1]+.5*a[b+e+1];else{var h=a[b],k=a[b+1],n=0,g=[0],p;for(p=b+e;p<d;p+=e){var q=a[p],r=a[p+1],n=n+Math.sqrt((q-h)*(q-h)+(r-k)*(r-k));g.push(n);h=q;k=r}d=.5*n;for(var s,h=fb,k=0,n=g.length;k<n;)p=k+n>>1,q=h(d,g[p]),0<q?k=p+1:(n=p,s=!q);s=s?k:~k;0>s?(d=(d-g[-s-2])/(g[-s-1]-g[-s-2]),b+=(-s-2)*e,g=Xb(a[b],a[b+e],d),h=Xb(a[b+1],a[b+e+1],d)):(g=a[b+s*e],h=a[b+s*e+1])}return null!=f?+(f[0]=g,f[1]=h,f):[g,h]}function Qm(a,b,d,e,f,g){if(d==b)return null;if(f<a[b+e-1])return g?(d=a.slice(b,b+e),d[e-1]=f,d):null;if(a[d-1]<f)return g?(d=a.slice(d-e,d),d[e-1]=f,d):null;if(f==a[b+e-1])return a.slice(b,b+e);b/=e;for(d/=e;b<d;)g=b+d>>1,f<a[(g+1)*e-1]?d=g:b=g+1;d=a[b*e-1];if(f==d)return a.slice((b-1)*e,(b-1)*e+e);g=(f-d)/(a[(b+1)*e-1]-d);d=[];var h;for(h=0;h<e-1;++h)d.push(Xb(a[(b-1)*e+h],a[b*e+h],g));d.push(f);return d}+function Rm(a,b,d,e,f,g){var h=0;if(g)return Qm(a,h,b[b.length-1],d,e,f);if(e<a[d-1])return f?(a=a.slice(0,d),a[d-1]=e,a):null;if(a[a.length-1]<e)return f?(a=a.slice(a.length-d),a[d-1]=e,a):null;f=0;for(g=b.length;f<g;++f){var k=b[f];if(h!=k){if(e<a[h+d-1])break;if(e<=a[k-1])return Qm(a,h,k,d,e,!1);h=k}}return null};function Sm(a,b){qk.call(this);this.d=null;this.s=this.t=this.p=-1;this.$(a,b)}v(Sm,qk);l=Sm.prototype;l.lh=function(a){null===this.o?this.o=a.slice():ab(this.o,a);this.q()};l.clone=function(){var a=new Sm(null);Tm(a,this.c,this.o.slice());return a};l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;this.s!=this.f&&(this.t=Math.sqrt(zk(this.o,0,this.o.length,this.H,0)),this.s=this.f);return Bk(this.o,0,this.o.length,this.H,this.t,!1,a,b,d,e)};+l.yh=function(a,b){return Sk(this.o,0,this.o.length,this.H,a,b)};l.Qj=function(a,b){return"XYM"!=this.c&&"XYZM"!=this.c?null:Qm(this.o,0,this.o.length,this.H,a,m(b)?b:!1)};l.U=function(){return Gk(this.o,0,this.o.length,this.H)};l.Mf=function(){var a=this.o,b=this.H,d=a[0],e=a[1],f=0,g;for(g=0+b;g<this.o.length;g+=b)var h=a[g],k=a[g+1],f=f+Math.sqrt((h-d)*(h-d)+(k-e)*(k-e)),d=h,e=k;return f};function em(a){a.p!=a.f&&(a.d=Pm(a.o,0,a.o.length,a.H,a.d),a.p=a.f);return a.d}+l.sc=function(a){var b=[];b.length=Ik(this.o,0,this.o.length,this.H,a,b,0);a=new Sm(null);Tm(a,"XY",b);return a};l.S=function(){return"LineString"};l.na=function(a){return Tk(this.o,0,this.o.length,this.H,a)};l.$=function(a,b){null===a?Tm(this,"XY",null):(tk(this,b,a,1),null===this.o&&(this.o=[]),this.o.length=Ek(this.o,0,a,this.H),this.q())};function Tm(a,b,d){sk(a,b,d);a.q()};function Um(a,b){qk.call(this);this.d=[];this.p=this.s=-1;this.$(a,b)}v(Um,qk);l=Um.prototype;l.mh=function(a){null===this.o?this.o=a.o.slice():ab(this.o,a.o.slice());this.d.push(this.o.length);this.q()};l.clone=function(){var a=new Um(null);Vm(a,this.c,this.o.slice(),this.d.slice());return a};l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;this.p!=this.f&&(this.s=Math.sqrt(Ak(this.o,0,this.d,this.H,0)),this.p=this.f);return Ck(this.o,0,this.d,this.H,this.s,!1,a,b,d,e)};+l.Sj=function(a,b,d){return"XYM"!=this.c&&"XYZM"!=this.c||0===this.o.length?null:Rm(this.o,this.d,this.H,a,m(b)?b:!1,m(d)?d:!1)};l.U=function(){return Hk(this.o,0,this.d,this.H)};l.Ph=function(a){if(0>a||this.d.length<=a)return null;var b=new Sm(null);Tm(b,this.c,this.o.slice(0===a?0:this.d[a-1],this.d[a]));return b};l.Pc=function(){var a=this.o,b=this.d,d=this.c,e=[],f=0,g,h;g=0;for(h=b.length;g<h;++g){var k=b[g],n=new Sm(null);Tm(n,d,a.slice(f,k));e.push(n);f=k}return e};+function fm(a){var b=[],d=a.o,e=0,f=a.d;a=a.H;var g,h;g=0;for(h=f.length;g<h;++g){var k=f[g],e=Pm(d,e,k,a);ab(b,e);e=k}return b}l.sc=function(a){var b=[],d=[],e=this.o,f=this.d,g=this.H,h=0,k=0,n,p;n=0;for(p=f.length;n<p;++n){var q=f[n],k=Ik(e,h,q,g,a,b,k);d.push(k);h=q}b.length=k;a=new Um(null);Vm(a,"XY",b,d);return a};l.S=function(){return"MultiLineString"};l.na=function(a){a:{var b=this.o,d=this.d,e=this.H,f=0,g,h;g=0;for(h=d.length;g<h;++g){if(Tk(b,f,d[g],e,a)){a=!0;break a}f=d[g]}a=!1}return a};+l.$=function(a,b){if(null===a)Vm(this,"XY",null,this.d);else{tk(this,b,a,2);null===this.o&&(this.o=[]);var d=Fk(this.o,0,a,this.H,this.d);this.o.length=0===d.length?0:d[d.length-1];this.q()}};function Vm(a,b,d,e){sk(a,b,d);a.d=e;a.q()}function Wm(a,b){var d="XY",e=[],f=[],g,h;g=0;for(h=b.length;g<h;++g){var k=b[g];0===g&&(d=k.c);ab(e,k.o);f.push(e.length)}Vm(a,d,e,f)};function Xm(a,b){qk.call(this);this.$(a,b)}v(Xm,qk);l=Xm.prototype;l.oh=function(a){null===this.o?this.o=a.o.slice():ab(this.o,a.o);this.q()};l.clone=function(){var a=new Xm(null);sk(a,this.c,this.o.slice());a.q();return a};l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;var f=this.o,g=this.H,h,k,n;h=0;for(k=f.length;h<k;h+=g)if(n=xk(a,b,f[h],f[h+1]),n<e){e=n;for(n=0;n<g;++n)d[n]=f[h+n];d.length=g}return e};l.U=function(){return Gk(this.o,0,this.o.length,this.H)};+l.Zh=function(a){var b=null===this.o?0:this.o.length/this.H;if(0>a||b<=a)return null;b=new Mk(null);Nk(b,this.c,this.o.slice(a*this.H,(a+1)*this.H));return b};l.Kd=function(){var a=this.o,b=this.c,d=this.H,e=[],f,g;f=0;for(g=a.length;f<g;f+=d){var h=new Mk(null);Nk(h,b,a.slice(f,f+d));e.push(h)}return e};l.S=function(){return"MultiPoint"};l.na=function(a){var b=this.o,d=this.H,e,f,g,h;e=0;for(f=b.length;e<f;e+=d)if(g=b[e],h=b[e+1],$d(a,g,h))return!0;return!1};+l.$=function(a,b){null===a?sk(this,"XY",null):(tk(this,b,a,1),null===this.o&&(this.o=[]),this.o.length=Ek(this.o,0,a,this.H));this.q()};function Ym(a,b){qk.call(this);this.d=[];this.s=-1;this.t=null;this.L=this.v=this.J=-1;this.p=null;this.$(a,b)}v(Ym,qk);l=Ym.prototype;l.ph=function(a){if(null===this.o)this.o=a.o.slice(),a=a.d.slice(),this.d.push();else{var b=this.o.length;ab(this.o,a.o);a=a.d.slice();var d,e;d=0;for(e=a.length;d<e;++d)a[d]+=b}this.d.push(a);this.q()};l.clone=function(){var a=new Ym(null);Zm(a,this.c,this.o.slice(),this.d.slice());return a};+l.bb=function(a,b,d,e){if(e<Yd(this.N(),a,b))return e;if(this.v!=this.f){var f=this.d,g=0,h=0,k,n;k=0;for(n=f.length;k<n;++k)var p=f[k],h=Ak(this.o,g,p,this.H,h),g=p[p.length-1];this.J=Math.sqrt(h);this.v=this.f}f=hm(this);g=this.d;h=this.H;k=this.J;n=0;var p=m(void 0)?void 0:[NaN,NaN],q,r;q=0;for(r=g.length;q<r;++q){var s=g[q];e=Ck(f,n,s,h,k,!0,a,b,d,e,p);n=s[s.length-1]}return e};+l.Nb=function(a,b){var d;a:{d=hm(this);var e=this.d,f=0;if(0!==e.length){var g,h;g=0;for(h=e.length;g<h;++g){var k=e[g];if(Qk(d,f,k,this.H,a,b)){d=!0;break a}f=k[k.length-1]}}d=!1}return d};l.Tj=function(){var a=hm(this),b=this.d,d=0,e=0,f,g;f=0;for(g=b.length;f<g;++f)var h=b[f],e=e+vk(a,d,h,this.H),d=h[h.length-1];return e};+l.U=function(a){var b;m(a)?(b=hm(this).slice(),Yk(b,this.d,this.H,a)):b=this.o;a=b;b=this.d;var d=this.H,e=0,f=m(void 0)?void 0:[],g=0,h,k;h=0;for(k=b.length;h<k;++h){var n=b[h];f[g++]=Hk(a,e,n,d,f[g]);e=n[n.length-1]}f.length=g;return f};+function im(a){if(a.s!=a.f){var b=a.o,d=a.d,e=a.H,f=0,g=[],h,k,n=Sd();h=0;for(k=d.length;h<k;++h){var p=d[h],n=ee(Vd(Infinity,Infinity,-Infinity,-Infinity,void 0),b,f,p[0],e);g.push((n[0]+n[2])/2,(n[1]+n[3])/2);f=p[p.length-1]}b=hm(a);d=a.d;e=a.H;f=0;h=[];k=0;for(n=d.length;k<n;++k)p=d[k],h=Rk(b,f,p,e,g,2*k,h),f=p[p.length-1];a.t=h;a.s=a.f}return a.t}l.Mh=function(){var a=new Xm(null),b=im(this).slice();sk(a,"XY",b);a.q();return a};+function hm(a){if(a.L!=a.f){var b=a.o,d;a:{d=a.d;var e,f;e=0;for(f=d.length;e<f;++e)if(!Wk(b,d[e],a.H,void 0)){d=!1;break a}d=!0}d?a.p=b:(a.p=b.slice(),a.p.length=Yk(a.p,a.d,a.H));a.L=a.f}return a.p}l.sc=function(a){var b=[],d=[],e=this.o,f=this.d,g=this.H;a=Math.sqrt(a);var h=0,k=0,n,p;n=0;for(p=f.length;n<p;++n){var q=f[n],r=[],k=Jk(e,h,q,g,a,b,k,r);d.push(r);h=q[q.length-1]}b.length=k;e=new Ym(null);Zm(e,"XY",b,d);return e};+l.ai=function(a){if(0>a||this.d.length<=a)return null;var b;0===a?b=0:(b=this.d[a-1],b=b[b.length-1]);a=this.d[a].slice();var d=a[a.length-1];if(0!==b){var e,f;e=0;for(f=a.length;e<f;++e)a[e]-=b}e=new F(null);Zk(e,this.c,this.o.slice(b,d),a);return e};l.ud=function(){var a=this.c,b=this.o,d=this.d,e=[],f=0,g,h,k,n;g=0;for(h=d.length;g<h;++g){var p=d[g].slice(),q=p[p.length-1];if(0!==f)for(k=0,n=p.length;k<n;++k)p[k]-=f;k=new F(null);Zk(k,a,b.slice(f,q),p);e.push(k);f=q}return e};l.S=function(){return"MultiPolygon"};+l.na=function(a){a:{var b=hm(this),d=this.d,e=this.H,f=0,g,h;g=0;for(h=d.length;g<h;++g){var k=d[g];if(Uk(b,f,k,e,a)){a=!0;break a}f=k[k.length-1]}a=!1}return a};l.$=function(a,b){if(null===a)Zm(this,"XY",null,this.d);else{tk(this,b,a,3);null===this.o&&(this.o=[]);var d=this.o,e=this.H,f=this.d,g=0,f=m(f)?f:[],h=0,k,n;k=0;for(n=a.length;k<n;++k)g=Fk(d,g,a[k],e,f[h]),f[h++]=g,g=g[g.length-1];f.length=h;0===f.length?this.o.length=0:(d=f[f.length-1],this.o.length=0===d.length?0:d[d.length-1]);this.q()}};+function Zm(a,b,d,e){sk(a,b,d);a.d=e;a.q()}function $m(a,b){var d="XY",e=[],f=[],g,h,k;g=0;for(h=b.length;g<h;++g){var n=b[g];0===g&&(d=n.c);var p=e.length;k=n.d;var q,r;q=0;for(r=k.length;q<r;++q)k[q]+=p;ab(e,n.o);f.push(k)}Zm(a,d,e,f)};function an(a,b){return ma(a)-ma(b)}function bn(a,b){var d=.5*a/b;return d*d}function cn(a,b,d,e,f,g){var h=!1,k,n;k=d.i;null!==k&&(n=k.Tc(),2==n||3==n?k.Re(f,g):(0==n&&k.load(),k.Ae(f,g),h=!0));f=(0,d.e)(b);null!=f&&(e=f.xe(e),(0,dn[e.S()])(a,e,d,b));return h}+var dn={Point:function(a,b,d,e){var f=d.i;if(null!==f){if(2!=f.Tc())return;var g=a.c(d.c,"Image");g.mb(f);g.yb(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),a.zb(b.U(),0,2,2,b,e))},LineString:function(a,b,d,e){var f=d.d;if(null!==f){var g=a.c(d.c,"LineString");g.Fa(null,f);g.Ib(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),a.zb(em(b),0,2,2,b,e))},Polygon:function(a,b,d,e){var f=d.j,g=d.d;if(null!==f||null!==g){var h=a.c(d.c,"Polygon");h.Fa(f,g);h.Vb(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),+a.zb(al(b),0,2,2,b,e))},MultiPoint:function(a,b,d,e){var f=d.i;if(null!==f){if(2!=f.Tc())return;var g=a.c(d.c,"Image");g.mb(f);g.xb(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),d=b.o,a.zb(d,0,d.length,b.H,b,e))},MultiLineString:function(a,b,d,e){var f=d.d;if(null!==f){var g=a.c(d.c,"LineString");g.Fa(null,f);g.qc(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),d=fm(b),a.zb(d,0,d.length,2,b,e))},MultiPolygon:function(a,b,d,e){var f=d.j,g=d.d;if(null!==g||null!==f){var h=a.c(d.c,"Polygon");h.Fa(f,+g);h.rc(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),d=im(b),a.zb(d,0,d.length,2,b,e))},GeometryCollection:function(a,b,d,e){b=b.e;var f,g;f=0;for(g=b.length;f<g;++f)(0,dn[b[f].S()])(a,b[f],d,e)},Circle:function(a,b,d,e){var f=d.j,g=d.d;if(null!==f||null!==g){var h=a.c(d.c,"Polygon");h.Fa(f,g);h.pc(b,e)}f=d.f;null!==f&&(a=a.c(d.c,"Text"),a.Ga(f),a.zb(b.Sc(),0,2,2,b,e))}};function en(a,b,d,e,f){jj.call(this,a,b,d,2,e);this.f=f}v(en,jj);en.prototype.c=function(){return this.f};function fn(a){$g.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.l=m(a.resolutions)?a.resolutions:null}v(fn,$g);function gn(a,b){if(null!==a.l){var d=ac(a.l,b,0);b=a.l[d]}return b}fn.prototype.v=function(a){a=a.target;switch(a.state){case 1:this.dispatchEvent(new hn(jn,a));break;case 2:this.dispatchEvent(new hn(kn,a));break;case 3:this.dispatchEvent(new hn(ln,a))}};function mn(a,b){a.c().src=b}+function hn(a,b){qc.call(this,a);this.image=b}v(hn,qc);var jn="imageloadstart",kn="imageloadend",ln="imageloaderror";function nn(a){fn.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions,state:m(a.state)?a.state:void 0});this.R=a.canvasFunction;this.t=null;this.L=0;this.V=m(a.ratio)?a.ratio:1.5}v(nn,fn);nn.prototype.wc=function(a,b,d,e){b=gn(this,b);var f=this.t;if(null!==f&&this.L==this.f&&f.resolution==b&&f.j==d&&Zd(f.N(),a))return f;a=a.slice();se(a,this.V);e=this.R(a,b,d,[qe(a)/b*d,ne(a)/b*d],e);null===e||(f=new en(a,b,d,this.j,e));this.t=f;this.L=this.f;return f};var on;+(function(){var a={mf:{}};(function(){function b(a,d){if(!(this instanceof b))return new b(a,d);this.me=Math.max(4,a||9);this.af=Math.max(2,Math.ceil(.4*this.me));d&&this.hh(d);this.clear()}function d(a,b){a.bbox=e(a,0,a.children.length,b)}function e(a,b,d,e){for(var g=[Infinity,Infinity,-Infinity,-Infinity],h;b<d;b++)h=a.children[b],f(g,a.Da?e(h):h.bbox);return g}function f(a,b){a[0]=Math.min(a[0],b[0]);a[1]=Math.min(a[1],b[1]);a[2]=Math.max(a[2],b[2]);a[3]=Math.max(a[3],b[3])}function g(a,b){return a.bbox[0]-+b.bbox[0]}function h(a,b){return a.bbox[1]-b.bbox[1]}function k(a){return(a[2]-a[0])*(a[3]-a[1])}function n(a){return a[2]-a[0]+(a[3]-a[1])}function p(a,b){return a[0]<=b[0]&&a[1]<=b[1]&&b[2]<=a[2]&&b[3]<=a[3]}function q(a,b){return b[0]<=a[2]&&b[1]<=a[3]&&b[2]>=a[0]&&b[3]>=a[1]}function r(a,b,d,e,f){for(var g=[b,d],h;g.length;)d=g.pop(),b=g.pop(),d-b<=e||(h=b+Math.ceil((d-b)/e/2)*e,s(a,b,d,h,f),g.push(b,h,h,d))}function s(a,b,d,e,f){for(var g,h,k,n,p;d>b;){600<d-b&&(g=d-b+1,h=e-b+1,k=Math.log(g),+n=.5*Math.exp(2*k/3),p=.5*Math.sqrt(k*n*(g-n)/g)*(0>h-g/2?-1:1),k=Math.max(b,Math.floor(e-h*n/g+p)),h=Math.min(d,Math.floor(e+(g-h)*n/g+p)),s(a,k,h,e,f));g=a[e];h=b;n=d;u(a,b,e);for(0<f(a[d],g)&&u(a,b,d);h<n;){u(a,h,n);h++;for(n--;0>f(a[h],g);)h++;for(;0<f(a[n],g);)n--}0===f(a[b],g)?u(a,b,n):(n++,u(a,n,d));n<=e&&(b=n+1);e<=n&&(d=n-1)}}function u(a,b,d){var e=a[b];a[b]=a[d];a[d]=e}b.prototype={all:function(){return this.Xe(this.data,[])},search:function(a){var b=this.data,d=[],e=this.Pa;if(!q(a,b.bbox))return d;+for(var f=[],g,h,k,n;b;){g=0;for(h=b.children.length;g<h;g++)k=b.children[g],n=b.Da?e(k):k.bbox,q(a,n)&&(b.Da?d.push(k):p(a,n)?this.Xe(k,d):f.push(k));b=f.pop()}return d},load:function(a){if(!a||!a.length)return this;if(a.length<this.af){for(var b=0,d=a.length;b<d;b++)this.xa(a[b]);return this}a=this.Ze(a.slice(),0,a.length-1,0);this.data.children.length?this.data.height===a.height?this.bf(this.data,a):(this.data.height<a.height&&(b=this.data,this.data=a,a=b),this.$e(a,this.data.height-a.height-1,+!0)):this.data=a;return this},xa:function(a){a&&this.$e(a,this.data.height-1);return this},clear:function(){this.data={children:[],height:1,bbox:[Infinity,Infinity,-Infinity,-Infinity],Da:!0};return this},remove:function(a){if(!a)return this;for(var b=this.data,d=this.Pa(a),e=[],f=[],g,h,k,n;b||e.length;){b||(b=e.pop(),h=e[e.length-1],g=f.pop(),n=!0);if(b.Da&&(k=b.children.indexOf(a),-1!==k)){b.children.splice(k,1);e.push(b);this.gh(e);break}n||b.Da||!p(b.bbox,d)?h?(g++,b=h.children[g],n=!1):b=null:+(e.push(b),f.push(g),g=0,h=b,b=b.children[0])}return this},Pa:function(a){return a},pe:function(a,b){return a[0]-b[0]},qe:function(a,b){return a[1]-b[1]},toJSON:function(){return this.data},Xe:function(a,b){for(var d=[];a;)a.Da?b.push.apply(b,a.children):d.push.apply(d,a.children),a=d.pop();return b},Ze:function(a,b,e,f){var g=e-b+1,h=this.me,k;if(g<=h)return k={children:a.slice(b,e+1),height:1,bbox:null,Da:!0},d(k,this.Pa),k;f||(f=Math.ceil(Math.log(g)/Math.log(h)),h=Math.ceil(g/Math.pow(h,f-1)));+k={children:[],height:f,bbox:null};var g=Math.ceil(g/h),h=g*Math.ceil(Math.sqrt(h)),n,p,q;for(r(a,b,e,h,this.pe);b<=e;b+=h)for(p=Math.min(b+h-1,e),r(a,b,p,g,this.qe),n=b;n<=p;n+=g)q=Math.min(n+g-1,p),k.children.push(this.Ze(a,n,q,f-1));d(k,this.Pa);return k},fh:function(a,b,d,e){for(var f,g,h,n,p,q,r,s;;){e.push(b);if(b.Da||e.length-1===d)break;r=s=Infinity;f=0;for(g=b.children.length;f<g;f++){h=b.children[f];p=k(h.bbox);q=a;var u=h.bbox;q=(Math.max(u[2],q[2])-Math.min(u[0],q[0]))*(Math.max(u[3],+q[3])-Math.min(u[1],q[1]))-p;q<s?(s=q,r=p<r?p:r,n=h):q===s&&p<r&&(r=p,n=h)}b=n}return b},$e:function(a,b,d){var e=this.Pa;d=d?a.bbox:e(a);var e=[],g=this.fh(d,this.data,b,e);g.children.push(a);for(f(g.bbox,d);0<=b;)if(e[b].children.length>this.me)this.ih(e,b),b--;else break;this.bh(d,e,b)},ih:function(a,b){var e=a[b],f=e.children.length,g=this.af;this.dh(e,g,f);f={children:e.children.splice(this.eh(e,g,f)),height:e.height};e.Da&&(f.Da=!0);d(e,this.Pa);d(f,this.Pa);b?a[b-1].children.push(f):this.bf(e,+f)},bf:function(a,b){this.data={children:[a,b],height:a.height+1};d(this.data,this.Pa)},eh:function(a,b,d){var f,g,h,n,p,q,r;p=q=Infinity;for(f=b;f<=d-b;f++){g=e(a,0,f,this.Pa);h=e(a,f,d,this.Pa);var s=g,u=h;n=Math.max(s[0],u[0]);var Ma=Math.max(s[1],u[1]),sb=Math.min(s[2],u[2]),s=Math.min(s[3],u[3]);n=Math.max(0,sb-n)*Math.max(0,s-Ma);g=k(g)+k(h);n<p?(p=n,r=f,q=g<q?g:q):n===p&&g<q&&(q=g,r=f)}return r},dh:function(a,b,d){var e=a.Da?this.pe:g,f=a.Da?this.qe:h,k=this.Ye(a,b,d,e);b=this.Ye(a,b,d,f);+k<b&&a.children.sort(e)},Ye:function(a,b,d,g){a.children.sort(g);g=this.Pa;var h=e(a,0,b,g),k=e(a,d-b,d,g),p=n(h)+n(k),q,r;for(q=b;q<d-b;q++)r=a.children[q],f(h,a.Da?g(r):r.bbox),p+=n(h);for(q=d-b-1;q>=b;q--)r=a.children[q],f(k,a.Da?g(r):r.bbox),p+=n(k);return p},bh:function(a,b,d){for(;0<=d;d--)f(b[d].bbox,a)},gh:function(a){for(var b=a.length-1,e;0<=b;b--)0===a[b].children.length?0<b?(e=a[b-1].children,e.splice(e.indexOf(a[b]),1)):this.clear():d(a[b],this.Pa)},hh:function(a){var b=["return a"," - b",+";"];this.pe=new Function("a","b",b.join(a[0]));this.qe=new Function("a","b",b.join(a[1]));this.Pa=new Function("a","return [a"+a.join(", a")+"];")}};"function"===typeof define&&define.Tm?define("rbush",function(){return b}):"undefined"!==typeof a?a.mf=b:"undefined"!==typeof self?self.c=b:window.c=b})();on=a.mf})();function pn(a){this.f=on(a);this.c={}}l=pn.prototype;l.xa=function(a,b){var d=[a[0],a[1],a[2],a[3],b];this.f.xa(d);this.c[ma(b)]=d};l.load=function(a,b){for(var d=Array(b.length),e=0,f=b.length;e<f;e++){var g=a[e],h=b[e],g=[g[0],g[1],g[2],g[3],h];d[e]=g;this.c[ma(h)]=g}this.f.load(d)};l.remove=function(a){a=ma(a);var b=this.c[a];yb(this.c,a);return null!==this.f.remove(b)};l.update=function(a,b){var d=ma(b);ce(this.c[d].slice(0,4),a)||(this.remove(b),this.xa(a,b))};+function qn(a){a=a.f.all();return Sa(a,function(a){return a[4]})}function rn(a,b){var d=a.f.search(b);return Sa(d,function(a){return a[4]})}l.forEach=function(a,b){return sn(qn(this),a,b)};function tn(a,b,d,e){return sn(rn(a,b),d,e)}function sn(a,b,d){for(var e,f=0,g=a.length;f<g&&!(e=b.call(d,a[f]));f++);return e}l.pa=function(){return wb(this.c)};l.clear=function(){this.f.clear();this.c={}};l.N=function(){return this.f.data.bbox};function un(a){a=m(a)?a:{};$g.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,state:m(a.state)?a.state:void 0});this.d=new pn;this.e={};this.k={};this.l={};this.n={};m(a.features)&&this.pb(a.features)}v(un,$g);l=un.prototype;l.Za=function(a){var b=ma(a).toString();vn(this,b,a);var d=a.W();null!=d?(d=d.N(),this.d.xa(d,a)):this.e[b]=a;wn(this,b,a);this.dispatchEvent(new xn("addfeature",a));this.q()};+function vn(a,b,d){a.n[b]=[w(d,"change",a.Uf,!1,a),w(d,"propertychange",a.Uf,!1,a)]}function wn(a,b,d){var e=d.ea;m(e)?a.k[e.toString()]=d:a.l[b]=d}l.Ka=function(a){this.pb(a);this.q()};l.pb=function(a){var b,d,e,f,g=[],h=[];d=0;for(e=a.length;d<e;d++){f=a[d];b=ma(f).toString();vn(this,b,f);var k=f.W();null!=k?(b=k.N(),g.push(b),h.push(f)):this.e[b]=f}this.d.load(g,h);d=0;for(e=a.length;d<e;d++)f=a[d],b=ma(f).toString(),wn(this,b,f),this.dispatchEvent(new xn("addfeature",f))};+l.clear=function(a){if(a){for(var b in this.n)Qa(this.n[b],Wc);this.n={};this.k={};this.l={}}else a=this.qg,this.d.forEach(a,this),mb(this.e,a,this);this.d.clear();this.e={};this.dispatchEvent(new xn("clear"));this.q()};l.eb=function(a,b){return this.d.forEach(a,b)};function yn(a,b,d){a.Aa([b[0],b[1],b[0],b[1]],function(a){if(a.W().Nb(b[0],b[1]))return d.call(void 0,a)})}l.Aa=function(a,b,d){return tn(this.d,a,b,d)};l.Jb=function(a,b,d,e){return this.Aa(a,d,e)};+l.Ra=function(a,b,d){return this.Aa(a,function(e){if(e.W().na(a)&&(e=b.call(d,e)))return e})};l.Ea=function(){var a=qn(this.d);wb(this.e)||ab(a,qb(this.e));return a};l.Ta=function(a){var b=[];yn(this,a,function(a){b.push(a)});return b};l.fb=function(a){var b=a[0],d=a[1],e=null,f=[NaN,NaN],g=Infinity,h=[-Infinity,-Infinity,Infinity,Infinity];tn(this.d,h,function(a){var n=a.W(),p=g;g=n.bb(b,d,f,g);g<p&&(e=a,a=Math.sqrt(g),h[0]=b-a,h[1]=d-a,h[2]=b+a,h[3]=d+a)});return e};l.N=function(){return this.d.N()};+l.Sa=function(a){a=this.k[a.toString()];return m(a)?a:null};l.Uf=function(a){a=a.target;var b=ma(a).toString(),d=a.W();null!=d?(d=d.N(),b in this.e?(delete this.e[b],this.d.xa(d,a)):this.d.update(d,a)):b in this.e||(this.d.remove(a),this.e[b]=a);d=a.ea;m(d)?(d=d.toString(),b in this.l?(delete this.l[b],this.k[d]=a):this.k[d]!==a&&(zn(this,a),this.k[d]=a)):b in this.l||(zn(this,a),this.l[b]=a);this.q();this.dispatchEvent(new xn("changefeature",a))};l.pa=function(){return this.d.pa()&&wb(this.e)};+l.Lb=ca;l.jb=function(a){var b=ma(a).toString();b in this.e?delete this.e[b]:this.d.remove(a);this.qg(a);this.q()};l.qg=function(a){var b=ma(a).toString();Qa(this.n[b],Wc);delete this.n[b];var d=a.ea;m(d)?delete this.k[d.toString()]:delete this.l[b];this.dispatchEvent(new xn("removefeature",a))};function zn(a,b){for(var d in a.k)if(a.k[d]===b){delete a.k[d];break}}function xn(a,b){qc.call(this,a);this.feature=b}v(xn,qc);function An(a){this.c=a.source;this.Y=Hd();this.d=Nf();this.e=[0,0];this.n=null;nn.call(this,{attributions:a.attributions,canvasFunction:ra(this.qh,this),logo:a.logo,projection:a.projection,ratio:a.ratio,resolutions:a.resolutions,state:this.c.u});this.s=null;this.k=void 0;this.Rf(a.style);w(this.c,"change",this.kk,void 0,this)}v(An,nn);l=An.prototype;+l.qh=function(a,b,d,e,f){var g=new zm(.5*b/d,a,b);this.c.Lb(a,b,f);var h=!1;this.c.Jb(a,b,function(a){var e;if(!(e=h)){var f;m(a.c)?f=a.c.call(a,b):m(this.k)&&(f=this.k(a,b));if(null!=f){var q,r=!1;e=0;for(q=f.length;e<q;++e)r=cn(g,a,f[e],bn(b,d),this.jk,this)||r;e=r}else e=!1}h=e},this);Am(g);if(h)return null;this.e[0]!=e[0]||this.e[1]!=e[1]?(this.d.canvas.width=e[0],this.d.canvas.height=e[1],this.e[0]=e[0],this.e[1]=e[1]):this.d.clearRect(0,0,e[0],e[1]);a=Bn(this,ke(a),b,d,e);Dm(g,this.d,d,a,0,+{});this.n=g;return this.d.canvas};l.Nd=function(a,b,d,e,f){if(null!==this.n){var g={};return this.n.d(a,b,0,e,function(a){var b=ma(a).toString();if(!(b in g))return g[b]=!0,f(a)})}};l.gk=function(){return this.c};l.hk=function(){return this.s};l.ik=function(){return this.k};function Bn(a,b,d,e,f){return kj(a.Y,f[0]/2,f[1]/2,e/d,-e/d,0,-b[0],-b[1])}l.jk=function(){this.q()};l.kk=function(){ah(this,this.c.u)};l.Rf=function(a){this.s=m(a)?a:yl;this.k=null===a?void 0:xl(this.s);this.q()};function Cn(a){Em.call(this,a);this.j=null;this.i=Hd();this.d=this.e=null}v(Cn,Em);l=Cn.prototype;l.Ya=function(a,b,d,e){var f=this.c;return f.c().Nd(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};+l.gc=function(a,b,d,e){if(!fa(this.Md()))if(this.c.c()instanceof An){if(a=a.slice(),mj(b.pixelToCoordinateMatrix,a,a),this.Ya(a,b,bd,this))return d.call(e,this.c)}else if(null===this.e&&(this.e=Hd(),Nd(this.i,this.e)),b=Hm(a,this.e),null===this.d&&(this.d=Nf(1,1)),this.d.clearRect(0,0,1,1),this.d.drawImage(this.Md(),b[0],b[1],1,1,0,0,1,1),0<this.d.getImageData(0,0,1,1).data[3])return d.call(e,this.c)};l.Md=function(){return null===this.j?null:this.j.c()};l.rf=function(){return this.i};+l.De=function(a,b){var d=a.pixelRatio,e=a.viewState,f=e.center,g=e.resolution,h=e.rotation,k,n=this.c.c(),p=a.viewHints;k=a.extent;m(b.extent)&&(k=oe(k,b.extent));p[0]||p[1]||re(k)||(e=e.projection,p=n.i,null===p||(e=p),k=n.wc(k,g,d,e),null!==k&&pj(this,k)&&(this.j=k));if(null!==this.j){k=this.j;var e=k.N(),p=k.resolution,q=k.j,g=d*p/(g*q);kj(this.i,d*a.size[0]/2,d*a.size[1]/2,g,g,h,q*(e[0]-f[0])/p,q*(f[1]-e[3])/p);this.e=null;sj(a.attributions,k.i);tj(a,n)}return!0};function Dn(a){Em.call(this,a);this.d=this.i=null;this.l=!1;this.k=null;this.n=Hd();this.j=null;this.t=this.s=NaN;this.p=this.e=null}v(Dn,Em);Dn.prototype.Md=function(){return this.i};Dn.prototype.rf=function(){return this.n};+Dn.prototype.De=function(a,b){var d=a.pixelRatio,e=a.viewState,f=e.projection,g=this.c,h=g.c(),k=qh(h,f),n=h.od(),p=ih(k,e.resolution),q=h.ac(p,a.pixelRatio,f),r=k.ra(p),s=r/(q/k.ta(p)),u=e.center,y;r==e.resolution?(u=vj(u,r,a.size),y=me(u,r,e.rotation,a.size)):y=a.extent;m(b.extent)&&(y=oe(y,b.extent));if(re(y))return!1;var z=fh(k,y,r),A=q*of(z),E=q*(z.f-z.d+1),x,Q;null===this.i?(Q=Nf(A,E),this.i=Q.canvas,this.d=[A,E],this.k=Q,this.l=!Im(this.d)):(x=this.i,Q=this.k,this.d[0]<A||this.d[1]<E||this.t!==+q||this.l&&(this.d[0]>A||this.d[1]>E)?(x.width=A,x.height=E,this.d=[A,E],this.l=!Im(this.d),this.e=null):(A=this.d[0],E=this.d[1],(x=p!=this.s)||(x=this.e,x=!(x.c<=z.c&&z.e<=x.e&&x.d<=z.d&&z.f<=x.f)),x&&(this.e=null)));var N,L;null===this.e?(A/=q,E/=q,N=z.c-Math.floor((A-of(z))/2),L=z.d-Math.floor((E-(z.f-z.d+1))/2),this.s=p,this.t=q,this.e=new kf(N,N+A-1,L,L+E-1),this.p=Array(A*E),E=this.e):(E=this.e,A=of(E));x={};x[p]={};var U=[],Ca=this.jd(h,x),eb=g.ia(),R=Sd(),Ma=new kf(0,0,0,0),sb,$a,Ub;for(L=+z.c;L<=z.e;++L)for(Ub=z.d;Ub<=z.f;++Ub)$a=h.Zb(p,L,Ub,d,f),N=$a.state,2==N||4==N||3==N&&!eb?x[p][jf($a.c)]=$a:(sb=k.ld($a.c,Ca,null,Ma,R),sb||(U.push($a),sb=k.xd($a.c,Ma,R),null===sb||Ca(p+1,sb)));Ca=0;for(sb=U.length;Ca<sb;++Ca)$a=U[Ca],L=q*($a.c[1]-E.c),Ub=q*(E.f-$a.c[2]),Q.clearRect(L,Ub,q,q);U=Sa(rb(x),Number);db(U);var nb=h.R,Mc=je(dh(k,[p,E.c,E.f],R)),sc,Qe,qj,Zh,Xf,gm,Ca=0;for(sb=U.length;Ca<sb;++Ca)if(sc=U[Ca],q=h.ac(sc,d,f),Zh=x[sc],sc==p)for(qj in Zh)$a=Zh[qj],Qe=($a.c[2]-E.d)*A+($a.c[1]-+E.c),this.p[Qe]!=$a&&(L=q*($a.c[1]-E.c),Ub=q*(E.f-$a.c[2]),N=$a.state,4!=N&&(3!=N||eb)&&nb||Q.clearRect(L,Ub,q,q),2==N&&Q.drawImage($a.La(),n,n,q,q,L,Ub,q,q),this.p[Qe]=$a);else for(qj in sc=k.ra(sc)/r,Zh)for($a=Zh[qj],Qe=dh(k,$a.c,R),L=(Qe[0]-Mc[0])/s,Ub=(Mc[1]-Qe[3])/s,gm=sc*q,Xf=sc*q,N=$a.state,4!=N&&nb||Q.clearRect(L,Ub,gm,Xf),2==N&&Q.drawImage($a.La(),n,n,q,q,L,Ub,gm,Xf),$a=eh(k,Qe,p,Ma),N=Math.max($a.c,E.c),Ub=Math.min($a.e,E.e),L=Math.max($a.d,E.d),$a=Math.min($a.f,E.f);N<=Ub;++N)for(Xf=L;Xf<=+$a;++Xf)Qe=(Xf-E.d)*A+(N-E.c),this.p[Qe]=void 0;uj(a.usedTiles,h,p,z);wj(a,h,k,d,f,y,p,g.v());rj(a,h);tj(a,h);kj(this.n,d*a.size[0]/2,d*a.size[1]/2,d*s/e.resolution,d*s/e.resolution,e.rotation,(Mc[0]-u[0])/s,(u[1]-Mc[1])/s);this.j=null;return!0};Dn.prototype.gc=function(a,b,d,e){if(null!==this.k&&(null===this.j&&(this.j=Hd(),Nd(this.n,this.j)),a=Hm(a,this.j),0<this.k.getImageData(a[0],a[1],1,1).data[3]))return d.call(e,this.c)};function En(a){Em.call(this,a);this.e=!1;this.l=-1;this.p=NaN;this.i=Sd();this.d=this.k=null;this.j=Nf()}v(En,Em);+En.prototype.u=function(a,b,d){var e=Gm(this,a);Fm(this,"precompose",d,a,e);var f=this.d;if(null!==f&&!f.pa()){var g;jd(this.c,"render")?(this.j.canvas.width=d.canvas.width,this.j.canvas.height=d.canvas.height,g=this.j):g=d;var h=g.globalAlpha;g.globalAlpha=b.opacity;Dm(f,g,a.pixelRatio,e,a.viewState.rotation,a.skippedFeatureUids);g!=d&&(Fm(this,"render",g,a,e),d.drawImage(g.canvas,0,0));g.globalAlpha=h}Fm(this,"postcompose",d,a,e)};+En.prototype.Ya=function(a,b,d,e){if(null!==this.d){var f=this.c,g={};return this.d.d(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){var b=ma(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};En.prototype.n=function(){oj(this)};+En.prototype.De=function(a){function b(a){var b;m(a.c)?b=a.c.call(a,k):m(d.v)&&(b=(0,d.v)(a,k));if(null!=b){if(null!=b){var e,f,g=!1;e=0;for(f=b.length;e<f;++e)g=cn(q,a,b[e],bn(k,n),this.n,this)||g;a=g}else a=!1;this.e=this.e||a}}var d=this.c,e=d.c();sj(a.attributions,e.j);tj(a,e);if(!this.e&&(!d.Ec&&a.viewHints[0]||a.viewHints[1]))return!0;var f=a.extent,g=a.viewState,h=g.projection,k=g.resolution,n=a.pixelRatio;a=d.f;var p=d.ia,g=d.get("renderOrder");m(g)||(g=an);f=Wd(f,p*k);if(!this.e&&this.p==+k&&this.l==a&&this.k==g&&Zd(this.i,f))return!0;pc(this.d);this.d=null;this.e=!1;var q=new zm(.5*k/n,f,k,d.ia);e.Lb(f,k,h);if(null===g)e.Jb(f,k,b,this);else{var r=[];e.Jb(f,k,function(a){r.push(a)},this);db(r,g);Qa(r,b,this)}Am(q);this.p=k;this.l=a;this.k=g;this.i=f;this.d=q;return!0};function Fn(a,b){Cj.call(this,0,b);this.e=Nf();this.c=this.e.canvas;this.c.style.width="100%";this.c.style.height="100%";this.c.className="ol-unselectable";Hf(a,this.c,0);this.f=!0;this.j=Hd()}v(Fn,Cj);Fn.prototype.re=function(a){return a instanceof H?new Cn(a):a instanceof I?new Dn(a):a instanceof J?new En(a):null};+function Gn(a,b,d){var e=a.k,f=a.e;if(jd(e,b)){var g=d.extent,h=d.pixelRatio,k=d.viewState,n=k.resolution,p=k.rotation;kj(a.j,a.c.width/2,a.c.height/2,h/n,-h/n,-p,-k.center[0],-k.center[1]);k=new zm(.5*n/h,g,n);g=new Xl(f,h,g,a.j,p);e.dispatchEvent(new cl(b,e,g,k,d,f,null));Am(k);k.pa()||Dm(k,f,h,a.j,p,{});jm(g);a.d=k}}Fn.prototype.S=function(){return"canvas"};+Fn.prototype.be=function(a){if(null===a)this.f&&(Mg(this.c,!1),this.f=!1);else{var b=this.e,d=a.size[0]*a.pixelRatio,e=a.size[1]*a.pixelRatio;this.c.width!=d||this.c.height!=e?(this.c.width=d,this.c.height=e):b.clearRect(0,0,this.c.width,this.c.height);Dj(a);Gn(this,"precompose",a);var d=a.layerStatesArray,e=a.viewState.resolution,f,g,h,k;f=0;for(g=d.length;f<g;++f)k=d[f],h=k.layer,h=Fj(this,h),ij(k,e)&&"ready"==k.zc&&h.De(a,k)&&h.u(a,k,b);Gn(this,"postcompose",a);this.f||(Mg(this.c,!0),this.f=!0);+Gj(this,a);a.postRenderFunctions.push(Ej)}};function Hn(a,b){nj.call(this,a);this.target=b}v(Hn,nj);Hn.prototype.j=ca;Hn.prototype.p=ca;function In(a){var b=Ef("DIV");b.style.position="absolute";Hn.call(this,a,b);this.d=null;this.e=Jd()}v(In,Hn);In.prototype.Ya=function(a,b,d,e){var f=this.c;return f.c().Nd(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};In.prototype.j=function(){Gf(this.target);this.d=null};+In.prototype.i=function(a,b){var d=a.viewState,e=d.center,f=d.resolution,g=d.rotation,h=this.d,k=this.c.c(),n=a.viewHints,p=a.extent;m(b.extent)&&(p=oe(p,b.extent));n[0]||n[1]||re(p)||(d=d.projection,n=k.i,null===n||(d=n),p=k.wc(p,f,a.pixelRatio,d),null===p||pj(this,p)&&(h=p));null!==h&&(d=h.N(),n=h.resolution,p=Hd(),kj(p,a.size[0]/2,a.size[1]/2,n/f,n/f,g,(d[0]-e[0])/n,(e[1]-d[3])/n),h!=this.d&&(e=h.c(this),e.style.maxWidth="none",e.style.position="absolute",Gf(this.target),this.target.appendChild(e),+this.d=h),lj(p,this.e)||(Rf(this.target,p),Kd(this.e,p)),sj(a.attributions,h.i),tj(a,k));return!0};function Jn(a){var b=Ef("DIV");b.style.position="absolute";Hn.call(this,a,b);this.e=!0;this.l=1;this.k=0;this.d={}}v(Jn,Hn);Jn.prototype.j=function(){Gf(this.target);this.k=0};+Jn.prototype.i=function(a,b){if(!b.visible)return this.e&&(Mg(this.target,!1),this.e=!1),!0;var d=a.pixelRatio,e=a.viewState,f=e.projection,g=this.c,h=g.c(),k=qh(h,f),n=h.od(),p=ih(k,e.resolution),q=k.ra(p),r=e.center,s;q==e.resolution?(r=vj(r,q,a.size),s=me(r,q,e.rotation,a.size)):s=a.extent;m(b.extent)&&(s=oe(s,b.extent));var q=fh(k,s,q),u={};u[p]={};var y=this.jd(h,u),z=g.ia(),A=Sd(),E=new kf(0,0,0,0),x,Q,N,L;for(N=q.c;N<=q.e;++N)for(L=q.d;L<=q.f;++L)x=h.Zb(p,N,L,d,f),Q=x.state,2==Q?u[p][jf(x.c)]=+x:4==Q||3==Q&&!z||(Q=k.ld(x.c,y,null,E,A),Q||(x=k.xd(x.c,E,A),null===x||y(p+1,x)));var U;if(this.k!=h.f){for(U in this.d)z=this.d[+U],If(z.target);this.d={};this.k=h.f}A=Sa(rb(u),Number);db(A);var y={},Ca;N=0;for(L=A.length;N<L;++N){U=A[N];U in this.d?z=this.d[U]:(z=k.Rc(r,U),z=new Kn(k,z),y[U]=!0,this.d[U]=z);U=u[U];for(Ca in U){x=z;Q=U[Ca];var eb=n,R=Q.c,Ma=R[0],sb=R[1],$a=R[2],R=jf(R);if(!(R in x.f)){var Ma=x.e.ta(Ma),Ub=Q.La(x),nb=Ub.style;nb.maxWidth="none";var Mc=void 0,sc=void 0;0<eb?(Mc=Ef("DIV"),+sc=Mc.style,sc.overflow="hidden",sc.width=Ma+"px",sc.height=Ma+"px",nb.position="absolute",nb.left=-eb+"px",nb.top=-eb+"px",nb.width=Ma+2*eb+"px",nb.height=Ma+2*eb+"px",Mc.appendChild(Ub)):(nb.width=Ma+"px",nb.height=Ma+"px",Mc=Ub,sc=nb);sc.position="absolute";sc.left=(sb-x.d[1])*Ma+"px";sc.top=(x.d[2]-$a)*Ma+"px";null===x.c&&(x.c=document.createDocumentFragment());x.c.appendChild(Mc);x.f[R]=Q}}null!==z.c&&(z.target.appendChild(z.c),z.c=null)}n=Sa(rb(this.d),Number);db(n);N=Hd();Ca=0;for(A=n.length;Ca<+A;++Ca)if(U=n[Ca],z=this.d[U],U in u)if(x=z.k,L=z.i,kj(N,a.size[0]/2,a.size[1]/2,x/e.resolution,x/e.resolution,e.rotation,(L[0]-r[0])/x,(r[1]-L[1])/x),L=z,x=N,lj(x,L.j)||(Rf(L.target,x),Kd(L.j,x)),U in y){for(--U;0<=U;--U)if(U in this.d){L=this.d[U].target;L.parentNode&&L.parentNode.insertBefore(z.target,L.nextSibling);break}0>U&&Hf(this.target,z.target,0)}else{if(!a.viewHints[0]&&!a.viewHints[1]){Q=eh(z.e,s,z.d[0],E);U=[];x=L=void 0;for(x in z.f)L=z.f[x],Q.contains(L.c)||U.push(L);eb=Q=void 0;Q=+0;for(eb=U.length;Q<eb;++Q)L=U[Q],x=jf(L.c),If(L.La(z)),delete z.f[x]}}else If(z.target),delete this.d[U];b.opacity!=this.l&&(this.l=this.target.style.opacity=b.opacity);b.visible&&!this.e&&(Mg(this.target,!0),this.e=!0);uj(a.usedTiles,h,p,q);wj(a,h,k,d,f,s,p,g.v());rj(a,h);tj(a,h);return!0};+function Kn(a,b){this.target=Ef("DIV");this.target.style.position="absolute";this.target.style.width="100%";this.target.style.height="100%";this.e=a;this.d=b;this.i=je(dh(a,b));this.k=a.ra(b[0]);this.f={};this.c=null;this.j=Jd()};function Ln(a){this.k=Nf();var b=this.k.canvas;b.style.maxWidth="none";b.style.position="absolute";Hn.call(this,a,b);this.e=!1;this.s=-1;this.u=NaN;this.l=Sd();this.d=this.n=null;this.v=Hd();this.t=Hd()}v(Ln,Hn);+Ln.prototype.p=function(a,b){var d=a.viewState,e=d.center,f=d.rotation,g=d.resolution,d=a.pixelRatio,h=a.size[0],k=a.size[1],n=h*d,p=k*d,e=kj(this.v,d*h/2,d*k/2,d/g,-d/g,-f,-e[0],-e[1]),g=this.k;g.canvas.width=n;g.canvas.height=p;h=kj(this.t,0,0,1/d,1/d,0,-(n-h)/2*d,-(p-k)/2*d);Rf(g.canvas,h);Mn(this,"precompose",a,e);h=this.d;null===h||h.pa()||(g.globalAlpha=b.opacity,Dm(h,g,d,e,f,a.skippedFeatureUids),Mn(this,"render",a,e));Mn(this,"postcompose",a,e)};+function Mn(a,b,d,e){var f=a.k;a=a.c;jd(a,b)&&(e=new Xl(f,d.pixelRatio,d.extent,e,d.viewState.rotation),a.dispatchEvent(new cl(b,a,e,null,d,f,null)),jm(e))}Ln.prototype.Ya=function(a,b,d,e){if(null!==this.d){var f=this.c,g={};return this.d.d(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){var b=ma(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};Ln.prototype.J=function(){oj(this)};+Ln.prototype.i=function(a){function b(a){var b;m(a.c)?b=a.c.call(a,k):m(d.v)&&(b=(0,d.v)(a,k));if(null!=b){if(null!=b){var e,f,g=!1;e=0;for(f=b.length;e<f;++e)g=cn(q,a,b[e],bn(k,n),this.J,this)||g;a=g}else a=!1;this.e=this.e||a}}var d=this.c,e=d.c();sj(a.attributions,e.j);tj(a,e);if(!this.e&&(!d.Ec&&a.viewHints[0]||a.viewHints[1]))return!0;var f=a.extent,g=a.viewState,h=g.projection,k=g.resolution,n=a.pixelRatio;a=d.f;var p=d.ia,g=d.get("renderOrder");m(g)||(g=an);f=Wd(f,p*k);if(!this.e&&this.u==+k&&this.s==a&&this.n==g&&Zd(this.l,f))return!0;pc(this.d);this.d=null;this.e=!1;var q=new zm(.5*k/n,f,k,d.ia);e.Lb(f,k,h);if(null===g)e.Jb(f,k,b,this);else{var r=[];e.Jb(f,k,function(a){r.push(a)},this);db(r,g);Qa(r,b,this)}Am(q);this.u=k;this.s=a;this.n=g;this.l=f;this.d=q;return!0};function Nn(a,b){Cj.call(this,0,b);this.f=null;this.f=Nf();var d=this.f.canvas;d.style.position="absolute";d.style.width="100%";d.style.height="100%";d.className="ol-unselectable";Hf(a,d,0);this.j=Hd();this.c=Ef("DIV");this.c.className="ol-unselectable";d=this.c.style;d.position="absolute";d.width="100%";d.height="100%";w(this.c,"touchstart",tc);Hf(a,this.c,0);this.e=!0}v(Nn,Cj);Nn.prototype.T=function(){If(this.c);Nn.X.T.call(this)};+Nn.prototype.re=function(a){if(a instanceof H)a=new In(a);else if(a instanceof I)a=new Jn(a);else if(a instanceof J)a=new Ln(a);else return null;return a};+function On(a,b,d){var e=a.k;if(jd(e,b)){var f=d.extent,g=d.pixelRatio,h=d.viewState,k=h.resolution,n=h.rotation,p=a.f,q=p.canvas;kj(a.j,q.width/2,q.height/2,g/h.resolution,-g/h.resolution,-h.rotation,-h.center[0],-h.center[1]);h=new Xl(p,g,f,a.j,n);f=new zm(.5*k/g,f,k);e.dispatchEvent(new cl(b,e,h,f,d,p,null));Am(f);f.pa()||Dm(f,p,g,a.j,n,{});jm(h);a.d=f}}Nn.prototype.S=function(){return"dom"};+Nn.prototype.be=function(a){if(null===a)this.e&&(Mg(this.c,!1),this.e=!1);else{var b;b=function(a,b){Hf(this.c,a,b)};var d=this.k;if(jd(d,"precompose")||jd(d,"postcompose")){var d=this.f.canvas,e=a.pixelRatio;d.width=a.size[0]*e;d.height=a.size[1]*e}On(this,"precompose",a);var d=a.layerStatesArray,f,g,h,e=0;for(f=d.length;e<f;++e)h=d[e],g=h.layer,g=Fj(this,g),b.call(this,g.target,e),"ready"==h.zc?g.i(a,h)&&g.p(a,h):g.j();b=a.layerStates;for(var k in this.i)k in b||(g=this.i[k],If(g.target));this.e||+(Mg(this.c,!0),this.e=!0);Dj(a);Gj(this,a);a.postRenderFunctions.push(Ej);On(this,"postcompose",a)}};function Pn(a){this.c=a}function Qn(a){this.c=a}v(Qn,Pn);Qn.prototype.S=function(){return 35632};function Rn(a){this.c=a}v(Rn,Pn);Rn.prototype.S=function(){return 35633};function Sn(){this.c="precision mediump float;varying vec2 a;varying float b;uniform mat4 k;uniform float l;uniform sampler2D m;void main(void){vec4 texColor=texture2D(m,a);float alpha=texColor.a*b*l;if(alpha==0.0){discard;}gl_FragColor.a=alpha;gl_FragColor.rgb=(k*vec4(texColor.rgb,1.)).rgb;}"}v(Sn,Qn);da(Sn);+function Tn(){this.c="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.,0.);gl_Position=h*vec4(c,0.,1.)+offsets;a=d;b=f;}"}v(Tn,Rn);da(Tn);+function Un(a,b){this.n=a.getUniformLocation(b,"k");this.p=a.getUniformLocation(b,"j");this.l=a.getUniformLocation(b,"i");this.i=a.getUniformLocation(b,"l");this.k=a.getUniformLocation(b,"h");this.c=a.getAttribLocation(b,"e");this.f=a.getAttribLocation(b,"f");this.e=a.getAttribLocation(b,"c");this.d=a.getAttribLocation(b,"g");this.j=a.getAttribLocation(b,"d")};function Vn(){this.c="precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}v(Vn,Qn);da(Vn);+function Wn(){this.c="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.,0.);gl_Position=h*vec4(c,0.,1.)+offsets;a=d;b=f;}"}v(Wn,Rn);da(Wn);+function Xn(a,b){this.p=a.getUniformLocation(b,"j");this.l=a.getUniformLocation(b,"i");this.i=a.getUniformLocation(b,"k");this.k=a.getUniformLocation(b,"h");this.c=a.getAttribLocation(b,"e");this.f=a.getAttribLocation(b,"f");this.e=a.getAttribLocation(b,"c");this.d=a.getAttribLocation(b,"g");this.j=a.getAttribLocation(b,"d")};function Yn(a){this.c=m(a)?a:[];this.f=m(void 0)?void 0:35044};function Zn(a,b){this.n=a;this.c=b;this.f={};this.i={};this.j={};this.p=this.l=this.e=this.k=null;(this.d=Wa(va,"OES_element_index_uint"))&&b.getExtension("OES_element_index_uint");w(this.n,"webglcontextlost",this.gl,!1,this);w(this.n,"webglcontextrestored",this.hl,!1,this)}+function $n(a,b,d){var e=a.c,f=d.c,g=ma(d);if(g in a.f)e.bindBuffer(b,a.f[g].buffer);else{var h=e.createBuffer();e.bindBuffer(b,h);var k;34962==b?k=new Float32Array(f):34963==b&&(k=a.d?new Uint32Array(f):new Uint16Array(f));e.bufferData(b,k,d.f);a.f[g]={d:d,buffer:h}}}function ao(a,b){var d=a.c,e=ma(b),f=a.f[e];d.isContextLost()||d.deleteBuffer(f.buffer);delete a.f[e]}l=Zn.prototype;+l.T=function(){var a=this.c;a.isContextLost()||(mb(this.f,function(b){a.deleteBuffer(b.buffer)}),mb(this.j,function(b){a.deleteProgram(b)}),mb(this.i,function(b){a.deleteShader(b)}),a.deleteFramebuffer(this.e),a.deleteRenderbuffer(this.p),a.deleteTexture(this.l))};l.fl=function(){return this.c};+l.we=function(){if(null===this.e){var a=this.c,b=a.createFramebuffer();a.bindFramebuffer(a.FRAMEBUFFER,b);var d=bo(a,1,1),e=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,e);a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_COMPONENT16,1,1);a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,d,0);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,e);a.bindTexture(a.TEXTURE_2D,null);a.bindRenderbuffer(a.RENDERBUFFER,null);a.bindFramebuffer(a.FRAMEBUFFER,+null);this.e=b;this.l=d;this.p=e}return this.e};function co(a,b){var d=ma(b);if(d in a.i)return a.i[d];var e=a.c,f=e.createShader(b.S());e.shaderSource(f,b.c);e.compileShader(f);return a.i[d]=f}function eo(a,b,d){var e=ma(b)+"/"+ma(d);if(e in a.j)return a.j[e];var f=a.c,g=f.createProgram();f.attachShader(g,co(a,b));f.attachShader(g,co(a,d));f.linkProgram(g);return a.j[e]=g}l.gl=function(){xb(this.f);xb(this.i);xb(this.j);this.p=this.l=this.e=this.k=null};l.hl=function(){};+l.Vd=function(a){if(a==this.k)return!1;this.c.useProgram(a);this.k=a;return!0};function fo(a,b,d){var e=a.createTexture();a.bindTexture(a.TEXTURE_2D,e);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);m(b)&&a.texParameteri(3553,10242,b);m(d)&&a.texParameteri(3553,10243,d);return e}function bo(a,b,d){var e=fo(a,void 0,void 0);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,b,d,0,a.RGBA,a.UNSIGNED_BYTE,null);return e}+function go(a,b){var d=fo(a,33071,33071);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);return d};function ho(a,b){this.v=this.t=void 0;this.Ia=new ug;this.l=ke(b);this.s=[];this.i=[];this.R=void 0;this.j=[];this.e=[];this.Y=this.V=void 0;this.f=[];this.L=this.J=this.p=null;this.ga=void 0;this.oa=Jd();this.za=Jd();this.sa=this.ha=void 0;this.Ja=Jd();this.Ha=this.ja=this.ua=void 0;this.ma=[];this.k=[];this.c=[];this.u=null;this.d=[];this.n=[];this.ia=void 0}+function io(a,b){var d=a.u,e=a.p,f=a.ma,g=a.k,h=b.c;return function(){if(!h.isContextLost()){var a,n;a=0;for(n=f.length;a<n;++a)h.deleteTexture(f[a]);a=0;for(n=g.length;a<n;++a)h.deleteTexture(g[a])}ao(b,d);ao(b,e)}}+function jo(a,b,d,e){var f=a.t,g=a.v,h=a.R,k=a.V,n=a.Y,p=a.ga,q=a.ha,r=a.sa,s=a.ua?1:0,u=a.ja,y=a.Ha,z=a.ia,A=Math.cos(u),u=Math.sin(u),E=a.f.length,x=a.c.length,Q,N,L,U,Ca,eb;for(Q=0;Q<d;Q+=e)Ca=b[Q]-a.l[0],eb=b[Q+1]-a.l[1],N=x/8,L=-y*f,U=-y*(h-g),a.c[x++]=Ca,a.c[x++]=eb,a.c[x++]=L*A-U*u,a.c[x++]=L*u+U*A,a.c[x++]=q/n,a.c[x++]=(r+h)/k,a.c[x++]=p,a.c[x++]=s,L=y*(z-f),U=-y*(h-g),a.c[x++]=Ca,a.c[x++]=eb,a.c[x++]=L*A-U*u,a.c[x++]=L*u+U*A,a.c[x++]=(q+z)/n,a.c[x++]=(r+h)/k,a.c[x++]=p,a.c[x++]=s,L=y*(z-+f),U=y*g,a.c[x++]=Ca,a.c[x++]=eb,a.c[x++]=L*A-U*u,a.c[x++]=L*u+U*A,a.c[x++]=(q+z)/n,a.c[x++]=r/k,a.c[x++]=p,a.c[x++]=s,L=-y*f,U=y*g,a.c[x++]=Ca,a.c[x++]=eb,a.c[x++]=L*A-U*u,a.c[x++]=L*u+U*A,a.c[x++]=q/n,a.c[x++]=r/k,a.c[x++]=p,a.c[x++]=s,a.f[E++]=N,a.f[E++]=N+1,a.f[E++]=N+2,a.f[E++]=N,a.f[E++]=N+2,a.f[E++]=N+3}l=ho.prototype;l.xb=function(a,b){this.d.push(this.f.length);this.n.push(b);var d=a.o;jo(this,d,d.length,a.H)};+l.yb=function(a,b){this.d.push(this.f.length);this.n.push(b);var d=a.o;jo(this,d,d.length,a.H)};l.Ob=function(a){var b=a.c;this.s.push(this.f.length);this.i.push(this.f.length);this.u=new Yn(this.c);$n(a,34962,this.u);this.p=new Yn(this.f);$n(a,34963,this.p);a={};ko(this.ma,this.j,a,b);ko(this.k,this.e,a,b);this.R=this.v=this.t=void 0;this.e=this.j=null;this.Y=this.V=void 0;this.f=null;this.Ha=this.ja=this.ua=this.sa=this.ha=this.ga=void 0;this.c=null;this.ia=void 0};+function ko(a,b,d,e){var f,g,h,k=b.length;for(h=0;h<k;++h)f=b[h],g=ma(f).toString(),g in d?f=d[g]:(f=go(e,f),d[g]=f),a[h]=f}+l.fc=function(a,b,d,e,f,g,h,k,n,p,q,r,s,u,y){g=a.c;$n(a,34962,this.u);$n(a,34963,this.p);var z=k||1!=n||p||1!=q,A,E;z?(A=Sn.Ua(),E=Tn.Ua()):(A=Vn.Ua(),E=Wn.Ua());E=eo(a,A,E);z?null===this.J?this.J=A=new Un(g,E):A=this.J:null===this.L?this.L=A=new Xn(g,E):A=this.L;a.Vd(E);g.enableVertexAttribArray(A.e);g.vertexAttribPointer(A.e,2,5126,!1,32,0);g.enableVertexAttribArray(A.c);g.vertexAttribPointer(A.c,2,5126,!1,32,8);g.enableVertexAttribArray(A.j);g.vertexAttribPointer(A.j,2,5126,!1,32,16);g.enableVertexAttribArray(A.f);+g.vertexAttribPointer(A.f,1,5126,!1,32,24);g.enableVertexAttribArray(A.d);g.vertexAttribPointer(A.d,1,5126,!1,32,28);E=this.Ja;kj(E,0,0,2/(d*f[0]),2/(d*f[1]),-e,-(b[0]-this.l[0]),-(b[1]-this.l[1]));b=this.za;d=2/f[0];f=2/f[1];Ld(b);b[0]=d;b[5]=f;b[10]=1;b[15]=1;f=this.oa;Ld(f);0!==e&&Qd(f,-e);g.uniformMatrix4fv(A.k,!1,E);g.uniformMatrix4fv(A.l,!1,b);g.uniformMatrix4fv(A.p,!1,f);g.uniform1f(A.i,h);z&&g.uniformMatrix4fv(A.n,!1,vg(this.Ia,k,n,p,q));var x;if(m(s)){if(u)a:{e=a.d?5125:5123;a=a.d?4:2;p=+this.d.length-1;for(h=this.k.length-1;0<=h;--h)for(g.bindTexture(3553,this.k[h]),k=0<h?this.i[h-1]:0,q=this.i[h];0<=p&&this.d[p]>=k;){n=this.d[p];u=this.n[p];x=ma(u).toString();if(!m(r[x])&&(!m(y)||pe(y,u.W().N()))&&(g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),g.drawElements(4,q-n,e,n*a),q=s(u))){r=q;break a}q=n;p--}r=void 0}else g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),lo(this,g,a,r,this.k,this.i),r=(r=s(null))?r:void 0;x=r}else lo(this,g,a,r,this.ma,this.s);g.disableVertexAttribArray(A.e);+g.disableVertexAttribArray(A.c);g.disableVertexAttribArray(A.j);g.disableVertexAttribArray(A.f);g.disableVertexAttribArray(A.d);return x};+function lo(a,b,d,e,f,g){var h=d.d?5125:5123;d=d.d?4:2;if(wb(e)){var k;a=0;e=f.length;for(k=0;a<e;++a){b.bindTexture(3553,f[a]);var n=g[a];b.drawElements(4,n-k,h,k*d);k=n}}else{k=0;var p,n=0;for(p=f.length;n<p;++n){b.bindTexture(3553,f[n]);for(var q=0<n?g[n-1]:0,r=g[n],s=q;k<a.d.length&&a.d[k]<=r;){var u=ma(a.n[k]).toString();m(e[u])?(s!==q&&b.drawElements(4,q-s,h,s*d),q=s=k===a.d.length-1?r:a.d[k+1]):q=k===a.d.length-1?r:a.d[k+1];k++}s!==q&&b.drawElements(4,q-s,h,s*d)}}}+l.mb=function(a){var b=a.Ab(),d=a.Fb(1),e=a.pd(),f=a.Od(1),g=a.s,h=a.Gb(),k=a.t,n=a.l,p=a.kb();a=a.n;var q;0===this.j.length?this.j.push(d):(q=this.j[this.j.length-1],ma(q)!=ma(d)&&(this.s.push(this.f.length),this.j.push(d)));0===this.e.length?this.e.push(f):(q=this.e[this.e.length-1],ma(q)!=ma(f)&&(this.i.push(this.f.length),this.e.push(f)));this.t=b[0];this.v=b[1];this.R=p[1];this.V=e[1];this.Y=e[0];this.ga=g;this.ha=h[0];this.sa=h[1];this.ja=n;this.ua=k;this.Ha=a;this.ia=p[0]};+function mo(a,b,d){this.j=b;this.i=a;this.e=d;this.f={}}function no(a,b){var d=[],e;for(e in a.f)d.push(io(a.f[e],b));return fd.apply(null,d)}function oo(a,b){for(var d in a.f)a.f[d].Ob(b)}mo.prototype.c=function(a,b){var d=this.f[b];m(d)||(d=new po[b](this.i,this.j),this.f[b]=d);return d};mo.prototype.pa=function(){return wb(this.f)};function qo(a,b,d,e,f,g,h,k,n,p,q,r,s,u,y){var z=ro,A,E;for(A=km.length-1;0<=A;--A)if(E=a.f[km[A]],m(E)&&(E=E.fc(b,d,e,f,z,g,h,k,n,p,q,r,s,u,y)))return E}+mo.prototype.d=function(a,b,d,e,f,g,h,k,n,p,q,r,s,u){var y=b.c;y.bindFramebuffer(y.FRAMEBUFFER,b.we());var z;m(this.e)&&(z=Wd(be(a),e*this.e));return qo(this,b,a,e,f,h,k,n,p,q,r,s,function(a){var b=new Uint8Array(4);y.readPixels(0,0,1,1,y.RGBA,y.UNSIGNED_BYTE,b);if(0<b[3]&&(a=u(a)))return a},!0,z)};+function so(a,b,d,e,f,g,h,k,n,p,q,r){var s=d.c;s.bindFramebuffer(s.FRAMEBUFFER,d.we());a=qo(a,d,b,e,f,g,h,k,n,p,q,r,function(){var a=new Uint8Array(4);s.readPixels(0,0,1,1,s.RGBA,s.UNSIGNED_BYTE,a);return 0<a[3]},!1);return m(a)}var po={Image:ho},ro=[1,1];function to(a,b,d,e,f,g,h){this.d=a;this.j=b;this.c=g;this.i=h;this.l=f;this.p=e;this.k=d;this.e=null;this.f={}}l=to.prototype;l.oc=function(a,b){var d=a.toString(),e=this.f[d];m(e)?e.push(b):this.f[d]=[b]};l.pc=function(){};l.se=function(a,b){var d=(0,b.e)(a);if(null!=d&&pe(this.c,d.N())){var e=b.c;m(e)||(e=0);this.oc(e,function(a){a.Fa(b.j,b.d);a.mb(b.i);a.Ga(b.f);var e=uo[d.S()];e&&e.call(a,d,null)})}};+l.kd=function(a,b){var d=a.e,e,f;e=0;for(f=d.length;e<f;++e){var g=d[e],h=uo[g.S()];h&&h.call(this,g,b)}};l.yb=function(a,b){var d=this.d,e=(new mo(1,this.c)).c(0,"Image");e.mb(this.e);e.yb(a,b);e.Ob(d);e.fc(this.d,this.j,this.k,this.p,this.l,this.c,this.i,1,0,1,0,1,{});io(e,d)()};l.Ib=function(){};l.qc=function(){};l.xb=function(a,b){var d=this.d,e=(new mo(1,this.c)).c(0,"Image");e.mb(this.e);e.xb(a,b);e.Ob(d);e.fc(this.d,this.j,this.k,this.p,this.l,this.c,this.i,1,0,1,0,1,{});io(e,d)()};l.rc=function(){};+l.Vb=function(){};l.zb=function(){};l.Fa=function(){};l.mb=function(a){this.e=a};l.Ga=function(){};var uo={Point:to.prototype.yb,MultiPoint:to.prototype.xb,GeometryCollection:to.prototype.kd};function vo(){this.c="precision mediump float;varying vec2 a;uniform mat4 f;uniform float g;uniform sampler2D h;void main(void){vec4 texColor=texture2D(h,a);gl_FragColor.rgb=(f*vec4(texColor.rgb,1.)).rgb;gl_FragColor.a=texColor.a*g;}"}v(vo,Qn);da(vo);function wo(){this.c="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}"}v(wo,Rn);da(wo);+function xo(a,b){this.k=a.getUniformLocation(b,"f");this.d=a.getUniformLocation(b,"g");this.e=a.getUniformLocation(b,"e");this.i=a.getUniformLocation(b,"d");this.j=a.getUniformLocation(b,"h");this.c=a.getAttribLocation(b,"b");this.f=a.getAttribLocation(b,"c")};function yo(){this.c="precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}"}v(yo,Qn);da(yo);function zo(){this.c="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}"}v(zo,Rn);da(zo);+function Ao(a,b){this.d=a.getUniformLocation(b,"f");this.e=a.getUniformLocation(b,"e");this.i=a.getUniformLocation(b,"d");this.j=a.getUniformLocation(b,"g");this.c=a.getAttribLocation(b,"b");this.f=a.getAttribLocation(b,"c")};function Bo(a,b){nj.call(this,b);this.d=a;this.R=new Yn([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.j=this.$a=null;this.i=void 0;this.l=Hd();this.s=Jd();this.V=new ug;this.u=this.n=null}v(Bo,nj);+function Co(a,b,d){var e=a.d.j;if(m(a.i)&&a.i==d)e.bindFramebuffer(36160,a.j);else{b.postRenderFunctions.push(sa(function(a,b,d){a.isContextLost()||(a.deleteFramebuffer(b),a.deleteTexture(d))},e,a.j,a.$a));b=bo(e,d,d);var f=e.createFramebuffer();e.bindFramebuffer(36160,f);e.framebufferTexture2D(36160,36064,3553,b,0);a.$a=b;a.j=f;a.i=d}}+Bo.prototype.Qf=function(a,b,d){Do(this,"precompose",d,a);$n(d,34962,this.R);var e=d.c,f=b.brightness||1!=b.contrast||b.hue||1!=b.saturation,g,h;f?(g=vo.Ua(),h=wo.Ua()):(g=yo.Ua(),h=zo.Ua());g=eo(d,g,h);f?null===this.n?this.n=h=new xo(e,g):h=this.n:null===this.u?this.u=h=new Ao(e,g):h=this.u;d.Vd(g)&&(e.enableVertexAttribArray(h.c),e.vertexAttribPointer(h.c,2,5126,!1,16,0),e.enableVertexAttribArray(h.f),e.vertexAttribPointer(h.f,2,5126,!1,16,8),e.uniform1i(h.j,0));e.uniformMatrix4fv(h.i,!1,this.l);+e.uniformMatrix4fv(h.e,!1,this.s);f&&e.uniformMatrix4fv(h.k,!1,vg(this.V,b.brightness,b.contrast,b.hue,b.saturation));e.uniform1f(h.d,b.opacity);e.bindTexture(3553,this.$a);e.drawArrays(5,0,4);Do(this,"postcompose",d,a)};function Do(a,b,d,e){a=a.c;if(jd(a,b)){var f=e.viewState;a.dispatchEvent(new cl(b,a,new to(d,f.center,f.resolution,f.rotation,e.size,e.extent,e.pixelRatio),null,e,null,d))}}Bo.prototype.Ee=function(){this.j=this.$a=null;this.i=void 0};function Eo(a,b){Bo.call(this,a,b);this.p=this.k=this.e=null}v(Eo,Bo);function Fo(a,b){var d=b.c();return go(a.d.j,d)}Eo.prototype.Ya=function(a,b,d,e){var f=this.c;return f.c().Nd(a,b.viewState.resolution,b.viewState.rotation,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};+Eo.prototype.Fe=function(a,b){var d=this.d.j,e=a.viewState,f=e.center,g=e.resolution,h=e.rotation,k=this.e,n=this.$a,p=this.c.c(),q=a.viewHints,r=a.extent;m(b.extent)&&(r=oe(r,b.extent));q[0]||q[1]||re(r)||(e=e.projection,q=p.i,null===q||(e=q),r=p.wc(r,g,a.pixelRatio,e),null!==r&&pj(this,r)&&(k=r,n=Fo(this,r),null===this.$a||a.postRenderFunctions.push(sa(function(a,b){a.isContextLost()||a.deleteTexture(b)},d,this.$a))));null!==k&&(d=this.d.e.n,Go(this,d.width,d.height,f,g,h,k.N()),this.p=null,f=this.l,+Ld(f),Pd(f,1,-1),Od(f,0,-1),this.e=k,this.$a=n,sj(a.attributions,k.i),tj(a,p));return!0};function Go(a,b,d,e,f,g,h){b*=f;d*=f;a=a.s;Ld(a);Pd(a,2/b,2/d);Qd(a,-g);Od(a,h[0]-e[0],h[1]-e[1]);Pd(a,(h[2]-h[0])/2,(h[3]-h[1])/2);Od(a,1,1)}Eo.prototype.Ld=function(a,b){var d=this.Ya(a,b,bd,this);return m(d)};+Eo.prototype.gc=function(a,b,d,e){if(null!==this.e&&!fa(this.e.c()))if(this.c.c()instanceof An){if(a=a.slice(),mj(b.pixelToCoordinateMatrix,a,a),this.Ya(a,b,bd,this))return d.call(e,this.c)}else{var f=[this.e.c().width,this.e.c().height];if(null===this.p){var g=b.size;b=Hd();Ld(b);Od(b,-1,-1);Pd(b,2/g[0],2/g[1]);Od(b,0,g[1]);Pd(b,1,-1);g=Hd();Nd(this.s,g);var h=Hd();Ld(h);Od(h,0,f[1]);Pd(h,1,-1);Pd(h,f[0]/2,f[1]/2);Od(h,1,1);var k=Hd();Md(h,g,k);Md(k,b,k);this.p=k}b=[0,0];mj(this.p,a,b);if(!(0>b[0]||+b[0]>f[0]||0>b[1]||b[1]>f[1])&&(null===this.k&&(this.k=Nf(1,1)),this.k.clearRect(0,0,1,1),this.k.drawImage(this.e.c(),b[0],b[1],1,1,0,0,1,1),0<this.k.getImageData(0,0,1,1).data[3]))return d.call(e,this.c)}};function Ho(){this.c="precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}"}v(Ho,Qn);da(Ho);function Io(){this.c="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}"}v(Io,Rn);da(Io);function Jo(a,b){this.d=a.getUniformLocation(b,"e");this.e=a.getUniformLocation(b,"d");this.c=a.getAttribLocation(b,"b");this.f=a.getAttribLocation(b,"c")};function Ko(a,b){Bo.call(this,a,b);this.J=Ho.Ua();this.L=Io.Ua();this.e=null;this.v=new Yn([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.t=this.k=null;this.p=-1}v(Ko,Bo);l=Ko.prototype;l.T=function(){ao(this.d.e,this.v);Ko.X.T.call(this)};l.jd=function(a,b){var d=this.d;return function(e,f){return ph(a,e,f,function(a){var f=Wg(d.f,a.ub());f&&(b[e]||(b[e]={}),b[e][a.c.toString()]=a);return f})}};l.Ee=function(){Ko.X.Ee.call(this);this.e=null};+l.Fe=function(a,b,d){var e=this.d,f=d.c,g=a.viewState,h=g.projection,k=this.c,n=k.c(),p=qh(n,h),q=ih(p,g.resolution),r=p.ra(q),s=n.ac(q,a.pixelRatio,h),u=s/p.ta(q),y=r/u,z=n.od(),A=g.center,E;r==g.resolution?(A=vj(A,r,a.size),E=me(A,r,g.rotation,a.size)):E=a.extent;r=fh(p,E,r);if(null!==this.k&&nf(this.k,r)&&this.p==n.f)y=this.t;else{var x=[of(r),r.f-r.d+1],x=Math.max(x[0]*s,x[1]*s),Q=Math.pow(2,Math.ceil(Math.log(x)/Math.LN2)),x=y*Q,N=p.Pb(q),L=N[0]+r.c*s*y,y=N[1]+r.d*s*y,y=[L,y,L+x,y+x];Co(this,+a,Q);f.viewport(0,0,Q,Q);f.clearColor(0,0,0,0);f.clear(16384);f.disable(3042);Q=eo(d,this.J,this.L);d.Vd(Q);null===this.e&&(this.e=new Jo(f,Q));$n(d,34962,this.v);f.enableVertexAttribArray(this.e.c);f.vertexAttribPointer(this.e.c,2,5126,!1,16,0);f.enableVertexAttribArray(this.e.f);f.vertexAttribPointer(this.e.f,2,5126,!1,16,8);f.uniform1i(this.e.d,0);d={};d[q]={};var U=this.jd(n,d),Ca=k.ia(),Q=!0,L=Sd(),eb=new kf(0,0,0,0),R,Ma,sb;for(Ma=r.c;Ma<=r.e;++Ma)for(sb=r.d;sb<=r.f;++sb){N=n.Zb(q,Ma,sb,u,h);+if(m(b.extent)&&(R=dh(p,N.c,L),!pe(R,b.extent)))continue;R=N.state;if(2==R){if(Wg(e.f,N.ub())){d[q][jf(N.c)]=N;continue}}else if(4==R||3==R&&!Ca)continue;Q=!1;R=p.ld(N.c,U,null,eb,L);R||(N=p.xd(N.c,eb,L),null===N||U(q+1,N))}b=Sa(rb(d),Number);db(b);for(var U=new Float32Array(4),$a,Ub,nb,Ca=0,eb=b.length;Ca<eb;++Ca)for($a in Ub=d[b[Ca]],Ub)N=Ub[$a],R=dh(p,N.c,L),Ma=2*(R[2]-R[0])/x,sb=2*(R[3]-R[1])/x,nb=2*(R[0]-y[0])/x-1,R=2*(R[1]-y[1])/x-1,Gd(U,Ma,sb,nb,R),f.uniform4fv(this.e.e,U),Lo(e,N,s,z*u),f.drawArrays(5,+0,4);Q?(this.k=r,this.t=y,this.p=n.f):(this.t=this.k=null,this.p=-1,a.animate=!0)}uj(a.usedTiles,n,q,r);var Mc=e.l;wj(a,n,p,u,h,E,q,k.v(),function(a){var b;(b=2!=a.state||Wg(e.f,a.ub()))||(b=a.ub()in Mc.d);b||xj(Mc,[a,hh(p,a.c),p.ra(a.c[0]),s,z*u])},this);rj(a,n);tj(a,n);f=this.l;Ld(f);Od(f,(A[0]-y[0])/(y[2]-y[0]),(A[1]-y[1])/(y[3]-y[1]));0!==g.rotation&&Qd(f,g.rotation);Pd(f,a.size[0]*g.resolution/(y[2]-y[0]),a.size[1]*g.resolution/(y[3]-y[1]));Od(f,-.5,-.5);return!0};+l.gc=function(a,b,d,e){if(null!==this.j){var f=[0,0];mj(this.l,[a[0]/b.size[0],(b.size[1]-a[1])/b.size[1]],f);a=[f[0]*this.i,f[1]*this.i];b=this.d.e.c;b.bindFramebuffer(b.FRAMEBUFFER,this.j);f=new Uint8Array(4);b.readPixels(a[0],a[1],1,1,b.RGBA,b.UNSIGNED_BYTE,f);if(0<f[3])return d.call(e,this.c)}};function Mo(a,b){Bo.call(this,a,b);this.p=!1;this.L=-1;this.J=NaN;this.t=Sd();this.k=this.e=this.v=null}v(Mo,Bo);l=Mo.prototype;l.Qf=function(a,b,d){this.k=b;var e=a.viewState,f=this.e;if(null!==f&&!f.pa()){var g=e.center,h=e.resolution,e=e.rotation,k=a.size,n=a.pixelRatio,p=b.opacity,q=b.brightness,r=b.contrast,s=b.hue;b=b.saturation;a=a.skippedFeatureUids;var u,y,z;u=0;for(y=km.length;u<y;++u)z=f.f[km[u]],m(z)&&z.fc(d,g,h,e,k,n,p,q,r,s,b,a,void 0,!1)}};+l.T=function(){var a=this.e;null!==a&&(no(a,this.d.e)(),this.e=null);Mo.X.T.call(this)};l.Ya=function(a,b,d,e){if(null!==this.e&&null!==this.k){var f=b.viewState,g=this.c,h=this.k,k={};return this.e.d(a,this.d.e,f.center,f.resolution,f.rotation,b.size,b.pixelRatio,h.opacity,h.brightness,h.contrast,h.hue,h.saturation,b.skippedFeatureUids,function(a){var b=ma(a).toString();if(!(b in k))return k[b]=!0,d.call(e,a,g)})}};+l.Ld=function(a,b){if(null===this.e||null===this.k)return!1;var d=b.viewState,e=this.k;return so(this.e,a,this.d.e,d.resolution,d.rotation,b.pixelRatio,e.opacity,e.brightness,e.contrast,e.hue,e.saturation,b.skippedFeatureUids)};l.gc=function(a,b,d,e){a=a.slice();mj(b.pixelToCoordinateMatrix,a,a);if(this.Ld(a,b))return d.call(e,this.c)};l.ak=function(){oj(this)};+l.Fe=function(a,b,d){function e(a){var b;m(a.c)?b=a.c.call(a,n):m(f.v)&&(b=(0,f.v)(a,n));if(null!=b){if(null!=b){var d,e,g=!1;d=0;for(e=b.length;d<e;++d)g=cn(s,a,b[d],bn(n,p),this.ak,this)||g;a=g}else a=!1;this.p=this.p||a}}var f=this.c;b=f.c();sj(a.attributions,b.j);tj(a,b);if(!this.p&&(!f.Ec&&a.viewHints[0]||a.viewHints[1]))return!0;var g=a.extent,h=a.viewState,k=h.projection,n=h.resolution,p=a.pixelRatio,h=f.f,q=f.ia,r=f.get("renderOrder");m(r)||(r=an);g=Wd(g,q*n);if(!this.p&&this.J==n&&this.L==+h&&this.v==r&&Zd(this.t,g))return!0;null===this.e||a.postRenderFunctions.push(no(this.e,d));this.p=!1;var s=new mo(.5*n/p,g,f.ia);b.Lb(g,n,k);if(null===r)b.Jb(g,n,e,this);else{var u=[];b.Jb(g,n,function(a){u.push(a)},this);db(u,r);Qa(u,e,this)}oo(s,d);this.J=n;this.L=h;this.v=r;this.t=g;this.e=s;return!0};function No(a,b){Cj.call(this,0,b);this.c=Ef("CANVAS");this.c.style.width="100%";this.c.style.height="100%";this.c.className="ol-unselectable";Hf(a,this.c,0);this.t=0;this.v=Nf();this.n=!0;this.j=Tf(this.c,{antialias:!0,depth:!1,vh:!0,preserveDrawingBuffer:!1,stencil:!0});this.e=new Zn(this.c,this.j);w(this.c,"webglcontextlost",this.Zj,!1,this);w(this.c,"webglcontextrestored",this.$j,!1,this);this.f=new Vg;this.s=null;this.l=new Hj(ra(function(a){var b=a[1];a=a[2];var f=b[0]-this.s[0],b=b[1]-this.s[1];+return 65536*Math.log(a)+Math.sqrt(f*f+b*b)/a},this),function(a){return a[0].ub()});this.J=ra(function(){if(!this.l.pa()){Lj(this.l);var a=Ij(this.l);Lo(this,a[0],a[3],a[4])}},this);this.p=0;Oo(this)}v(No,Cj);+function Lo(a,b,d,e){var f=a.j,g=b.ub();if(Wg(a.f,g))a=a.f.get(g),f.bindTexture(3553,a.$a),9729!=a.Df&&(f.texParameteri(3553,10240,9729),a.Df=9729),9729!=a.Ef&&(f.texParameteri(3553,10240,9729),a.Ef=9729);else{var h=f.createTexture();f.bindTexture(3553,h);if(0<e){var k=a.v.canvas,n=a.v;a.t!=d?(k.width=d,k.height=d,a.t=d):n.clearRect(0,0,d,d);n.drawImage(b.La(),e,e,d,d,0,0,d,d);f.texImage2D(3553,0,6408,6408,5121,k)}else f.texImage2D(3553,0,6408,6408,5121,b.La());f.texParameteri(3553,10240,9729);f.texParameteri(3553,+10241,9729);f.texParameteri(3553,10242,33071);f.texParameteri(3553,10243,33071);a.f.set(g,{$a:h,Df:9729,Ef:9729})}}l=No.prototype;l.re=function(a){return a instanceof H?new Eo(this,a):a instanceof I?new Ko(this,a):a instanceof J?new Mo(this,a):null};+function Po(a,b,d){var e=a.k;if(jd(e,b)){var f=a.e,g=d.extent,h=d.size,k=d.viewState,n=d.pixelRatio,p=k.resolution,q=k.center,r=k.rotation,k=new to(f,q,p,r,h,g,n),g=new mo(.5*p/n,g);e.dispatchEvent(new cl(b,e,k,g,d,null,f));oo(g,f);if(!g.pa()){var s=Qo;b=s.opacity;d=s.brightness;var e=s.contrast,u=s.hue,s=s.saturation,y={},z,A,E;z=0;for(A=km.length;z<A;++z)E=g.f[km[z]],m(E)&&E.fc(f,q,p,r,h,n,b,d,e,u,s,y,void 0,!1)}no(g,f)();f=Sa(rb(k.f),Number);db(f);h=0;for(n=f.length;h<n;++h)for(p=k.f[f[h].toString()],+q=0,r=p.length;q<r;++q)p[q](k);a.d=g}}l.T=function(){var a=this.j;a.isContextLost()||this.f.forEach(function(b){null===b||a.deleteTexture(b.$a)});pc(this.e);No.X.T.call(this)};l.th=function(a,b){for(var d=this.j,e;1024<this.f.Xb()-this.p;){e=this.f.c.lc;if(null===e)if(+this.f.c.Gd==b.index)break;else--this.p;else d.deleteTexture(e.$a);this.f.pop()}};l.S=function(){return"webgl"};l.Zj=function(a){a.preventDefault();this.f.clear();this.p=0;mb(this.i,function(a){a.Ee()})};l.$j=function(){Oo(this);this.k.render()};+function Oo(a){a=a.j;a.activeTexture(33984);a.blendFuncSeparate(770,771,1,771);a.disable(2884);a.disable(2929);a.disable(3089);a.disable(2960)}+l.be=function(a){var b=this.e,d=this.j;if(d.isContextLost())return!1;if(null===a)return this.n&&(Mg(this.c,!1),this.n=!1),!1;this.s=a.focus;this.f.set((-a.index).toString(),null);++this.p;var e=[],f=a.layerStatesArray,g=a.viewState.resolution,h,k,n,p;h=0;for(k=f.length;h<k;++h)p=f[h],ij(p,g)&&"ready"==p.zc&&(n=Fj(this,p.layer),n.Fe(a,p,b)&&e.push(p));f=a.size[0]*a.pixelRatio;g=a.size[1]*a.pixelRatio;if(this.c.width!=f||this.c.height!=g)this.c.width=f,this.c.height=g;d.bindFramebuffer(36160,null);+d.clearColor(0,0,0,0);d.clear(16384);d.enable(3042);d.viewport(0,0,this.c.width,this.c.height);Po(this,"precompose",a);h=0;for(k=e.length;h<k;++h)p=e[h],n=Fj(this,p.layer),n.Qf(a,p,b);this.n||(Mg(this.c,!0),this.n=!0);Dj(a);1024<this.f.Xb()-this.p&&a.postRenderFunctions.push(ra(this.th,this));this.l.pa()||(a.postRenderFunctions.push(this.J),a.animate=!0);Po(this,"postcompose",a);Gj(this,a);a.postRenderFunctions.push(Ej)};+l.Ce=function(a,b,d,e,f,g){var h;if(this.j.isContextLost())return!1;var k=this.e,n=b.viewState;if(null!==this.d){var p={},q=Qo;if(h=this.d.d(a,k,n.center,n.resolution,n.rotation,b.size,b.pixelRatio,q.opacity,q.brightness,q.contrast,q.hue,q.saturation,{},function(a){var b=ma(a).toString();if(!(b in p))return p[b]=!0,d.call(e,a,null)}))return h}k=b.layerStatesArray;for(q=k.length-1;0<=q;--q){h=k[q];var r=h.layer;if(ij(h,n.resolution)&&f.call(g,r)&&(h=Fj(this,r).Ya(a,b,d,e)))return h}};+l.Pf=function(a,b,d,e){var f=!1;if(this.j.isContextLost())return!1;var g=this.e,h=b.viewState;if(null!==this.d&&(f=Qo,f=so(this.d,a,g,h.resolution,h.rotation,b.pixelRatio,f.opacity,f.brightness,f.contrast,f.hue,f.saturation,{})))return!0;var g=b.layerStatesArray,k;for(k=g.length-1;0<=k;--k){var n=g[k],p=n.layer;if(ij(n,h.resolution)&&d.call(e,p)&&(f=Fj(this,p).Ld(a,b)))return!0}return f};+l.Of=function(a,b,d,e,f){if(this.j.isContextLost())return!1;var g=this.e,h=b.viewState,k;if(null!==this.d){var n=Qo;k=this.k.wa(a);if(so(this.d,k,g,h.resolution,h.rotation,b.pixelRatio,n.opacity,n.brightness,n.contrast,n.hue,n.saturation,{})&&(k=d.call(e,null)))return k}g=b.layerStatesArray;for(n=g.length-1;0<=n;--n){k=g[n];var p=k.layer;if(ij(k,h.resolution)&&f.call(e,p)&&(k=Fj(this,p).gc(a,b,d,e)))return k}};var Qo={opacity:1,brightness:0,contrast:1,hue:0,saturation:1};var Ro=["canvas","webgl","dom"];+function K(a){qd.call(this);var b=So(a);this.Cc=m(a.loadTilesWhileAnimating)?a.loadTilesWhileAnimating:!1;this.zc=m(a.loadTilesWhileInteracting)?a.loadTilesWhileInteracting:!1;this.Ec=m(a.pixelRatio)?a.pixelRatio:Vf;this.Dc=b.logos;this.v=new Hh(this.Vl,void 0,this);oc(this,this.v);this.Ac=Hd();this.fd=Hd();this.Bc=0;this.e=null;this.Ia=Sd();this.s=this.Y=null;this.d=Bf("DIV","ol-viewport");this.d.style.position="relative";this.d.style.overflow="hidden";this.d.style.width="100%";this.d.style.height=+"100%";this.d.style.msTouchAction="none";bg&&(this.d.className="ol-touch");this.oa=Bf("DIV","ol-overlaycontainer");this.d.appendChild(this.oa);this.L=Bf("DIV","ol-overlaycontainer-stopevent");w(this.L,["click","dblclick","mousedown","touchstart","MSPointerDown",dj,Hb?"DOMMouseScroll":"mousewheel"],rc);this.d.appendChild(this.L);a=new Wi(this);w(a,qb(gj),this.xf,!1,this);oc(this,a);this.ja=b.keyboardEventTarget;this.J=new bi;w(this.J,"key",this.vf,!1,this);oc(this,this.J);a=new ji(this.d);w(a,"mousewheel",+this.vf,!1,this);oc(this,a);this.l=b.controls;this.k=b.interactions;this.n=b.overlays;this.t=new b.Xl(this.d,this);oc(this,this.t);this.nc=new Wh;oc(this,this.nc);w(this.nc,"resize",this.u,!1,this);this.ga=null;this.R=[];this.za=[];this.ob=new Mj(ra(this.fi,this),ra(this.Dj,this));this.ha={};w(this,ud("layergroup"),this.yi,!1,this);w(this,ud("view"),this.Ej,!1,this);w(this,ud("size"),this.Oi,!1,this);w(this,ud("target"),this.Pi,!1,this);this.I(b.wm);this.l.forEach(function(a){a.setMap(this)},this);+w(this.l,"add",function(a){a.element.setMap(this)},!1,this);w(this.l,"remove",function(a){a.element.setMap(null)},!1,this);this.k.forEach(function(a){a.setMap(this)},this);w(this.k,"add",function(a){a.element.setMap(this)},!1,this);w(this.k,"remove",function(a){a.element.setMap(null)},!1,this);this.n.forEach(function(a){a.setMap(this)},this);w(this.n,"add",function(a){a.element.setMap(this)},!1,this);w(this.n,"remove",function(a){a.element.setMap(null)},!1,this)}v(K,qd);l=K.prototype;l.jh=function(a){this.l.push(a)};+l.kh=function(a){this.k.push(a)};l.cf=function(a){this.Yb().ec().push(a)};l.df=function(a){this.n.push(a)};l.Qa=function(a){this.render();Array.prototype.push.apply(this.R,arguments)};l.T=function(){If(this.d);K.X.T.call(this)};l.ue=function(a,b,d,e,f){if(null!==this.e)return a=this.wa(a),this.t.Ce(a,this.e,b,m(d)?d:null,m(e)?e:bd,m(f)?f:null)};l.Cj=function(a,b,d,e,f){if(null!==this.e)return this.t.Of(a,this.e,b,m(d)?d:null,m(e)?e:bd,m(f)?f:null)};+l.Ri=function(a,b,d){if(null===this.e)return!1;a=this.wa(a);return this.t.Pf(a,this.e,m(b)?b:bd,m(d)?d:null)};l.Dh=function(a){return this.wa(this.md(a))};l.md=function(a){if(m(a.changedTouches)){var b=a.changedTouches[0];a=Jg(this.d);return[b.clientX-a.x,b.clientY-a.y]}b=this.d;a=Jg(a);b=Jg(b);b=new sf(a.x-b.x,a.y-b.y);return[b.x,b.y]};l.Jd=function(){return this.get("target")};K.prototype.getTarget=K.prototype.Jd;l=K.prototype;l.Qc=function(){var a=this.Jd();return m(a)?xf(a):null};+l.wa=function(a){var b=this.e;if(null===b)return null;a=a.slice();return mj(b.pixelToCoordinateMatrix,a,a)};l.Bh=function(){return this.l};l.Xh=function(){return this.n};l.Kh=function(){return this.k};l.Yb=function(){return this.get("layergroup")};K.prototype.getLayerGroup=K.prototype.Yb;K.prototype.ia=function(){return this.Yb().ec()};K.prototype.i=function(a){var b=this.e;if(null===b)return null;a=a.slice(0,2);return mj(b.coordinateToPixelMatrix,a,a)};K.prototype.j=function(){return this.get("size")};+K.prototype.getSize=K.prototype.j;K.prototype.c=function(){return this.get("view")};K.prototype.getView=K.prototype.c;l=K.prototype;l.hi=function(){return this.d};l.fi=function(a,b,d,e){var f=this.e;if(!(null!==f&&b in f.wantedTiles&&f.wantedTiles[b][jf(a.c)]))return Infinity;a=d[0]-f.focus[0];d=d[1]-f.focus[1];return 65536*Math.log(e)+Math.sqrt(a*a+d*d)/e};l.vf=function(a,b){var d=new Ui(b||a.type,this,a);this.xf(d)};+l.xf=function(a){if(null!==this.e){this.ga=a.coordinate;a.frameState=this.e;var b=this.k.c,d;if(!1!==this.dispatchEvent(a))for(d=b.length-1;0<=d;d--){var e=b[d];if(e.d()&&!e.handleEvent(a))break}}};+l.Mi=function(){var a=this.e,b=this.ob;if(!b.pa()){var d=16,e=d,f=0;null!==a&&(f=a.viewHints,f[0]&&(d=this.Cc?8:0,e=2),f[1]&&(d=this.zc?8:0,e=2),f=pb(a.wantedTiles));d*=f;e*=f;if(b.e<d){Lj(b);d=Math.min(d-b.e,e,b.Xb());for(e=0;e<d;++e)f=Ij(b)[0],w(f,"change",b.k,!1,b),f.load();b.e+=d}}b=this.za;d=0;for(e=b.length;d<e;++d)b[d](this,a);b.length=0};l.Oi=function(){this.render()};+l.Pi=function(){var a=this.Qc();ii(this.J);null===a?If(this.d):(a.appendChild(this.d),ci(this.J,null===this.ja?a:this.ja));this.u()};l.Dj=function(){this.render()};l.Qi=function(){this.render()};l.Ej=function(){null!==this.Y&&(Wc(this.Y),this.Y=null);var a=this.c();null!==a&&(this.Y=w(a,"propertychange",this.Qi,!1,this));this.render()};l.zi=function(){this.render()};l.Ai=function(){this.render()};+l.yi=function(){if(null!==this.s){for(var a=this.s.length,b=0;b<a;++b)Wc(this.s[b]);this.s=null}a=this.Yb();null!=a&&(this.s=[w(a,"propertychange",this.Ai,!1,this),w(a,"change",this.zi,!1,this)]);this.render()};l.Wl=function(){var a=this.v;Ih(a);a.kf()};l.render=function(){null!=this.v.ea||this.v.start()};l.Ql=function(a){if(m(this.l.remove(a)))return a};l.Rl=function(a){var b;m(this.k.remove(a))&&(b=a);return b};l.Sl=function(a){return this.Yb().ec().remove(a)};l.Tl=function(a){if(m(this.n.remove(a)))return a};+l.Vl=function(a){var b,d,e,f=this.j(),g=this.c(),h=null;if(b=m(f)&&0<f[0]&&0<f[1]&&null!==g)b=null!=g.d()&&m(g.c());if(b){var h=g.u.slice(),k=this.Yb().ab(),n={};b=0;for(d=k.length;b<d;++b)n[ma(k[b].layer)]=k[b];e=Xe(g);h={animate:!1,attributions:{},coordinateToPixelMatrix:this.Ac,extent:null,focus:null===this.ga?e.center:this.ga,index:this.Bc++,layerStates:n,layerStatesArray:k,logos:Bb(this.Dc),pixelRatio:this.Ec,pixelToCoordinateMatrix:this.fd,postRenderFunctions:[],size:f,skippedFeatureUids:this.ha,+tileQueue:this.ob,time:a,usedTiles:{},viewState:e,viewHints:h,wantedTiles:{}}}if(null!==h){a=this.R;b=f=0;for(d=a.length;b<d;++b)g=a[b],g(this,h)&&(a[f++]=g);a.length=f;h.extent=me(e.center,e.resolution,e.rotation,h.size)}this.e=h;this.t.be(h);null!==h&&(h.animate&&this.render(),Array.prototype.push.apply(this.za,h.postRenderFunctions),0!==this.R.length||h.viewHints[0]||h.viewHints[1]||ce(h.extent,this.Ia)||(this.dispatchEvent(new Tg("moveend",this,h)),Xd(h.extent,this.Ia)));this.dispatchEvent(new Tg("postrender",+this,h));Mh(this.Mi,this)};l.wg=function(a){this.set("layergroup",a)};K.prototype.setLayerGroup=K.prototype.wg;K.prototype.V=function(a){this.set("size",a)};K.prototype.setSize=K.prototype.V;K.prototype.ma=function(a){this.set("target",a)};K.prototype.setTarget=K.prototype.ma;K.prototype.Ja=function(a){this.set("view",a)};K.prototype.setView=K.prototype.Ja;K.prototype.ab=function(a){a=ma(a).toString();this.ha[a]=!0;this.render()};+K.prototype.u=function(){var a=this.Qc();if(null===a)this.V(void 0);else{var b=wf(a),d=Gb&&a.currentStyle;d&&Lf(uf(b))&&"auto"!=d.width&&"auto"!=d.height&&!d.boxSizing?(b=Ng(a,d.width,"width","pixelWidth"),a=Ng(a,d.height,"height","pixelHeight"),a=new tf(b,a)):(d=new tf(a.offsetWidth,a.offsetHeight),b=Pg(a,"padding"),a=Sg(a),a=new tf(d.width-a.left-b.left-b.right-a.right,d.height-a.top-b.top-b.bottom-a.bottom));this.V([a.width,a.height])}};+K.prototype.mc=function(a){a=ma(a).toString();delete this.ha[a];this.render()};+function So(a){var b=null;m(a.keyboardEventTarget)&&(b=ia(a.keyboardEventTarget)?document.getElementById(a.keyboardEventTarget):a.keyboardEventTarget);var d={},e={};if(!m(a.logo)||"boolean"==typeof a.logo&&a.logo)e["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszWWMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvYasvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvXH1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1VkbMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLPVcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqTacrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaarldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+HizeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDnBAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSFhYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJREFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxCBrb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7ahgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCnB3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC"]="http://openlayers.org/";+else{var f=a.logo;ia(f)?e[f]="":la(f)&&(e[f.src]=f.href)}f=a.layers instanceof G?a.layers:new G({layers:a.layers});d.layergroup=f;d.target=a.target;d.view=m(a.view)?a.view:new B;var f=Cj,g;m(a.renderer)?ga(a.renderer)?g=a.renderer:ia(a.renderer)&&(g=[a.renderer]):g=Ro;var h,k;h=0;for(k=g.length;h<k;++h){var n=g[h];if("canvas"==n){if(Zf){f=Fn;break}}else if("dom"==n){f=Nn;break}else if("webgl"==n&&Uf){f=No;break}}var p;m(a.controls)?p=ga(a.controls)?new lg(a.controls.slice()):a.controls:p=yh();var q;+m(a.interactions)?q=ga(a.interactions)?new lg(a.interactions.slice()):a.interactions:q=Pl();a=m(a.overlays)?ga(a.overlays)?new lg(a.overlays.slice()):a.overlays:new lg;return{controls:p,interactions:q,keyboardEventTarget:b,logos:e,overlays:a,Xl:f,wm:d}}Wl();function M(a){qd.call(this);this.L=m(a.insertFirst)?a.insertFirst:!0;this.R=m(a.stopEvent)?a.stopEvent:!0;this.fa=Bf("DIV",{"class":"ol-overlay-container"});this.fa.style.position="absolute";this.J=m(a.autoPan)?a.autoPan:!1;this.k=m(a.autoPanAnimation)?a.autoPanAnimation:{};this.v=m(a.autoPanMargin)?a.autoPanMargin:20;this.c={ed:"",Hd:"",ce:"",de:"",visible:!0};this.j=null;w(this,ud("element"),this.ri,!1,this);w(this,ud("map"),this.Gi,!1,this);w(this,ud("offset"),this.Ii,!1,this);w(this,ud("position"),+this.Ki,!1,this);w(this,ud("positioning"),this.Li,!1,this);m(a.element)&&this.Pe(a.element);this.s(m(a.offset)?a.offset:[0,0]);this.t(m(a.positioning)?a.positioning:"top-left");m(a.position)&&this.i(a.position)}v(M,qd);M.prototype.d=function(){return this.get("element")};M.prototype.getElement=M.prototype.d;M.prototype.e=function(){return this.get("map")};M.prototype.getMap=M.prototype.e;M.prototype.l=function(){return this.get("offset")};M.prototype.getOffset=M.prototype.l;M.prototype.u=function(){return this.get("position")};+M.prototype.getPosition=M.prototype.u;M.prototype.n=function(){return this.get("positioning")};M.prototype.getPositioning=M.prototype.n;l=M.prototype;l.ri=function(){Gf(this.fa);var a=this.d();null!=a&&Ff(this.fa,a)};l.Gi=function(){null!==this.j&&(If(this.fa),Wc(this.j),this.j=null);var a=this.e();null!=a&&(this.j=w(a,"postrender",this.render,!1,this),To(this),a=this.R?a.L:a.oa,this.L?Hf(a,this.fa,0):Ff(a,this.fa))};l.render=function(){To(this)};l.Ii=function(){To(this)};+l.Ki=function(){To(this);if(m(this.get("position"))&&this.J){var a=this.e();if(m(a)&&!fa(a.Qc())){var b=Uo(a.Qc(),a.j()),d=this.d(),e=d.offsetWidth,f=d.currentStyle||window.getComputedStyle(d),e=e+(parseInt(f.marginLeft,10)+parseInt(f.marginRight,10)),f=d.offsetHeight,g=d.currentStyle||window.getComputedStyle(d),f=f+(parseInt(g.marginTop,10)+parseInt(g.marginBottom,10)),h=Uo(d,[e,f]),d=this.v;Zd(b,h)||(e=h[0]-b[0],f=b[2]-h[2],g=h[1]-b[1],h=b[3]-h[3],b=[0,0],0>e?b[0]=e-d:0>f&&(b[0]=Math.abs(f)+d),+0>g?b[1]=g-d:0>h&&(b[1]=Math.abs(h)+d),0===b[0]&&0===b[1])||(d=a.c().d(),e=a.i(d),b=[e[0]+b[0],e[1]+b[1]],null!==this.k&&(this.k.source=d,a.Qa(cf(this.k))),a.c().Ma(a.wa(b)))}}};l.Li=function(){To(this)};l.Pe=function(a){this.set("element",a)};M.prototype.setElement=M.prototype.Pe;M.prototype.setMap=function(a){this.set("map",a)};M.prototype.setMap=M.prototype.setMap;M.prototype.s=function(a){this.set("offset",a)};M.prototype.setOffset=M.prototype.s;M.prototype.i=function(a){this.set("position",a)};+M.prototype.setPosition=M.prototype.i;function Uo(a,b){var d=wf(a);Fg(a,"position");var e=new sf(0,0),f;f=d?wf(d):document;f=!Gb||Gb&&9<=Rb||Lf(uf(f))?f.documentElement:f.body;a!=f&&(f=Ig(a),d=Mf(uf(d)),e.x=f.left+d.x,e.y=f.top+d.y);return[e.x,e.y,e.x+b[0],e.y+b[1]]}M.prototype.t=function(a){this.set("positioning",a)};M.prototype.setPositioning=M.prototype.t;+function To(a){var b=a.e(),d=a.u();if(m(b)&&null!==b.e&&m(d)){var d=b.i(d),e=b.j(),b=a.fa.style,f=a.l(),g=a.n(),h=f[0],f=f[1];if("bottom-right"==g||"center-right"==g||"top-right"==g)""!==a.c.Hd&&(a.c.Hd=b.left=""),h=Math.round(e[0]-d[0]-h)+"px",a.c.ce!=h&&(a.c.ce=b.right=h);else{""!==a.c.ce&&(a.c.ce=b.right="");if("bottom-center"==g||"center-center"==g||"top-center"==g)h-=Kg(a.fa).width/2;h=Math.round(d[0]+h)+"px";a.c.Hd!=h&&(a.c.Hd=b.left=h)}if("bottom-left"==g||"bottom-center"==g||"bottom-right"==+g)""!==a.c.de&&(a.c.de=b.top=""),d=Math.round(e[1]-d[1]-f)+"px",a.c.ed!=d&&(a.c.ed=b.bottom=d);else{""!==a.c.ed&&(a.c.ed=b.bottom="");if("center-left"==g||"center-center"==g||"center-right"==g)f-=Kg(a.fa).height/2;d=Math.round(d[1]+f)+"px";a.c.de!=d&&(a.c.de=b.top=d)}a.c.visible||(Mg(a.fa,!0),a.c.visible=!0)}else a.c.visible&&(Mg(a.fa,!1),a.c.visible=!1)};function Vo(a){a=m(a)?a:{};this.i=m(a.collapsed)?a.collapsed:!0;this.k=m(a.collapsible)?a.collapsible:!0;this.k||(this.i=!1);var b=m(a.className)?a.className:"ol-overviewmap",d=m(a.tipLabel)?a.tipLabel:"Overview map",e=m(a.collapseLabel)?a.collapseLabel:"\u00ab";this.s=ia(e)?Bf("SPAN",{},e):e;e=m(a.label)?a.label:"\u00bb";this.t=ia(e)?Bf("SPAN",{},e):e;d=Bf("BUTTON",{type:"button",title:d},this.k&&!this.i?this.s:this.t);w(d,"click",this.Mj,!1,this);w(d,["mouseout",uc],function(){this.blur()},!1);+var e=Bf("DIV","ol-overviewmap-map"),f=this.e=new K({controls:new lg,interactions:new lg,target:e});m(a.layers)&&a.layers.forEach(function(a){f.cf(a)},this);var g=Bf("DIV","ol-overviewmap-box");this.n=new M({position:[0,0],positioning:"bottom-left",element:g});this.e.df(this.n);b=Bf("DIV",b+" ol-unselectable ol-control"+(this.i&&this.k?" ol-collapsed":"")+(this.k?"":" ol-uncollapsible"),e,d);Ug.call(this,{element:b,render:m(a.render)?a.render:Wo,target:a.target})}v(Vo,Ug);l=Vo.prototype;+l.setMap=function(a){var b=this.c;null===a&&null!==b&&Vc(b,ud("view"),this.Jf,!1,this);Vo.X.setMap.call(this,a);null!==a&&(0===this.e.ia().Mb()&&this.e.O("layergroup",a),Xo(this),w(a,ud("view"),this.Jf,!1,this),this.e.u(),Yo(this))};function Xo(a){var b=a.c.c();null===b||a.e.c().O("rotation",b)}+function Wo(){var a=this.c,b=this.e;if(null!==a.e&&null!==b.e){var d=a.j(),a=a.c().k(d),e=b.j(),d=b.c().k(e),f=b.i(je(a)),b=b.i(he(a)),b=new tf(Math.abs(f[0]-b[0]),Math.abs(f[1]-b[1])),f=e[0],e=e[1];b.width<.1*f||b.height<.1*e||b.width>.75*f||b.height>.75*e?Yo(this):Zd(d,a)||(a=this.e,d=this.c.c(),a.c().Ma(d.d()))}Zo(this)}l.Jf=function(){Xo(this)};function Yo(a){var b=a.c;a=a.e;var d=b.j(),b=b.c().k(d),d=a.j();a=a.c();var e=Math.log(7.5)/Math.LN2;se(b,1/(.1*Math.pow(2,e/2)));a.te(b,d)}+function Zo(a){var b=a.c,d=a.e;if(null!==b.e&&null!==d.e){var e=b.j(),f=b.c(),g=d.c();d.j();var b=f.e(),h=a.n,d=a.n.d(),f=f.k(e),e=g.c(),g=ge(f),f=ie(f),k;a=a.c.c().d();m(a)&&(k=[g[0]-a[0],g[1]-a[1]],Ad(k,b),vd(k,a));h.i(k);null!=d&&(k=new tf(Math.abs((g[0]-f[0])/e),Math.abs((f[1]-g[1])/e)),b=Lf(uf(wf(d))),!Gb||Pb("10")||b&&Pb("8")?(d=d.style,Hb?d.MozBoxSizing="border-box":Ib?d.WebkitBoxSizing="border-box":d.boxSizing="border-box",d.width=Math.max(k.width,0)+"px",d.height=Math.max(k.height,0)+"px"):+(a=d.style,b?(b=Pg(d,"padding"),d=Sg(d),a.pixelWidth=k.width-d.left-b.left-b.right-d.right,a.pixelHeight=k.height-d.top-b.top-b.bottom-d.bottom):(a.pixelWidth=k.width,a.pixelHeight=k.height)))}}l.Mj=function(a){a.preventDefault();$o(this)};function $o(a){Ag(a.element,"ol-collapsed");a.i?Jf(a.s,a.t):Jf(a.t,a.s);a.i=!a.i;var b=a.e;a.i||null!==b.e||(b.u(),Yo(a),Uc(b,"postrender",function(){Zo(this)},!1,a))}l.Lj=function(){return this.k};+l.Oj=function(a){this.k!==a&&(this.k=a,Ag(this.element,"ol-uncollapsible"),!a&&this.i&&$o(this))};l.Nj=function(a){this.k&&this.i!==a&&$o(this)};l.Kj=function(){return this.i};function ap(a){a=m(a)?a:{};var b=m(a.className)?a.className:"ol-scale-line";this.k=Bf("DIV",b+"-inner");this.fa=Bf("DIV",b+" ol-unselectable",this.k);this.v=null;this.n=m(a.minWidth)?a.minWidth:64;this.e=!1;this.L=void 0;this.J="";this.i=null;Ug.call(this,{element:this.fa,render:m(a.render)?a.render:bp,target:a.target});w(this,ud("units"),this.R,!1,this);this.t(a.units||"metric")}v(ap,Ug);var cp=[1,2,5];ap.prototype.s=function(){return this.get("units")};ap.prototype.getUnits=ap.prototype.s;+function bp(a){a=a.frameState;null===a?this.v=null:this.v=a.viewState;dp(this)}ap.prototype.R=function(){dp(this)};ap.prototype.t=function(a){this.set("units",a)};ap.prototype.setUnits=ap.prototype.t;+function dp(a){var b=a.v;if(null===b)a.e&&(Mg(a.fa,!1),a.e=!1);else{var d=b.center,e=b.projection,b=e.getPointResolution(b.resolution,d),f=e.f,g=a.s();"degrees"!=f||"metric"!=g&&"imperial"!=g&&"us"!=g&&"nautical"!=g?"degrees"!=f&&"degrees"==g?(null===a.i&&(a.i=De(e,ze("EPSG:4326"))),d=Math.cos(Yb(a.i(d)[1])),e=ve.radius,e/=we[f],b*=180/(Math.PI*d*e)):a.i=null:(a.i=null,d=Math.cos(Yb(d[1])),b*=Math.PI*d*ve.radius/180);d=a.n*b;f="";"degrees"==g?d<1/60?(f="\u2033",b*=3600):1>d?(f="\u2032",b*=60):f="\u00b0":+"imperial"==g?.9144>d?(f="in",b/=.0254):1609.344>d?(f="ft",b/=.3048):(f="mi",b/=1609.344):"nautical"==g?(b/=1852,f="nm"):"metric"==g?1>d?(f="mm",b*=1E3):1E3>d?f="m":(f="km",b/=1E3):"us"==g&&(.9144>d?(f="in",b*=39.37):1609.344>d?(f="ft",b/=.30480061):(f="mi",b/=1609.3472));for(d=3*Math.floor(Math.log(a.n*b)/Math.log(10));;){e=cp[d%3]*Math.pow(10,Math.floor(d/3));g=Math.round(e/b);if(isNaN(g)){Mg(a.fa,!1);a.e=!1;return}if(g>=a.n)break;++d}b=e+" "+f;a.J!=b&&(a.k.innerHTML=b,a.J=b);a.L!=g&&(a.k.style.width=+g+"px",a.L=g);a.e||(Mg(a.fa,!0),a.e=!0)}};function ep(a){lc.call(this);this.f=a;this.c={}}v(ep,lc);var fp=[];ep.prototype.Wa=function(a,b,d,e){ga(b)||(b&&(fp[0]=b.toString()),b=fp);for(var f=0;f<b.length;f++){var g=w(a,b[f],d||this.handleEvent,e||!1,this.f||this);if(!g)break;this.c[g.key]=g}return this};+ep.prototype.Qe=function(a,b,d,e,f){if(ga(b))for(var g=0;g<b.length;g++)this.Qe(a,b[g],d,e,f);else d=d||this.handleEvent,f=f||this.f||this,d=Oc(d),e=!!e,b=Bc(a)?Ic(a.qb,String(b),d,e,f):a?(a=Qc(a))?Ic(a,b,d,e,f):null:null,b&&(Wc(b),delete this.c[b.key]);return this};function gp(a){mb(a.c,Wc);a.c={}}ep.prototype.T=function(){ep.X.T.call(this);gp(this)};ep.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function hp(a,b,d){hd.call(this);this.target=a;this.handle=b||a;this.c=d||new Cg(NaN,NaN,NaN,NaN);this.d=wf(a);this.f=new ep(this);oc(this,this.f);w(this.handle,["touchstart","mousedown"],this.uf,!1,this)}v(hp,hd);var ip=Gb||Hb&&Pb("1.9.3");l=hp.prototype;l.clientX=0;l.clientY=0;l.screenX=0;l.screenY=0;l.xg=0;l.yg=0;l.tc=0;l.uc=0;l.cc=!1;l.T=function(){hp.X.T.call(this);Vc(this.handle,["touchstart","mousedown"],this.uf,!1,this);gp(this.f);ip&&this.d.releaseCapture();this.handle=this.target=null};+l.uf=function(a){var b="mousedown"==a.type;if(this.cc||b&&!zc(a))this.dispatchEvent("earlycancel");else if(jp(a),this.dispatchEvent(new kp("start",this,a.clientX,a.clientY))){this.cc=!0;a.preventDefault();var b=this.d,d=b.documentElement,e=!ip;this.f.Wa(b,["touchmove","mousemove"],this.Hi,e);this.f.Wa(b,["touchend","mouseup"],this.Ad,e);ip?(d.setCapture(!1),this.f.Wa(d,"losecapture",this.Ad)):this.f.Wa(b?b.parentWindow||b.defaultView:window,"blur",this.Ad);this.j&&this.f.Wa(this.j,"scroll",this.nl,+e);this.clientX=this.xg=a.clientX;this.clientY=this.yg=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;this.tc=this.target.offsetLeft;this.uc=this.target.offsetTop;this.e=Mf(uf(this.d));ta()}};l.Ad=function(a){gp(this.f);ip&&this.d.releaseCapture();if(this.cc){jp(a);this.cc=!1;var b=lp(this,this.tc),d=mp(this,this.uc);this.dispatchEvent(new kp("end",this,a.clientX,a.clientY,0,b,d))}else this.dispatchEvent("earlycancel")};+function jp(a){var b=a.type;"touchstart"==b||"touchmove"==b?xc(a,a.c.targetTouches[0],a.d):"touchend"!=b&&"touchcancel"!=b||xc(a,a.c.changedTouches[0],a.d)}+l.Hi=function(a){jp(a);var b=1*(a.clientX-this.clientX),d=a.clientY-this.clientY;this.clientX=a.clientX;this.clientY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;if(!this.cc){var e=this.xg-this.clientX,f=this.yg-this.clientY;if(0<e*e+f*f)if(this.dispatchEvent(new kp("start",this,a.clientX,a.clientY)))this.cc=!0;else{this.sa||this.Ad(a);return}}d=np(this,b,d);b=d.x;d=d.y;this.cc&&this.dispatchEvent(new kp("beforedrag",this,a.clientX,a.clientY,0,b,d))&&(op(this,a,b,d),a.preventDefault())};+function np(a,b,d){var e=Mf(uf(a.d));b+=e.x-a.e.x;d+=e.y-a.e.y;a.e=e;a.tc+=b;a.uc+=d;b=lp(a,a.tc);a=mp(a,a.uc);return new sf(b,a)}l.nl=function(a){var b=np(this,0,0);a.clientX=this.clientX;a.clientY=this.clientY;op(this,a,b.x,b.y)};function op(a,b,d,e){a.target.style.left=d+"px";a.target.style.top=e+"px";a.dispatchEvent(new kp("drag",a,b.clientX,b.clientY,0,d,e))}+function lp(a,b){var d=a.c,e=isNaN(d.left)?null:d.left,d=isNaN(d.width)?0:d.width;return Math.min(null!=e?e+d:Infinity,Math.max(null!=e?e:-Infinity,b))}function mp(a,b){var d=a.c,e=isNaN(d.top)?null:d.top,d=isNaN(d.height)?0:d.height;return Math.min(null!=e?e+d:Infinity,Math.max(null!=e?e:-Infinity,b))}function kp(a,b,d,e,f,g,h){qc.call(this,a);this.clientX=d;this.clientY=e;this.left=m(g)?g:b.tc;this.top=m(h)?h:b.uc}v(kp,qc);function pp(a){a=m(a)?a:{};this.i=void 0;this.k=qp;this.n=null;this.s=!1;var b=m(a.className)?a.className:"ol-zoomslider",d=Bf("DIV",[b+"-thumb","ol-unselectable"]),b=Bf("DIV",[b,"ol-unselectable","ol-control"],d);this.e=new hp(d);oc(this,this.e);w(this.e,"start",this.qi,!1,this);w(this.e,"drag",this.oi,!1,this);w(this.e,"end",this.pi,!1,this);w(b,"click",this.ni,!1,this);w(d,"click",rc);Ug.call(this,{element:b,render:m(a.render)?a.render:rp})}v(pp,Ug);var qp=0;l=pp.prototype;+l.setMap=function(a){pp.X.setMap.call(this,a);null===a||a.render()};+function rp(a){if(null!==a.frameState){if(!this.s){var b=this.element,d=Kg(b),e=Kf(b),b=Pg(e,"margin"),f=new tf(e.offsetWidth,e.offsetHeight),e=f.width+b.right+b.left,b=f.height+b.top+b.bottom;this.n=[e,b];e=d.width-e;b=d.height-b;d.width>d.height?(this.k=1,d=new Cg(0,0,e,0)):(this.k=qp,d=new Cg(0,0,0,b));this.e.c=d||new Cg(NaN,NaN,NaN,NaN);this.s=!0}a=a.frameState.viewState.resolution;a!==this.i&&(this.i=a,a=1-We(this.c.c())(a),d=this.e,b=Kf(this.element),1==this.k?Gg(b,d.c.left+d.c.width*a):Gg(b,+d.c.left,d.c.top+d.c.height*a))}}l.ni=function(a){var b=this.c,d=b.c(),e=d.c();b.Qa(ef({resolution:e,duration:200,easing:Ze}));a=sp(this,a.offsetX-this.n[0]/2,a.offsetY-this.n[1]/2);a=tp(this,a);d.j(d.constrainResolution(a))};l.qi=function(){Ye(this.c.c(),1)};l.oi=function(a){a=sp(this,a.left,a.top);this.i=tp(this,a);this.c.c().j(this.i)};l.pi=function(){var a=this.c,b=a.c();Ye(b,-1);a.Qa(ef({resolution:this.i,duration:200,easing:Ze}));a=b.constrainResolution(this.i);b.j(a)};+function sp(a,b,d){var e=a.e.c;return Vb(1===a.k?(b-e.left)/e.width:(d-e.top)/e.height,0,1)}function tp(a,b){return Ve(a.c.c())(1-b)};function up(a){a=m(a)?a:{};this.e=m(a.extent)?a.extent:null;var b=m(a.className)?a.className:"ol-zoom-extent",d=Bf("BUTTON",{type:"button",title:m(a.tipLabel)?a.tipLabel:"Fit to extent"},m(a.label)?a.label:"E");w(d,"click",this.i,!1,this);w(d,["mouseout",uc],function(){this.blur()},!1);b=Bf("DIV",b+" ol-unselectable ol-control",d);Ug.call(this,{element:b,target:a.target})}v(up,Ug);+up.prototype.i=function(a){a.preventDefault();var b=this.c;a=b.c();var d=null===this.e?a.t.N():this.e,b=b.j();a.te(d,b)};function vp(a){qd.call(this);a=m(a)?a:{};this.c=null;w(this,ud("tracking"),this.n,!1,this);this.d(m(a.tracking)?a.tracking:!1)}v(vp,qd);vp.prototype.T=function(){this.d(!1);vp.X.T.call(this)};+vp.prototype.u=function(a){a=a.c;if(null!=a.alpha){var b=Yb(a.alpha);this.set("alpha",b);"boolean"==typeof a.absolute&&a.absolute?this.set("heading",b):null!=a.webkitCompassHeading&&null!=a.webkitCompassAccuracy&&-1!=a.webkitCompassAccuracy&&this.set("heading",Yb(a.webkitCompassHeading))}null!=a.beta&&this.set("beta",Yb(a.beta));null!=a.gamma&&this.set("gamma",Yb(a.gamma));this.q()};vp.prototype.j=function(){return this.get("alpha")};vp.prototype.getAlpha=vp.prototype.j;vp.prototype.i=function(){return this.get("beta")};+vp.prototype.getBeta=vp.prototype.i;vp.prototype.k=function(){return this.get("gamma")};vp.prototype.getGamma=vp.prototype.k;vp.prototype.l=function(){return this.get("heading")};vp.prototype.getHeading=vp.prototype.l;vp.prototype.e=function(){return this.get("tracking")};vp.prototype.getTracking=vp.prototype.e;vp.prototype.n=function(){if($f){var a=this.e();a&&null===this.c?this.c=w(ba,"deviceorientation",this.u,!1,this):a||null===this.c||(Wc(this.c),this.c=null)}};+vp.prototype.d=function(a){this.set("tracking",a)};vp.prototype.setTracking=vp.prototype.d;function wp(a){qd.call(this);this.l=a;w(this.l,["change","input"],this.k,!1,this);w(this,ud("value"),this.n,!1,this);w(this,ud("checked"),this.i,!1,this)}v(wp,qd);wp.prototype.c=function(){return this.get("checked")};wp.prototype.getChecked=wp.prototype.c;wp.prototype.d=function(){return this.get("value")};wp.prototype.getValue=wp.prototype.d;wp.prototype.j=function(a){this.set("value",a)};wp.prototype.setValue=wp.prototype.j;wp.prototype.e=function(a){this.set("checked",a)};+wp.prototype.setChecked=wp.prototype.e;wp.prototype.k=function(){var a=this.l;"checkbox"===a.type||"radio"===a.type?this.e(a.checked):this.j(a.value)};wp.prototype.i=function(){this.l.checked=this.c()};wp.prototype.n=function(){this.l.value=this.d()};function O(a){qd.call(this);this.ea=void 0;this.d="geometry";this.k=null;this.c=void 0;this.i=null;w(this,ud(this.d),this.Bd,!1,this);m(a)&&(a instanceof ok||null===a?this.Xa(a):this.I(a))}v(O,qd);O.prototype.clone=function(){var a=new O(this.M());a.j(this.d);var b=this.W();null!=b&&a.Xa(b.clone());b=this.k;null===b||a.l(b);return a};O.prototype.W=function(){return this.get(this.d)};O.prototype.getGeometry=O.prototype.W;l=O.prototype;l.Jh=function(){return this.ea};l.Ih=function(){return this.d};+l.uj=function(){return this.k};l.vj=function(){return this.c};l.xi=function(){this.q()};l.Bd=function(){null!==this.i&&(Wc(this.i),this.i=null);var a=this.W();null!=a&&(this.i=w(a,"change",this.xi,!1,this),this.q())};l.Xa=function(a){this.set(this.d,a)};O.prototype.setGeometry=O.prototype.Xa;O.prototype.l=function(a){this.k=a;null===a?a=void 0:ka(a)||(a=ga(a)?a:[a],a=$c(a));this.c=a;this.q()};O.prototype.e=function(a){this.ea=a;this.q()};+O.prototype.j=function(a){Vc(this,ud(this.d),this.Bd,!1,this);this.d=a;w(this,ud(this.d),this.Bd,!1,this);this.Bd()};function xp(a){a=m(a)?a:{};this.k=this.j=this.e=this.f=this.d=this.c=null;this.i=void 0;this.If(m(a.style)?a.style:yl);m(a.features)?ga(a.features)?this.Xc(new lg(a.features.slice())):this.Xc(a.features):this.Xc(new lg);m(a.map)&&this.setMap(a.map)}l=xp.prototype;l.Gf=function(a){this.c.push(a)};l.oj=function(){return this.c};l.pj=function(){return this.e};l.Hf=function(){yp(this)};l.vi=function(a){a=a.element;this.f[ma(a).toString()]=w(a,"change",this.Hf,!1,this);yp(this)};+l.wi=function(a){a=ma(a.element).toString();Wc(this.f[a]);delete this.f[a];yp(this)};l.sj=function(){yp(this)};l.tj=function(a){if(null!==this.c){var b=this.i;m(b)||(b=yl);var d=a.c;a=a.frameState;var e=a.viewState.resolution,f=bn(e,a.pixelRatio),g,h,k,n;this.c.forEach(function(a){n=a.c;k=m(n)?n.call(a,e):b(a,e);if(null!=k)for(h=k.length,g=0;g<h;++g)cn(d,a,k[g],f,this.sj,this)},this)}};l.Id=function(a){this.c.remove(a)};function yp(a){null===a.e||a.e.render()}+l.Xc=function(a){null!==this.d&&(Qa(this.d,Wc),this.d=null);null!==this.f&&(Qa(qb(this.f),Wc),this.f=null);this.c=a;null!==a&&(this.d=[w(a,"add",this.vi,!1,this),w(a,"remove",this.wi,!1,this)],this.f={},a.forEach(function(a){this.f[ma(a).toString()]=w(a,"change",this.Hf,!1,this)},this));yp(this)};l.setMap=function(a){null!==this.j&&(Wc(this.j),this.j=null);yp(this);this.e=a;null!==a&&(this.j=w(a,"postcompose",this.tj,!1,this),a.render())};l.If=function(a){this.k=a;this.i=xl(a);yp(this)};l.qj=function(){return this.k};+l.rj=function(){return this.i};function zp(){this.defaultDataProjection=null}function Ap(a,b,d){var e;m(d)&&(e={dataProjection:m(d.dataProjection)?d.dataProjection:a.Oa(b),featureProjection:d.featureProjection});return Bp(a,e)}function Bp(a,b){var d;m(b)&&(d={featureProjection:b.featureProjection,dataProjection:null!=b.dataProjection?b.dataProjection:a.defaultDataProjection,rightHanded:b.rightHanded});return d}+function Cp(a,b,d){var e=m(d)?ze(d.featureProjection):null;d=m(d)?ze(d.dataProjection):null;return null===e||null===d||Re(e,d)?a:a instanceof ok?(b?a.clone():a).transform(b?e:d,b?d:e):Ue(b?a.slice():a,b?e:d,b?d:e)};var Dp=ba.JSON.parse,Ep=ba.JSON.stringify;function Fp(){this.defaultDataProjection=null}v(Fp,zp);function Gp(a){return la(a)?a:ia(a)?(a=Dp(a),m(a)?a:null):null}l=Fp.prototype;l.S=function(){return"json"};l.Rb=function(a,b){return Hp(this,Gp(a),Ap(this,a,b))};l.qa=function(a,b){return this.d(Gp(a),Ap(this,a,b))};l.Vc=function(a,b){var d=Gp(a),e=Ap(this,a,b);return Ip(d,e)};l.Oa=function(a){a=Gp(a).crs;return null!=a?"name"==a.type?ze(a.properties.name):"EPSG"==a.type?ze("EPSG:"+a.properties.code):null:this.defaultDataProjection};+l.fe=function(a,b){return Ep(this.c(a,b))};l.Ub=function(a,b){return Ep(this.e(a,b))};l.ad=function(a,b){return Ep(this.j(a,b))};function Jp(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=ze(null!=a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326");this.f=a.geometryName}v(Jp,Fp);function Ip(a,b){return null===a?null:Cp((0,Kp[a.type])(a),!1,b)}function Lp(a,b){return(0,Mp[a.S()])(Cp(a,!0,b),b)}+var Kp={Point:function(a){return new Mk(a.coordinates)},LineString:function(a){return new Sm(a.coordinates)},Polygon:function(a){return new F(a.coordinates)},MultiPoint:function(a){return new Xm(a.coordinates)},MultiLineString:function(a){return new Um(a.coordinates)},MultiPolygon:function(a){return new Ym(a.coordinates)},GeometryCollection:function(a,b){var d=Sa(a.geometries,function(a){return Ip(a,b)});return new Lm(d)}},Mp={Point:function(a){return{type:"Point",coordinates:a.U()}},LineString:function(a){return{type:"LineString",+coordinates:a.U()}},Polygon:function(a,b){var d;m(b)&&(d=b.rightHanded);return{type:"Polygon",coordinates:a.U(d)}},MultiPoint:function(a){return{type:"MultiPoint",coordinates:a.U()}},MultiLineString:function(a){return{type:"MultiLineString",coordinates:a.U()}},MultiPolygon:function(a,b){var d;m(b)&&(d=b.rightHanded);return{type:"MultiPolygon",coordinates:a.U(d)}},GeometryCollection:function(a,b){return{type:"GeometryCollection",geometries:Sa(a.e,function(a){return Lp(a,b)})}},Circle:function(){return{type:"GeometryCollection",+geometries:[]}}};function Hp(a,b,d){d=Ip(b.geometry,d);var e=new O;m(a.f)&&e.j(a.f);e.Xa(d);m(b.id)&&e.e(b.id);m(b.properties)&&e.I(b.properties);return e}Jp.prototype.d=function(a,b){if("Feature"==a.type)return[Hp(this,a,b)];if("FeatureCollection"==a.type){var d=[],e=a.features,f,g;f=0;for(g=e.length;f<g;++f)d.push(Hp(this,e[f],b));return d}return[]};+Jp.prototype.c=function(a,b){b=Bp(this,b);var d={type:"Feature"},e=a.ea;null!=e&&(d.id=e);e=a.W();null!=e&&(d.geometry=Lp(e,b));e=a.M();yb(e,a.d);d.properties=wb(e)?null:e;return d};Jp.prototype.e=function(a,b){b=Bp(this,b);var d=[],e,f;e=0;for(f=a.length;e<f;++e)d.push(this.c(a[e],b));return{type:"FeatureCollection",features:d}};Jp.prototype.j=function(a,b){return Lp(a,Bp(this,b))};function Np(a){if("undefined"!=typeof XMLSerializer)return(new XMLSerializer).serializeToString(a);if(a=a.xml)return a;throw Error("Your browser does not support serializing XML documents");};var Op;a:if(document.implementation&&document.implementation.createDocument)Op=document.implementation.createDocument("","",null);else{if("undefined"!=typeof ActiveXObject){var Pp=new ActiveXObject("MSXML2.DOMDocument");if(Pp){Pp.resolveExternals=!1;Pp.validateOnParse=!1;try{Pp.setProperty("ProhibitDTD",!0),Pp.setProperty("MaxXMLSize",2048),Pp.setProperty("MaxElementDepth",256)}catch(Qp){}}if(Pp){Op=Pp;break a}}throw Error("Your browser does not support creating new documents");}var Rp=Op;+function Sp(a,b){return Rp.createElementNS(a,b)}function Tp(a,b){null===a&&(a="");return Rp.createNode(1,b,a)}var Up=document.implementation&&document.implementation.createDocument?Sp:Tp;function Vp(a,b){return Wp(a,b,[]).join("")}function Wp(a,b,d){if(4==a.nodeType||3==a.nodeType)b?d.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):d.push(a.nodeValue);else for(a=a.firstChild;null!==a;a=a.nextSibling)Wp(a,b,d);return d}function Xp(a){return a.localName}+function Yp(a){var b=a.localName;return m(b)?b:a.baseName}var Zp=Gb?Yp:Xp;function $p(a){return a instanceof Document}function aq(a){return la(a)&&9==a.nodeType}var bq=Gb?aq:$p;function cq(a){return a instanceof Node}function dq(a){return la(a)&&m(a.nodeType)}var eq=Gb?dq:cq;function fq(a,b,d){return a.getAttributeNS(b,d)||""}function gq(a,b,d){var e="";a=hq(a,b,d);m(a)&&(e=a.nodeValue);return e}var iq=document.implementation&&document.implementation.createDocument?fq:gq;+function jq(a,b,d){return a.getAttributeNodeNS(b,d)}function kq(a,b,d){var e=null;a=a.attributes;for(var f,g,h=0,k=a.length;h<k;++h)if(f=a[h],f.namespaceURI==b&&(g=f.prefix?f.prefix+":"+d:d,g==f.nodeName)){e=f;break}return e}var hq=document.implementation&&document.implementation.createDocument?jq:kq;function lq(a,b,d,e){a.setAttributeNS(b,d,e)}function mq(a,b,d,e){null===b?a.setAttribute(d,e):(b=a.ownerDocument.createNode(2,d,b),b.nodeValue=e,a.setAttributeNode(b))}+var nq=document.implementation&&document.implementation.createDocument?lq:mq;function oq(a){return(new DOMParser).parseFromString(a,"application/xml")}function pq(a,b){return function(d,e){var f=a.call(b,d,e);m(f)&&ab(e[e.length-1],f)}}function qq(a,b){return function(d,e){var f=a.call(m(b)?b:this,d,e);m(f)&&e[e.length-1].push(f)}}function rq(a,b){return function(d,e){var f=a.call(m(b)?b:this,d,e);m(f)&&(e[e.length-1]=f)}}+function sq(a){return function(b,d){var e=a.call(m(void 0)?void 0:this,b,d);m(e)&&Ab(d[d.length-1],m(void 0)?void 0:b.localName).push(e)}}function P(a,b){return function(d,e){var f=a.call(m(void 0)?void 0:this,d,e);m(f)&&(e[e.length-1][m(b)?b:d.localName]=f)}}function S(a,b,d){return tq(a,b,d)}function T(a,b){return function(d,e,f){a.call(m(b)?b:this,d,e,f);f[f.length-1].node.appendChild(d)}}+function uq(a){var b,d;return function(e,f,g){if(!m(b)){b={};var h={};h[e.localName]=a;b[e.namespaceURI]=h;d=vq(e.localName)}wq(b,d,f,g)}}function vq(a,b){return function(d,e,f){d=e[e.length-1].node;e=a;m(e)||(e=f);f=b;m(b)||(f=d.namespaceURI);return Up(f,e)}}var xq=vq();function yq(a,b){for(var d=b.length,e=Array(d),f=0;f<d;++f)e[f]=a[b[f]];return e}function tq(a,b,d){d=m(d)?d:{};var e,f;e=0;for(f=a.length;e<f;++e)d[a[e]]=b;return d}+function zq(a,b,d,e){for(b=b.firstElementChild;null!==b;b=b.nextElementSibling){var f=a[b.namespaceURI];m(f)&&(f=f[b.localName],m(f)&&f.call(e,b,d))}}function V(a,b,d,e,f){e.push(a);zq(b,d,e,f);return e.pop()}function wq(a,b,d,e,f,g){for(var h=(m(f)?f:d).length,k,n,p=0;p<h;++p)k=d[p],m(k)&&(n=b.call(g,k,e,m(f)?f[p]:void 0),m(n)&&a[n.namespaceURI][n.localName].call(g,n,k,e))}function Aq(a,b,d,e,f,g,h){f.push(a);wq(b,d,e,f,g,h);f.pop()};function Bq(){this.defaultDataProjection=null}v(Bq,zp);l=Bq.prototype;l.S=function(){return"xml"};l.Rb=function(a,b){if(bq(a))return Cq(this,a,b);if(eq(a))return this.ig(a,b);if(ia(a)){var d=oq(a);return Cq(this,d,b)}return null};function Cq(a,b,d){a=Dq(a,b,d);return 0<a.length?a[0]:null}l.qa=function(a,b){if(bq(a))return Dq(this,a,b);if(eq(a))return this.Sb(a,b);if(ia(a)){var d=oq(a);return Dq(this,d,b)}return[]};+function Dq(a,b,d){var e=[];for(b=b.firstChild;null!==b;b=b.nextSibling)1==b.nodeType&&ab(e,a.Sb(b,d));return e}l.Vc=function(a,b){if(bq(a))return this.n(a,b);if(eq(a)){var d=this.Yd(a,[Ap(this,a,m(b)?b:{})]);return m(d)?d:null}return ia(a)?(d=oq(a),this.n(d,b)):null};l.Oa=function(a){return bq(a)?this.Ne(a):eq(a)?this.ae(a):ia(a)?(a=oq(a),this.Ne(a)):null};l.Ne=function(){return this.defaultDataProjection};l.ae=function(){return this.defaultDataProjection};l.fe=function(a,b){var d=this.s(a,b);return Np(d)};+l.Ub=function(a,b){var d=this.c(a,b);return Np(d)};l.ad=function(a,b){var d=this.l(a,b);return Np(d)};function Eq(a){a=m(a)?a:{};this.featureType=a.featureType;this.featureNS=a.featureNS;this.srsName=a.srsName;this.schemaLocation="";this.f={};this.f["http://www.opengis.net/gml"]={featureMember:rq(Eq.prototype.Wd),featureMembers:rq(Eq.prototype.Wd)};this.defaultDataProjection=null}v(Eq,Bq);l=Eq.prototype;+l.Wd=function(a,b){var d=Zp(a),e;if("FeatureCollection"==d)e=V(null,this.f,a,b,this);else if("featureMembers"==d||"featureMember"==d){var f=b[0],g=f.featureType;e=f.featureNS;var h,k;if(!m(g)&&null!=a.childNodes){g=[];e={};h=0;for(k=a.childNodes.length;h<k;++h){var n=a.childNodes[h];if(1===n.nodeType){var p=n.nodeName.split(":").pop();if(-1===Pa(g,p)){var q;ub(e,n.namespaceURI)?q=vb(e,function(a){return a===n.namespaceURI}):(q="p"+pb(e),e[q]=n.namespaceURI);g.push(q+":"+p)}}}f.featureType=g;f.featureNS=+e}ia(e)&&(h=e,e={},e.p0=h);var f={},g=ga(g)?g:[g],r;for(r in e){p={};h=0;for(k=g.length;h<k;++h)(-1===g[h].indexOf(":")?"p0":g[h].split(":")[0])===r&&(p[g[h].split(":").pop()]="featureMembers"==d?qq(this.Je,this):rq(this.Je,this));f[e[r]]=p}e=V([],f,a,b)}m(e)||(e=[]);return e};l.Yd=function(a,b){var d=b[0];d.srsName=a.firstElementChild.getAttribute("srsName");var e=V(null,this.We,a,b,this);if(null!=e)return Cp(e,!1,d)};+l.Je=function(a,b){var d,e=a.getAttribute("fid")||iq(a,"http://www.opengis.net/gml","id"),f={},g;for(d=a.firstElementChild;null!==d;d=d.nextElementSibling){var h=Zp(d);if(0===d.childNodes.length||1===d.childNodes.length&&3===d.firstChild.nodeType){var k=Vp(d,!1);/^[\s\xa0]*$/.test(k)&&(k=void 0);f[h]=k}else"boundedBy"!==h&&(g=h),f[h]=this.Yd(d,b)}d=new O(f);m(g)&&d.j(g);e&&d.e(e);return d};l.og=function(a,b){var d=this.Xd(a,b);if(null!=d){var e=new Mk(null);Nk(e,"XYZ",d);return e}};+l.mg=function(a,b){var d=V([],this.Sg,a,b,this);if(m(d))return new Xm(d)};l.lg=function(a,b){var d=V([],this.Rg,a,b,this);if(m(d)){var e=new Um(null);Wm(e,d);return e}};l.ng=function(a,b){var d=V([],this.Tg,a,b,this);if(m(d)){var e=new Ym(null);$m(e,d);return e}};l.dg=function(a,b){zq(this.Wg,a,b,this)};l.Cf=function(a,b){zq(this.Pg,a,b,this)};l.eg=function(a,b){zq(this.Xg,a,b,this)};l.Zd=function(a,b){var d=this.Xd(a,b);if(null!=d){var e=new Sm(null);Tm(e,"XYZ",d);return e}};+l.Dl=function(a,b){var d=V(null,this.cd,a,b,this);if(null!=d)return d};l.kg=function(a,b){var d=this.Xd(a,b);if(m(d)){var e=new Kk(null);Lk(e,"XYZ",d);return e}};l.$d=function(a,b){var d=V([null],this.je,a,b,this);if(m(d)&&null!==d[0]){var e=new F(null),f=d[0],g=[f.length],h,k;h=1;for(k=d.length;h<k;++h)ab(f,d[h]),g.push(f.length);Zk(e,"XYZ",f,g);return e}};l.Xd=function(a,b){return V(null,this.cd,a,b,this)};l.Sg=Object({"http://www.opengis.net/gml":{pointMember:qq(Eq.prototype.dg),pointMembers:qq(Eq.prototype.dg)}});+l.Rg=Object({"http://www.opengis.net/gml":{lineStringMember:qq(Eq.prototype.Cf),lineStringMembers:qq(Eq.prototype.Cf)}});l.Tg=Object({"http://www.opengis.net/gml":{polygonMember:qq(Eq.prototype.eg),polygonMembers:qq(Eq.prototype.eg)}});l.Wg=Object({"http://www.opengis.net/gml":{Point:qq(Eq.prototype.Xd)}});l.Pg=Object({"http://www.opengis.net/gml":{LineString:qq(Eq.prototype.Zd)}});l.Xg=Object({"http://www.opengis.net/gml":{Polygon:qq(Eq.prototype.$d)}});l.dd=Object({"http://www.opengis.net/gml":{LinearRing:rq(Eq.prototype.Dl)}});+l.Sb=function(a,b){var d={featureType:this.featureType,featureNS:this.featureNS};m(b)&&Db(d,Ap(this,a,b));return this.Wd(a,[d])};l.ae=function(a){return ze(m(this.u)?this.u:a.firstElementChild.getAttribute("srsName"))};function Fq(a){a=Vp(a,!1);return Gq(a)}function Gq(a){if(a=/^\s*(true|1)|(false|0)\s*$/.exec(a))return m(a[1])||!1}function Hq(a){a=Vp(a,!1);if(a=/^\s*(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(Z|(?:([+\-])(\d{2})(?::(\d{2}))?))\s*$/.exec(a)){var b=Date.UTC(parseInt(a[1],10),parseInt(a[2],10)-1,parseInt(a[3],10),parseInt(a[4],10),parseInt(a[5],10),parseInt(a[6],10))/1E3;if("Z"!=a[7]){var d="-"==a[8]?-1:1,b=b+60*d*parseInt(a[9],10);m(a[10])&&(b+=3600*d*parseInt(a[10],10))}return b}}+function Iq(a){a=Vp(a,!1);return Jq(a)}function Jq(a){if(a=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(a))return parseFloat(a[1])}function Kq(a){a=Vp(a,!1);return Lq(a)}function Lq(a){if(a=/^\s*(\d+)\s*$/.exec(a))return parseInt(a[1],10)}function W(a){a=Vp(a,!1);return Aa(a)}function Mq(a,b){Nq(a,b?"1":"0")}function Oq(a,b){a.appendChild(Rp.createTextNode(b.toPrecision()))}function Pq(a,b){a.appendChild(Rp.createTextNode(b.toString()))}function Nq(a,b){a.appendChild(Rp.createTextNode(b))};function Qq(a){a=m(a)?a:{};Eq.call(this,a);this.p=m(a.surface)?a.surface:!1;this.j=m(a.curve)?a.curve:!1;this.i=m(a.multiCurve)?a.multiCurve:!0;this.k=m(a.multiSurface)?a.multiSurface:!0;this.schemaLocation=m(a.schemaLocation)?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"}v(Qq,Eq);l=Qq.prototype;l.Gl=function(a,b){var d=V([],this.Qg,a,b,this);if(m(d)){var e=new Um(null);Wm(e,d);return e}};+l.Hl=function(a,b){var d=V([],this.Ug,a,b,this);if(m(d)){var e=new Ym(null);$m(e,d);return e}};l.gf=function(a,b){zq(this.Mg,a,b,this)};l.zg=function(a,b){zq(this.$g,a,b,this)};l.Kl=function(a,b){return V([null],this.Vg,a,b,this)};l.Ml=function(a,b){return V([null],this.Zg,a,b,this)};l.Ll=function(a,b){return V([null],this.je,a,b,this)};l.Fl=function(a,b){return V([null],this.cd,a,b,this)};l.Vi=function(a,b){var d=V(void 0,this.dd,a,b,this);m(d)&&b[b.length-1].push(d)};+l.uh=function(a,b){var d=V(void 0,this.dd,a,b,this);m(d)&&(b[b.length-1][0]=d)};l.pg=function(a,b){var d=V([null],this.ah,a,b,this);if(m(d)&&null!==d[0]){var e=new F(null),f=d[0],g=[f.length],h,k;h=1;for(k=d.length;h<k;++h)ab(f,d[h]),g.push(f.length);Zk(e,"XYZ",f,g);return e}};l.gg=function(a,b){var d=V([null],this.Ng,a,b,this);if(m(d)){var e=new Sm(null);Tm(e,"XYZ",d);return e}};l.Cl=function(a,b){var d=V([null],this.Og,a,b,this);return Vd(d[1][0],d[1][1],d[2][0],d[2][1])};+l.El=function(a,b){for(var d=Vp(a,!1),e=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,f=[],g;g=e.exec(d);)f.push(parseFloat(g[1])),d=d.substr(g[0].length);if(""===d){d=b[0].srsName;e="enu";null===d||(e=Ce(ze(d)));if("neu"===e)for(d=0,e=f.length;d<e;d+=3)g=f[d],f[d]=f[d+1],f[d+1]=g;d=f.length;2==d&&f.push(0);return 0===d?void 0:f}};+l.Le=function(a,b){var d=Vp(a,!1).replace(/^\s*|\s*$/g,""),e=b[0].srsName,f=a.parentNode.getAttribute("srsDimension"),g="enu";null===e||(g=Ce(ze(e)));d=d.split(/\s+/);e=2;fa(a.getAttribute("srsDimension"))?fa(a.getAttribute("dimension"))?null===f||(e=Lq(f)):e=Lq(a.getAttribute("dimension")):e=Lq(a.getAttribute("srsDimension"));for(var h,k,n=[],p=0,q=d.length;p<q;p+=e)f=parseFloat(d[p]),h=parseFloat(d[p+1]),k=3===e?parseFloat(d[p+2]):0,"en"===g.substr(0,2)?n.push(f,h,k):n.push(h,f,k);return n};+l.cd=Object({"http://www.opengis.net/gml":{pos:rq(Qq.prototype.El),posList:rq(Qq.prototype.Le)}});l.je=Object({"http://www.opengis.net/gml":{interior:Qq.prototype.Vi,exterior:Qq.prototype.uh}});+l.We=Object({"http://www.opengis.net/gml":{Point:rq(Eq.prototype.og),MultiPoint:rq(Eq.prototype.mg),LineString:rq(Eq.prototype.Zd),MultiLineString:rq(Eq.prototype.lg),LinearRing:rq(Eq.prototype.kg),Polygon:rq(Eq.prototype.$d),MultiPolygon:rq(Eq.prototype.ng),Surface:rq(Qq.prototype.pg),MultiSurface:rq(Qq.prototype.Hl),Curve:rq(Qq.prototype.gg),MultiCurve:rq(Qq.prototype.Gl),Envelope:rq(Qq.prototype.Cl)}});l.Qg=Object({"http://www.opengis.net/gml":{curveMember:qq(Qq.prototype.gf),curveMembers:qq(Qq.prototype.gf)}});+l.Ug=Object({"http://www.opengis.net/gml":{surfaceMember:qq(Qq.prototype.zg),surfaceMembers:qq(Qq.prototype.zg)}});l.Mg=Object({"http://www.opengis.net/gml":{LineString:qq(Eq.prototype.Zd),Curve:qq(Qq.prototype.gg)}});l.$g=Object({"http://www.opengis.net/gml":{Polygon:qq(Eq.prototype.$d),Surface:qq(Qq.prototype.pg)}});l.ah=Object({"http://www.opengis.net/gml":{patches:rq(Qq.prototype.Kl)}});l.Ng=Object({"http://www.opengis.net/gml":{segments:rq(Qq.prototype.Ml)}});+l.Og=Object({"http://www.opengis.net/gml":{lowerCorner:qq(Qq.prototype.Le),upperCorner:qq(Qq.prototype.Le)}});l.Vg=Object({"http://www.opengis.net/gml":{PolygonPatch:rq(Qq.prototype.Ll)}});l.Zg=Object({"http://www.opengis.net/gml":{LineStringSegment:rq(Qq.prototype.Fl)}});function Rq(a,b,d){d=d[d.length-1].srsName;b=b.U();for(var e=b.length,f=Array(e),g,h=0;h<e;++h){g=b[h];var k=h,n="enu";null!=d&&(n=Ce(ze(d)));f[k]="en"===n.substr(0,2)?g[0]+" "+g[1]:g[1]+" "+g[0]}Nq(a,f.join(" "))}+l.Ig=function(a,b,d){var e=d[d.length-1].srsName;null!=e&&a.setAttribute("srsName",e);e=Up(a.namespaceURI,"pos");a.appendChild(e);d=d[d.length-1].srsName;a="enu";null!=d&&(a=Ce(ze(d)));b=b.U();Nq(e,"en"===a.substr(0,2)?b[0]+" "+b[1]:b[1]+" "+b[0])};var Sq={"http://www.opengis.net/gml":{lowerCorner:T(Nq),upperCorner:T(Nq)}};l=Qq.prototype;+l.ym=function(a,b,d){var e=d[d.length-1].srsName;m(e)&&a.setAttribute("srsName",e);Aq({node:a},Sq,xq,[b[0]+" "+b[1],b[2]+" "+b[3]],d,["lowerCorner","upperCorner"],this)};l.Fg=function(a,b,d){var e=d[d.length-1].srsName;null!=e&&a.setAttribute("srsName",e);e=Up(a.namespaceURI,"posList");a.appendChild(e);Rq(e,b,d)};l.Yg=function(a,b){var d=b[b.length-1],e=d.node,f=d.exteriorWritten;m(f)||(d.exteriorWritten=!0);return Up(e.namespaceURI,m(f)?"interior":"exterior")};+l.ie=function(a,b,d){var e=d[d.length-1].srsName;"PolygonPatch"!==a.nodeName&&null!=e&&a.setAttribute("srsName",e);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.qd(),Aq({node:a,srsName:e},Tq,this.Yg,b,d,void 0,this)):"Surface"===a.nodeName&&(e=Up(a.namespaceURI,"patches"),a.appendChild(e),a=Up(e.namespaceURI,"PolygonPatch"),e.appendChild(a),this.ie(a,b,d))};+l.ee=function(a,b,d){var e=d[d.length-1].srsName;"LineStringSegment"!==a.nodeName&&null!=e&&a.setAttribute("srsName",e);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(e=Up(a.namespaceURI,"posList"),a.appendChild(e),Rq(e,b,d)):"Curve"===a.nodeName&&(e=Up(a.namespaceURI,"segments"),a.appendChild(e),a=Up(e.namespaceURI,"LineStringSegment"),e.appendChild(a),this.ee(a,b,d))};+l.Hg=function(a,b,d){var e=d[d.length-1],f=e.srsName,e=e.surface;null!=f&&a.setAttribute("srsName",f);b=b.ud();Aq({node:a,srsName:f,surface:e},Uq,this.e,b,d,void 0,this)};l.Cm=function(a,b,d){var e=d[d.length-1].srsName;null!=e&&a.setAttribute("srsName",e);b=b.Kd();Aq({node:a,srsName:e},Vq,vq("pointMember"),b,d,void 0,this)};l.Gg=function(a,b,d){var e=d[d.length-1],f=e.srsName,e=e.curve;null!=f&&a.setAttribute("srsName",f);b=b.Pc();Aq({node:a,srsName:f,curve:e},Wq,this.e,b,d,void 0,this)};+l.Jg=function(a,b,d){var e=Up(a.namespaceURI,"LinearRing");a.appendChild(e);this.Fg(e,b,d)};l.Kg=function(a,b,d){var e=this.d(b,d);m(e)&&(a.appendChild(e),this.ie(e,b,d))};l.Fm=function(a,b,d){var e=Up(a.namespaceURI,"Point");a.appendChild(e);this.Ig(e,b,d)};l.Eg=function(a,b,d){var e=this.d(b,d);m(e)&&(a.appendChild(e),this.ee(e,b,d))};+l.he=function(a,b,d){var e=d[d.length-1],f=Bb(e);f.node=a;var g;ga(b)?m(e.dataProjection)?g=Ue(b,e.featureProjection,e.dataProjection):g=b:g=Cp(b,!0,e);Aq(f,Xq,this.d,[g],d,void 0,this)};+l.Bg=function(a,b,d){var e=b.ea;m(e)&&a.setAttribute("fid",e);var e=d[d.length-1],f=e.featureNS,g=b.d;m(e.ic)||(e.ic={},e.ic[f]={});var h=b.M();b=[];var k=[],n;for(n in h){var p=h[n];null!==p&&(b.push(n),k.push(p),n==g?n in e.ic[f]||(e.ic[f][n]=T(this.he,this)):n in e.ic[f]||(e.ic[f][n]=T(Nq)))}n=Bb(e);n.node=a;Aq(n,e.ic,vq(void 0,f),k,d,b)};+var Uq={"http://www.opengis.net/gml":{surfaceMember:T(Qq.prototype.Kg),polygonMember:T(Qq.prototype.Kg)}},Vq={"http://www.opengis.net/gml":{pointMember:T(Qq.prototype.Fm)}},Wq={"http://www.opengis.net/gml":{lineStringMember:T(Qq.prototype.Eg),curveMember:T(Qq.prototype.Eg)}},Tq={"http://www.opengis.net/gml":{exterior:T(Qq.prototype.Jg),interior:T(Qq.prototype.Jg)}},Xq={"http://www.opengis.net/gml":{Curve:T(Qq.prototype.ee),MultiCurve:T(Qq.prototype.Gg),Point:T(Qq.prototype.Ig),MultiPoint:T(Qq.prototype.Cm),+LineString:T(Qq.prototype.ee),MultiLineString:T(Qq.prototype.Gg),LinearRing:T(Qq.prototype.Fg),Polygon:T(Qq.prototype.ie),MultiPolygon:T(Qq.prototype.Hg),Surface:T(Qq.prototype.ie),MultiSurface:T(Qq.prototype.Hg),Envelope:T(Qq.prototype.ym)}},Yq={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};Qq.prototype.e=function(a,b){return Up("http://www.opengis.net/gml",Yq[b[b.length-1].node.nodeName])};+Qq.prototype.d=function(a,b){var d=b[b.length-1],e=d.multiSurface,f=d.surface,g=d.curve,d=d.multiCurve,h;ga(a)?h="Envelope":(h=a.S(),"MultiPolygon"===h&&!0===e?h="MultiSurface":"Polygon"===h&&!0===f?h="Surface":"LineString"===h&&!0===g?h="Curve":"MultiLineString"===h&&!0===d&&(h="MultiCurve"));return Up("http://www.opengis.net/gml",h)};+Qq.prototype.l=function(a,b){b=Bp(this,b);var d=Up("http://www.opengis.net/gml","geom"),e={node:d,srsName:this.srsName,curve:this.j,surface:this.p,multiSurface:this.k,multiCurve:this.i};m(b)&&Db(e,b);this.he(d,a,[e]);return d};+Qq.prototype.c=function(a,b){b=Bp(this,b);var d=Up("http://www.opengis.net/gml","featureMembers");nq(d,"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.schemaLocation);var e={srsName:this.srsName,curve:this.j,surface:this.p,multiSurface:this.k,multiCurve:this.i,featureNS:this.featureNS,featureType:this.featureType};m(b)&&Db(e,b);var e=[e],f=e[e.length-1],g=f.featureType,h=f.featureNS,k={};k[h]={};k[h][g]=T(this.Bg,this);f=Bb(f);f.node=d;Aq(f,k,vq(g,h),a,e);return d};function Zq(a){a=m(a)?a:{};Eq.call(this,a);this.schemaLocation=m(a.schemaLocation)?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd"}v(Zq,Eq);l=Zq.prototype;+l.jg=function(a,b){var d=Vp(a,!1).replace(/^\s*|\s*$/g,""),e=b[0].srsName,f=a.parentNode.getAttribute("srsDimension"),g="enu";null===e||(g=Ce(ze(e)));d=d.split(/[\s,]+/);e=2;fa(a.getAttribute("srsDimension"))?fa(a.getAttribute("dimension"))?null===f||(e=Lq(f)):e=Lq(a.getAttribute("dimension")):e=Lq(a.getAttribute("srsDimension"));for(var h,k,n=[],p=0,q=d.length;p<q;p+=e)f=parseFloat(d[p]),h=parseFloat(d[p+1]),k=3===e?parseFloat(d[p+2]):0,"en"===g.substr(0,2)?n.push(f,h,k):n.push(h,f,k);return n};+l.Bl=function(a,b){var d=V([null],this.Lg,a,b,this);return Vd(d[1][0],d[1][1],d[1][3],d[1][4])};l.Ti=function(a,b){var d=V(void 0,this.dd,a,b,this);m(d)&&b[b.length-1].push(d)};l.ol=function(a,b){var d=V(void 0,this.dd,a,b,this);m(d)&&(b[b.length-1][0]=d)};l.cd=Object({"http://www.opengis.net/gml":{coordinates:rq(Zq.prototype.jg)}});l.je=Object({"http://www.opengis.net/gml":{innerBoundaryIs:Zq.prototype.Ti,outerBoundaryIs:Zq.prototype.ol}});l.Lg=Object({"http://www.opengis.net/gml":{coordinates:qq(Zq.prototype.jg)}});+l.We=Object({"http://www.opengis.net/gml":{Point:rq(Eq.prototype.og),MultiPoint:rq(Eq.prototype.mg),LineString:rq(Eq.prototype.Zd),MultiLineString:rq(Eq.prototype.lg),LinearRing:rq(Eq.prototype.kg),Polygon:rq(Eq.prototype.$d),MultiPolygon:rq(Eq.prototype.ng),Box:rq(Zq.prototype.Bl)}});function $q(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=ze("EPSG:4326");this.f=a.readExtensions}v($q,Bq);var ar=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"];function br(a,b,d){a.push(parseFloat(b.getAttribute("lon")),parseFloat(b.getAttribute("lat")));"ele"in d?(a.push(d.ele),yb(d,"ele")):a.push(0);"time"in d?(a.push(d.time),yb(d,"time")):a.push(0);return a}+function cr(a,b){var d=b[b.length-1],e=a.getAttribute("href");null===e||(d.link=e);zq(dr,a,b)}function er(a,b){b[b.length-1].extensionsNode_=a}function fr(a,b){var d=b[0],e=V({flatCoordinates:[]},gr,a,b);if(m(e)){var f=e.flatCoordinates;yb(e,"flatCoordinates");var g=new Sm(null);Tm(g,"XYZM",f);Cp(g,!1,d);d=new O(g);d.I(e);return d}}+function hr(a,b){var d=b[0],e=V({flatCoordinates:[],ends:[]},ir,a,b);if(m(e)){var f=e.flatCoordinates;yb(e,"flatCoordinates");var g=e.ends;yb(e,"ends");var h=new Um(null);Vm(h,"XYZM",f,g);Cp(h,!1,d);d=new O(h);d.I(e);return d}}function jr(a,b){var d=b[0],e=V({},kr,a,b);if(m(e)){var f=br([],a,e),f=new Mk(f,"XYZM");Cp(f,!1,d);d=new O(f);d.I(e);return d}}+var lr={rte:fr,trk:hr,wpt:jr},mr=S(ar,{rte:qq(fr),trk:qq(hr),wpt:qq(jr)}),dr=S(ar,{text:P(W,"linkText"),type:P(W,"linkType")}),gr=S(ar,{name:P(W),cmt:P(W),desc:P(W),src:P(W),link:cr,number:P(Kq),extensions:er,type:P(W),rtept:function(a,b){var d=V({},nr,a,b);m(d)&&br(b[b.length-1].flatCoordinates,a,d)}}),nr=S(ar,{ele:P(Iq),time:P(Hq)}),ir=S(ar,{name:P(W),cmt:P(W),desc:P(W),src:P(W),link:cr,number:P(Kq),type:P(W),extensions:er,trkseg:function(a,b){var d=b[b.length-1];zq(or,a,b);d.ends.push(d.flatCoordinates.length)}}),+or=S(ar,{trkpt:function(a,b){var d=V({},pr,a,b);m(d)&&br(b[b.length-1].flatCoordinates,a,d)}}),pr=S(ar,{ele:P(Iq),time:P(Hq)}),kr=S(ar,{ele:P(Iq),time:P(Hq),magvar:P(Iq),geoidheight:P(Iq),name:P(W),cmt:P(W),desc:P(W),src:P(W),link:cr,sym:P(W),type:P(W),fix:P(W),sat:P(Kq),hdop:P(Iq),vdop:P(Iq),pdop:P(Iq),ageofdgpsdata:P(Iq),dgpsid:P(Kq),extensions:er});+function qr(a,b){null===b&&(b=[]);for(var d=0,e=b.length;d<e;++d){var f=b[d];if(m(a.f)){var g=f.get("extensionsNode_")||null;a.f(f,g)}f.set("extensionsNode_",void 0)}}$q.prototype.ig=function(a,b){if(!Wa(ar,a.namespaceURI))return null;var d=lr[a.localName];if(!m(d))return null;d=d(a,[Ap(this,a,b)]);if(!m(d))return null;qr(this,[d]);return d};$q.prototype.Sb=function(a,b){if(!Wa(ar,a.namespaceURI))return[];if("gpx"==a.localName){var d=V([],mr,a,[Ap(this,a,b)]);if(m(d))return qr(this,d),d}return[]};+function rr(a,b,d){a.setAttribute("href",b);b=d[d.length-1].properties;Aq({node:a},sr,xq,[b.linkText,b.linkType],d,tr)}function ur(a,b,d){var e=d[d.length-1],f=e.node.namespaceURI,g=e.properties;nq(a,null,"lat",b[1]);nq(a,null,"lon",b[0]);switch(e.geometryLayout){case "XYZM":0!==b[3]&&(g.time=b[3]);case "XYZ":0!==b[2]&&(g.ele=b[2]);break;case "XYM":0!==b[2]&&(g.time=b[2])}b=vr[f];e=yq(g,b);Aq({node:a,properties:g},wr,xq,e,d,b)}+var tr=["text","type"],sr=tq(ar,{text:T(Nq),type:T(Nq)}),xr=tq(ar,"name cmt desc src link number type rtept".split(" ")),yr=tq(ar,{name:T(Nq),cmt:T(Nq),desc:T(Nq),src:T(Nq),link:T(rr),number:T(Pq),type:T(Nq),rtept:uq(T(ur))}),zr=tq(ar,"name cmt desc src link number type trkseg".split(" ")),Cr=tq(ar,{name:T(Nq),cmt:T(Nq),desc:T(Nq),src:T(Nq),link:T(rr),number:T(Pq),type:T(Nq),trkseg:uq(T(function(a,b,d){Aq({node:a,geometryLayout:b.c,properties:{}},Ar,Br,b.U(),d)}))}),Br=vq("trkpt"),Ar=tq(ar,{trkpt:T(ur)}),+vr=tq(ar,"ele time magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid".split(" ")),wr=tq(ar,{ele:T(Oq),time:T(function(a,b){var d=new Date(1E3*b),d=d.getUTCFullYear()+"-"+Ka(d.getUTCMonth()+1)+"-"+Ka(d.getUTCDate())+"T"+Ka(d.getUTCHours())+":"+Ka(d.getUTCMinutes())+":"+Ka(d.getUTCSeconds())+"Z";a.appendChild(Rp.createTextNode(d))}),magvar:T(Oq),geoidheight:T(Oq),name:T(Nq),cmt:T(Nq),desc:T(Nq),src:T(Nq),link:T(rr),sym:T(Nq),type:T(Nq),fix:T(Nq),sat:T(Pq),+hdop:T(Oq),vdop:T(Oq),pdop:T(Oq),ageofdgpsdata:T(Oq),dgpsid:T(Pq)}),Dr={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function Er(a,b){var d=a.W();if(m(d))return Up(b[b.length-1].node.namespaceURI,Dr[d.S()])}+var Fr=tq(ar,{rte:T(function(a,b,d){var e=d[0],f=b.M();a={node:a,properties:f};b=b.W();m(b)&&(b=Cp(b,!0,e),a.geometryLayout=b.c,f.rtept=b.U());e=xr[d[d.length-1].node.namespaceURI];f=yq(f,e);Aq(a,yr,xq,f,d,e)}),trk:T(function(a,b,d){var e=d[0],f=b.M();a={node:a,properties:f};b=b.W();m(b)&&(b=Cp(b,!0,e),f.trkseg=b.Pc());e=zr[d[d.length-1].node.namespaceURI];f=yq(f,e);Aq(a,Cr,xq,f,d,e)}),wpt:T(function(a,b,d){var e=d[0],f=d[d.length-1];f.properties=b.M();b=b.W();m(b)&&(b=Cp(b,!0,e),f.geometryLayout=+b.c,ur(a,b.U(),d))})});$q.prototype.c=function(a,b){b=Bp(this,b);var d=Up("http://www.topografix.com/GPX/1/1","gpx");Aq({node:d},Fr,Er,a,[b]);return d};function Gr(a){a=Hr(a);return Sa(a,function(a){return a.d.substring(a.f,a.c)})}function Ir(a,b,d){this.d=a;this.f=b;this.c=d}function Hr(a){for(var b=RegExp("\r\n|\r|\n","g"),d=0,e,f=[];e=b.exec(a);)d=new Ir(a,d,e.index),f.push(d),d=b.lastIndex;d<a.length&&(d=new Ir(a,d,a.length),f.push(d));return f};function Jr(){this.defaultDataProjection=null}v(Jr,zp);l=Jr.prototype;l.S=function(){return"text"};l.Rb=function(a,b){return this.Uc(ia(a)?a:"",Bp(this,b))};l.qa=function(a,b){return this.Ke(ia(a)?a:"",Bp(this,b))};l.Vc=function(a,b){return this.Wc(ia(a)?a:"",Bp(this,b))};l.Oa=function(){return this.defaultDataProjection};l.fe=function(a,b){return this.ge(a,Bp(this,b))};l.Ub=function(a,b){return this.Cg(a,Bp(this,b))};l.ad=function(a,b){return this.bd(a,Bp(this,b))};function Kr(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=ze("EPSG:4326");this.c=m(a.altitudeMode)?a.altitudeMode:"none"}v(Kr,Jr);var Lr=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Mr=/^H.([A-Z]{3}).*?:(.*)/,Nr=/^HFDTE(\d{2})(\d{2})(\d{2})/;+Kr.prototype.Uc=function(a,b){var d=this.c,e=Gr(a),f={},g=[],h=2E3,k=0,n=1,p,q;p=0;for(q=e.length;p<q;++p){var r=e[p],s;if("B"==r.charAt(0)){if(s=Lr.exec(r)){var r=parseInt(s[1],10),u=parseInt(s[2],10),y=parseInt(s[3],10),z=parseInt(s[4],10)+parseInt(s[5],10)/6E4;"S"==s[6]&&(z=-z);var A=parseInt(s[7],10)+parseInt(s[8],10)/6E4;"W"==s[9]&&(A=-A);g.push(A,z);"none"!=d&&g.push("gps"==d?parseInt(s[11],10):"barometric"==d?parseInt(s[12],10):0);g.push(Date.UTC(h,k,n,r,u,y)/1E3)}}else if("H"==r.charAt(0))if(s=+Nr.exec(r))n=parseInt(s[1],10),k=parseInt(s[2],10)-1,h=2E3+parseInt(s[3],10);else if(s=Mr.exec(r))f[s[1]]=Aa(s[2]),Nr.exec(r)}if(0===g.length)return null;e=new Sm(null);Tm(e,"none"==d?"XYM":"XYZM",g);d=new O(Cp(e,!1,b));d.I(f);return d};Kr.prototype.Ke=function(a,b){var d=this.Uc(a,b);return null===d?[]:[d]};var Or=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Pr(a){if(Qr){Qr=!1;var b=ba.location;if(b){var d=b.href;if(d&&(d=(d=Pr(d)[3]||null)?decodeURI(d):d)&&d!=b.hostname)throw Qr=!0,Error();}}return a.match(Or)}var Qr=Ib;+function Rr(a,b){for(var d=a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null,h=null;0<=f?(g=d[e].substring(0,f),h=d[e].substring(f+1)):g=d[e];b(g,h?decodeURIComponent(h.replace(/\+/g," ")):"")}}function Sr(a){if(a[1]){var b=a[0],d=b.indexOf("#");0<=d&&(a.push(b.substr(d)),a[0]=b=b.substr(0,d));d=b.indexOf("?");0>d?a[1]="?":d==b.length-1&&(a[1]=void 0)}return a.join("")}+function Tr(a,b,d){if(ga(b))for(var e=0;e<b.length;e++)Tr(a,String(b[e]),d);else null!=b&&d.push("&",a,""===b?"":"=",encodeURIComponent(String(b)))}function Ur(a,b){for(var d in b)Tr(d,b[d],a);return a};function Vr(a,b){var d;a instanceof Vr?(this.bc=m(b)?b:a.bc,Wr(this,a.Tb),this.kc=a.kc,this.wb=a.wb,Xr(this,a.xc),this.vb=a.vb,Yr(this,a.c.clone()),this.Wb=a.Wb):a&&(d=Pr(String(a)))?(this.bc=!!b,Wr(this,d[1]||"",!0),this.kc=Zr(d[2]||""),this.wb=Zr(d[3]||"",!0),Xr(this,d[4]),this.vb=Zr(d[5]||"",!0),Yr(this,d[6]||"",!0),this.Wb=Zr(d[7]||"")):(this.bc=!!b,this.c=new $r(null,0,this.bc))}l=Vr.prototype;l.Tb="";l.kc="";l.wb="";l.xc=null;l.vb="";l.Wb="";l.bc=!1;+l.toString=function(){var a=[],b=this.Tb;b&&a.push(as(b,bs,!0),":");if(b=this.wb){a.push("//");var d=this.kc;d&&a.push(as(d,bs,!0),"@");a.push(encodeURIComponent(String(b)).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.xc;null!=b&&a.push(":",String(b))}if(b=this.vb)this.wb&&"/"!=b.charAt(0)&&a.push("/"),a.push(as(b,"/"==b.charAt(0)?cs:ds,!0));(b=this.c.toString())&&a.push("?",b);(b=this.Wb)&&a.push("#",as(b,es));return a.join("")};l.clone=function(){return new Vr(this)};+function Wr(a,b,d){a.Tb=d?Zr(b,!0):b;a.Tb&&(a.Tb=a.Tb.replace(/:$/,""))}function Xr(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.xc=b}else a.xc=null}function Yr(a,b,d){b instanceof $r?(a.c=b,fs(a.c,a.bc)):(d||(b=as(b,gs)),a.c=new $r(b,0,a.bc))}function hs(a){return a instanceof Vr?a.clone():new Vr(a,void 0)}+function is(a,b){a instanceof Vr||(a=hs(a));b instanceof Vr||(b=hs(b));var d=a,e=b,f=d.clone(),g=!!e.Tb;g?Wr(f,e.Tb):g=!!e.kc;g?f.kc=e.kc:g=!!e.wb;g?f.wb=e.wb:g=null!=e.xc;var h=e.vb;if(g)Xr(f,e.xc);else if(g=!!e.vb)if("/"!=h.charAt(0)&&(d.wb&&!d.vb?h="/"+h:(d=f.vb.lastIndexOf("/"),-1!=d&&(h=f.vb.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=[],n=0;n<d.length;){var p=d[n++];"."==p?h&&n==d.length&&k.push(""):+".."==p?((1<k.length||1==k.length&&""!=k[0])&&k.pop(),h&&n==d.length&&k.push("")):(k.push(p),h=!0)}h=k.join("/")}else h=d;g?f.vb=h:g=""!==e.c.toString();g?Yr(f,Zr(e.c.toString())):g=!!e.Wb;g&&(f.Wb=e.Wb);return f}function Zr(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function as(a,b,d){return ia(a)?(a=encodeURI(a).replace(b,js),d&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function js(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}+var bs=/[#\/\?@]/g,ds=/[\#\?:]/g,cs=/[\#\?]/g,gs=/[\#\?@]/g,es=/#/g;function $r(a,b,d){this.c=a||null;this.f=!!d}function ks(a){a.ka||(a.ka=new Sh,a.Ca=0,a.c&&Rr(a.c,function(b,d){a.add(decodeURIComponent(b.replace(/\+/g," ")),d)}))}l=$r.prototype;l.ka=null;l.Ca=null;l.Xb=function(){ks(this);return this.Ca};l.add=function(a,b){ks(this);this.c=null;a=ls(this,a);var d=this.ka.get(a);d||this.ka.set(a,d=[]);d.push(b);this.Ca++;return this};+l.remove=function(a){ks(this);a=ls(this,a);return Uh(this.ka.f,a)?(this.c=null,this.Ca-=this.ka.get(a).length,this.ka.remove(a)):!1};l.clear=function(){this.ka=this.c=null;this.Ca=0};l.pa=function(){ks(this);return 0==this.Ca};function ms(a,b){ks(a);b=ls(a,b);return Uh(a.ka.f,b)}l.K=function(){ks(this);for(var a=this.ka.sb(),b=this.ka.K(),d=[],e=0;e<b.length;e++)for(var f=a[e],g=0;g<f.length;g++)d.push(b[e]);return d};+l.sb=function(a){ks(this);var b=[];if(ia(a))ms(this,a)&&(b=Ya(b,this.ka.get(ls(this,a))));else{a=this.ka.sb();for(var d=0;d<a.length;d++)b=Ya(b,a[d])}return b};l.set=function(a,b){ks(this);this.c=null;a=ls(this,a);ms(this,a)&&(this.Ca-=this.ka.get(a).length);this.ka.set(a,[b]);this.Ca++;return this};l.get=function(a,b){var d=a?this.sb(a):[];return 0<d.length?String(d[0]):b};function ns(a,b,d){a.remove(b);0<d.length&&(a.c=null,a.ka.set(ls(a,b),Za(d)),a.Ca+=d.length)}+l.toString=function(){if(this.c)return this.c;if(!this.ka)return"";for(var a=[],b=this.ka.K(),d=0;d<b.length;d++)for(var e=b[d],f=encodeURIComponent(String(e)),e=this.sb(e),g=0;g<e.length;g++){var h=f;""!==e[g]&&(h+="="+encodeURIComponent(String(e[g])));a.push(h)}return this.c=a.join("&")};l.clone=function(){var a=new $r;a.c=this.c;this.ka&&(a.ka=this.ka.clone(),a.Ca=this.Ca);return a};function ls(a,b){var d=String(b);a.f&&(d=d.toLowerCase());return d}+function fs(a,b){b&&!a.f&&(ks(a),a.c=null,a.ka.forEach(function(a,b){var f=b.toLowerCase();b!=f&&(this.remove(b),ns(this,f,a))},a));a.f=b};function os(a){a=m(a)?a:{};this.e=a.font;this.j=a.rotation;this.f=a.scale;this.d=a.text;this.k=a.textAlign;this.p=a.textBaseline;this.c=m(a.fill)?a.fill:null;this.i=m(a.stroke)?a.stroke:null;this.l=m(a.offsetX)?a.offsetX:0;this.n=m(a.offsetY)?a.offsetY:0}l=os.prototype;l.Fh=function(){return this.e};l.Vh=function(){return this.l};l.Wh=function(){return this.n};l.Zk=function(){return this.c};l.$k=function(){return this.j};l.al=function(){return this.f};l.bl=function(){return this.i};l.cl=function(){return this.d};+l.di=function(){return this.k};l.ei=function(){return this.p};l.am=function(a){this.e=a};l.$l=function(a){this.c=a};l.dl=function(a){this.j=a};l.el=function(a){this.f=a};l.im=function(a){this.i=a};l.jm=function(a){this.d=a};l.km=function(a){this.k=a};l.lm=function(a){this.p=a};function ps(a){function b(a){return ga(a)?a:ia(a)?(!(a in e)&&"#"+a in e&&(a="#"+a),b(e[a])):d}a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=ze("EPSG:4326");var d=m(a.defaultStyle)?a.defaultStyle:qs,e={};this.d=m(a.extractStyles)?a.extractStyles:!0;this.f=e;this.e=function(){var a=this.get("Style");if(m(a))return a;a=this.get("styleUrl");return m(a)?b(a):d}}v(ps,Bq);+var rs=["http://www.google.com/kml/ext/2.2"],ss=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],ts=[255,255,255,1],us=new tl({color:ts}),vs=[20,2],ws=[64,64],xs=new zj({anchor:vs,anchorOrigin:"bottom-left",anchorXUnits:"pixels",anchorYUnits:"pixels",crossOrigin:"anonymous",rotation:0,scale:.5,size:ws,src:"https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"}),ys=new pl({color:ts,width:1}),zs=new os({font:"normal 16px Helvetica",+fill:us,stroke:ys,scale:1}),qs=[new vl({fill:us,image:xs,text:zs,stroke:ys,zIndex:0})],As={fraction:"fraction",pixels:"pixels"};function Bs(a){a=Vp(a,!1);if(a=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(a))return a=a[1],[parseInt(a.substr(6,2),16),parseInt(a.substr(4,2),16),parseInt(a.substr(2,2),16),parseInt(a.substr(0,2),16)/255]}+function Cs(a){a=Vp(a,!1);for(var b=[],d=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i,e;e=d.exec(a);)b.push(parseFloat(e[1]),parseFloat(e[2]),e[3]?parseFloat(e[3]):0),a=a.substr(e[0].length);return""!==a?void 0:b}function Ds(a){var b=Vp(a,!1);return null!=a.baseURI?is(a.baseURI,Aa(b)).toString():Aa(b)}function Es(a){a=Iq(a);if(m(a))return Math.sqrt(a)}function Fs(a,b){return V(null,Gs,a,b)}+function Hs(a,b){var d=V({o:[],Ag:[]},Is,a,b);if(m(d)){var e=d.o,d=d.Ag,f,g;f=0;for(g=Math.min(e.length,d.length);f<g;++f)e[4*f+3]=d[f];d=new Sm(null);Tm(d,"XYZM",e);return d}}function Js(a,b){var d=V(null,Ks,a,b);if(m(d)){var e=new Sm(null);Tm(e,"XYZ",d);return e}}function Ls(a,b){var d=V(null,Ks,a,b);if(m(d)){var e=new F(null);Zk(e,"XYZ",d,[d.length]);return e}}+function Ms(a,b){var d=V([],Ns,a,b);if(!m(d))return null;if(0===d.length)return new Lm(d);var e=!0,f=d[0].S(),g,h,k;h=1;for(k=d.length;h<k;++h)if(g=d[h],g.S()!=f){e=!1;break}if(e){if("Point"==f){g=d[0];e=g.c;f=g.o;h=1;for(k=d.length;h<k;++h)g=d[h],ab(f,g.o);d=new Xm(null);sk(d,e,f);d.q();return d}return"LineString"==f?(g=new Um(null),Wm(g,d),g):"Polygon"==f?(g=new Ym(null),$m(g,d),g):"GeometryCollection"==f?new Lm(d):null}return new Lm(d)}+function Os(a,b){var d=V(null,Ks,a,b);if(null!=d){var e=new Mk(null);Nk(e,"XYZ",d);return e}}function Ps(a,b){var d=V([null],Qs,a,b);if(null!=d&&null!==d[0]){var e=new F(null),f=d[0],g=[f.length],h,k;h=1;for(k=d.length;h<k;++h)ab(f,d[h]),g.push(f.length);Zk(e,"XYZ",f,g);return e}}+function Rs(a,b){var d=V({},Ss,a,b);if(!m(d))return null;var e=zb(d,"fillStyle",us),f=d.fill;m(f)&&!f&&(e=null);var f=zb(d,"imageStyle",xs),g=zb(d,"textStyle",zs),h=zb(d,"strokeStyle",ys),d=d.outline;m(d)&&!d&&(h=null);return[new vl({fill:e,image:f,stroke:h,text:g,zIndex:void 0})]}function Ts(a,b){zq(Us,a,b)}+var Vs=S(ss,{value:rq(W)}),Us=S(ss,{Data:function(a,b){var d=a.getAttribute("name");if(null!==d){var e=V(void 0,Vs,a,b);m(e)&&(b[b.length-1][d]=e)}},SchemaData:function(a,b){zq(Ws,a,b)}}),Gs=S(ss,{coordinates:rq(Cs)}),Qs=S(ss,{innerBoundaryIs:function(a,b){var d=V(void 0,Xs,a,b);m(d)&&b[b.length-1].push(d)},outerBoundaryIs:function(a,b){var d=V(void 0,Ys,a,b);m(d)&&(b[b.length-1][0]=d)}}),Is=S(ss,{when:function(a,b){var d=b[b.length-1].Ag,e=Vp(a,!1);if(e=/^\s*(\d{4})($|-(\d{2})($|-(\d{2})($|T(\d{2}):(\d{2}):(\d{2})(Z|(?:([+\-])(\d{2})(?::(\d{2}))?)))))\s*$/.exec(e)){var f=+Date.UTC(parseInt(e[1],10),m(e[3])?parseInt(e[3],10)-1:0,m(e[5])?parseInt(e[5],10):1,m(e[7])?parseInt(e[7],10):0,m(e[8])?parseInt(e[8],10):0,m(e[9])?parseInt(e[9],10):0);if(m(e[10])&&"Z"!=e[10]){var g="-"==e[11]?-1:1,f=f+60*g*parseInt(e[12],10);m(e[13])&&(f+=3600*g*parseInt(e[13],10))}d.push(f)}else d.push(0)}},S(rs,{coord:function(a,b){var d=b[b.length-1].o,e=Vp(a,!1);(e=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(e))?+d.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]),0):d.push(0,0,0,0)}})),Ks=S(ss,{coordinates:rq(Cs)}),Zs=S(ss,{href:P(Ds)},S(rs,{x:P(Iq),y:P(Iq),w:P(Iq),h:P(Iq)})),$s=S(ss,{Icon:P(function(a,b){var d=V({},Zs,a,b);return m(d)?d:null}),heading:P(Iq),hotSpot:P(function(a){var b=a.getAttribute("xunits"),d=a.getAttribute("yunits");return{x:parseFloat(a.getAttribute("x")),Ue:As[b],y:parseFloat(a.getAttribute("y")),Ve:As[d]}}),scale:P(Es)}),Xs=S(ss,{LinearRing:rq(Fs)}),at=S(ss,{color:P(Bs),scale:P(Es)}),+bt=S(ss,{color:P(Bs),width:P(Iq)}),Ns=S(ss,{LineString:qq(Js),LinearRing:qq(Ls),MultiGeometry:qq(Ms),Point:qq(Os),Polygon:qq(Ps)}),ct=S(rs,{Track:qq(Hs)}),et=S(ss,{ExtendedData:Ts,Link:function(a,b){zq(dt,a,b)},address:P(W),description:P(W),name:P(W),open:P(Fq),phoneNumber:P(W),visibility:P(Fq)}),dt=S(ss,{href:P(Ds)}),Ys=S(ss,{LinearRing:rq(Fs)}),ft=S(ss,{Style:P(Rs),key:P(W),styleUrl:P(function(a){var b=Aa(Vp(a,!1));return null!=a.baseURI?is(a.baseURI,b).toString():b})}),ht=S(ss,{ExtendedData:Ts,+MultiGeometry:P(Ms,"geometry"),LineString:P(Js,"geometry"),LinearRing:P(Ls,"geometry"),Point:P(Os,"geometry"),Polygon:P(Ps,"geometry"),Style:P(Rs),StyleMap:function(a,b){var d=V(void 0,gt,a,b);if(m(d)){var e=b[b.length-1];ga(d)?e.Style=d:ia(d)&&(e.styleUrl=d)}},address:P(W),description:P(W),name:P(W),open:P(Fq),phoneNumber:P(W),styleUrl:P(Ds),visibility:P(Fq)},S(rs,{MultiTrack:P(function(a,b){var d=V([],ct,a,b);if(m(d)){var e=new Um(null);Wm(e,d);return e}},"geometry"),Track:P(Hs,"geometry")})),it=+S(ss,{color:P(Bs),fill:P(Fq),outline:P(Fq)}),Ws=S(ss,{SimpleData:function(a,b){var d=a.getAttribute("name");if(null!==d){var e=W(a);b[b.length-1][d]=e}}}),Ss=S(ss,{IconStyle:function(a,b){var d=V({},$s,a,b);if(m(d)){var e=b[b.length-1],f=zb(d,"Icon",{}),g;g=f.href;g=m(g)?g:"https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png";var h,k,n,p=d.hotSpot;m(p)?(h=[p.x,p.y],k=p.Ue,n=p.Ve):"https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"===g?(h=vs,n=k="pixels"):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(g)&&+(h=[.5,0],n=k="fraction");var q,p=f.x,r=f.y;m(p)&&m(r)&&(q=[p,r]);var s,p=f.w,f=f.h;m(p)&&m(f)&&(s=[p,f]);var u,f=d.heading;m(f)&&(u=Yb(f));d=d.scale;"https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"==g&&(s=ws);h=new zj({anchor:h,anchorOrigin:"bottom-left",anchorXUnits:k,anchorYUnits:n,crossOrigin:"anonymous",offset:q,offsetOrigin:"bottom-left",rotation:u,scale:d,size:s,src:g});e.imageStyle=h}},LabelStyle:function(a,b){var d=V({},at,a,b);m(d)&&(b[b.length-1].textStyle=new os({fill:new tl({color:zb(d,+"color",ts)}),scale:d.scale}))},LineStyle:function(a,b){var d=V({},bt,a,b);m(d)&&(b[b.length-1].strokeStyle=new pl({color:zb(d,"color",ts),width:zb(d,"width",1)}))},PolyStyle:function(a,b){var d=V({},it,a,b);if(m(d)){var e=b[b.length-1];e.fillStyle=new tl({color:zb(d,"color",ts)});var f=d.fill;m(f)&&(e.fill=f);d=d.outline;m(d)&&(e.outline=d)}}}),gt=S(ss,{Pair:function(a,b){var d=V({},ft,a,b);if(m(d)){var e=d.key;m(e)&&"normal"==e&&(e=d.styleUrl,m(e)&&(b[b.length-1]=e),d=d.Style,m(d)&&(b[b.length-+1]=d))}}});l=ps.prototype;l.hg=function(a,b){Zp(a);var d=S(ss,{Folder:pq(this.hg,this),Placemark:qq(this.Me,this),Style:ra(this.Ol,this),StyleMap:ra(this.Nl,this)}),d=V([],d,a,b,this);if(m(d))return d};l.Me=function(a,b){var d=V({geometry:null},ht,a,b);if(m(d)){var e=new O,f=a.getAttribute("id");null===f||e.e(f);f=b[0];null!=d.geometry&&Cp(d.geometry,!1,f);e.I(d);this.d&&e.l(this.e);return e}};+l.Ol=function(a,b){var d=a.getAttribute("id");if(null!==d){var e=Rs(a,b);m(e)&&(d=null!=a.baseURI?is(a.baseURI,"#"+d).toString():"#"+d,this.f[d]=e)}};l.Nl=function(a,b){var d=a.getAttribute("id");if(null!==d){var e=V(void 0,gt,a,b);m(e)&&(d=null!=a.baseURI?is(a.baseURI,"#"+d).toString():"#"+d,this.f[d]=e)}};l.ig=function(a,b){if(!Wa(ss,a.namespaceURI))return null;var d=this.Me(a,[Ap(this,a,b)]);return m(d)?d:null};+l.Sb=function(a,b){if(!Wa(ss,a.namespaceURI))return[];var d;d=Zp(a);if("Document"==d||"Folder"==d)return d=this.hg(a,[Ap(this,a,b)]),m(d)?d:[];if("Placemark"==d)return d=this.Me(a,[Ap(this,a,b)]),m(d)?[d]:[];if("kml"==d){d=[];var e;for(e=a.firstElementChild;null!==e;e=e.nextElementSibling){var f=this.Sb(e,b);m(f)&&ab(d,f)}return d}return[]};l.Il=function(a){if(bq(a))return jt(this,a);if(eq(a))return kt(this,a);if(ia(a))return a=oq(a),jt(this,a)};+function jt(a,b){var d;for(d=b.firstChild;null!==d;d=d.nextSibling)if(1==d.nodeType){var e=kt(a,d);if(m(e))return e}}function kt(a,b){var d;for(d=b.firstElementChild;null!==d;d=d.nextElementSibling)if(Wa(ss,d.namespaceURI)&&"name"==d.localName)return W(d);for(d=b.firstElementChild;null!==d;d=d.nextElementSibling){var e=Zp(d);if(Wa(ss,d.namespaceURI)&&("Document"==e||"Folder"==e||"Placemark"==e||"kml"==e)&&(e=kt(a,d),m(e)))return e}}+l.Jl=function(a){var b=[];bq(a)?ab(b,lt(this,a)):eq(a)?ab(b,mt(this,a)):ia(a)&&(a=oq(a),ab(b,lt(this,a)));return b};function lt(a,b){var d,e=[];for(d=b.firstChild;null!==d;d=d.nextSibling)1==d.nodeType&&ab(e,mt(a,d));return e}+function mt(a,b){var d,e=[];for(d=b.firstElementChild;null!==d;d=d.nextElementSibling)if(Wa(ss,d.namespaceURI)&&"NetworkLink"==d.localName){var f=V({},et,d,[]);e.push(f)}for(d=b.firstElementChild;null!==d;d=d.nextElementSibling)f=Zp(d),!Wa(ss,d.namespaceURI)||"Document"!=f&&"Folder"!=f&&"kml"!=f||ab(e,mt(a,d));return e}function nt(a,b){var d=qg(b),d=[255*(4==d.length?d[3]:1),d[2],d[1],d[0]],e;for(e=0;4>e;++e){var f=parseInt(d[e],10).toString(16);d[e]=1==f.length?"0"+f:f}Nq(a,d.join(""))}+function ot(a,b,d){Aq({node:a},pt,qt,[b],d)}function rt(a,b,d){var e={node:a};null!=b.ea&&a.setAttribute("id",b.ea);a=b.M();var f=b.c;m(f)&&(f=f.call(b,0),null!==f&&0<f.length&&(a.Style=f[0],f=f[0].f,null===f||(a.name=f.d)));f=st[d[d.length-1].node.namespaceURI];a=yq(a,f);Aq(e,tt,xq,a,d,f);a=d[0];b=b.W();null!=b&&(b=Cp(b,!0,a));Aq(e,tt,ut,[b],d)}function vt(a,b,d){var e=b.o;a={node:a};a.layout=b.c;a.stride=b.H;Aq(a,wt,xt,[e],d)}+function yt(a,b,d){b=b.qd();var e=b.shift();a={node:a};Aq(a,zt,At,b,d);Aq(a,zt,Bt,[e],d)}function Ct(a,b){Oq(a,b*b)}+var Dt=tq(ss,["Document","Placemark"]),Gt=tq(ss,{Document:T(function(a,b,d){Aq({node:a},Et,Ft,b,d)}),Placemark:T(rt)}),Et=tq(ss,{Placemark:T(rt)}),Ht={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry"},It=tq(ss,["href"],tq(rs,["x","y","w","h"])),Jt=tq(ss,{href:T(Nq)},tq(rs,{x:T(Oq),y:T(Oq),w:T(Oq),h:T(Oq)})),Kt=tq(ss,["scale","heading","Icon","hotSpot"]),Mt=tq(ss,{Icon:T(function(a,+b,d){a={node:a};var e=It[d[d.length-1].node.namespaceURI],f=yq(b,e);Aq(a,Jt,xq,f,d,e);e=It[rs[0]];f=yq(b,e);Aq(a,Jt,Lt,f,d,e)}),heading:T(Oq),hotSpot:T(function(a,b){a.setAttribute("x",b.x);a.setAttribute("y",b.y);a.setAttribute("xunits",b.Ue);a.setAttribute("yunits",b.Ve)}),scale:T(Ct)}),Nt=tq(ss,["color","scale"]),Ot=tq(ss,{color:T(nt),scale:T(Ct)}),Pt=tq(ss,["color","width"]),Qt=tq(ss,{color:T(nt),width:T(Oq)}),pt=tq(ss,{LinearRing:T(vt)}),Rt=tq(ss,{LineString:T(vt),Point:T(vt),Polygon:T(yt)}),+st=tq(ss,"name open visibility address phoneNumber description styleUrl Style".split(" ")),tt=tq(ss,{MultiGeometry:T(function(a,b,d){a={node:a};var e=b.S(),f,g;"MultiPoint"==e?(f=b.Kd(),g=St):"MultiLineString"==e?(f=b.Pc(),g=Tt):"MultiPolygon"==e&&(f=b.ud(),g=Ut);Aq(a,Rt,g,f,d)}),LineString:T(vt),LinearRing:T(vt),Point:T(vt),Polygon:T(yt),Style:T(function(a,b,d){a={node:a};var e={},f=b.j,g=b.d,h=b.i;b=b.f;null===h||(e.IconStyle=h);null===b||(e.LabelStyle=b);null===g||(e.LineStyle=g);null===f||(e.PolyStyle=+f);b=Vt[d[d.length-1].node.namespaceURI];e=yq(e,b);Aq(a,Wt,xq,e,d,b)}),address:T(Nq),description:T(Nq),name:T(Nq),open:T(Mq),phoneNumber:T(Nq),styleUrl:T(Nq),visibility:T(Mq)}),wt=tq(ss,{coordinates:T(function(a,b,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=b.length,k="";if(0<h){k+=b[0];for(e=1;e<f;++e)k+=","+b[e];for(g=d;g<h;g+=d)for(k+=" "+b[g],e=1;e<f;++e)k+=","+b[g+e]}Nq(a,k)})}),zt=tq(ss,{outerBoundaryIs:T(ot),innerBoundaryIs:T(ot)}),+Xt=tq(ss,{color:T(nt)}),Vt=tq(ss,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Wt=tq(ss,{IconStyle:T(function(a,b,d){a={node:a};var e={},f=b.kb(),g=b.pd(),h={href:b.c.i};if(null!==f){h.w=f[0];h.h=f[1];var k=b.Ab(),n=b.Gb();null!==n&&null!==g&&0!==n[0]&&n[1]!==f[1]&&(h.x=n[0],h.y=g[1]-(n[1]+f[1]));null===k||0===k[0]||k[1]===f[1]||(e.hotSpot={x:k[0],Ue:"pixels",y:f[1]-k[1],Ve:"pixels"})}e.Icon=h;f=b.n;1!==f&&(e.scale=f);b=b.l;0!==b&&(e.heading=b);b=Kt[d[d.length-1].node.namespaceURI];e=yq(e,b);+Aq(a,Mt,xq,e,d,b)}),LabelStyle:T(function(a,b,d){a={node:a};var e={},f=b.c;null===f||(e.color=f.c);b=b.f;m(b)&&1!==b&&(e.scale=b);b=Nt[d[d.length-1].node.namespaceURI];e=yq(e,b);Aq(a,Ot,xq,e,d,b)}),LineStyle:T(function(a,b,d){a={node:a};var e=Pt[d[d.length-1].node.namespaceURI];b=yq({color:b.c,width:b.f},e);Aq(a,Qt,xq,b,d,e)}),PolyStyle:T(function(a,b,d){Aq({node:a},Xt,Yt,[b.c],d)})});function Lt(a,b,d){return Up(rs[0],"gx:"+d)}+function Ft(a,b){return Up(b[b.length-1].node.namespaceURI,"Placemark")}function ut(a,b){if(null!=a)return Up(b[b.length-1].node.namespaceURI,Ht[a.S()])}var Yt=vq("color"),xt=vq("coordinates"),At=vq("innerBoundaryIs"),St=vq("Point"),Tt=vq("LineString"),qt=vq("LinearRing"),Ut=vq("Polygon"),Bt=vq("outerBoundaryIs");+ps.prototype.c=function(a,b){b=Bp(this,b);var d=Up(ss[4],"kml");nq(d,"http://www.w3.org/2000/xmlns/","xmlns:gx",rs[0]);nq(d,"http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");nq(d,"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var e={node:d},f={};1<a.length?f.Document=a:1==a.length&&(f.Placemark=a[0]);var g=Dt[d.namespaceURI],f=yq(f,g);Aq(e,Gt,xq,f,[b],g);+return d};function Zt(){this.defaultDataProjection=null;this.defaultDataProjection=ze("EPSG:4326")}v(Zt,Bq);function $t(a,b){b[b.length-1].Zc[a.getAttribute("k")]=a.getAttribute("v")}+var au=[null],bu=S(au,{nd:function(a,b){b[b.length-1].vc.push(a.getAttribute("ref"))},tag:$t}),du=S(au,{node:function(a,b){var d=b[0],e=b[b.length-1],f=a.getAttribute("id"),g=[parseFloat(a.getAttribute("lon")),parseFloat(a.getAttribute("lat"))];e.Ff[f]=g;var h=V({Zc:{}},cu,a,b);wb(h.Zc)||(g=new Mk(g),Cp(g,!1,d),d=new O(g),d.e(f),d.I(h.Zc),e.features.push(d))},way:function(a,b){for(var d=b[0],e=a.getAttribute("id"),f=V({vc:[],Zc:{}},bu,a,b),g=b[b.length-1],h=[],k=0,n=f.vc.length;k<n;k++)ab(h,g.Ff[f.vc[k]]);+f.vc[0]==f.vc[f.vc.length-1]?(k=new F(null),Zk(k,"XY",h,[h.length])):(k=new Sm(null),Tm(k,"XY",h));Cp(k,!1,d);d=new O(k);d.e(e);d.I(f.Zc);g.features.push(d)}}),cu=S(au,{tag:$t});Zt.prototype.Sb=function(a,b){var d=Ap(this,a,b);return"osm"==a.localName&&(d=V({Ff:{},features:[]},du,a,[d]),m(d.features))?d.features:[]};function eu(a){return a.getAttributeNS("http://www.w3.org/1999/xlink","href")};function fu(){}fu.prototype.d=function(a){return bq(a)?this.f(a):eq(a)?this.c(a):ia(a)?(a=oq(a),this.f(a)):null};function gu(){}v(gu,fu);gu.prototype.f=function(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return this.c(a);return null};gu.prototype.c=function(a){a=V({},hu,a,[]);return m(a)?a:null};+var iu=[null,"http://www.opengis.net/ows/1.1"],hu=S(iu,{ServiceIdentification:P(function(a,b){return V({},ju,a,b)}),ServiceProvider:P(function(a,b){return V({},ku,a,b)}),OperationsMetadata:P(function(a,b){return V({},lu,a,b)})}),mu=S(iu,{DeliveryPoint:P(W),City:P(W),AdministrativeArea:P(W),PostalCode:P(W),Country:P(W),ElectronicMailAddress:P(W)}),nu=S(iu,{Value:sq(function(a){return W(a)})}),ou=S(iu,{AllowedValues:P(function(a,b){return V({},nu,a,b)})}),qu=S(iu,{Phone:P(function(a,b){return V({},+pu,a,b)}),Address:P(function(a,b){return V({},mu,a,b)})}),su=S(iu,{HTTP:P(function(a,b){return V({},ru,a,b)})}),ru=S(iu,{Get:sq(function(a,b){var d=eu(a);return m(d)?V({href:d},tu,a,b):void 0}),Post:void 0}),uu=S(iu,{DCP:P(function(a,b){return V({},su,a,b)})}),lu=S(iu,{Operation:function(a,b){var d=a.getAttribute("name"),e=V({},uu,a,b);m(e)&&(b[b.length-1][d]=e)}}),pu=S(iu,{Voice:P(W),Facsimile:P(W)}),tu=S(iu,{Constraint:sq(function(a,b){var d=a.getAttribute("name");return m(d)?V({name:d},ou,a,b):+void 0})}),vu=S(iu,{IndividualName:P(W),PositionName:P(W),ContactInfo:P(function(a,b){return V({},qu,a,b)})}),ju=S(iu,{Title:P(W),ServiceTypeVersion:P(W),ServiceType:P(W)}),ku=S(iu,{ProviderName:P(W),ProviderSite:P(eu),ServiceContact:P(function(a,b){return V({},vu,a,b)})});function wu(a,b,d,e){var f;m(e)?f=m(void 0)?void 0:0:(e=[],f=0);var g,h;for(g=0;g<b;)for(h=a[g++],e[f++]=a[g++],e[f++]=h,h=2;h<d;++h)e[f++]=a[g++];e.length=f};function xu(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=ze("EPSG:4326");this.c=m(a.factor)?a.factor:1E5;this.f=m(a.geometryLayout)?a.geometryLayout:"XY"}v(xu,Jr);function yu(a,b,d){d=m(d)?d:1E5;var e,f=Array(b);for(e=0;e<b;++e)f[e]=0;var g,h;g=0;for(h=a.length;g<h;)for(e=0;e<b;++e,++g){var k=a[g],n=k-f[e];f[e]=k;a[g]=n}return zu(a,d)}+function Au(a,b,d){var e=m(d)?d:1E5,f=Array(b);for(d=0;d<b;++d)f[d]=0;a=Bu(a,e);var g,e=0;for(g=a.length;e<g;)for(d=0;d<b;++d,++e)f[d]+=a[e],a[e]=f[d];return a}function zu(a,b){var d=m(b)?b:1E5,e,f;e=0;for(f=a.length;e<f;++e)a[e]=Math.round(a[e]*d);d=0;for(e=a.length;d<e;++d)f=a[d],a[d]=0>f?~(f<<1):f<<1;d="";e=0;for(f=a.length;e<f;++e){for(var g=a[e],h=void 0,k="";32<=g;)h=(32|g&31)+63,k+=String.fromCharCode(h),g>>=5;h=g+63;k+=String.fromCharCode(h);d+=k}return d}+function Bu(a,b){var d=m(b)?b:1E5,e=[],f=0,g=0,h,k;h=0;for(k=a.length;h<k;++h){var n=a.charCodeAt(h)-63,f=f|(n&31)<<g;32>n?(e.push(f),g=f=0):g+=5}f=0;for(g=e.length;f<g;++f)h=e[f],e[f]=h&1?~(h>>1):h>>1;f=0;for(g=e.length;f<g;++f)e[f]/=d;return e}l=xu.prototype;l.Uc=function(a,b){var d=this.Wc(a,b);return new O(d)};l.Ke=function(a,b){return[this.Uc(a,b)]};l.Wc=function(a,b){var d=rk(this.f),e=Au(a,d,this.c);wu(e,e.length,d,e);d=Gk(e,0,e.length,d);return Cp(new Sm(d,this.f),!1,Bp(this,b))};+l.ge=function(a,b){var d=a.W();return null!=d?this.bd(d,b):""};l.Cg=function(a,b){return this.ge(a[0],b)};l.bd=function(a,b){a=Cp(a,!0,Bp(this,b));var d=a.o,e=a.H;wu(d,d.length,e,d);return yu(d,e,this.c)};function Cu(a){a=m(a)?a:{};this.defaultDataProjection=null;this.defaultDataProjection=ze(null!=a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326")}v(Cu,Fp);function Du(a,b){var d=[],e,f,g,h;g=0;for(h=a.length;g<h;++g)e=a[g],0<g&&d.pop(),0<=e?f=b[e]:f=b[~e].slice().reverse(),d.push.apply(d,f);e=0;for(f=d.length;e<f;++e)d[e]=d[e].slice();return d}function Eu(a,b,d,e,f){a=a.geometries;var g=[],h,k;h=0;for(k=a.length;h<k;++h)g[h]=Fu(a[h],b,d,e,f);return g}+function Fu(a,b,d,e,f){var g=a.type,h=Gu[g];b="Point"===g||"MultiPoint"===g?h(a,d,e):h(a,b);d=new O;d.Xa(Cp(b,!1,f));m(a.id)&&d.e(a.id);m(a.properties)&&d.I(a.properties);return d}+Cu.prototype.d=function(a,b){if("Topology"==a.type){var d,e=null,f=null;m(a.transform)&&(d=a.transform,e=d.scale,f=d.translate);var g=a.arcs;if(m(d)){d=e;var h=f,k,n;k=0;for(n=g.length;k<n;++k)for(var p=g[k],q=d,r=h,s=0,u=0,y=void 0,z=void 0,A=void 0,z=0,A=p.length;z<A;++z)y=p[z],s+=y[0],u+=y[1],y[0]=s,y[1]=u,Hu(y,q,r)}d=[];h=qb(a.objects);k=0;for(n=h.length;k<n;++k)"GeometryCollection"===h[k].type?(p=h[k],d.push.apply(d,Eu(p,g,e,f,b))):(p=h[k],d.push(Fu(p,g,e,f,b)));return d}return[]};+function Hu(a,b,d){a[0]=a[0]*b[0]+d[0];a[1]=a[1]*b[1]+d[1]}Cu.prototype.Oa=function(){return this.defaultDataProjection};+var Gu={Point:function(a,b,d){a=a.coordinates;null===b||null===d||Hu(a,b,d);return new Mk(a)},LineString:function(a,b){var d=Du(a.arcs,b);return new Sm(d)},Polygon:function(a,b){var d=[],e,f;e=0;for(f=a.arcs.length;e<f;++e)d[e]=Du(a.arcs[e],b);return new F(d)},MultiPoint:function(a,b,d){a=a.coordinates;var e,f;if(null!==b&&null!==d)for(e=0,f=a.length;e<f;++e)Hu(a[e],b,d);return new Xm(a)},MultiLineString:function(a,b){var d=[],e,f;e=0;for(f=a.arcs.length;e<f;++e)d[e]=Du(a.arcs[e],b);return new Um(d)},+MultiPolygon:function(a,b){var d=[],e,f,g,h,k,n;k=0;for(n=a.arcs.length;k<n;++k){e=a.arcs[k];f=[];g=0;for(h=e.length;g<h;++g)f[g]=Du(e[g],b);d[k]=f}return new Ym(d)}};function Iu(a){a=m(a)?a:{};this.j=a.featureType;this.d=a.featureNS;this.f=m(a.gmlFormat)?a.gmlFormat:new Qq;this.e=m(a.schemaLocation)?a.schemaLocation:"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";this.defaultDataProjection=null}v(Iu,Bq);Iu.prototype.Sb=function(a,b){var d={featureType:this.j,featureNS:this.d};Db(d,Ap(this,a,m(b)?b:{}));d=[d];this.f.f["http://www.opengis.net/gml"].featureMember=qq(Eq.prototype.Wd);d=V([],this.f.f,a,d,this.f);m(d)||(d=[]);return d};+Iu.prototype.k=function(a){if(bq(a))return Ju(a);if(eq(a))return V({},Ku,a,[]);if(ia(a))return a=oq(a),Ju(a)};Iu.prototype.i=function(a){if(bq(a))return Lu(this,a);if(eq(a))return Mu(this,a);if(ia(a))return a=oq(a),Lu(this,a)};function Lu(a,b){for(var d=b.firstChild;null!==d;d=d.nextSibling)if(1==d.nodeType)return Mu(a,d)}var Nu={"http://www.opengis.net/gml":{boundedBy:P(Eq.prototype.Yd,"bounds")}};+function Mu(a,b){var d={},e=Lq(b.getAttribute("numberOfFeatures"));d.numberOfFeatures=e;return V(d,Nu,b,[],a.f)}+var Ou={"http://www.opengis.net/wfs":{totalInserted:P(Kq),totalUpdated:P(Kq),totalDeleted:P(Kq)}},Pu={"http://www.opengis.net/ogc":{FeatureId:qq(function(a){return a.getAttribute("fid")})}},Qu={"http://www.opengis.net/wfs":{Feature:function(a,b){zq(Pu,a,b)}}},Ku={"http://www.opengis.net/wfs":{TransactionSummary:P(function(a,b){return V({},Ou,a,b)},"transactionSummary"),InsertResults:P(function(a,b){return V([],Qu,a,b)},"insertIds")}};+function Ju(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return V({},Ku,a,[])}var Ru={"http://www.opengis.net/wfs":{PropertyName:T(Nq)}};function Su(a,b){var d=Up("http://www.opengis.net/ogc","Filter"),e=Up("http://www.opengis.net/ogc","FeatureId");d.appendChild(e);e.setAttribute("fid",b);a.appendChild(d)}+var Tu={"http://www.opengis.net/wfs":{Insert:T(function(a,b,d){var e=d[d.length-1],e=Up(e.featureNS,e.featureType);a.appendChild(e);Qq.prototype.Bg(e,b,d)}),Update:T(function(a,b,d){var e=d[d.length-1],f=e.featureType,g=e.featurePrefix,g=m(g)?g:"feature",h=e.featureNS;a.setAttribute("typeName",g+":"+f);nq(a,"http://www.w3.org/2000/xmlns/","xmlns:"+g,h);f=b.ea;if(m(f)){for(var g=b.K(),h=[],k=0,n=g.length;k<n;k++){var p=b.get(g[k]);m(p)&&h.push({name:g[k],value:p})}Aq({node:a,srsName:e.srsName},Tu,+vq("Property"),h,d);Su(a,f)}}),Delete:T(function(a,b,d){var e=d[d.length-1];d=e.featureType;var f=e.featurePrefix,f=m(f)?f:"feature",e=e.featureNS;a.setAttribute("typeName",f+":"+d);nq(a,"http://www.w3.org/2000/xmlns/","xmlns:"+f,e);b=b.ea;m(b)&&Su(a,b)}),Property:T(function(a,b,d){var e=Up("http://www.opengis.net/wfs","Name");a.appendChild(e);Nq(e,b.name);null!=b.value&&(e=Up("http://www.opengis.net/wfs","Value"),a.appendChild(e),b.value instanceof ok?Qq.prototype.he(e,b.value,d):Nq(e,b.value))}),+Native:T(function(a,b){m(b.xm)&&a.setAttribute("vendorId",b.xm);m(b.Yl)&&a.setAttribute("safeToIgnore",b.Yl);m(b.value)&&Nq(a,b.value)})}},Uu={"http://www.opengis.net/wfs":{Query:T(function(a,b,d){var e=d[d.length-1],f=e.featurePrefix,g=e.featureNS,h=e.propertyNames,k=e.srsName;a.setAttribute("typeName",(m(f)?f+":":"")+b);m(k)&&a.setAttribute("srsName",k);m(g)&&nq(a,"http://www.w3.org/2000/xmlns/","xmlns:"+f,g);b=Bb(e);b.node=a;Aq(b,Ru,vq("PropertyName"),h,d);e=e.bbox;m(e)&&(h=Up("http://www.opengis.net/ogc",+"Filter"),b=d[d.length-1].geometryName,f=Up("http://www.opengis.net/ogc","BBOX"),h.appendChild(f),g=Up("http://www.opengis.net/ogc","PropertyName"),Nq(g,b),f.appendChild(g),Qq.prototype.he(f,e,d),a.appendChild(h))})}};+Iu.prototype.p=function(a){var b=Up("http://www.opengis.net/wfs","GetFeature");b.setAttribute("service","WFS");b.setAttribute("version","1.1.0");m(a)&&(m(a.handle)&&b.setAttribute("handle",a.handle),m(a.outputFormat)&&b.setAttribute("outputFormat",a.outputFormat),m(a.maxFeatures)&&b.setAttribute("maxFeatures",a.maxFeatures),m(a.resultType)&&b.setAttribute("resultType",a.resultType),m(a.pm)&&b.setAttribute("startIndex",a.pm),m(a.count)&&b.setAttribute("count",a.count));nq(b,"http://www.w3.org/2001/XMLSchema-instance",+"xsi:schemaLocation",this.e);var d=a.featureTypes;a=[{node:b,srsName:a.srsName,featureNS:m(a.featureNS)?a.featureNS:this.d,featurePrefix:a.featurePrefix,geometryName:a.geometryName,bbox:a.bbox,fg:m(a.fg)?a.fg:[]}];var e=Bb(a[a.length-1]);e.node=b;Aq(e,Uu,vq("Query"),d,a);return b};+Iu.prototype.u=function(a,b,d,e){var f=[],g=Up("http://www.opengis.net/wfs","Transaction");g.setAttribute("service","WFS");g.setAttribute("version","1.1.0");var h,k;m(e)&&(h=m(e.gmlOptions)?e.gmlOptions:{},m(e.handle)&&g.setAttribute("handle",e.handle));nq(g,"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.e);null!=a&&(k={node:g,featureNS:e.featureNS,featureType:e.featureType,featurePrefix:e.featurePrefix},Db(k,h),Aq(k,Tu,vq("Insert"),a,f));null!=b&&(k={node:g,featureNS:e.featureNS,+featureType:e.featureType,featurePrefix:e.featurePrefix},Db(k,h),Aq(k,Tu,vq("Update"),b,f));null!=d&&Aq({node:g,featureNS:e.featureNS,featureType:e.featureType,featurePrefix:e.featurePrefix},Tu,vq("Delete"),d,f);m(e.nativeElements)&&Aq({node:g,featureNS:e.featureNS,featureType:e.featureType,featurePrefix:e.featurePrefix},Tu,vq("Native"),e.nativeElements,f);return g};Iu.prototype.Ne=function(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return this.ae(a);return null};+Iu.prototype.ae=function(a){if(null!=a.firstElementChild&&null!=a.firstElementChild.firstElementChild)for(a=a.firstElementChild.firstElementChild,a=a.firstElementChild;null!==a;a=a.nextElementSibling)if(0!==a.childNodes.length&&(1!==a.childNodes.length||3!==a.firstChild.nodeType)){var b=[{}];this.f.Yd(a,b);return ze(b.pop().srsName)}return null};function Vu(a){a=m(a)?a:{};this.defaultDataProjection=null;this.c=m(a.splitCollection)?a.splitCollection:!1}v(Vu,Jr);function Wu(a){a=a.U();return 0==a.length?"":a[0]+" "+a[1]}function Xu(a){a=a.U();for(var b=[],d=0,e=a.length;d<e;++d)b.push(a[d][0]+" "+a[d][1]);return b.join(",")}function Yu(a){var b=[];a=a.qd();for(var d=0,e=a.length;d<e;++d)b.push("("+Xu(a[d])+")");return b.join(",")}function Zu(a){var b=a.S();a=(0,$u[b])(a);b=b.toUpperCase();return 0===a.length?b+" EMPTY":b+"("+a+")"}+var $u={Point:Wu,LineString:Xu,Polygon:Yu,MultiPoint:function(a){var b=[];a=a.Kd();for(var d=0,e=a.length;d<e;++d)b.push("("+Wu(a[d])+")");return b.join(",")},MultiLineString:function(a){var b=[];a=a.Pc();for(var d=0,e=a.length;d<e;++d)b.push("("+Xu(a[d])+")");return b.join(",")},MultiPolygon:function(a){var b=[];a=a.ud();for(var d=0,e=a.length;d<e;++d)b.push("("+Yu(a[d])+")");return b.join(",")},GeometryCollection:function(a){var b=[];a=a.qf();for(var d=0,e=a.length;d<e;++d)b.push(Zu(a[d]));return b.join(",")}};+l=Vu.prototype;l.Uc=function(a,b){var d=this.Wc(a,b);if(m(d)){var e=new O;e.Xa(d);return e}return null};l.Ke=function(a,b){var d=[],e=this.Wc(a,b);this.c&&"GeometryCollection"==e.S()?d=e.e:d=[e];for(var f=[],g=0,h=d.length;g<h;++g)e=new O,e.Xa(d[g]),f.push(e);return f};l.Wc=function(a,b){var d;d=new av(new bv(a));d.c=cv(d.f);d=dv(d);return m(d)?Cp(d,!1,b):null};l.ge=function(a,b){var d=a.W();return m(d)?this.bd(d,b):""};+l.Cg=function(a,b){if(1==a.length)return this.ge(a[0],b);for(var d=[],e=0,f=a.length;e<f;++e)d.push(a[e].W());d=new Lm(d);return this.bd(d,b)};l.bd=function(a,b){return Zu(Cp(a,!0,b))};function bv(a){this.f=a;this.c=-1}function ev(a,b){var d=m(b)?b:!1;return"0"<=a&&"9">=a||"."==a&&!d}+function cv(a){var b=a.f.charAt(++a.c),d={position:a.c,value:b};if("("==b)d.type=2;else if(","==b)d.type=5;else if(")"==b)d.type=3;else if(ev(b)||"-"==b){d.type=4;var e,b=a.c,f=!1;do"."==e&&(f=!0),e=a.f.charAt(++a.c);while(ev(e,f));a=parseFloat(a.f.substring(b,a.c--));d.value=a}else if("a"<=b&&"z">=b||"A"<=b&&"Z">=b){d.type=1;b=a.c;do e=a.f.charAt(++a.c);while("a"<=e&&"z">=e||"A"<=e&&"Z">=e);a=a.f.substring(b,a.c--).toUpperCase();d.value=a}else{if(" "==b||"\t"==b||"\r"==b||"\n"==b)return cv(a);if(""===+b)d.type=6;else throw Error("Unexpected character: "+b);}return d}function av(a){this.f=a}l=av.prototype;l.match=function(a){if(a=this.c.type==a)this.c=cv(this.f);return a};+function dv(a){var b=a.c;if(a.match(1)){var d=b.value;if("GEOMETRYCOLLECTION"==d){a:{if(a.match(2)){b=[];do b.push(dv(a));while(a.match(5));if(a.match(3)){a=b;break a}}else if(fv(a)){a=[];break a}throw Error(gv(a));}return new Lm(a)}var e=hv[d],b=iv[d];if(!m(e)||!m(b))throw Error("Invalid geometry type: "+d);a=e.call(a);return new b(a)}throw Error(gv(a));}l.He=function(){if(this.match(2)){var a=jv(this);if(this.match(3))return a}else if(fv(this))return null;throw Error(gv(this));};+l.Ge=function(){if(this.match(2)){var a=kv(this);if(this.match(3))return a}else if(fv(this))return[];throw Error(gv(this));};l.Ie=function(){if(this.match(2)){var a=lv(this);if(this.match(3))return a}else if(fv(this))return[];throw Error(gv(this));};l.rl=function(){if(this.match(2)){var a;if(2==this.c.type)for(a=[this.He()];this.match(5);)a.push(this.He());else a=kv(this);if(this.match(3))return a}else if(fv(this))return[];throw Error(gv(this));};+l.ql=function(){if(this.match(2)){var a=lv(this);if(this.match(3))return a}else if(fv(this))return[];throw Error(gv(this));};l.sl=function(){if(this.match(2)){for(var a=[this.Ie()];this.match(5);)a.push(this.Ie());if(this.match(3))return a}else if(fv(this))return[];throw Error(gv(this));};function jv(a){for(var b=[],d=0;2>d;++d){var e=a.c;if(a.match(4))b.push(e.value);else break}if(2==b.length)return b;throw Error(gv(a));}function kv(a){for(var b=[jv(a)];a.match(5);)b.push(jv(a));return b}+function lv(a){for(var b=[a.Ge()];a.match(5);)b.push(a.Ge());return b}function fv(a){var b=1==a.c.type&&"EMPTY"==a.c.value;b&&(a.c=cv(a.f));return b}function gv(a){return"Unexpected `"+a.c.value+"` at position "+a.c.position+" in `"+a.f.f+"`"}var iv={POINT:Mk,LINESTRING:Sm,POLYGON:F,MULTIPOINT:Xm,MULTILINESTRING:Um,MULTIPOLYGON:Ym},hv={POINT:av.prototype.He,LINESTRING:av.prototype.Ge,POLYGON:av.prototype.Ie,MULTIPOINT:av.prototype.rl,MULTILINESTRING:av.prototype.ql,MULTIPOLYGON:av.prototype.sl};function mv(){this.version=void 0}v(mv,fu);mv.prototype.f=function(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return this.c(a);return null};mv.prototype.c=function(a){this.version=Aa(a.getAttribute("version"));a=V({version:this.version},nv,a,[]);return m(a)?a:null};function ov(a,b){return V({},pv,a,b)}function qv(a,b){return V({},rv,a,b)}function sv(a,b){var d=ov(a,b);if(m(d)){var e=[Lq(a.getAttribute("width")),Lq(a.getAttribute("height"))];d.size=e;return d}}+function tv(a,b){return V([],uv,a,b)}+var vv=[null,"http://www.opengis.net/wms"],nv=S(vv,{Service:P(function(a,b){return V({},wv,a,b)}),Capability:P(function(a,b){return V({},xv,a,b)})}),xv=S(vv,{Request:P(function(a,b){return V({},yv,a,b)}),Exception:P(function(a,b){return V([],zv,a,b)}),Layer:P(function(a,b){return V({},Av,a,b)})}),wv=S(vv,{Name:P(W),Title:P(W),Abstract:P(W),KeywordList:P(tv),OnlineResource:P(eu),ContactInformation:P(function(a,b){return V({},Bv,a,b)}),Fees:P(W),AccessConstraints:P(W),LayerLimit:P(Kq),MaxWidth:P(Kq),+MaxHeight:P(Kq)}),Bv=S(vv,{ContactPersonPrimary:P(function(a,b){return V({},Cv,a,b)}),ContactPosition:P(W),ContactAddress:P(function(a,b){return V({},Dv,a,b)}),ContactVoiceTelephone:P(W),ContactFacsimileTelephone:P(W),ContactElectronicMailAddress:P(W)}),Cv=S(vv,{ContactPerson:P(W),ContactOrganization:P(W)}),Dv=S(vv,{AddressType:P(W),Address:P(W),City:P(W),StateOrProvince:P(W),PostCode:P(W),Country:P(W)}),zv=S(vv,{Format:qq(W)}),Av=S(vv,{Name:P(W),Title:P(W),Abstract:P(W),KeywordList:P(tv),CRS:sq(W),+EX_GeographicBoundingBox:P(function(a,b){var d=V({},Ev,a,b);if(m(d)){var e=d.westBoundLongitude,f=d.southBoundLatitude,g=d.eastBoundLongitude,d=d.northBoundLatitude;return m(e)&&m(f)&&m(g)&&m(d)?[e,f,g,d]:void 0}}),BoundingBox:sq(function(a){var b=[Jq(a.getAttribute("minx")),Jq(a.getAttribute("miny")),Jq(a.getAttribute("maxx")),Jq(a.getAttribute("maxy"))],d=[Jq(a.getAttribute("resx")),Jq(a.getAttribute("resy"))];return{crs:a.getAttribute("CRS"),extent:b,res:d}}),Dimension:sq(function(a){return{name:a.getAttribute("name"),+units:a.getAttribute("units"),unitSymbol:a.getAttribute("unitSymbol"),"default":a.getAttribute("default"),multipleValues:Gq(a.getAttribute("multipleValues")),nearestValue:Gq(a.getAttribute("nearestValue")),current:Gq(a.getAttribute("current")),values:W(a)}}),Attribution:P(function(a,b){return V({},Fv,a,b)}),AuthorityURL:sq(function(a,b){var d=ov(a,b);if(m(d))return d.name=a.getAttribute("name"),d}),Identifier:sq(W),MetadataURL:sq(function(a,b){var d=ov(a,b);if(m(d))return d.type=a.getAttribute("type"),+d}),DataURL:sq(ov),FeatureListURL:sq(ov),Style:sq(function(a,b){return V({},Gv,a,b)}),MinScaleDenominator:P(Iq),MaxScaleDenominator:P(Iq),Layer:sq(function(a,b){var d=b[b.length-1],e=V({},Av,a,b);if(m(e)){var f=Gq(a.getAttribute("queryable"));m(f)||(f=d.queryable);e.queryable=m(f)?f:!1;f=Lq(a.getAttribute("cascaded"));m(f)||(f=d.cascaded);e.cascaded=f;f=Gq(a.getAttribute("opaque"));m(f)||(f=d.opaque);e.opaque=m(f)?f:!1;f=Gq(a.getAttribute("noSubsets"));m(f)||(f=d.noSubsets);e.noSubsets=m(f)?f:!1;+f=Jq(a.getAttribute("fixedWidth"));m(f)||(f=d.fixedWidth);e.fixedWidth=f;f=Jq(a.getAttribute("fixedHeight"));m(f)||(f=d.fixedHeight);e.fixedHeight=f;Qa(["Style","CRS","AuthorityURL"],function(a){var b=d[a];if(m(b)){var f=Ab(e,a),f=f.concat(b);e[a]=f}});Qa("EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" "),function(a){m(e[a])||(e[a]=d[a])});return e}})}),Fv=S(vv,{Title:P(W),OnlineResource:P(eu),LogoURL:P(sv)}),Ev=S(vv,{westBoundLongitude:P(Iq),+eastBoundLongitude:P(Iq),southBoundLatitude:P(Iq),northBoundLatitude:P(Iq)}),yv=S(vv,{GetCapabilities:P(qv),GetMap:P(qv),GetFeatureInfo:P(qv)}),rv=S(vv,{Format:sq(W),DCPType:sq(function(a,b){return V({},Hv,a,b)})}),Hv=S(vv,{HTTP:P(function(a,b){return V({},Iv,a,b)})}),Iv=S(vv,{Get:P(ov),Post:P(ov)}),Gv=S(vv,{Name:P(W),Title:P(W),Abstract:P(W),LegendURL:sq(sv),StyleSheetURL:P(ov),StyleURL:P(ov)}),pv=S(vv,{Format:P(W),OnlineResource:P(eu)}),uv=S(vv,{Keyword:qq(W)});function Jv(){this.d="http://mapserver.gis.umn.edu/mapserver";this.f=new Zq;this.defaultDataProjection=null}v(Jv,Bq);+function Kv(a,b,d){b.namespaceURI=a.d;var e=Zp(b),f=[];if(0===b.childNodes.length)return f;"msGMLOutput"==e&&Qa(b.childNodes,function(a){if(1===a.nodeType){var b=d[0],e=a.localName,n=RegExp,p;p="_layer".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08");n=new n(p,"");e=e.replace(n,"")+"_feature";b.featureType=e;b.featureNS=this.d;n={};n[e]=qq(this.f.Je,this.f);b=S([b.featureNS,null],n);a.namespaceURI=this.d;a=V([],b,a,d,this.f);m(a)&&ab(f,a)}},a);"FeatureCollection"==e&&(a=V([],+a.f.f,b,[{}],a.f),m(a)&&(f=a));return f}Jv.prototype.Sb=function(a,b){var d={featureType:this.featureType,featureNS:this.featureNS};m(b)&&Db(d,Ap(this,a,b));return Kv(this,a,[d])};function Lv(){this.e=new gu}v(Lv,fu);Lv.prototype.f=function(a){for(a=a.firstChild;null!==a;a=a.nextSibling)if(1==a.nodeType)return this.c(a);return null};Lv.prototype.c=function(a){this.version=Aa(a.getAttribute("version"));var b=this.e.c(a);if(!m(b))return null;b.version=this.version;b=V(b,Mv,a,[]);return m(b)?b:null};function Nv(a){var b=W(a).split(" ");if(m(b)&&2==b.length)return a=+b[0],b=+b[1],isNaN(a)||isNaN(b)?void 0:[a,b]}+var Ov=[null,"http://www.opengis.net/wmts/1.0"],Pv=[null,"http://www.opengis.net/ows/1.1"],Mv=S(Ov,{Contents:P(function(a,b){return V({},Qv,a,b)})}),Qv=S(Ov,{Layer:sq(function(a,b){return V({},Rv,a,b)}),TileMatrixSet:sq(function(a,b){return V({},Sv,a,b)})}),Rv=S(Ov,{Style:sq(function(a,b){var d=V({},Tv,a,b);if(m(d)){var e="true"===a.getAttribute("isDefault");d.isDefault=e;return d}}),Format:sq(W),TileMatrixSetLink:sq(function(a,b){return V({},Uv,a,b)}),ResourceURL:sq(function(a){var b=a.getAttribute("format"),+d=a.getAttribute("template");a=a.getAttribute("resourceType");var e={};m(b)&&(e.format=b);m(d)&&(e.template=d);m(a)&&(e.resourceType=a);return e})},S(Pv,{Title:P(W),Abstract:P(W),WGS84BoundingBox:P(function(a,b){var d=V([],Vv,a,b);return 2!=d.length?void 0:Rd(d)}),Identifier:P(W)})),Tv=S(Ov,{LegendURL:sq(function(a){var b={};b.format=a.getAttribute("format");b.href=eu(a);return b})},S(Pv,{Title:P(W),Identifier:P(W)})),Uv=S(Ov,{TileMatrixSet:P(W)}),Vv=S(Pv,{LowerCorner:qq(Nv),UpperCorner:qq(Nv)}),+Sv=S(Ov,{WellKnownScaleSet:P(W),TileMatrix:sq(function(a,b){return V({},Wv,a,b)})},S(Pv,{SupportedCRS:P(W),Identifier:P(W)})),Wv=S(Ov,{TopLeftCorner:P(Nv),ScaleDenominator:P(Iq),TileWidth:P(Kq),TileHeight:P(Kq),MatrixWidth:P(Kq),MatrixHeight:P(Kq)},S(Pv,{Identifier:P(W)}));var Xv=new ue(6378137);function X(a){qd.call(this);a=m(a)?a:{};this.c=null;this.j=Te;this.e=void 0;w(this,ud("projection"),this.wj,!1,this);w(this,ud("tracking"),this.xj,!1,this);m(a.projection)&&this.n(ze(a.projection));m(a.trackingOptions)&&this.u(a.trackingOptions);this.d(m(a.tracking)?a.tracking:!1)}v(X,qd);l=X.prototype;l.T=function(){this.d(!1);X.X.T.call(this)};l.wj=function(){var a=this.k();null!=a&&(this.j=De(ze("EPSG:4326"),a),null===this.c||this.set("position",this.j(this.c)))};+l.xj=function(){if(ag){var a=this.l();a&&!m(this.e)?this.e=ba.navigator.geolocation.watchPosition(ra(this.zl,this),ra(this.Al,this),this.i()):!a&&m(this.e)&&(ba.navigator.geolocation.clearWatch(this.e),this.e=void 0)}};+l.zl=function(a){a=a.coords;this.set("accuracy",a.accuracy);this.set("altitude",null===a.altitude?void 0:a.altitude);this.set("altitudeAccuracy",null===a.altitudeAccuracy?void 0:a.altitudeAccuracy);this.set("heading",null===a.heading?void 0:Yb(a.heading));null===this.c?this.c=[a.longitude,a.latitude]:(this.c[0]=a.longitude,this.c[1]=a.latitude);var b=this.j(this.c);this.set("position",b);this.set("speed",null===a.speed?void 0:a.speed);a=bl(Xv,this.c,a.accuracy);a.va(this.j);this.set("accuracyGeometry",+a);this.q()};l.Al=function(a){a.type="error";this.d(!1);this.dispatchEvent(a)};l.pf=function(){return this.get("accuracy")};X.prototype.getAccuracy=X.prototype.pf;X.prototype.s=function(){return this.get("accuracyGeometry")||null};X.prototype.getAccuracyGeometry=X.prototype.s;X.prototype.t=function(){return this.get("altitude")};X.prototype.getAltitude=X.prototype.t;X.prototype.v=function(){return this.get("altitudeAccuracy")};X.prototype.getAltitudeAccuracy=X.prototype.v;X.prototype.L=function(){return this.get("heading")};+X.prototype.getHeading=X.prototype.L;X.prototype.R=function(){return this.get("position")};X.prototype.getPosition=X.prototype.R;X.prototype.k=function(){return this.get("projection")};X.prototype.getProjection=X.prototype.k;X.prototype.J=function(){return this.get("speed")};X.prototype.getSpeed=X.prototype.J;X.prototype.l=function(){return this.get("tracking")};X.prototype.getTracking=X.prototype.l;X.prototype.i=function(){return this.get("trackingOptions")};X.prototype.getTrackingOptions=X.prototype.i;+X.prototype.n=function(a){this.set("projection",a)};X.prototype.setProjection=X.prototype.n;X.prototype.d=function(a){this.set("tracking",a)};X.prototype.setTracking=X.prototype.d;X.prototype.u=function(a){this.set("trackingOptions",a)};X.prototype.setTrackingOptions=X.prototype.u;function Yv(a,b,d){for(var e=[],f=a(0),g=a(1),h=b(f),k=b(g),n=[g,f],p=[k,h],q=[1,0],r={},s=1E5,u,y,z,A,E;0<--s&&0<q.length;)z=q.pop(),f=n.pop(),h=p.pop(),g=z.toString(),g in r||(e.push(h[0],h[1]),r[g]=!0),A=q.pop(),g=n.pop(),k=p.pop(),E=(z+A)/2,u=a(E),y=b(u),wk(y[0],y[1],h[0],h[1],k[0],k[1])<d?(e.push(k[0],k[1]),g=A.toString(),r[g]=!0):(q.push(A,E,E,z),p.push(k,y,y,h),n.push(g,u,u,f));return e}function Zv(a,b,d,e,f){var g=ze("EPSG:4326");return Yv(function(e){return[a,b+(d-b)*e]},Se(g,e),f)}+function $v(a,b,d,e,f){var g=ze("EPSG:4326");return Yv(function(e){return[b+(d-b)*e,a]},Se(g,e),f)};function aw(a){a=m(a)?a:{};this.p=this.k=null;this.e=this.d=Infinity;this.i=this.j=-Infinity;this.v=m(a.targetSize)?a.targetSize:100;this.s=m(a.maxLines)?a.maxLines:100;this.c=[];this.f=[];this.t=m(a.strokeStyle)?a.strokeStyle:bw;this.u=this.l=void 0;this.n=null;this.setMap(m(a.map)?a.map:null)}var bw=new pl({color:"rgba(0,0,0,0.2)"}),cw=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001];+function dw(a,b,d,e,f){var g=f;b=Zv(b,a.j,a.d,a.p,d);g=m(a.c[g])?a.c[g]:new Sm(null);Tm(g,"XY",b);pe(g.N(),e)&&(a.c[f++]=g);return f}function ew(a,b,d,e,f){var g=f;b=$v(b,a.i,a.e,a.p,d);g=m(a.f[g])?a.f[g]:new Sm(null);Tm(g,"XY",b);pe(g.N(),e)&&(a.f[f++]=g);return f}l=aw.prototype;l.yj=function(){return this.k};l.Th=function(){return this.c};l.Yh=function(){return this.f};+l.zf=function(a){var b=a.vectorContext,d=a.frameState;a=d.extent;var e=d.viewState,f=e.center,g=e.projection,e=e.resolution,d=d.pixelRatio,d=e*e/(4*d*d);if(null===this.p||!Re(this.p,g)){var h=g.N(),k=g.j,n=k[2],p=k[1],q=k[0];this.d=k[3];this.e=n;this.j=p;this.i=q;k=ze("EPSG:4326");this.l=Se(k,g);this.u=Se(g,k);this.n=this.u(ke(h));this.p=g}for(var g=this.n[0],h=this.n[1],k=-1,r,p=Math.pow(this.v*e,2),q=[],s=[],e=0,n=cw.length;e<n;++e){r=cw[e]/2;q[0]=g-r;q[1]=h-r;s[0]=g+r;s[1]=h+r;this.l(q,q);this.l(s,+s);r=Math.pow(s[0]-q[0],2)+Math.pow(s[1]-q[1],2);if(r<=p)break;k=cw[e]}e=k;if(-1==e)this.c.length=this.f.length=0;else{g=this.u(f);f=g[0];g=g[1];h=this.s;f=Math.floor(f/e)*e;p=Vb(f,this.i,this.e);n=dw(this,p,d,a,0);for(k=0;p!=this.i&&k++<h;)p=Math.max(p-e,this.i),n=dw(this,p,d,a,n);p=Vb(f,this.i,this.e);for(k=0;p!=this.e&&k++<h;)p=Math.min(p+e,this.e),n=dw(this,p,d,a,n);this.c.length=n;g=Math.floor(g/e)*e;f=Vb(g,this.j,this.d);n=ew(this,f,d,a,0);for(k=0;f!=this.j&&k++<h;)f=Math.max(f-e,this.j),n=+ew(this,f,d,a,n);f=Vb(g,this.j,this.d);for(k=0;f!=this.d&&k++<h;)f=Math.min(f+e,this.d),n=ew(this,f,d,a,n);this.f.length=n}b.Fa(null,this.t);a=0;for(d=this.c.length;a<d;++a)f=this.c[a],b.Ib(f,null);a=0;for(d=this.f.length;a<d;++a)f=this.f[a],b.Ib(f,null)};l.setMap=function(a){null!==this.k&&(this.k.B("postcompose",this.zf,this),this.k.render());null!==a&&(a.A("postcompose",this.zf,this),a.render());this.k=a};function fw(a,b,d,e,f,g,h){jj.call(this,a,b,d,0,e);this.p=f;this.f=new Image;null!==g&&(this.f.crossOrigin=g);this.e={};this.d=null;this.state=0;this.k=h}v(fw,jj);fw.prototype.c=function(a){if(m(a)){var b=ma(a);if(b in this.e)return this.e[b];a=wb(this.e)?this.f:this.f.cloneNode(!1);return this.e[b]=a}return this.f};fw.prototype.l=function(){this.state=3;Qa(this.d,Wc);this.d=null;this.dispatchEvent("change")};+fw.prototype.n=function(){m(this.resolution)||(this.resolution=ne(this.extent)/this.f.height);this.state=2;Qa(this.d,Wc);this.d=null;this.dispatchEvent("change")};fw.prototype.load=function(){0==this.state&&(this.state=1,this.dispatchEvent("change"),this.d=[Uc(this.f,"error",this.l,!1,this),Uc(this.f,"load",this.n,!1,this)],this.k(this,this.p))};function gw(a,b,d,e,f){Zg.call(this,a,b);this.p=d;this.f=new Image;null!==e&&(this.f.crossOrigin=e);this.j={};this.k=null;this.n=f}v(gw,Zg);l=gw.prototype;l.T=function(){1==this.state&&hw(this);gw.X.T.call(this)};l.La=function(a){if(m(a)){var b=ma(a);if(b in this.j)return this.j[b];a=wb(this.j)?this.f:this.f.cloneNode(!1);return this.j[b]=a}return this.f};l.ub=function(){return this.p};l.zj=function(){this.state=3;hw(this);this.d()};+l.Aj=function(){this.state=this.f.naturalWidth&&this.f.naturalHeight?2:4;hw(this);this.d()};l.load=function(){0==this.state&&(this.state=1,this.d(),this.k=[Uc(this.f,"error",this.zj,!1,this),Uc(this.f,"load",this.Aj,!1,this)],this.n(this,this.p))};function hw(a){Qa(a.k,Wc);a.k=null};function iw(a,b,d){return function(e,f,g){return d(a,b,e,f,g)}}function jw(){};function kw(a,b){hd.call(this);this.c=new ep(this);var d=a;b&&(d=wf(a));this.c.Wa(d,"dragenter",this.il);d!=a&&this.c.Wa(d,"dragover",this.jl);this.c.Wa(a,"dragover",this.kl);this.c.Wa(a,"drop",this.ll)}v(kw,hd);l=kw.prototype;l.Oc=!1;l.T=function(){kw.X.T.call(this);this.c.Nc()};l.il=function(a){var b=a.c.dataTransfer;(this.Oc=!(!b||!(b.types&&(Wa(b.types,"Files")||Wa(b.types,"public.file-url"))||b.files&&0<b.files.length)))&&a.preventDefault()};+l.jl=function(a){this.Oc&&(a.preventDefault(),a.c.dataTransfer.dropEffect="none")};l.kl=function(a){this.Oc&&(a.preventDefault(),a.tb(),a=a.c.dataTransfer,a.effectAllowed="all",a.dropEffect="copy")};l.ll=function(a){this.Oc&&(a.preventDefault(),a.tb(),a=new wc(a.c),a.type="drop",this.dispatchEvent(a))};function lw(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0}function mw(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};function nw(a,b){ow||pw();qw||(ow(),qw=!0);rw.push(new sw(a,b))}var ow;function pw(){if(ba.Promise&&ba.Promise.resolve){var a=ba.Promise.resolve();ow=function(){a.then(tw)}}else ow=function(){Mh(tw)}}var qw=!1,rw=[];function tw(){for(;rw.length;){var a=rw;rw=[];for(var b=0;b<a.length;b++){var d=a[b];try{d.c.call(d.f)}catch(e){Lh(e)}}}qw=!1}function sw(a,b){this.c=a;this.f=b};function uw(a,b){this.f=vw;this.i=void 0;this.c=this.d=null;this.e=this.j=!1;try{var d=this;a.call(b,function(a){ww(d,xw,a)},function(a){ww(d,yw,a)})}catch(e){ww(this,yw,e)}}var vw=0,xw=2,yw=3;uw.prototype.then=function(a,b,d){return zw(this,ka(a)?a:null,ka(b)?b:null,d)};lw(uw);uw.prototype.cancel=function(a){this.f==vw&&nw(function(){var b=new Aw(a);Bw(this,b)},this)};+function Bw(a,b){if(a.f==vw)if(a.d){var d=a.d;if(d.c){for(var e=0,f=-1,g=0,h;h=d.c[g];g++)if(h=h.Gc)if(e++,h==a&&(f=g),0<=f&&1<e)break;0<=f&&(d.f==vw&&1==e?Bw(d,b):(e=d.c.splice(f,1)[0],Cw(d,e,yw,b)))}}else ww(a,yw,b)}function Dw(a,b){a.c&&a.c.length||a.f!=xw&&a.f!=yw||Ew(a);a.c||(a.c=[]);a.c.push(b)}+function zw(a,b,d,e){var f={Gc:null,$f:null,bg:null};f.Gc=new uw(function(a,h){f.$f=b?function(d){try{var f=b.call(e,d);a(f)}catch(p){h(p)}}:a;f.bg=d?function(b){try{var f=d.call(e,b);!m(f)&&b instanceof Aw?h(b):a(f)}catch(p){h(p)}}:h});f.Gc.d=a;Dw(a,f);return f.Gc}uw.prototype.k=function(a){this.f=vw;ww(this,xw,a)};uw.prototype.p=function(a){this.f=vw;ww(this,yw,a)};+function ww(a,b,d){if(a.f==vw){if(a==d)b=yw,d=new TypeError("Promise cannot resolve to itself");else{if(mw(d)){a.f=1;d.then(a.k,a.p,a);return}if(la(d))try{var e=d.then;if(ka(e)){Fw(a,d,e);return}}catch(f){b=yw,d=f}}a.i=d;a.f=b;Ew(a);b!=yw||d instanceof Aw||Gw(a,d)}}function Fw(a,b,d){function e(b){g||(g=!0,a.p(b))}function f(b){g||(g=!0,a.k(b))}a.f=1;var g=!1;try{d.call(b,f,e)}catch(h){e(h)}}function Ew(a){a.j||(a.j=!0,nw(a.l,a))}+uw.prototype.l=function(){for(;this.c&&this.c.length;){var a=this.c;this.c=[];for(var b=0;b<a.length;b++)Cw(this,a[b],this.f,this.i)}this.j=!1};function Cw(a,b,d,e){if(d==xw)b.$f(e);else{if(b.Gc)for(;a&&a.e;a=a.d)a.e=!1;b.bg(e)}}function Gw(a,b){a.e=!0;nw(function(){a.e&&Hw.call(null,b)})}var Hw=Lh;function Aw(a){wa.call(this,a)}v(Aw,wa);Aw.prototype.name="cancel";/*+ Portions of this code are from MochiKit, received by+ The Closure Authors under the MIT license. All other code is Copyright+ 2005-2009 The Closure Authors. All Rights Reserved.+*/+function Iw(a,b){this.j=[];this.s=a;this.u=b||null;this.e=this.c=!1;this.d=void 0;this.l=this.t=this.k=!1;this.i=0;this.f=null;this.p=0}Iw.prototype.cancel=function(a){if(this.c)this.d instanceof Iw&&this.d.cancel();else{if(this.f){var b=this.f;delete this.f;a?b.cancel(a):(b.p--,0>=b.p&&b.cancel())}this.s?this.s.call(this.u,this):this.l=!0;this.c||(a=new Jw,Kw(this),Lw(this,!1,a))}};Iw.prototype.n=function(a,b){this.k=!1;Lw(this,a,b)};function Lw(a,b,d){a.c=!0;a.d=d;a.e=!b;Mw(a)}+function Kw(a){if(a.c){if(!a.l)throw new Nw;a.l=!1}}function Ow(a,b,d,e){a.j.push([b,d,e]);a.c&&Mw(a)}Iw.prototype.then=function(a,b,d){var e,f,g=new uw(function(a,b){e=a;f=b});Ow(this,e,function(a){a instanceof Jw?g.cancel():f(a)});return g.then(a,b,d)};lw(Iw);function Pw(a){return Ta(a.j,function(a){return ka(a[1])})}+function Mw(a){if(a.i&&a.c&&Pw(a)){var b=a.i,d=Qw[b];d&&(ba.clearTimeout(d.ea),delete Qw[b]);a.i=0}a.f&&(a.f.p--,delete a.f);for(var b=a.d,e=d=!1;a.j.length&&!a.k;){var f=a.j.shift(),g=f[0],h=f[1],f=f[2];if(g=a.e?h:g)try{var k=g.call(f||a.u,b);m(k)&&(a.e=a.e&&(k==b||k instanceof Error),a.d=b=k);mw(b)&&(e=!0,a.k=!0)}catch(n){b=n,a.e=!0,Pw(a)||(d=!0)}}a.d=b;e&&(k=ra(a.n,a,!0),e=ra(a.n,a,!1),b instanceof Iw?(Ow(b,k,e),b.t=!0):b.then(k,e));d&&(b=new Rw(b),Qw[b.ea]=b,a.i=b.ea)}+function Nw(){wa.call(this)}v(Nw,wa);Nw.prototype.message="Deferred has already fired";Nw.prototype.name="AlreadyCalledError";function Jw(){wa.call(this)}v(Jw,wa);Jw.prototype.message="Deferred was canceled";Jw.prototype.name="CanceledError";function Rw(a){this.ea=ba.setTimeout(ra(this.f,this),0);this.c=a}Rw.prototype.f=function(){delete Qw[this.ea];throw this.c;};var Qw={};function Sw(a,b){m(a.name)?(this.name=a.name,this.code=Tw[a.name]):(this.code=a.code,this.name=Uw(a.code));wa.call(this,za("%s %s",this.name,b))}v(Sw,wa);function Uw(a){var b=vb(Tw,function(b){return a==b});if(!m(b))throw Error("Invalid code: "+a);return b}var Tw={AbortError:3,EncodingError:5,InvalidModificationError:9,InvalidStateError:7,NotFoundError:1,NotReadableError:4,NoModificationAllowedError:6,PathExistsError:12,QuotaExceededError:10,SecurityError:2,SyntaxError:8,TypeMismatchError:11};function Vw(a,b){qc.call(this,a.type,b)}v(Vw,qc);function Ww(){hd.call(this);this.lb=new FileReader;this.lb.onloadstart=ra(this.c,this);this.lb.onprogress=ra(this.c,this);this.lb.onload=ra(this.c,this);this.lb.onabort=ra(this.c,this);this.lb.onerror=ra(this.c,this);this.lb.onloadend=ra(this.c,this)}v(Ww,hd);Ww.prototype.getError=function(){return this.lb.error&&new Sw(this.lb.error,"reading file")};Ww.prototype.c=function(a){this.dispatchEvent(new Vw(a,this))};Ww.prototype.T=function(){Ww.X.T.call(this);delete this.lb};+function Xw(a){var b=new Iw;a.Wa("loadend",sa(function(a,b){var f=b.lb.result,g=b.getError();null==f||g?(Kw(a),Lw(a,!1,g)):(Kw(a),Lw(a,!0,f));b.Nc()},b,a));return b};function Yw(a){a=m(a)?a:{};Qj.call(this,{handleEvent:bd});this.i=m(a.formatConstructors)?a.formatConstructors:[];this.u=m(a.projection)?ze(a.projection):null;this.j=null;this.c=void 0}v(Yw,Qj);Yw.prototype.T=function(){m(this.c)&&Wc(this.c);Yw.X.T.call(this)};Yw.prototype.k=function(a){a=a.c.dataTransfer.files;var b,d,e;b=0;for(d=a.length;b<d;++b){var f=e=a[b],g=new Ww,h=Xw(g);g.lb.readAsText(f,"");Ow(h,sa(this.l,e),null,this)}};+Yw.prototype.l=function(a,b){var d=this.n,e=this.u;null===e&&(e=d.c().t);var d=this.i,f=[],g,h;g=0;for(h=d.length;g<h;++g){var k=new d[g],n;try{n=k.qa(b)}catch(p){n=null}if(null!==n){var k=k.Oa(b),k=Se(k,e),q,r;q=0;for(r=n.length;q<r;++q){var s=n[q],u=s.W();null!=u&&u.va(k);f.push(s)}}}this.dispatchEvent(new Zw($w,this,a,f,e))};+Yw.prototype.setMap=function(a){m(this.c)&&(Wc(this.c),this.c=void 0);null!==this.j&&(pc(this.j),this.j=null);Yw.X.setMap.call(this,a);null!==a&&(this.j=new kw(a.d),this.c=w(this.j,"drop",this.k,!1,this))};var $w="addfeatures";function Zw(a,b,d,e,f){qc.call(this,a,b);this.features=e;this.file=d;this.projection=f}v(Zw,qc);function ax(a,b){this.x=a;this.y=b}v(ax,sf);ax.prototype.clone=function(){return new ax(this.x,this.y)};ax.prototype.scale=sf.prototype.scale;ax.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};ax.prototype.rotate=function(a){var b=Math.cos(a);a=Math.sin(a);var d=this.y*b+this.x*a;this.x=this.x*b-this.y*a;this.y=d;return this};function bx(a){a=m(a)?a:{};dk.call(this,{handleDownEvent:cx,handleDragEvent:dx,handleUpEvent:ex});this.l=m(a.condition)?a.condition:ak;this.c=this.i=void 0;this.k=0}v(bx,dk);function dx(a){if(ck(a)){var b=a.map,d=b.j();a=a.pixel;a=new ax(a[0]-d[0]/2,d[1]/2-a[1]);d=Math.atan2(a.y,a.x);a=Math.sqrt(a.x*a.x+a.y*a.y);var e=b.c(),f=Xe(e);b.render();m(this.i)&&Rj(b,e,f.rotation-(d-this.i));this.i=d;m(this.c)&&Tj(b,e,f.resolution/a*this.c);m(this.c)&&(this.k=this.c/a);this.c=a}}+function ex(a){if(!ck(a))return!0;a=a.map;var b=a.c();Ye(b,-1);var d=Xe(b),e=this.k-1,f=d.rotation,f=b.constrainRotation(f,0);Rj(a,b,f,void 0,void 0);d=d.resolution;d=b.constrainResolution(d,0,e);Tj(a,b,d,void 0,400);this.k=0;return!1}function cx(a){return ck(a)&&this.l(a)?(Ye(a.map.c(),1),this.c=this.i=void 0,!0):!1};function fx(a,b){qc.call(this,a);this.feature=b}v(fx,qc);+function gx(a){dk.call(this,{handleDownEvent:hx,handleEvent:ix,handleUpEvent:jx});this.V=null;this.ja=m(a.source)?a.source:null;this.ga=m(a.features)?a.features:null;this.ob=m(a.snapTolerance)?a.snapTolerance:12;this.Ja=m(a.minPointsPerRing)?a.minPointsPerRing:3;var b=this.L=a.type,d;"Point"===b||"MultiPoint"===b?d=kx:"LineString"===b||"MultiLineString"===b?d=lx:"Polygon"===b||"MultiPolygon"===b?d=mx:"Circle"===b&&(d=nx);this.c=d;this.i=this.s=this.t=this.k=this.l=null;this.R=new xp({style:m(a.style)?+a.style:ox()});this.ha=a.geometryName;this.ab=m(a.condition)?a.condition:Zj;w(this,ud("active"),this.ia,!1,this)}v(gx,dk);function ox(){var a=zl();return function(b){return a[b.W().S()]}}gx.prototype.setMap=function(a){gx.X.setMap.call(this,a);this.ia()};function ix(a){var b=!0;a.type===ej?b=px(this,a):a.type===Zi&&(b=!1);return ek.call(this,a)&&b}function hx(a){return this.ab(a)?(this.V=a.pixel,!0):!1}+function jx(a){var b=this.V,d=a.pixel,e=b[0]-d[0],b=b[1]-d[1],d=!0;4>=e*e+b*b&&(px(this,a),null===this.l?qx(this,a):this.c===kx||this.c===nx&&null!==this.l||rx(this,a)?this.Y():(a=a.coordinate,e=this.k.W(),this.c===lx?(this.l=a.slice(),b=e.U(),b.push(a.slice()),e.$(b)):this.c===mx&&(this.i[0].push(a.slice()),e.$(this.i)),sx(this)),d=!1);return d}+function px(a,b){if(a.c===kx&&null===a.l)qx(a,b);else if(null===a.l){var d=b.coordinate.slice();null===a.t?(a.t=new O(new Mk(d)),sx(a)):a.t.W().$(d)}else{var d=b.coordinate,e=a.k.W(),f,g;a.c===kx?(g=e.U(),g[0]=d[0],g[1]=d[1],e.$(g)):(a.c===lx?f=e.U():a.c===mx?f=a.i[0]:a.c===nx&&(f=e.Sc()),rx(a,b)&&(d=a.l.slice()),a.t.W().$(d),g=f[f.length-1],g[0]=d[0],g[1]=d[1],a.c===lx?e.$(f):a.c===mx?(g=a.s.W(),g.$(f),e.$(a.i)):a.c===nx&&(g=a.s.W(),g.$([e.Sc(),d]),e.Lf(g.Mf())));sx(a)}return!0}+function rx(a,b){var d=!1;if(null!==a.k){var e=a.k.W(),f=!1,g=[a.l];a.c===lx?f=2<e.U().length:a.c===mx&&(f=e.U()[0].length>a.Ja,g=[a.i[0][0],a.i[0][a.i[0].length-2]]);if(f)for(var e=b.map,f=0,h=g.length;f<h;f++){var k=g[f],n=e.i(k),p=b.pixel,d=p[0]-n[0],n=p[1]-n[1];if(d=Math.sqrt(d*d+n*n)<=a.ob){a.l=k;break}}}return d}+function qx(a,b){var d=b.coordinate;a.l=d;var e;a.c===kx?e=new Mk(d.slice()):a.c===lx?e=new Sm([d.slice(),d.slice()]):a.c===mx?(a.s=new O(new Sm([d.slice(),d.slice()])),a.i=[[d.slice(),d.slice()]],e=new F(a.i)):a.c===nx&&(e=new Jm(d.slice(),0),a.s=new O(new Sm([d.slice(),d.slice()])));a.k=new O;m(a.ha)&&a.k.j(a.ha);a.k.Xa(e);sx(a);a.dispatchEvent(new fx("drawstart",a.k))}+gx.prototype.Y=function(){var a=tx(this),b,d=a.W();this.c===kx?b=d.U():this.c===lx?(b=d.U(),b.pop(),d.$(b)):this.c===mx&&(this.i[0].pop(),this.i[0].push(this.i[0][0]),d.$(this.i),b=d.U());"MultiPoint"===this.L?a.Xa(new Xm([b])):"MultiLineString"===this.L?a.Xa(new Um([b])):"MultiPolygon"===this.L&&a.Xa(new Ym([b]));null===this.ga||this.ga.push(a);null===this.ja||this.ja.Za(a);this.dispatchEvent(new fx("drawend",a))};+function tx(a){a.l=null;var b=a.k;null!==b&&(a.k=null,a.t=null,a.s=null,a.R.c.clear());return b}gx.prototype.v=ad;function sx(a){var b=[];null===a.k||b.push(a.k);null===a.s||b.push(a.s);null===a.t||b.push(a.t);a.R.Xc(new lg(b))}gx.prototype.ia=function(){var a=this.n,b=this.d();null!==a&&b||tx(this);this.R.setMap(b?a:null)};var kx="Point",lx="LineString",mx="Polygon",nx="Circle";function ux(a){dk.call(this,{handleDownEvent:vx,handleDragEvent:wx,handleEvent:xx,handleUpEvent:yx});this.ga=m(a.deleteCondition)?a.deleteCondition:gd(Zj,Yj);this.Y=this.i=null;this.R=[0,0];this.c=new pn;this.l=m(a.pixelTolerance)?a.pixelTolerance:10;this.V=!1;this.k=null;this.s=new xp({style:m(a.style)?a.style:zx()});this.L={Point:this.Em,LineString:this.Dg,LinearRing:this.Dg,Polygon:this.Gm,MultiPoint:this.Bm,MultiLineString:this.Am,MultiPolygon:this.Dm,GeometryCollection:this.zm};this.t=a.features;+this.t.forEach(this.Nf,this);w(this.t,"add",this.ti,!1,this);w(this.t,"remove",this.ui,!1,this)}v(ux,dk);l=ux.prototype;l.Nf=function(a){var b=a.W();m(this.L[b.S()])&&this.L[b.S()].call(this,a,b);a=this.n;null===a||Ax(this,this.R,a)};l.setMap=function(a){this.s.setMap(a);ux.X.setMap.call(this,a)};l.ti=function(a){this.Nf(a.element)};+l.ui=function(a){var b=a.element;a=this.c;var d,e=[];tn(a,b.W().N(),function(a){b===a.feature&&e.push(a)});for(d=e.length-1;0<=d;--d)a.remove(e[d]);null!==this.i&&0===this.t.Mb()&&(this.s.Id(this.i),this.i=null)};l.Em=function(a,b){var d=b.U(),d={feature:a,geometry:b,la:[d,d]};this.c.xa(b.N(),d)};l.Bm=function(a,b){var d=b.U(),e,f,g;f=0;for(g=d.length;f<g;++f)e=d[f],e={feature:a,geometry:b,depth:[f],index:f,la:[e,e]},this.c.xa(b.N(),e)};+l.Dg=function(a,b){var d=b.U(),e,f,g,h;e=0;for(f=d.length-1;e<f;++e)g=d.slice(e,e+2),h={feature:a,geometry:b,index:e,la:g},this.c.xa(Rd(g),h)};l.Am=function(a,b){var d=b.U(),e,f,g,h,k,n,p;h=0;for(k=d.length;h<k;++h)for(e=d[h],f=0,g=e.length-1;f<g;++f)n=e.slice(f,f+2),p={feature:a,geometry:b,depth:[h],index:f,la:n},this.c.xa(Rd(n),p)};+l.Gm=function(a,b){var d=b.U(),e,f,g,h,k,n,p;h=0;for(k=d.length;h<k;++h)for(e=d[h],f=0,g=e.length-1;f<g;++f)n=e.slice(f,f+2),p={feature:a,geometry:b,depth:[h],index:f,la:n},this.c.xa(Rd(n),p)};l.Dm=function(a,b){var d=b.U(),e,f,g,h,k,n,p,q,r,s;n=0;for(p=d.length;n<p;++n)for(q=d[n],h=0,k=q.length;h<k;++h)for(e=q[h],f=0,g=e.length-1;f<g;++f)r=e.slice(f,f+2),s={feature:a,geometry:b,depth:[h,n],index:f,la:r},this.c.xa(Rd(r),s)};+l.zm=function(a,b){var d,e=b.e;for(d=0;d<e.length;++d)this.L[e[d].S()].call(this,a,e[d])};function Bx(a,b){var d=a.i;null===d?(d=new O(new Mk(b)),a.i=d,a.s.Gf(d)):d.W().$(b)}function Cx(a,b){return a.index-b.index}+function vx(a){Ax(this,a.pixel,a.map);this.k=[];var b=this.i;if(null!==b){a=[];var b=b.W().U(),d=Rd([b]),d=rn(this.c,d),e={};d.sort(Cx);for(var f=0,g=d.length;f<g;++f){var h=d[f],k=h.la,n=ma(h.feature),p=h.depth;p&&(n+="-"+p.join("-"));e[n]||(e[n]=Array(2));if(zd(k[0],b)&&!e[n][0])this.k.push([h,0]),e[n][0]=h;else if(zd(k[1],b)&&!e[n][1]){if("LineString"!==h.geometry.S()&&"MultiLineString"!==h.geometry.S()||!e[n][0]||0!==e[n][0].index)this.k.push([h,1]),e[n][1]=h}else ma(k)in this.Y&&!e[n][0]&&!e[n][1]&&+a.push([h,b])}for(f=a.length-1;0<=f;--f)this.Ui.apply(this,a[f])}return null!==this.i}+function wx(a){a=a.coordinate;for(var b=0,d=this.k.length;b<d;++b){for(var e=this.k[b],f=e[0],g=f.depth,h=f.geometry,k=h.U(),n=f.la,e=e[1];a.length<h.H;)a.push(0);switch(h.S()){case "Point":k=a;n[0]=n[1]=a;break;case "MultiPoint":k[f.index]=a;n[0]=n[1]=a;break;case "LineString":k[f.index+e]=a;n[e]=a;break;case "MultiLineString":k[g[0]][f.index+e]=a;n[e]=a;break;case "Polygon":k[g[0]][f.index+e]=a;n[e]=a;break;case "MultiPolygon":k[g[1]][g[0]][f.index+e]=a,n[e]=a}h.$(k)}Bx(this,a)}+function yx(){for(var a,b=this.k.length-1;0<=b;--b)a=this.k[b][0],this.c.update(Rd(a.la),a);return!1}+function xx(a){var b;a.map.c().u.slice()[1]||a.type!=ej||this.u||(this.R=a.pixel,Ax(this,a.pixel,a.map));if(null!==this.i&&this.ga(a)){this.i.W();b=this.k;var d={},e,f,g,h,k,n,p,q,r;for(k=b.length-1;0<=k;--k)if(g=b[k],q=g[0],h=q.geometry,f=h.U(),r=ma(q.feature),q.depth&&(r+="-"+q.depth.join("-")),e=p=n=void 0,0===g[1]?(p=q,n=q.index):1==g[1]&&(e=q,n=q.index+1),r in d||(d[r]=[e,p,n]),g=d[r],m(e)&&(g[0]=e),m(p)&&(g[1]=p),m(g[0])&&m(g[1])){e=f;r=!1;p=n-1;switch(h.S()){case "MultiLineString":f[q.depth[0]].splice(n,+1);r=!0;break;case "LineString":f.splice(n,1);r=!0;break;case "MultiPolygon":e=e[q.depth[1]];case "Polygon":e=e[q.depth[0]],4<e.length&&(n==e.length-1&&(n=0),e.splice(n,1),r=!0,0===n&&(e.pop(),e.push(e[0]),p=e.length-1))}r&&(this.c.remove(g[0]),this.c.remove(g[1]),h.$(f),f={depth:q.depth,feature:q.feature,geometry:q.geometry,index:p,la:[g[0].la[0],g[1].la[1]]},this.c.xa(Rd(f.la),f),Dx(this,h,n,q.depth,-1),this.s.Id(this.i),this.i=null)}b=!0}return ek.call(this,a)&&!b}+function Ax(a,b,d){function e(a,b){return Bd(f,wd(f,a.la))-Bd(f,wd(f,b.la))}var f=d.wa(b),g=d.wa([b[0]-a.l,b[1]+a.l]),h=d.wa([b[0]+a.l,b[1]-a.l]),g=Rd([g,h]),g=rn(a.c,g);if(0<g.length){g.sort(e);var h=g[0].la,k=wd(f,h),n=d.i(k);if(Math.sqrt(Bd(b,n))<=a.l){b=d.i(h[0]);d=d.i(h[1]);b=Bd(n,b);d=Bd(n,d);a.V=Math.sqrt(Math.min(b,d))<=a.l;a.V&&(k=b>d?h[1]:h[0]);Bx(a,k);d={};d[ma(h)]=!0;b=1;for(n=g.length;b<n;++b)if(k=g[b].la,zd(h[0],k[0])&&zd(h[1],k[1])||zd(h[0],k[1])&&zd(h[1],k[0]))d[ma(k)]=!0;else break;+a.Y=d;return}}null!==a.i&&(a.s.Id(a.i),a.i=null)}+l.Ui=function(a,b){for(var d=a.la,e=a.feature,f=a.geometry,g=a.depth,h=a.index,k;b.length<f.H;)b.push(0);switch(f.S()){case "MultiLineString":k=f.U();k[g[0]].splice(h+1,0,b);break;case "Polygon":k=f.U();k[g[0]].splice(h+1,0,b);break;case "MultiPolygon":k=f.U();k[g[1]][g[0]].splice(h+1,0,b);break;case "LineString":k=f.U();k.splice(h+1,0,b);break;default:return}f.$(k);k=this.c;k.remove(a);Dx(this,f,h,g,1);var n={la:[d[0],b],feature:e,geometry:f,depth:g,index:h};k.xa(Rd(n.la),n);this.k.push([n,1]);d=+{la:[b,d[1]],feature:e,geometry:f,depth:g,index:h+1};k.xa(Rd(d.la),d);this.k.push([d,0])};function Dx(a,b,d,e,f){tn(a.c,b.N(),function(a){a.geometry===b&&(!m(e)||gb(a.depth,e))&&a.index>d&&(a.index+=f)})}function zx(){var a=zl();return function(){return a.Point}};function Ex(a,b,d){qc.call(this,a);this.selected=b;this.deselected=d}v(Ex,qc);+function Fx(a){Qj.call(this,{handleEvent:Gx});a=m(a)?a:{};this.l=m(a.condition)?a.condition:Yj;this.i=m(a.addCondition)?a.addCondition:ad;this.t=m(a.removeCondition)?a.removeCondition:ad;this.J=m(a.toggleCondition)?a.toggleCondition:ak;this.k=m(a.multi)?a.multi:!1;var b;if(m(a.layers))if(ka(a.layers))b=a.layers;else{var d=a.layers;b=function(a){return Wa(d,a)}}else b=bd;this.j=b;this.c=new xp({style:m(a.style)?a.style:Hx()});a=this.c.c;w(a,"add",this.u,!1,this);w(a,"remove",this.v,!1,this)}v(Fx,Qj);+Fx.prototype.s=function(){return this.c.c};+function Gx(a){if(!this.l(a))return!0;var b=this.i(a),d=this.t(a),e=this.J(a),f=a.map,g=this.c.c,h=[],k=[],n=!1;if(b||d||e){f.ue(a.pixel,function(a){-1==Pa(g.c,a)?(b||e)&&k.push(a):(d||e)&&h.push(a)},void 0,this.j);for(f=h.length-1;0<=f;--f)g.remove(h[f]);g.Be(k);if(0<k.length||0<h.length)n=!0}else f.ue(a.pixel,function(a){k.push(a);return!this.k},this,this.j),0<k.length&&1==g.Mb()&&g.item(0)==k[0]||(n=!0,0!==g.Mb()&&(h=Array.prototype.concat(g.c),g.clear()),g.Be(k));n&&this.dispatchEvent(new Ex("select",+k,h));return Xj(a)}Fx.prototype.setMap=function(a){var b=this.n,d=this.c.c;null===b||d.forEach(b.mc,b);Fx.X.setMap.call(this,a);this.c.setMap(a);null===a||d.forEach(a.ab,a)};function Hx(){var a=zl();ab(a.Polygon,a.LineString);ab(a.GeometryCollection,a.LineString);return function(b){return a[b.W().S()]}}Fx.prototype.u=function(a){a=a.element;var b=this.n;null===b||b.ab(a)};Fx.prototype.v=function(a){a=a.element;var b=this.n;null===b||b.mc(a)};function Y(a){a=m(a)?a:{};var b=Bb(a);delete b.gradient;delete b.radius;delete b.blur;delete b.shadow;delete b.weight;J.call(this,b);this.ma=null;this.of=m(a.shadow)?a.shadow:250;this.fd=void 0;this.Dc=null;w(this,ud("gradient"),this.Si,!1,this);this.Cc(m(a.gradient)?a.gradient:Ix);this.Bc(m(a.blur)?a.blur:15);this.nc(m(a.radius)?a.radius:8);w(this,[ud("blur"),ud("radius")],this.hf,!1,this);this.hf();var d=m(a.weight)?a.weight:"weight",e;ia(d)?e=function(a){return a.get(d)}:e=d;this.oa(ra(function(a){a=+e(a);a=m(a)?Vb(a,0,1):1;var b=255*a|0,d=this.Dc[b];m(d)||(d=[new vl({image:new zj({opacity:a,src:this.fd})})],this.Dc[b]=d);return d},this));this.set("renderOrder",null);w(this,"render",this.Wi,!1,this)}v(Y,J);var Ix=["#00f","#0ff","#0f0","#ff0","#f00"];Y.prototype.Ia=function(){return this.get("blur")};Y.prototype.getBlur=Y.prototype.Ia;Y.prototype.Ja=function(){return this.get("gradient")};Y.prototype.getGradient=Y.prototype.Ja;Y.prototype.mc=function(){return this.get("radius")};+Y.prototype.getRadius=Y.prototype.mc;Y.prototype.Si=function(){for(var a=this.Ja(),b=Nf(1,256),d=b.createLinearGradient(0,0,1,256),e=1/(a.length-1),f=0,g=a.length;f<g;++f)d.addColorStop(f*e,a[f]);b.fillStyle=d;b.fillRect(0,0,1,256);this.ma=b.getImageData(0,0,1,256).data};+Y.prototype.hf=function(){var a=this.mc(),b=this.Ia(),d=a+b+1,e=2*d,e=Nf(e,e);e.shadowOffsetX=e.shadowOffsetY=this.of;e.shadowBlur=b;e.shadowColor="#000";e.beginPath();b=d-this.of;e.arc(b,b,a,0,2*Math.PI,!0);e.fill();this.fd=e.canvas.toDataURL();this.Dc=Array(256);this.q()};Y.prototype.Wi=function(a){a=a.context;var b=a.canvas,b=a.getImageData(0,0,b.width,b.height),d=b.data,e,f,g;e=0;for(f=d.length;e<f;e+=4)if(g=4*d[e+3])d[e]=this.ma[g],d[e+1]=this.ma[g+1],d[e+2]=this.ma[g+2];a.putImageData(b,0,0)};+Y.prototype.Bc=function(a){this.set("blur",a)};Y.prototype.setBlur=Y.prototype.Bc;Y.prototype.Cc=function(a){this.set("gradient",a)};Y.prototype.setGradient=Y.prototype.Cc;Y.prototype.nc=function(a){this.set("radius",a)};Y.prototype.setRadius=Y.prototype.nc;function Jx(a){return[a]};function Kx(a,b){var d=b||{},e=d.document||document,f=Ef("SCRIPT"),g={tg:f,jc:void 0},h=new Iw(Lx,g),k=null,n=null!=d.timeout?d.timeout:5E3;0<n&&(k=window.setTimeout(function(){Mx(f,!0);var b=new Nx(Ox,"Timeout reached for loading script "+a);Kw(h);Lw(h,!1,b)},n),g.jc=k);f.onload=f.onreadystatechange=function(){f.readyState&&"loaded"!=f.readyState&&"complete"!=f.readyState||(Mx(f,d.sh||!1,k),Kw(h),Lw(h,!0,null))};f.onerror=function(){Mx(f,!0,k);var b=new Nx(Px,"Error while loading script "+a);Kw(h);+Lw(h,!1,b)};yf(f,{type:"text/javascript",charset:"UTF-8",src:a});Qx(e).appendChild(f);return h}function Qx(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement}function Lx(){if(this&&this.tg){var a=this.tg;a&&"SCRIPT"==a.tagName&&Mx(a,!0,this.jc)}}function Mx(a,b,d){null!=d&&ba.clearTimeout(d);a.onload=ca;a.onerror=ca;a.onreadystatechange=ca;b&&window.setTimeout(function(){If(a)},0)}var Px=0,Ox=1;+function Nx(a,b){var d="Jsloader error (code #"+a+")";b&&(d+=": "+b);wa.call(this,d);this.code=a}v(Nx,wa);function Rx(a,b){this.f=new Vr(a);this.c=b?b:"callback";this.jc=5E3}var Sx=0;+Rx.prototype.send=function(a,b,d,e){a=a||null;e=e||"_"+(Sx++).toString(36)+ta().toString(36);ba._callbacks_||(ba._callbacks_={});var f=this.f.clone();if(a)for(var g in a)if(!a.hasOwnProperty||a.hasOwnProperty(g)){var h=f,k=g,n=a[g];ga(n)||(n=[String(n)]);ns(h.c,k,n)}b&&(ba._callbacks_[e]=Tx(e,b),b=this.c,g="_callbacks_."+e,ga(g)||(g=[String(g)]),ns(f.c,b,g));b=Kx(f.toString(),{timeout:this.jc,sh:!0});Ow(b,null,Ux(e,a,d),void 0);return{ea:e,jf:b}};+Rx.prototype.cancel=function(a){a&&(a.jf&&a.jf.cancel(),a.ea&&Vx(a.ea,!1))};function Ux(a,b,d){return function(){Vx(a,!1);d&&d(b)}}function Tx(a,b){return function(d){Vx(a,!0);b.apply(void 0,arguments)}}function Vx(a,b){ba._callbacks_[a]&&(b?delete ba._callbacks_[a]:ba._callbacks_[a]=ca)};function Wx(a){var b=/\{z\}/g,d=/\{x\}/g,e=/\{y\}/g,f=/\{-y\}/g;return function(g){return null===g?void 0:a.replace(b,g[0].toString()).replace(d,g[1].toString()).replace(e,g[2].toString()).replace(f,function(){return((1<<g[0])-g[2]-1).toString()})}}function Xx(a){return Yx(Sa(a,Wx))}function Yx(a){return 1===a.length?a[0]:function(b,d,e){return null===b?void 0:a[Wb((b[1]<<b[0])+b[2],a.length)](b,d,e)}}function Zx(){}+function $x(a,b){var d=[0,0,0];return function(e,f,g){return null===e?void 0:b(a(e,g,d),f,g)}}function ay(a){var b=[],d=/\{(\d)-(\d)\}/.exec(a)||/\{([a-z])-([a-z])\}/.exec(a);if(d){var e=d[2].charCodeAt(0),f;for(f=d[1].charCodeAt(0);f<=e;++f)b.push(a.replace(d[0],String.fromCharCode(f)))}else b.push(a);return b};function by(a){oh.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:m(a.state)?a.state:void 0,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio,wrapX:a.wrapX});this.tileUrlFunction=m(a.tileUrlFunction)?a.tileUrlFunction:Zx;this.crossOrigin=m(a.crossOrigin)?a.crossOrigin:null;this.tileLoadFunction=m(a.tileLoadFunction)?a.tileLoadFunction:cy;this.tileClass=m(a.tileClass)?a.tileClass:gw}v(by,oh);function cy(a,b){a.La().src=b}l=by.prototype;+l.Zb=function(a,b,d,e,f){var g=this.rb(a,b,d);if(Wg(this.c,g))return this.c.get(g);a=[a,b,d];b=m(f)?f:this.i;d=qh(this,b);var h;if(h=m(this.L)){h=a[0];var k=lh(d,h);if(m(k)){var n=mh(b),p=b.N();h=d.ta(h)*k==n.ta(h)*of(eh(n,p,h))}else h=b.e}h?this.L?(h=a[0],k=a[1],b=jh(d,h,b),k<b.c||k>b.e?(k=Wb(k,of(b)),b=[h,k,a[2]]):b=a):(h=a[1],b=jh(d,a[0],b),b=h<b.c||h>b.e?null:a):b=a;e=null===b?void 0:this.tileUrlFunction(b,e,f);e=new this.tileClass(a,m(e)?0:4,m(e)?e:"",this.crossOrigin,this.tileLoadFunction);+w(e,"change",this.xk,!1,this);this.c.set(g,e);return e};l.gb=function(){return this.tileLoadFunction};l.hb=function(){return this.tileUrlFunction};l.xk=function(a){a=a.target;switch(a.state){case 1:this.dispatchEvent(new rh("tileloadstart",a));break;case 2:this.dispatchEvent(new rh("tileloadend",a));break;case 3:this.dispatchEvent(new rh("tileloaderror",a))}};l.nb=function(a){this.c.clear();this.tileLoadFunction=a;this.q()};l.ya=function(a){this.c.clear();this.tileUrlFunction=a;this.q()};+l.Se=function(a,b,d){a=this.rb(a,b,d);Wg(this.c,a)&&this.c.get(a)};function dy(a){var b=m(a.extent)?a.extent:Rl,d=nh(b,a.maxZoom,a.tileSize);bh.call(this,{minZoom:a.minZoom,origin:le(b,"top-left"),resolutions:d,tileSize:a.tileSize})}v(dy,bh);dy.prototype.Hb=function(a){a=m(a)?a:{};var b=this.minZoom,d=this.maxZoom,e=null;if(m(a.extent)){var e=Array(d+1),f;for(f=0;f<=d;++f)e[f]=f<b?null:eh(this,a.extent,f)}return function(a,f,k){f=a[0];if(f<b||d<f)return null;var n=a[1];a=a[2];return a<-Math.pow(2,f)||-1<a||null!==e&&!mf(e[f],n,a)?null:ff(f,n,-a-1,k)}};+dy.prototype.xd=function(a,b){if(a[0]<this.maxZoom){var d=2*a[1],e=2*a[2];return lf(d,d+1,e,e+1,b)}return null};dy.prototype.ld=function(a,b,d,e){e=lf(0,a[1],0,a[2],e);for(a=a[0]-1;a>=this.minZoom;--a)if(e.c=e.e>>=1,e.d=e.f>>=1,b.call(d,a,e))return!0;return!1};function ey(a){by.call(this,{crossOrigin:"anonymous",opaque:!0,projection:ze("EPSG:3857"),state:"loading",tileLoadFunction:a.tileLoadFunction,wrapX:m(a.wrapX)?a.wrapX:!0});this.e=m(a.culture)?a.culture:"en-us";this.d=m(a.maxZoom)?a.maxZoom:-1;var b=new Vr((Sb?"https:":"http:")+"//dev.virtualearth.net/REST/v1/Imagery/Metadata/"+a.imagerySet);(new Rx(b,"jsonp")).send({include:"ImageryProviders",uriScheme:Sb?"https":"http",key:a.key},ra(this.k,this))}v(ey,by);var fy=new qf({html:'<a class="ol-attribution-bing-tos" href="http://www.microsoft.com/maps/product/terms.html">Terms of Use</a>'});+ey.prototype.k=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)ah(this,"error");else{var b=a.brandLogoUri;Sb&&-1==b.indexOf("https")&&(b=b.replace("http","https"));var d=a.resourceSets[0].resources[0],e=-1==this.d?d.zoomMax:this.d,f=new dy({extent:kh(this.i),minZoom:d.zoomMin,maxZoom:e,tileSize:d.imageWidth});this.tileGrid=f;var g=this.e;this.tileUrlFunction=$x(f.Hb(),Yx(Sa(d.imageUrlSubdomains,+function(a){var b=d.imageUrl.replace("{subdomain}",a).replace("{culture}",g);return function(a){return null===a?void 0:b.replace("{quadkey}",hf(a))}})));if(d.imageryProviders){var h=De(ze("EPSG:4326"),this.i);a=Sa(d.imageryProviders,function(a){var b=a.attribution,d={};Qa(a.coverageAreas,function(a){var b=a.zoomMin,g=Math.min(a.zoomMax,e);a=a.bbox;a=te([a[1],a[0],a[3],a[2]],h);var k,n;for(k=b;k<=g;++k)n=k.toString(),b=eh(f,a,k),n in d?d[n].push(b):d[n]=[b]});return new qf({html:b,tileRanges:d})});+a.push(fy);this.j=a}this.J=b;ah(this,"ready")}};function gy(a){un.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection});this.t=void 0;this.v=m(a.distance)?a.distance:20;this.s=[];this.c=a.source;this.c.A("change",gy.prototype.R,this)}v(gy,un);gy.prototype.L=function(){return this.c};gy.prototype.Lb=function(a,b,d){b!==this.t&&(this.clear(),this.t=b,this.c.Lb(a,b,d),hy(this),this.Ka(this.s))};gy.prototype.R=function(){this.clear();hy(this);this.Ka(this.s);this.q()};+function hy(a){if(m(a.t)){a.s.length=0;for(var b=Sd(),d=a.v*a.t,e=a.c.Ea(),f={},g=0,h=e.length;g<h;g++){var k=e[g];tb(f,ma(k).toString())||(k=k.W().U(),be(k,b),Wd(b,d,b),k=rn(a.c.d,b),k=Ra(k,function(a){a=ma(a).toString();return a in f?!1:f[a]=!0}),a.s.push(iy(k)))}}}function iy(a){for(var b=a.length,d=[0,0],e=0;e<b;e++){var f=a[e].W().U();vd(d,f)}b=1/b;d[0]*=b;d[1]*=b;d=new O(new Mk(d));d.set("features",a);return d};function jy(a,b,d){if(ka(a))d&&(a=ra(a,d));else if(a&&"function"==typeof a.handleEvent)a=ra(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:ba.setTimeout(a,b||0)};function ky(){}ky.prototype.c=null;function ly(a){var b;(b=a.c)||(b={},my(a)&&(b[0]=!0,b[1]=!0),b=a.c=b);return b};var ny;function oy(){}v(oy,ky);function py(a){return(a=my(a))?new ActiveXObject(a):new XMLHttpRequest}function my(a){if(!a.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],d=0;d<b.length;d++){var e=b[d];try{return new ActiveXObject(e),a.f=e}catch(f){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.f}ny=new oy;function qy(a){hd.call(this);this.v=new Sh;this.l=a||null;this.c=!1;this.p=this.Z=null;this.j=this.s="";this.f=this.u=this.e=this.n=!1;this.k=0;this.d=null;this.i=ry;this.t=this.J=!1}v(qy,hd);var ry="",sy=/^https?$/i,ty=["POST","PUT"];l=qy.prototype;+l.send=function(a,b,d,e){if(this.Z)throw Error("[goog.net.XhrIo] Object is active with another request="+this.s+"; newUri="+a);b=b?b.toUpperCase():"GET";this.s=a;this.j="";this.n=!1;this.c=!0;this.Z=this.l?py(this.l):py(ny);this.p=this.l?ly(this.l):ly(ny);this.Z.onreadystatechange=ra(this.ag,this);try{this.u=!0,this.Z.open(b,String(a),!0),this.u=!1}catch(f){uy(this,f);return}a=d||"";var g=this.v.clone();e&&Rh(e,function(a,b){g.set(b,a)});e=Ua(g.K(),vy);d=ba.FormData&&a instanceof ba.FormData;!Wa(ty,+b)||e||d||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");g.forEach(function(a,b){this.Z.setRequestHeader(b,a)},this);this.i&&(this.Z.responseType=this.i);"withCredentials"in this.Z&&(this.Z.withCredentials=this.J);try{wy(this),0<this.k&&((this.t=xy(this.Z))?(this.Z.timeout=this.k,this.Z.ontimeout=ra(this.jc,this)):this.d=jy(this.jc,this.k,this)),this.e=!0,this.Z.send(a),this.e=!1}catch(h){uy(this,h)}};function xy(a){return Gb&&Pb(9)&&ja(a.timeout)&&m(a.ontimeout)}+function vy(a){return"content-type"==a.toLowerCase()}l.jc=function(){"undefined"!=typeof aa&&this.Z&&(this.j="Timed out after "+this.k+"ms, aborting",this.dispatchEvent("timeout"),this.Z&&this.c&&(this.c=!1,this.f=!0,this.Z.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),yy(this)))};function uy(a,b){a.c=!1;a.Z&&(a.f=!0,a.Z.abort(),a.f=!1);a.j=b;zy(a);yy(a)}function zy(a){a.n||(a.n=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))}+l.T=function(){this.Z&&(this.c&&(this.c=!1,this.f=!0,this.Z.abort(),this.f=!1),yy(this,!0));qy.X.T.call(this)};l.ag=function(){this.sa||(this.u||this.e||this.f?Ay(this):this.ml())};l.ml=function(){Ay(this)};+function Ay(a){if(a.c&&"undefined"!=typeof aa&&(!a.p[1]||4!=By(a)||2!=Cy(a)))if(a.e&&4==By(a))jy(a.ag,0,a);else if(a.dispatchEvent("readystatechange"),4==By(a)){a.c=!1;try{if(Dy(a))a.dispatchEvent("complete"),a.dispatchEvent("success");else{var b;try{b=2<By(a)?a.Z.statusText:""}catch(d){b=""}a.j=b+" ["+Cy(a)+"]";zy(a)}}finally{yy(a)}}}function yy(a,b){if(a.Z){wy(a);var d=a.Z,e=a.p[0]?ca:null;a.Z=null;a.p=null;b||a.dispatchEvent("ready");try{d.onreadystatechange=e}catch(f){}}}+function wy(a){a.Z&&a.t&&(a.Z.ontimeout=null);ja(a.d)&&(ba.clearTimeout(a.d),a.d=null)}function Dy(a){var b=Cy(a),d;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=!0;break a;default:d=!1}if(!d){if(b=0===b)a=Pr(String(a.s))[1]||null,!a&&self.location&&(a=self.location.protocol,a=a.substr(0,a.length-1)),b=!sy.test(a?a.toLowerCase():"");d=b}return d}function By(a){return a.Z?a.Z.readyState:0}function Cy(a){try{return 2<By(a)?a.Z.status:-1}catch(b){return-1}}+function Ey(a){try{return a.Z?a.Z.responseText:""}catch(b){return""}}function Fy(a){try{if(!a.Z)return null;if("response"in a.Z)return a.Z.response;switch(a.i){case ry:case "text":return a.Z.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.Z)return a.Z.mozResponseArrayBuffer}return null}catch(b){return null}};function Z(a){un.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection});this.format=a.format}v(Z,un);+function Gy(a,b,d,e,f){var g=new qy;g.i="binary"==a.format.S()&&Wf?"arraybuffer":"text";w(g,"complete",function(a){a=a.target;if(Dy(a)){var b=this.format.S(),g;if("binary"==b&&Wf)g=Fy(a);else if("json"==b)g=Ey(a);else if("text"==b)g=Ey(a);else if("xml"==b){if(!Gb)try{g=a.Z?a.Z.responseXML:null}catch(p){g=null}null!=g||(g=oq(Ey(a)))}null!=g?d.call(f,this.c(g)):ah(this,"error")}else e.call(f);pc(a)},!1,a);g.send(b)}Z.prototype.c=function(a){return this.format.qa(a,{featureProjection:this.i})};function $(a){Z.call(this,{attributions:a.attributions,format:a.format,logo:a.logo,projection:a.projection});m(a.arrayBuffer)&&this.pb(this.c(a.arrayBuffer));m(a.doc)&&this.pb(this.c(a.doc));m(a.node)&&this.pb(this.c(a.node));m(a.object)&&this.pb(this.c(a.object));m(a.text)&&this.pb(this.c(a.text));if(m(a.url)||m(a.urls))if(ah(this,"loading"),m(a.url)&&Gy(this,a.url,this.t,this.s,this),m(a.urls)){a=a.urls;var b,d;b=0;for(d=a.length;b<d;++b)Gy(this,a[b],this.t,this.s,this)}}v($,Z);+$.prototype.s=function(){ah(this,"error")};$.prototype.t=function(a){this.pb(a);ah(this,"ready")};function Hy(a){a=m(a)?a:{};$.call(this,{attributions:a.attributions,extent:a.extent,format:new Jp({defaultDataProjection:a.defaultProjection}),logo:a.logo,object:a.object,projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(Hy,$);function Iy(a){a=m(a)?a:{};$.call(this,{attributions:a.attributions,doc:a.doc,extent:a.extent,format:new $q,logo:a.logo,node:a.node,projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(Iy,$);function Jy(a){a=m(a)?a:{};$.call(this,{format:new Kr({altitudeMode:a.altitudeMode}),projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(Jy,$);function Ky(a){fn.call(this,{projection:a.projection,resolutions:a.resolutions});this.R=m(a.crossOrigin)?a.crossOrigin:null;this.k=m(a.displayDpi)?a.displayDpi:96;this.e=m(a.params)?a.params:{};var b;m(a.url)?b=iw(a.url,this.e,ra(this.dk,this)):b=jw;this.t=b;this.c=m(a.imageLoadFunction)?a.imageLoadFunction:mn;this.V=m(a.hidpi)?a.hidpi:!0;this.L=m(a.metersPerUnit)?a.metersPerUnit:1;this.n=m(a.ratio)?a.ratio:1;this.Y=m(a.useOverlay)?a.useOverlay:!1;this.d=null;this.s=0}v(Ky,fn);l=Ky.prototype;+l.ck=function(){return this.e};l.wc=function(a,b,d,e){b=gn(this,b);d=this.V?d:1;var f=this.d;if(null!==f&&this.s==this.f&&f.resolution==b&&f.j==d&&Zd(f.N(),a))return f;1!=this.n&&(a=a.slice(),se(a,this.n));e=this.t(a,[qe(a)/b*d,ne(a)/b*d],e);m(e)?(f=new fw(a,b,d,this.j,e,this.R,this.c),w(f,"change",this.v,!1,this)):f=null;this.d=f;this.s=this.f;return f};l.bk=function(){return this.c};l.fk=function(a){Db(this.e,a);this.q()};+l.dk=function(a,b,d,e){var f;f=this.L;var g=qe(d),h=ne(d),k=e[0],n=e[1],p=.0254/this.k;f=n*g>k*h?g*f/(k*p):h*f/(n*p);d=ke(d);e={OPERATION:this.Y?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.k,SETDISPLAYWIDTH:Math.round(e[0]),SETDISPLAYHEIGHT:Math.round(e[1]),SETVIEWSCALE:f,SETVIEWCENTERX:d[0],SETVIEWCENTERY:d[1]};Db(e,b);return Sr(Ur([a],e))};l.ek=function(a){this.d=null;this.c=a;this.q()};function Ly(a){var b=m(a.attributions)?a.attributions:null,d=a.imageExtent,e,f;m(a.imageSize)&&(e=ne(d)/a.imageSize[1],f=[e]);var g=m(a.crossOrigin)?a.crossOrigin:null,h=m(a.imageLoadFunction)?a.imageLoadFunction:mn;fn.call(this,{attributions:b,logo:a.logo,projection:ze(a.projection),resolutions:f});this.c=new fw(d,e,1,b,a.url,g,h)}v(Ly,fn);Ly.prototype.wc=function(a){return pe(a,this.c.N())?this.c:null};function My(a){a=m(a)?a:{};fn.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.V=m(a.crossOrigin)?a.crossOrigin:null;this.e=a.url;this.n=m(a.imageLoadFunction)?a.imageLoadFunction:mn;this.d=a.params;this.k=!0;Ny(this);this.R=a.serverType;this.Y=m(a.hidpi)?a.hidpi:!0;this.c=null;this.s=[0,0];this.L=0;this.t=m(a.ratio)?a.ratio:1.5}v(My,fn);var Oy=[101,101];l=My.prototype;+l.lk=function(a,b,d,e){if(m(this.e)){var f=me(a,b,0,Oy),g={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.d.LAYERS};Db(g,this.d,e);e=Math.floor((f[3]-a[1])/b);g[this.k?"I":"X"]=Math.floor((a[0]-f[0])/b);g[this.k?"J":"Y"]=e;return Py(this,f,Oy,1,ze(d),g)}};l.nk=function(){return this.d};+l.wc=function(a,b,d,e){if(!m(this.e))return null;b=gn(this,b);1==d||this.Y&&m(this.R)||(d=1);var f=this.c;if(null!==f&&this.L==this.f&&f.resolution==b&&f.j==d&&Zd(f.N(),a))return f;f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Db(f,this.d);a=a.slice();var g=(a[0]+a[2])/2,h=(a[1]+a[3])/2;if(1!=this.t){var k=this.t*qe(a)/2,n=this.t*ne(a)/2;a[0]=g-k;a[1]=h-n;a[2]=g+k;a[3]=h+n}var k=b/d,n=Math.ceil(qe(a)/k),p=Math.ceil(ne(a)/k);a[0]=g-k*n/2;a[2]=g+k*n/2;a[1]=h-k*+p/2;a[3]=h+k*p/2;this.s[0]=n;this.s[1]=p;e=Py(this,a,this.s,d,e,f);this.c=new fw(a,b,d,this.j,e,this.V,this.n);this.L=this.f;w(this.c,"change",this.v,!1,this);return this.c};l.mk=function(){return this.n};+function Py(a,b,d,e,f,g){g[a.k?"CRS":"SRS"]=f.c;"STYLES"in a.d||(g.STYLES=new String(""));if(1!=e)switch(a.R){case "geoserver":g.FORMAT_OPTIONS="dpi:"+(90*e+.5|0);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.d;var h;a.k&&"ne"==d.substr(0,2)?h=[b[1],b[0],b[3],b[2]]:h=b;g.BBOX=h.join(",");return Sr(Ur([a.e],g))}l.ok=function(){return this.e};l.pk=function(a){this.c=null;this.n=a;this.q()};+l.qk=function(a){a!=this.e&&(this.e=a,this.c=null,this.q())};l.rk=function(a){Db(this.d,a);Ny(this);this.c=null;this.q()};function Ny(a){a.k=0<=La(zb(a.d,"VERSION","1.3.0"),"1.3")};function Qy(a){a=m(a)?a:{};$.call(this,{attributions:a.attributions,doc:a.doc,format:new ps({extractStyles:a.extractStyles,defaultStyle:a.defaultStyle}),logo:a.logo,node:a.node,projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(Qy,$);function Ry(a){var b=m(a.projection)?a.projection:"EPSG:3857",d=new dy({extent:kh(b),maxZoom:a.maxZoom,tileSize:a.tileSize});by.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,logo:a.logo,projection:b,tileGrid:d,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:Zx,wrapX:m(a.wrapX)?a.wrapX:!0});this.l=d.Hb();m(a.tileUrlFunction)?this.ya(a.tileUrlFunction):m(a.urls)?this.ya(Xx(a.urls)):m(a.url)&&this.d(a.url)}v(Ry,by);+Ry.prototype.ya=function(a){Ry.X.ya.call(this,$x(this.l,a))};Ry.prototype.d=function(a){this.ya(Xx(ay(a)))};function Sy(a){a=m(a)?a:{};var b;m(a.attributions)?b=a.attributions:b=[Ty];var d=Sb?"https:":"http:";Ry.call(this,{attributions:b,crossOrigin:m(a.crossOrigin)?a.crossOrigin:"anonymous",opaque:!0,maxZoom:m(a.maxZoom)?a.maxZoom:19,tileLoadFunction:a.tileLoadFunction,url:m(a.url)?a.url:d+"//{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:a.wrapX})}v(Sy,Ry);var Ty=new qf({html:'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.'});function Uy(a){a=m(a)?a:{};var b=Vy[a.layer];this.e=a.layer;var d=Sb?"https:":"http:";Ry.call(this,{attributions:b.attributions,crossOrigin:"anonymous",logo:"//developer.mapquest.com/content/osm/mq_logo.png",maxZoom:b.maxZoom,opaque:!0,tileLoadFunction:a.tileLoadFunction,url:m(a.url)?a.url:d+"//otile{1-4}-s.mqcdn.com/tiles/1.0.0/"+this.e+"/{z}/{x}/{y}.jpg"})}v(Uy,Ry);+var Wy=new qf({html:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>'}),Vy={osm:{maxZoom:19,attributions:[Wy,Ty]},sat:{maxZoom:18,attributions:[Wy,new qf({html:"Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"})]},hyb:{maxZoom:18,attributions:[Wy,Ty]}};Uy.prototype.k=function(){return this.e};function Xy(a){a=m(a)?a:{};$.call(this,{attributions:a.attributions,doc:a.doc,format:new Zt,logo:a.logo,node:a.node,projection:a.projection,text:a.text,url:a.url,urls:a.urls})}v(Xy,$);function Yy(a){Z.call(this,{attributions:a.attributions,format:a.format,logo:a.logo,projection:a.projection});this.t=new pn;this.v=a.loader;this.L=m(a.strategy)?a.strategy:Jx;this.s={}}v(Yy,Z);Yy.prototype.pb=function(a){var b=[],d,e;d=0;for(e=a.length;d<e;++d){var f=a[d],g=f.ea;m(g)?g in this.s||(b.push(f),this.s[g]=!0):b.push(f)}Yy.X.pb.call(this,b)};Yy.prototype.clear=function(a){xb(this.s);this.t.clear();Yy.X.clear.call(this,a)};+Yy.prototype.Lb=function(a,b,d){var e=this.t;a=this.L(a,b);var f,g;f=0;for(g=a.length;f<g;++f){var h=a[f];tn(e,h,function(a){return Zd(a.extent,h)})||(this.v.call(this,h,b,d),e.xa(h,{extent:h.slice()}))}};var Zy={terrain:{cb:"jpg",opaque:!0},"terrain-background":{cb:"jpg",opaque:!0},"terrain-labels":{cb:"png",opaque:!1},"terrain-lines":{cb:"png",opaque:!1},"toner-background":{cb:"png",opaque:!0},toner:{cb:"png",opaque:!0},"toner-hybrid":{cb:"png",opaque:!1},"toner-labels":{cb:"png",opaque:!1},"toner-lines":{cb:"png",opaque:!1},"toner-lite":{cb:"png",opaque:!0},watercolor:{cb:"jpg",opaque:!0}},$y={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:3,maxZoom:16}};+function az(a){var b=a.layer.indexOf("-"),d=Zy[a.layer],e=Sb?"https://stamen-tiles-{a-d}.a.ssl.fastly.net/":"http://{a-d}.tile.stamen.com/";Ry.call(this,{attributions:bz,crossOrigin:"anonymous",maxZoom:$y[-1==b?a.layer:a.layer.slice(0,b)].maxZoom,opaque:d.opaque,tileLoadFunction:a.tileLoadFunction,url:m(a.url)?a.url:e+a.layer+"/{z}/{x}/{y}."+d.cb})}v(az,Ry);+var bz=[new qf({html:'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.'}),Ty];function cz(a){a=m(a)?a:{};var b=m(a.params)?a.params:{};by.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,tileUrlFunction:ra(this.vk,this),wrapX:m(a.wrapX)?a.wrapX:!0});var d=a.urls;!m(d)&&m(a.url)&&(d=ay(a.url));this.e=null!=d?d:[];this.d=b;this.k=Sd()}v(cz,by);l=cz.prototype;l.sk=function(){return this.d};l.ac=function(a,b,d){a=cz.X.ac.call(this,a,b,d);return 1==b?a:a*b+.5|0};l.tk=function(){return this.e};+l.uk=function(a){a=m(a)?ay(a):null;this.Sf(a)};l.Sf=function(a){this.e=null!=a?a:[];this.q()};+l.vk=function(a,b,d){var e=this.tileGrid;null===e&&(e=qh(this,d));if(!(e.c.length<=a[0])){var f=dh(e,a,this.k),g=e.ta(a[0]);1!=b&&(g=g*b+.5|0);e={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Db(e,this.d);var h=this.e;0==h.length?a=void 0:(d=d.c.split(":").pop(),e.SIZE=g+","+g,e.BBOX=f.join(","),e.BBOXSR=d,e.IMAGESR=d,e.DPI=90*b,a=1==h.length?h[0]:h[Wb((a[1]<<a[0])+a[2],h.length)],ya(a,"/")||(a+="/"),ya(a,"MapServer/")?a+="export":ya(a,"ImageServer/")&&(a+="exportImage"),a=Sr(Ur([a],e)));return a}};+l.wk=function(a){Db(this.d,a);this.q()};function dz(a,b){Zg.call(this,a,2);this.e=b.ta(a[0]);this.f={}}v(dz,Zg);dz.prototype.La=function(a){a=m(a)?ma(a):-1;if(a in this.f)return this.f[a];var b=this.e,d=Nf(b,b);d.strokeStyle="black";d.strokeRect(.5,.5,b+.5,b+.5);d.fillStyle="black";d.textAlign="center";d.textBaseline="middle";d.font="24px sans-serif";d.fillText(jf(this.c),b/2,b/2);return this.f[a]=d.canvas};function ez(a){oh.call(this,{opaque:!1,projection:a.projection,tileGrid:a.tileGrid})}v(ez,oh);+ez.prototype.Zb=function(a,b,d){var e=this.rb(a,b,d);if(Wg(this.c,e))return this.c.get(e);a=new dz([a,b,d],this.tileGrid);this.c.set(e,a);return a};function fz(a){by.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,projection:ze("EPSG:3857"),state:"loading",tileLoadFunction:a.tileLoadFunction,wrapX:m(a.wrapX)?a.wrapX:!0});(new Rx(a.url)).send(void 0,ra(this.d,this))}v(fz,by);+fz.prototype.d=function(a){var b=ze("EPSG:4326"),d=this.i,e;m(a.bounds)&&(e=te(a.bounds,De(b,d)));var f=a.minzoom||0,g=a.maxzoom||22;this.tileGrid=d=new dy({extent:kh(d),maxZoom:g,minZoom:f});this.tileUrlFunction=$x(d.Hb({extent:e}),Xx(a.tiles));if(m(a.attribution)&&null===this.j){b=m(e)?e:b.N();e={};for(var h;f<=g;++f)h=f.toString(),e[h]=[eh(d,b,f)];this.j=[new qf({html:a.attribution,tileRanges:e})]}ah(this,"ready")};function gz(a){oh.call(this,{projection:ze("EPSG:3857"),state:"loading"});this.k=m(a.preemptive)?a.preemptive:!0;this.d=Zx;this.e=void 0;(new Rx(a.url)).send(void 0,ra(this.yk,this))}v(gz,oh);l=gz.prototype;l.ci=function(){return this.e};l.xh=function(a,b,d,e,f){null===this.tileGrid?!0===f?Mh(function(){d.call(e,null)}):d.call(e,null):(b=this.tileGrid.$b(a,b),hz(this.Zb(b[0],b[1],b[2],1,this.i),a,d,e,f))};+l.yk=function(a){var b=ze("EPSG:4326"),d=this.i,e;m(a.bounds)&&(e=te(a.bounds,De(b,d)));var f=a.minzoom||0,g=a.maxzoom||22;this.tileGrid=d=new dy({extent:kh(d),maxZoom:g,minZoom:f});this.e=a.template;var h=a.grids;if(null!=h){this.d=$x(d.Hb({extent:e}),Xx(h));if(m(a.attribution)){b=m(e)?e:b.N();for(e={};f<=g;++f)h=f.toString(),e[h]=[eh(d,b,f)];this.j=[new qf({html:a.attribution,tileRanges:e})]}ah(this,"ready")}else ah(this,"error")};+l.Zb=function(a,b,d,e,f){var g=this.rb(a,b,d);if(Wg(this.c,g))return this.c.get(g);a=[a,b,d];e=this.d(a,e,f);e=new iz(a,m(e)?0:4,m(e)?e:"",dh(this.tileGrid,a),this.k);this.c.set(g,e);return e};l.Se=function(a,b,d){a=this.rb(a,b,d);Wg(this.c,a)&&this.c.get(a)};function iz(a,b,d,e,f){Zg.call(this,a,b);this.p=d;this.f=e;this.l=f;this.j=this.k=this.e=null}v(iz,Zg);l=iz.prototype;l.La=function(){return null};+function jz(a,b){if(null===a.e||null===a.k||null===a.j)return null;var d=a.e[Math.floor((1-(b[1]-a.f[1])/(a.f[3]-a.f[1]))*a.e.length)];if(!ia(d))return null;d=d.charCodeAt(Math.floor((b[0]-a.f[0])/(a.f[2]-a.f[0])*d.length));93<=d&&d--;35<=d&&d--;d=a.k[d-32];return null!=d?a.j[d]:null}function hz(a,b,d,e,f){0==a.state&&!0===f?(Uc(a,"change",function(){d.call(e,jz(this,b))},!1,a),kz(a)):!0===f?Mh(function(){d.call(e,jz(this,b))},a):d.call(e,jz(a,b))}l.ub=function(){return this.p};+l.si=function(){this.state=3;this.d()};l.Fi=function(a){this.e=a.grid;this.k=a.keys;this.j=a.data;this.state=4;this.d()};function kz(a){0==a.state&&(a.state=1,(new Rx(a.p)).send(void 0,ra(a.Fi,a),ra(a.si,a)))}l.load=function(){this.l&&kz(this)};function lz(a){Z.call(this,{attributions:a.attributions,format:a.format,logo:a.logo,projection:a.projection});this.t=a.tileGrid;this.v=Zx;this.L=this.t.Hb();this.s={};m(a.tileUrlFunction)?(this.v=a.tileUrlFunction,this.q()):m(a.urls)?(this.v=Xx(a.urls),this.q()):m(a.url)&&(this.v=Xx(ay(a.url)),this.q())}v(lz,Z);l=lz.prototype;l.clear=function(){xb(this.s)};+function mz(a,b,d,e){var f=a.s;a=a.t.$b(b,d);f=f[a[0]+"/"+a[1]+"/"+a[2]];if(m(f))for(a=0,d=f.length;a<d;++a){var g=f[a];if(g.W().Nb(b[0],b[1])&&e.call(void 0,g))break}}l.Jb=function(a,b,d,e){var f=this.t,g=this.s;b=ih(f,b);a=eh(f,a,b);for(var h,f=a.c;f<=a.e;++f)for(h=a.d;h<=a.f;++h){var k=g[b+"/"+f+"/"+h];if(m(k)){var n,p;n=0;for(p=k.length;n<p;++n){var q=d.call(e,k[n]);if(q)return q}}}};l.Ea=function(){var a=this.s,b=[],d;for(d in a)ab(b,a[d]);return b};+l.Eh=function(a,b){var d=[];mz(this,a,b,function(a){d.push(a)});return d};l.Lb=function(a,b,d){function e(a,b){k[a]=b;ah(this,"ready")}var f=this.L,g=this.t,h=this.v,k=this.s;b=ih(g,b);a=eh(g,a,b);var g=[b,0,0],n,p;for(n=a.c;n<=a.e;++n)for(p=a.d;p<=a.f;++p){var q=b+"/"+n+"/"+p;if(!(q in k)){g[0]=b;g[1]=n;g[2]=p;f(g,d,g);var r=h(g,1,d);m(r)&&(k[q]=[],Gy(this,r,sa(e,q),ca,this))}}};function nz(a){a=m(a)?a:{};var b=m(a.params)?a.params:{};by.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,logo:a.logo,opaque:!zb(b,"TRANSPARENT",!0),projection:a.projection,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,tileUrlFunction:ra(this.Dk,this),wrapX:a.wrapX});var d=a.urls;!m(d)&&m(a.url)&&(d=ay(a.url));this.e=null!=d?d:[];this.l=m(a.gutter)?a.gutter:0;this.d=b;this.k=!0;this.n=a.serverType;this.t=m(a.hidpi)?a.hidpi:!0;this.s="";oz(this);this.v=Sd();pz(this)}+v(nz,by);l=nz.prototype;l.zk=function(a,b,d,e){d=ze(d);var f=this.tileGrid;null===f&&(f=qh(this,d));b=f.$b(a,b);if(!(f.c.length<=b[0])){var g=f.ra(b[0]),h=dh(f,b,this.v),f=f.ta(b[0]),k=this.l;0!==k&&(f+=2*k,h=Wd(h,g*k,h));k={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.d.LAYERS};Db(k,this.d,e);e=Math.floor((h[3]-a[1])/g);k[this.k?"I":"X"]=Math.floor((a[0]-h[0])/g);k[this.k?"J":"Y"]=e;return qz(this,b,f,h,1,d,k)}};l.od=function(){return this.l};+l.rb=function(a,b,d){return this.s+nz.X.rb.call(this,a,b,d)};l.Ak=function(){return this.d};+function qz(a,b,d,e,f,g,h){var k=a.e;if(0!=k.length){h.WIDTH=d;h.HEIGHT=d;h[a.k?"CRS":"SRS"]=g.c;"STYLES"in a.d||(h.STYLES=new String(""));if(1!=f)switch(a.n){case "geoserver":h.FORMAT_OPTIONS="dpi:"+(90*f+.5|0);break;case "mapserver":h.MAP_RESOLUTION=90*f;break;case "carmentaserver":case "qgis":h.DPI=90*f}d=g.d;a.k&&"ne"==d.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 Sr(Ur([1==k.length?k[0]:k[Wb((b[1]<<b[0])+b[2],k.length)]],h))}}+l.ac=function(a,b,d){a=nz.X.ac.call(this,a,b,d);return 1!=b&&this.t&&m(this.n)?a*b+.5|0:a};l.Bk=function(){return this.e};function oz(a){var b=0,d=[],e,f;e=0;for(f=a.e.length;e<f;++e)d[b++]=a.e[e];for(var g in a.d)d[b++]=g+"-"+a.d[g];a.s=d.join("#")}l.Ck=function(a){a=m(a)?ay(a):null;this.Tf(a)};l.Tf=function(a){this.e=null!=a?a:[];oz(this);this.q()};+l.Dk=function(a,b,d){var e=this.tileGrid;null===e&&(e=qh(this,d));if(!(e.c.length<=a[0])){1==b||this.t&&m(this.n)||(b=1);var f=e.ra(a[0]),g=dh(e,a,this.v),e=e.ta(a[0]),h=this.l;0!==h&&(e+=2*h,g=Wd(g,f*h,g));1!=b&&(e=e*b+.5|0);f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Db(f,this.d);return qz(this,a,e,g,b,d,f)}};l.Ek=function(a){Db(this.d,a);oz(this);pz(this);this.q()};function pz(a){a.k=0<=La(zb(a.d,"VERSION","1.3.0"),"1.3")};function rz(a){a=m(a)?a:{};$.call(this,{attributions:a.attributions,extent:a.extent,format:new Cu({defaultDataProjection:a.defaultProjection}),logo:a.logo,object:a.object,projection:a.projection,text:a.text,url:a.url})}v(rz,$);function sz(a){this.e=a.matrixIds;bh.call(this,{origin:a.origin,origins:a.origins,resolutions:a.resolutions,tileSize:a.tileSize,tileSizes:a.tileSizes,widths:a.widths})}v(sz,bh);sz.prototype.p=function(){return this.e};+function tz(a){var b=[],d=[],e=[],f=[],g=[],h;h=ze(a.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var k=h.sd(),n="ne"==h.d.substr(0,2);db(a.TileMatrix,function(a,b){return b.ScaleDenominator-a.ScaleDenominator});Qa(a.TileMatrix,function(a){d.push(a.Identifier);n?e.push([a.TopLeftCorner[1],a.TopLeftCorner[0]]):e.push(a.TopLeftCorner);b.push(2.8E-4*a.ScaleDenominator/k);f.push(a.TileWidth);g.push(a.MatrixWidth)});return new sz({origins:e,resolutions:b,matrixIds:d,tileSizes:f,+widths:g})};function uz(a){function b(a){a="KVP"==d?Sr(Ur([a],f)):a.replace(/\{(\w+?)\}/g,function(a,b){return b.toLowerCase()in f?f[b.toLowerCase()]:a});return function(b){if(null!==b){var f={TileMatrix:e.e[b[0]],TileCol:b[1],TileRow:b[2]};Db(f,g);b=a;return b="KVP"==d?Sr(Ur([b],f)):b.replace(/\{(\w+?)\}/g,function(a,b){return f[b]})}}}this.t=m(a.version)?a.version:"1.0.0";this.e=m(a.format)?a.format:"image/jpeg";this.d=m(a.dimensions)?a.dimensions:{};this.l="";vz(this);this.n=a.layer;this.k=a.matrixSet;this.s=+a.style;var d=m(a.requestEncoding)?a.requestEncoding:"KVP",e=a.tileGrid,f={layer:this.n,style:this.s,tilematrixset:this.k};"KVP"==d&&Db(f,{Service:"WMTS",Request:"GetTile",Version:this.t,Format:this.e});var g=this.d,h=Zx,k=a.urls;!m(k)&&m(a.url)&&(k=ay(a.url));m(k)&&(h=Yx(Sa(k,b)));var n=Sd(),h=$x(function(a,b,d){if(e.c.length<=a[0])return null;var f=a[1],g=-a[2]-1,h=dh(e,a,n);b=b.N();return!pe(h,b)||pe(h,b)&&(h[0]==b[2]||h[2]==b[0]||h[1]==b[3]||h[3]==b[1])?null:ff(a[0],f,g,d)},h);by.call(this,{attributions:a.attributions,+crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,tileClass:a.tileClass,tileGrid:e,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:h,wrapX:m(a.wrapX)?a.wrapX:!1})}v(uz,by);l=uz.prototype;l.Ch=function(){return this.d};l.Gh=function(){return this.e};l.rb=function(a,b,d){return this.l+uz.X.rb.call(this,a,b,d)};l.Fk=function(){return this.n};l.Sh=function(){return this.k};l.Gk=function(){return this.s};l.gi=function(){return this.t};+function vz(a){var b=0,d=[],e;for(e in a.d)d[b++]=e+"-"+a.d[e];a.l=d.join("/")}l.vm=function(a){Db(this.d,a);vz(this);this.q()};function wz(a){var b=m(a)?a:b;bh.call(this,{origin:[0,0],resolutions:b.resolutions})}v(wz,bh);wz.prototype.Hb=function(a){a=m(a)?a:{};var b=this.minZoom,d=this.maxZoom,e=null;if(m(a.extent)){var e=Array(d+1),f;for(f=0;f<=d;++f)e[f]=f<b?null:eh(this,a.extent,f)}return function(a,f,k){f=a[0];if(f<b||d<f)return null;var n=Math.pow(2,f),p=a[1];if(0>p||n<=p)return null;a=a[2];return a<-n||-1<a||null!==e&&!mf(e[f],p,-a-1)?null:ff(f,p,-a-1,k)}};function xz(a){a=m(a)?a:{};var b=a.size,d=b[0],e=b[1],f=[],g=256;switch(m(a.tierSizeCalculation)?a.tierSizeCalculation:"default"){case "default":for(;d>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;e<d;e++)g.push(1<<e),h.push(f[e-1][0]*f[e-1][1]+h[e-1]);g.reverse();var g=new wz({resolutions:g}),k=a.url,b=$x(g.Hb({extent:[0,0,b[0],b[1]]}),function(a){if(null!==+a){var b=a[0],d=a[1];a=a[2];return k+"TileGroup"+((d+a*f[b][0]+h[b])/256|0)+"/"+b+"-"+d+"-"+a+".jpg"}});by.call(this,{attributions:a.attributions,crossOrigin:a.crossOrigin,logo:a.logo,tileClass:yz,tileGrid:g,tileUrlFunction:b})}v(xz,by);function yz(a,b,d,e,f){gw.call(this,a,b,d,e,f);this.e={}}v(yz,gw);+yz.prototype.La=function(a){var b=m(a)?ma(a).toString():"";if(b in this.e)return this.e[b];a=yz.X.La.call(this,a);if(2==this.state){if(256==a.width&&256==a.height)return this.e[b]=a;var d=Nf(256,256);d.drawImage(a,0,0);return this.e[b]=d.canvas}return a};function zz(a){a=m(a)?a:{};this.f=m(a.initialSize)?a.initialSize:256;this.d=m(a.maxSize)?a.maxSize:m(ua)?ua:2048;this.c=m(a.space)?a.space:1;this.j=[new Az(this.f,this.c)];this.e=this.f;this.i=[new Az(this.e,this.c)]}zz.prototype.add=function(a,b,d,e,f,g){if(b+this.c>this.d||d+this.c>this.d)return null;e=Bz(this,!1,a,b,d,e,g);if(null===e)return null;a=Bz(this,!0,a,b,d,m(f)?f:cd,g);return{offsetX:e.offsetX,offsetY:e.offsetY,image:e.image,Af:a.image}};+function Bz(a,b,d,e,f,g,h){var k=b?a.i:a.j,n,p,q;p=0;for(q=k.length;p<q;++p){n=k[p];n=n.add(d,e,f,g,h);if(null!==n)return n;null===n&&p===q-1&&(b?(n=Math.min(2*a.e,a.d),a.e=n):(n=Math.min(2*a.f,a.d),a.f=n),n=new Az(n,a.c),k.push(n),++q)}}function Az(a,b){this.c=b;this.f=[{x:0,y:0,width:a,height:a}];this.e={};this.d=Ef("CANVAS");this.d.width=a;this.d.height=a;this.j=this.d.getContext("2d")}Az.prototype.get=function(a){return zb(this.e,a,null)};+Az.prototype.add=function(a,b,d,e,f){var g,h,k;h=0;for(k=this.f.length;h<k;++h)if(g=this.f[h],g.width>=b+this.c&&g.height>=d+this.c)return k={offsetX:g.x+this.c,offsetY:g.y+this.c,image:this.d},this.e[a]=k,e.call(f,this.j,g.x+this.c,g.y+this.c),a=h,b=b+this.c,d=d+this.c,f=e=void 0,g.width-b>g.height-d?(e={x:g.x+b,y:g.y,width:g.width-b,height:g.height},f={x:g.x,y:g.y+d,width:b,height:g.height-d},Cz(this,a,e,f)):(e={x:g.x+b,y:g.y,width:g.width-b,height:d},f={x:g.x,y:g.y+d,width:g.width,height:g.height-+d},Cz(this,a,e,f)),k;return null};function Cz(a,b,d,e){b=[b,1];0<d.width&&0<d.height&&b.push(d);0<e.width&&0<e.height&&b.push(e);a.f.splice.apply(a.f,b)};function Dz(a){this.u=this.e=this.j=null;this.p=m(a.fill)?a.fill:null;this.R=[0,0];this.c=a.points;this.d=m(a.radius)?a.radius:a.radius1;this.i=m(a.radius2)?a.radius2:this.d;this.k=m(a.angle)?a.angle:0;this.f=m(a.stroke)?a.stroke:null;this.L=this.V=this.J=null;var b=a.atlasManager,d="",e="",f=0,g=null,h,k=0;null!==this.f&&(h=sg(this.f.c),k=this.f.f,m(k)||(k=1),g=this.f.d,Yf||(g=null),e=this.f.j,m(e)||(e="round"),d=this.f.e,m(d)||(d="round"),f=this.f.i,m(f)||(f=10));var n=2*(this.d+k)+1,d={strokeStyle:h,+Yc:k,size:n,lineCap:d,lineDash:g,lineJoin:e,miterLimit:f};if(m(b)){var n=Math.round(n),e=null===this.p,p;e&&(p=ra(this.Xf,this,d));f=this.Bb();p=b.add(f,n,n,ra(this.Yf,this,d),p);this.e=p.image;this.R=[p.offsetX,p.offsetY];b=p.image.width;this.u=e?p.Af:this.e}else this.e=Ef("CANVAS"),this.e.height=n,this.e.width=n,b=n=this.e.width,p=this.e.getContext("2d"),this.Yf(d,p,0,0),null===this.p?(p=this.u=Ef("CANVAS"),p.height=d.size,p.width=d.size,p=p.getContext("2d"),this.Xf(d,p,0,0)):this.u=this.e;this.J=+[n/2,n/2];this.V=[n,n];this.L=[b,b];yj.call(this,{opacity:1,rotateWithView:!1,rotation:m(a.rotation)?a.rotation:0,scale:1,snapToPixel:m(a.snapToPixel)?a.snapToPixel:!0})}v(Dz,yj);l=Dz.prototype;l.Ab=function(){return this.J};l.Lk=function(){return this.k};l.Mk=function(){return this.p};l.Od=function(){return this.u};l.Fb=function(){return this.e};l.pd=function(){return this.L};l.Tc=function(){return 2};l.Gb=function(){return this.R};l.Nk=function(){return this.c};l.Ok=function(){return this.d};+l.bi=function(){return this.i};l.kb=function(){return this.V};l.Pk=function(){return this.f};l.Ae=ca;l.load=ca;l.Re=ca;+l.Yf=function(a,b,d,e){var f;b.setTransform(1,0,0,1,0,0);b.translate(d,e);b.beginPath();this.i!==this.d&&(this.c*=2);for(d=0;d<=this.c;d++)e=2*d*Math.PI/this.c-Math.PI/2+this.k,f=0===d%2?this.d:this.i,b.lineTo(a.size/2+f*Math.cos(e),a.size/2+f*Math.sin(e));null!==this.p&&(b.fillStyle=sg(this.p.c),b.fill());null!==this.f&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Yc,null===a.lineDash||b.setLineDash(a.lineDash),b.lineCap=a.lineCap,b.lineJoin=a.lineJoin,b.miterLimit=a.miterLimit,b.stroke());b.closePath()};+l.Xf=function(a,b,d,e){b.setTransform(1,0,0,1,0,0);b.translate(d,e);b.beginPath();this.i!==this.d&&(this.c*=2);var f;for(d=0;d<=this.c;d++)f=2*d*Math.PI/this.c-Math.PI/2+this.k,e=0===d%2?this.d:this.i,b.lineTo(a.size/2+e*Math.cos(f),a.size/2+e*Math.sin(f));b.fillStyle=ql;b.fill();null!==this.f&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Yc,null===a.lineDash||b.setLineDash(a.lineDash),b.stroke());b.closePath()};+l.Bb=function(){var a=null===this.f?"-":this.f.Bb(),b=null===this.p?"-":this.p.Bb();if(null===this.j||a!=this.j[1]||b!=this.j[2]||this.d!=this.j[3]||this.i!=this.j[4]||this.k!=this.j[5]||this.c!=this.j[6])this.j=["r"+a+b+(m(this.d)?this.d.toString():"-")+(m(this.i)?this.i.toString():"-")+(m(this.k)?this.k.toString():"-")+(m(this.c)?this.c.toString():"-"),a,b,this.d,this.i,this.k,this.c];return this.j[0]};function Ez(a,b,d,e,f,g){gw.call(this,b,d,e,"anonymous",g);this.l=a;this.e=null}v(Ez,gw);Ez.prototype.La=function(){return this.e};+Ez.prototype.load=function(){if(0===this.state){this.state=1;var a=this;this.f.addEventListener("load",function(){a.e=document.createElement("canvas");a.e.width=a.f.width;a.e.height=a.f.height;var b=a.e.width*a.e.height*4,d=a.e.getContext("2d");d.drawImage(a.f,0,0);for(var e=d.getImageData(0,0,a.e.width,a.e.height),f=e.data,g=0;g<b;g+=4){var h=a.l[f[g+0]+","+f[g+1]+","+f[g+2]+","+f[g+3]];h&&(f[g+0]=h.r,f[g+1]=h.g,f[g+2]=h.b,f[g+3]=h.a)}d.putImageData(e,0,0);a.state=2;a.d()});this.f.src=this.p}};t("ol.animation.bounce",function(a){var b=a.resolution,d=m(a.start)?a.start:ta(),e=m(a.duration)?a.duration:1E3,f=m(a.easing)?a.easing:bf;return function(a,h){if(h.time<d)return h.animate=!0,h.viewHints[0]+=1,!0;if(h.time<d+e){var k=f((h.time-d)/e),n=b-h.viewState.resolution;h.animate=!0;h.viewState.resolution+=k*n;h.viewHints[0]+=1;return!0}return!1}},OPENLAYERS);t("ol.animation.pan",cf,OPENLAYERS);t("ol.animation.rotate",df,OPENLAYERS);t("ol.animation.zoom",ef,OPENLAYERS);+t("ol.Attribution",qf,OPENLAYERS);qf.prototype.getHTML=qf.prototype.d;kg.prototype.element=kg.prototype.element;t("ol.Collection",lg,OPENLAYERS);lg.prototype.clear=lg.prototype.clear;lg.prototype.extend=lg.prototype.Be;lg.prototype.forEach=lg.prototype.forEach;lg.prototype.getArray=lg.prototype.nj;lg.prototype.item=lg.prototype.item;lg.prototype.getLength=lg.prototype.Mb;lg.prototype.insertAt=lg.prototype.Dd;lg.prototype.pop=lg.prototype.pop;lg.prototype.push=lg.prototype.push;+lg.prototype.remove=lg.prototype.remove;lg.prototype.removeAt=lg.prototype.Oe;lg.prototype.setAt=lg.prototype.Zl;t("ol.coordinate.add",vd,OPENLAYERS);t("ol.coordinate.createStringXY",function(a){return function(b){return Cd(b,a)}},OPENLAYERS);t("ol.coordinate.format",yd,OPENLAYERS);t("ol.coordinate.rotate",Ad,OPENLAYERS);t("ol.coordinate.toStringHDMS",function(a){return m(a)?xd(a[1],"NS")+" "+xd(a[0],"EW"):""},OPENLAYERS);t("ol.coordinate.toStringXY",Cd,OPENLAYERS);t("ol.DeviceOrientation",vp,OPENLAYERS);+vp.prototype.getAlpha=vp.prototype.j;vp.prototype.getBeta=vp.prototype.i;vp.prototype.getGamma=vp.prototype.k;vp.prototype.getHeading=vp.prototype.l;vp.prototype.getTracking=vp.prototype.e;vp.prototype.setTracking=vp.prototype.d;t("ol.easing.easeIn",function(a){return Math.pow(a,3)},OPENLAYERS);t("ol.easing.easeOut",Ze,OPENLAYERS);t("ol.easing.inAndOut",$e,OPENLAYERS);t("ol.easing.linear",af,OPENLAYERS);t("ol.easing.upAndDown",bf,OPENLAYERS);t("ol.extent.boundingExtent",Rd,OPENLAYERS);+t("ol.extent.buffer",Wd,OPENLAYERS);t("ol.extent.containsCoordinate",function(a,b){return $d(a,b[0],b[1])},OPENLAYERS);t("ol.extent.containsExtent",Zd,OPENLAYERS);t("ol.extent.containsXY",$d,OPENLAYERS);t("ol.extent.createEmpty",Sd,OPENLAYERS);t("ol.extent.equals",ce,OPENLAYERS);t("ol.extent.extend",de,OPENLAYERS);t("ol.extent.getBottomLeft",ge,OPENLAYERS);t("ol.extent.getBottomRight",he,OPENLAYERS);t("ol.extent.getCenter",ke,OPENLAYERS);t("ol.extent.getHeight",ne,OPENLAYERS);+t("ol.extent.getIntersection",oe,OPENLAYERS);t("ol.extent.getSize",function(a){return[a[2]-a[0],a[3]-a[1]]},OPENLAYERS);t("ol.extent.getTopLeft",je,OPENLAYERS);t("ol.extent.getTopRight",ie,OPENLAYERS);t("ol.extent.getWidth",qe,OPENLAYERS);t("ol.extent.intersects",pe,OPENLAYERS);t("ol.extent.isEmpty",re,OPENLAYERS);t("ol.extent.applyTransform",te,OPENLAYERS);t("ol.Feature",O,OPENLAYERS);O.prototype.clone=O.prototype.clone;O.prototype.getGeometry=O.prototype.W;O.prototype.getId=O.prototype.Jh;+O.prototype.getGeometryName=O.prototype.Ih;O.prototype.getStyle=O.prototype.uj;O.prototype.getStyleFunction=O.prototype.vj;O.prototype.setGeometry=O.prototype.Xa;O.prototype.setStyle=O.prototype.l;O.prototype.setId=O.prototype.e;O.prototype.setGeometryName=O.prototype.j;t("ol.FeatureOverlay",xp,OPENLAYERS);xp.prototype.addFeature=xp.prototype.Gf;xp.prototype.getFeatures=xp.prototype.oj;xp.prototype.getMap=xp.prototype.pj;xp.prototype.removeFeature=xp.prototype.Id;xp.prototype.setFeatures=xp.prototype.Xc;+xp.prototype.setMap=xp.prototype.setMap;xp.prototype.setStyle=xp.prototype.If;xp.prototype.getStyle=xp.prototype.qj;xp.prototype.getStyleFunction=xp.prototype.rj;t("ol.Geolocation",X,OPENLAYERS);X.prototype.getAccuracy=X.prototype.pf;X.prototype.getAccuracyGeometry=X.prototype.s;X.prototype.getAltitude=X.prototype.t;X.prototype.getAltitudeAccuracy=X.prototype.v;X.prototype.getHeading=X.prototype.L;X.prototype.getPosition=X.prototype.R;X.prototype.getProjection=X.prototype.k;X.prototype.getSpeed=X.prototype.J;+X.prototype.getTracking=X.prototype.l;X.prototype.getTrackingOptions=X.prototype.i;X.prototype.setProjection=X.prototype.n;X.prototype.setTracking=X.prototype.d;X.prototype.setTrackingOptions=X.prototype.u;t("ol.Graticule",aw,OPENLAYERS);aw.prototype.getMap=aw.prototype.yj;aw.prototype.getMeridians=aw.prototype.Th;aw.prototype.getParallels=aw.prototype.Yh;aw.prototype.setMap=aw.prototype.setMap;t("ol.has.DEVICE_PIXEL_RATIO",Vf,OPENLAYERS);t("ol.has.CANVAS",Zf,OPENLAYERS);+t("ol.has.DEVICE_ORIENTATION",$f,OPENLAYERS);t("ol.has.GEOLOCATION",ag,OPENLAYERS);t("ol.has.TOUCH",bg,OPENLAYERS);t("ol.has.WEBGL",Uf,OPENLAYERS);fw.prototype.getImage=fw.prototype.c;gw.prototype.getImage=gw.prototype.La;t("ol.Kinetic",Nj,OPENLAYERS);t("ol.loadingstrategy.all",function(){return[[-Infinity,-Infinity,Infinity,Infinity]]},OPENLAYERS);t("ol.loadingstrategy.bbox",Jx,OPENLAYERS);+t("ol.loadingstrategy.createTile",function(a){return function(b,d){var e=ih(a,d),f=eh(a,b,e),g=[],e=[e,0,0];for(e[1]=f.c;e[1]<=f.e;++e[1])for(e[2]=f.d;e[2]<=f.f;++e[2])g.push(dh(a,e));return g}},OPENLAYERS);t("ol.Map",K,OPENLAYERS);K.prototype.addControl=K.prototype.jh;K.prototype.addInteraction=K.prototype.kh;K.prototype.addLayer=K.prototype.cf;K.prototype.addOverlay=K.prototype.df;K.prototype.beforeRender=K.prototype.Qa;K.prototype.forEachFeatureAtPixel=K.prototype.ue;+K.prototype.forEachLayerAtPixel=K.prototype.Cj;K.prototype.hasFeatureAtPixel=K.prototype.Ri;K.prototype.getEventCoordinate=K.prototype.Dh;K.prototype.getEventPixel=K.prototype.md;K.prototype.getTarget=K.prototype.Jd;K.prototype.getTargetElement=K.prototype.Qc;K.prototype.getCoordinateFromPixel=K.prototype.wa;K.prototype.getControls=K.prototype.Bh;K.prototype.getOverlays=K.prototype.Xh;K.prototype.getInteractions=K.prototype.Kh;K.prototype.getLayerGroup=K.prototype.Yb;K.prototype.getLayers=K.prototype.ia;+K.prototype.getPixelFromCoordinate=K.prototype.i;K.prototype.getSize=K.prototype.j;K.prototype.getView=K.prototype.c;K.prototype.getViewport=K.prototype.hi;K.prototype.renderSync=K.prototype.Wl;K.prototype.render=K.prototype.render;K.prototype.removeControl=K.prototype.Ql;K.prototype.removeInteraction=K.prototype.Rl;K.prototype.removeLayer=K.prototype.Sl;K.prototype.removeOverlay=K.prototype.Tl;K.prototype.setLayerGroup=K.prototype.wg;K.prototype.setSize=K.prototype.V;K.prototype.setTarget=K.prototype.ma;+K.prototype.setView=K.prototype.Ja;K.prototype.updateSize=K.prototype.u;Ui.prototype.originalEvent=Ui.prototype.originalEvent;Ui.prototype.pixel=Ui.prototype.pixel;Ui.prototype.coordinate=Ui.prototype.coordinate;Ui.prototype.dragging=Ui.prototype.dragging;Ui.prototype.preventDefault=Ui.prototype.preventDefault;Ui.prototype.stopPropagation=Ui.prototype.tb;Tg.prototype.map=Tg.prototype.map;Tg.prototype.frameState=Tg.prototype.frameState;md.prototype.key=md.prototype.key;md.prototype.oldValue=md.prototype.oldValue;+nd.prototype.transform=nd.prototype.transform;t("ol.Object",qd,OPENLAYERS);qd.prototype.bindTo=qd.prototype.O;qd.prototype.get=qd.prototype.get;qd.prototype.getKeys=qd.prototype.K;qd.prototype.getProperties=qd.prototype.M;qd.prototype.set=qd.prototype.set;qd.prototype.setProperties=qd.prototype.I;qd.prototype.unbind=qd.prototype.P;qd.prototype.unbindAll=qd.prototype.Q;t("ol.Observable",kd,OPENLAYERS);t("ol.Observable.unByKey",ld,OPENLAYERS);kd.prototype.changed=kd.prototype.q;+kd.prototype.getRevision=kd.prototype.C;kd.prototype.on=kd.prototype.A;kd.prototype.once=kd.prototype.D;kd.prototype.un=kd.prototype.B;kd.prototype.unByKey=kd.prototype.G;t("ol.WEBGL_MAX_TEXTURE_SIZE",ua,OPENLAYERS);t("ol.inherits",v,OPENLAYERS);t("ol.Overlay",M,OPENLAYERS);M.prototype.getElement=M.prototype.d;M.prototype.getMap=M.prototype.e;M.prototype.getOffset=M.prototype.l;M.prototype.getPosition=M.prototype.u;M.prototype.getPositioning=M.prototype.n;M.prototype.setElement=M.prototype.Pe;+M.prototype.setMap=M.prototype.setMap;M.prototype.setOffset=M.prototype.s;M.prototype.setPosition=M.prototype.i;M.prototype.setPositioning=M.prototype.t;t("ol.Tile",Zg,OPENLAYERS);Zg.prototype.state=Zg.prototype.state;Zg.prototype.changed=Zg.prototype.d;Zg.prototype.getTileCoord=Zg.prototype.i;t("ol.View",B,OPENLAYERS);B.prototype.constrainCenter=B.prototype.l;B.prototype.constrainResolution=B.prototype.constrainResolution;B.prototype.constrainRotation=B.prototype.constrainRotation;+B.prototype.getCenter=B.prototype.d;B.prototype.calculateExtent=B.prototype.k;B.prototype.getProjection=B.prototype.R;B.prototype.getResolution=B.prototype.c;B.prototype.getResolutionForExtent=B.prototype.n;B.prototype.getRotation=B.prototype.e;B.prototype.getZoom=B.prototype.ki;B.prototype.fitExtent=B.prototype.te;B.prototype.fitGeometry=B.prototype.wh;B.prototype.centerOn=B.prototype.rh;B.prototype.rotate=B.prototype.rotate;B.prototype.setCenter=B.prototype.Ma;B.prototype.setResolution=B.prototype.j;+B.prototype.setRotation=B.prototype.v;B.prototype.setZoom=B.prototype.V;t("ol.wv.LookupImageTile.factory",function(a){return function(b,d,e,f,g){return new Ez(a,b,d,e,0,g)}},OPENLAYERS);t("ol.xml.getAllTextContent",Vp,OPENLAYERS);t("ol.xml.parse",oq,OPENLAYERS);t("ol.webgl.Context",Zn,OPENLAYERS);Zn.prototype.getGL=Zn.prototype.fl;Zn.prototype.getHitDetectionFramebuffer=Zn.prototype.we;Zn.prototype.useProgram=Zn.prototype.Vd;t("ol.tilegrid.TileGrid",bh,OPENLAYERS);bh.prototype.getMaxZoom=bh.prototype.rd;+bh.prototype.getMinZoom=bh.prototype.td;bh.prototype.getOrigin=bh.prototype.Pb;bh.prototype.getResolution=bh.prototype.ra;bh.prototype.getResolutions=bh.prototype.Ud;bh.prototype.getTileCoordForCoordAndResolution=bh.prototype.$b;bh.prototype.getTileCoordForCoordAndZ=bh.prototype.Rc;bh.prototype.getTileSize=bh.prototype.ta;t("ol.tilegrid.WMTS",sz,OPENLAYERS);sz.prototype.getMatrixIds=sz.prototype.p;t("ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet",tz,OPENLAYERS);t("ol.tilegrid.XYZ",dy,OPENLAYERS);+t("ol.tilegrid.Zoomify",wz,OPENLAYERS);t("ol.style.AtlasManager",zz,OPENLAYERS);t("ol.style.Circle",ul,OPENLAYERS);ul.prototype.getAnchor=ul.prototype.Ab;ul.prototype.getFill=ul.prototype.Hk;ul.prototype.getImage=ul.prototype.Fb;ul.prototype.getOrigin=ul.prototype.Gb;ul.prototype.getRadius=ul.prototype.Ik;ul.prototype.getSize=ul.prototype.kb;ul.prototype.getStroke=ul.prototype.Jk;t("ol.style.Fill",tl,OPENLAYERS);tl.prototype.getColor=tl.prototype.d;tl.prototype.setColor=tl.prototype.e;+t("ol.style.Icon",zj,OPENLAYERS);zj.prototype.getAnchor=zj.prototype.Ab;zj.prototype.getImage=zj.prototype.Fb;zj.prototype.getOrigin=zj.prototype.Gb;zj.prototype.getSrc=zj.prototype.Kk;zj.prototype.getSize=zj.prototype.kb;t("ol.style.Image",yj,OPENLAYERS);yj.prototype.getOpacity=yj.prototype.Pd;yj.prototype.getRotateWithView=yj.prototype.vd;yj.prototype.getRotation=yj.prototype.Qd;yj.prototype.getScale=yj.prototype.Rd;yj.prototype.getSnapToPixel=yj.prototype.wd;yj.prototype.getImage=yj.prototype.Fb;+yj.prototype.setRotation=yj.prototype.Sd;yj.prototype.setScale=yj.prototype.Td;t("ol.style.RegularShape",Dz,OPENLAYERS);Dz.prototype.getAnchor=Dz.prototype.Ab;Dz.prototype.getAngle=Dz.prototype.Lk;Dz.prototype.getFill=Dz.prototype.Mk;Dz.prototype.getImage=Dz.prototype.Fb;Dz.prototype.getOrigin=Dz.prototype.Gb;Dz.prototype.getPoints=Dz.prototype.Nk;Dz.prototype.getRadius=Dz.prototype.Ok;Dz.prototype.getRadius2=Dz.prototype.bi;Dz.prototype.getSize=Dz.prototype.kb;Dz.prototype.getStroke=Dz.prototype.Pk;+t("ol.style.Stroke",pl,OPENLAYERS);pl.prototype.getColor=pl.prototype.Qk;pl.prototype.getLineCap=pl.prototype.Nh;pl.prototype.getLineDash=pl.prototype.Rk;pl.prototype.getLineJoin=pl.prototype.Oh;pl.prototype.getMiterLimit=pl.prototype.Uh;pl.prototype.getWidth=pl.prototype.Sk;pl.prototype.setColor=pl.prototype.Tk;pl.prototype.setLineCap=pl.prototype.dm;pl.prototype.setLineDash=pl.prototype.Uk;pl.prototype.setLineJoin=pl.prototype.em;pl.prototype.setMiterLimit=pl.prototype.fm;+pl.prototype.setWidth=pl.prototype.mm;t("ol.style.Style",vl,OPENLAYERS);vl.prototype.getGeometry=vl.prototype.W;vl.prototype.getGeometryFunction=vl.prototype.Hh;vl.prototype.getFill=vl.prototype.Vk;vl.prototype.getImage=vl.prototype.Wk;vl.prototype.getStroke=vl.prototype.Xk;vl.prototype.getText=vl.prototype.Yk;vl.prototype.getZIndex=vl.prototype.ji;vl.prototype.setGeometry=vl.prototype.Zf;vl.prototype.setZIndex=vl.prototype.om;t("ol.style.Text",os,OPENLAYERS);os.prototype.getFont=os.prototype.Fh;+os.prototype.getOffsetX=os.prototype.Vh;os.prototype.getOffsetY=os.prototype.Wh;os.prototype.getFill=os.prototype.Zk;os.prototype.getRotation=os.prototype.$k;os.prototype.getScale=os.prototype.al;os.prototype.getStroke=os.prototype.bl;os.prototype.getText=os.prototype.cl;os.prototype.getTextAlign=os.prototype.di;os.prototype.getTextBaseline=os.prototype.ei;os.prototype.setFont=os.prototype.am;os.prototype.setFill=os.prototype.$l;os.prototype.setRotation=os.prototype.dl;os.prototype.setScale=os.prototype.el;+os.prototype.setStroke=os.prototype.im;os.prototype.setText=os.prototype.jm;os.prototype.setTextAlign=os.prototype.km;os.prototype.setTextBaseline=os.prototype.lm;t("ol.Sphere",ue,OPENLAYERS);ue.prototype.geodesicArea=ue.prototype.f;ue.prototype.haversineDistance=ue.prototype.c;t("ol.source.BingMaps",ey,OPENLAYERS);t("ol.source.BingMaps.TOS_ATTRIBUTION",fy,OPENLAYERS);t("ol.source.Cluster",gy,OPENLAYERS);gy.prototype.getSource=gy.prototype.L;Z.prototype.readFeatures=Z.prototype.c;+t("ol.source.GeoJSON",Hy,OPENLAYERS);t("ol.source.GPX",Iy,OPENLAYERS);t("ol.source.IGC",Jy,OPENLAYERS);t("ol.source.ImageCanvas",nn,OPENLAYERS);t("ol.source.ImageMapGuide",Ky,OPENLAYERS);Ky.prototype.getParams=Ky.prototype.ck;Ky.prototype.getImageLoadFunction=Ky.prototype.bk;Ky.prototype.updateParams=Ky.prototype.fk;Ky.prototype.setImageLoadFunction=Ky.prototype.ek;t("ol.source.Image",fn,OPENLAYERS);hn.prototype.image=hn.prototype.image;t("ol.source.ImageStatic",Ly,OPENLAYERS);+t("ol.source.ImageVector",An,OPENLAYERS);An.prototype.getSource=An.prototype.gk;An.prototype.getStyle=An.prototype.hk;An.prototype.getStyleFunction=An.prototype.ik;An.prototype.setStyle=An.prototype.Rf;t("ol.source.ImageWMS",My,OPENLAYERS);My.prototype.getGetFeatureInfoUrl=My.prototype.lk;My.prototype.getParams=My.prototype.nk;My.prototype.getImageLoadFunction=My.prototype.mk;My.prototype.getUrl=My.prototype.ok;My.prototype.setImageLoadFunction=My.prototype.pk;My.prototype.setUrl=My.prototype.qk;+My.prototype.updateParams=My.prototype.rk;t("ol.source.KML",Qy,OPENLAYERS);t("ol.source.MapQuest",Uy,OPENLAYERS);Uy.prototype.getLayer=Uy.prototype.k;t("ol.source.OSM",Sy,OPENLAYERS);t("ol.source.OSM.ATTRIBUTION",Ty,OPENLAYERS);t("ol.source.OSMXML",Xy,OPENLAYERS);t("ol.source.ServerVector",Yy,OPENLAYERS);Yy.prototype.clear=Yy.prototype.clear;Yy.prototype.readFeatures=Yy.prototype.c;t("ol.source.Source",$g,OPENLAYERS);$g.prototype.getAttributions=$g.prototype.ba;$g.prototype.getLogo=$g.prototype.aa;+$g.prototype.getProjection=$g.prototype.ca;$g.prototype.getState=$g.prototype.da;t("ol.source.Stamen",az,OPENLAYERS);t("ol.source.StaticVector",$,OPENLAYERS);t("ol.source.TileArcGISRest",cz,OPENLAYERS);cz.prototype.getParams=cz.prototype.sk;cz.prototype.getUrls=cz.prototype.tk;cz.prototype.setUrl=cz.prototype.uk;cz.prototype.setUrls=cz.prototype.Sf;cz.prototype.updateParams=cz.prototype.wk;t("ol.source.TileDebug",ez,OPENLAYERS);t("ol.source.TileImage",by,OPENLAYERS);+by.prototype.getTileLoadFunction=by.prototype.gb;by.prototype.getTileUrlFunction=by.prototype.hb;by.prototype.setTileLoadFunction=by.prototype.nb;by.prototype.setTileUrlFunction=by.prototype.ya;t("ol.source.TileJSON",fz,OPENLAYERS);t("ol.source.Tile",oh,OPENLAYERS);oh.prototype.getTileGrid=oh.prototype.Ba;rh.prototype.tile=rh.prototype.tile;t("ol.source.TileUTFGrid",gz,OPENLAYERS);gz.prototype.getTemplate=gz.prototype.ci;gz.prototype.forDataAtCoordinateAndResolution=gz.prototype.xh;+t("ol.source.TileVector",lz,OPENLAYERS);lz.prototype.getFeatures=lz.prototype.Ea;lz.prototype.getFeaturesAtCoordinateAndResolution=lz.prototype.Eh;t("ol.source.TileWMS",nz,OPENLAYERS);nz.prototype.getGetFeatureInfoUrl=nz.prototype.zk;nz.prototype.getParams=nz.prototype.Ak;nz.prototype.getUrls=nz.prototype.Bk;nz.prototype.setUrl=nz.prototype.Ck;nz.prototype.setUrls=nz.prototype.Tf;nz.prototype.updateParams=nz.prototype.Ek;t("ol.source.TopoJSON",rz,OPENLAYERS);t("ol.source.Vector",un,OPENLAYERS);+un.prototype.addFeature=un.prototype.Za;un.prototype.addFeatures=un.prototype.Ka;un.prototype.clear=un.prototype.clear;un.prototype.forEachFeature=un.prototype.eb;un.prototype.forEachFeatureInExtent=un.prototype.Aa;un.prototype.forEachFeatureIntersectingExtent=un.prototype.Ra;un.prototype.getFeatures=un.prototype.Ea;un.prototype.getFeaturesAtCoordinate=un.prototype.Ta;un.prototype.getClosestFeatureToCoordinate=un.prototype.fb;un.prototype.getExtent=un.prototype.N;un.prototype.getFeatureById=un.prototype.Sa;+un.prototype.removeFeature=un.prototype.jb;xn.prototype.feature=xn.prototype.feature;t("ol.source.WMTS",uz,OPENLAYERS);uz.prototype.getDimensions=uz.prototype.Ch;uz.prototype.getFormat=uz.prototype.Gh;uz.prototype.getLayer=uz.prototype.Fk;uz.prototype.getMatrixSet=uz.prototype.Sh;uz.prototype.getStyle=uz.prototype.Gk;uz.prototype.getVersion=uz.prototype.gi;uz.prototype.updateDimensions=uz.prototype.vm;+t("ol.source.WMTS.optionsFromCapabilities",function(a,b){var d=Ua(a.Contents.Layer,function(a){return a.Identifier==b.layer}),e,f,g;e=1<d.TileMatrixSetLink.length?Va(d.TileMatrixSetLink,function(a){return a.TileMatrixSet==b.matrixSet}):m(b.projection)?Va(d.TileMatrixSetLink,function(a){return a.TileMatrixSet.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3")==b.projection}):0;0>e&&(e=0);f=d.TileMatrixSetLink[e].TileMatrixSet;e=d.WGS84BoundingBox;m(e)&&(g=ze("EPSG:4326").N(),g=e[0]==+g[0]&&e[2]==g[2]);var h=d.Format[0];m(b.format)&&(h=b.format);e=Va(d.Style,function(a){return m(b.style)?a.Title==b.style:a.isDefault});0>e&&(e=0);e=d.Style[e].Identifier;var k={};m(d.Dimension)&&Qa(d.Dimension,function(a){var b=a.Identifier,d=a["default"];m(d)||(d=a.values[0]);k[b]=d});var n=Ua(a.Contents.TileMatrixSet,function(a){return a.Identifier==f}),p=tz(n),n=m(b.projection)?ze(b.projection):ze(n.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3")),q=[],r=b.requestEncoding,r=+m(r)?r:"";if(a.OperationsMetadata.hasOwnProperty("GetTile")&&0!=r.lastIndexOf("REST",0)){var d=a.OperationsMetadata.GetTile.DCP.HTTP.Get,s=Ua(d[0].Constraint,function(a){return"GetEncoding"==a.name}).AllowedValues.Value;0<s.length&&Wa(s,"KVP")&&(r="KVP",q.push(d[0].href))}else r="REST",Qa(d.ResourceURL,function(a){"tile"==a.resourceType&&(h=a.format,q.push(a.template))});return{urls:q,layer:b.layer,matrixSet:f,format:h,projection:n,requestEncoding:r,tileGrid:p,style:e,dimensions:k,wrapX:g}},OPENLAYERS);+t("ol.source.XYZ",Ry,OPENLAYERS);Ry.prototype.setTileUrlFunction=Ry.prototype.ya;Ry.prototype.setUrl=Ry.prototype.d;t("ol.source.Zoomify",xz,OPENLAYERS);cl.prototype.vectorContext=cl.prototype.vectorContext;cl.prototype.frameState=cl.prototype.frameState;cl.prototype.context=cl.prototype.context;cl.prototype.glContext=cl.prototype.glContext;to.prototype.drawAsync=to.prototype.oc;to.prototype.drawCircleGeometry=to.prototype.pc;to.prototype.drawFeature=to.prototype.se;+to.prototype.drawGeometryCollectionGeometry=to.prototype.kd;to.prototype.drawPointGeometry=to.prototype.yb;to.prototype.drawLineStringGeometry=to.prototype.Ib;to.prototype.drawMultiLineStringGeometry=to.prototype.qc;to.prototype.drawMultiPointGeometry=to.prototype.xb;to.prototype.drawMultiPolygonGeometry=to.prototype.rc;to.prototype.drawPolygonGeometry=to.prototype.Vb;to.prototype.drawText=to.prototype.zb;to.prototype.setFillStrokeStyle=to.prototype.Fa;to.prototype.setImageStyle=to.prototype.mb;+to.prototype.setTextStyle=to.prototype.Ga;Xl.prototype.drawAsync=Xl.prototype.oc;Xl.prototype.drawCircleGeometry=Xl.prototype.pc;Xl.prototype.drawFeature=Xl.prototype.se;Xl.prototype.drawPointGeometry=Xl.prototype.yb;Xl.prototype.drawMultiPointGeometry=Xl.prototype.xb;Xl.prototype.drawLineStringGeometry=Xl.prototype.Ib;Xl.prototype.drawMultiLineStringGeometry=Xl.prototype.qc;Xl.prototype.drawPolygonGeometry=Xl.prototype.Vb;Xl.prototype.drawMultiPolygonGeometry=Xl.prototype.rc;+Xl.prototype.setFillStrokeStyle=Xl.prototype.Fa;Xl.prototype.setImageStyle=Xl.prototype.mb;Xl.prototype.setTextStyle=Xl.prototype.Ga;t("ol.proj.common.add",Wl,OPENLAYERS);t("ol.proj.METERS_PER_UNIT",we,OPENLAYERS);t("ol.proj.Projection",xe,OPENLAYERS);xe.prototype.getCode=xe.prototype.Ah;xe.prototype.getExtent=xe.prototype.N;xe.prototype.getUnits=xe.prototype.Vj;xe.prototype.getMetersPerUnit=xe.prototype.sd;xe.prototype.getWorldExtent=xe.prototype.ii;xe.prototype.isGlobal=xe.prototype.Wj;+xe.prototype.setGlobal=xe.prototype.cm;xe.prototype.setExtent=xe.prototype.Xj;xe.prototype.setWorldExtent=xe.prototype.nm;xe.prototype.setGetPointResolution=xe.prototype.bm;xe.prototype.getPointResolution=xe.prototype.getPointResolution;t("ol.proj.addEquivalentProjections",Ae,OPENLAYERS);t("ol.proj.addProjection",Ne,OPENLAYERS);t("ol.proj.addCoordinateTransforms",Be,OPENLAYERS);t("ol.proj.get",ze,OPENLAYERS);t("ol.proj.getTransform",Se,OPENLAYERS);+t("ol.proj.transform",function(a,b,d){return Se(b,d)(a,void 0,a.length)},OPENLAYERS);t("ol.proj.transformExtent",Ue,OPENLAYERS);t("ol.layer.Heatmap",Y,OPENLAYERS);Y.prototype.getBlur=Y.prototype.Ia;Y.prototype.getGradient=Y.prototype.Ja;Y.prototype.getRadius=Y.prototype.mc;Y.prototype.setBlur=Y.prototype.Bc;Y.prototype.setGradient=Y.prototype.Cc;Y.prototype.setRadius=Y.prototype.nc;t("ol.layer.Image",H,OPENLAYERS);H.prototype.getSource=H.prototype.c;t("ol.layer.Layer",D,OPENLAYERS);+D.prototype.getSource=D.prototype.c;D.prototype.setSource=D.prototype.ja;t("ol.layer.Base",C,OPENLAYERS);C.prototype.getBrightness=C.prototype.e;C.prototype.getContrast=C.prototype.j;C.prototype.getHue=C.prototype.i;C.prototype.getExtent=C.prototype.N;C.prototype.getMaxResolution=C.prototype.k;C.prototype.getMinResolution=C.prototype.l;C.prototype.getOpacity=C.prototype.u;C.prototype.getSaturation=C.prototype.n;C.prototype.getVisible=C.prototype.d;C.prototype.setBrightness=C.prototype.J;+C.prototype.setContrast=C.prototype.L;C.prototype.setHue=C.prototype.R;C.prototype.setExtent=C.prototype.s;C.prototype.setMaxResolution=C.prototype.V;C.prototype.setMinResolution=C.prototype.Y;C.prototype.setOpacity=C.prototype.t;C.prototype.setSaturation=C.prototype.ga;C.prototype.setVisible=C.prototype.ha;t("ol.layer.Group",G,OPENLAYERS);G.prototype.getLayers=G.prototype.ec;G.prototype.setLayers=G.prototype.v;t("ol.layer.Tile",I,OPENLAYERS);I.prototype.getPreload=I.prototype.v;+I.prototype.getSource=I.prototype.c;I.prototype.setPreload=I.prototype.ma;I.prototype.getUseInterimTilesOnError=I.prototype.ia;I.prototype.setUseInterimTilesOnError=I.prototype.oa;t("ol.layer.Vector",J,OPENLAYERS);J.prototype.getSource=J.prototype.c;J.prototype.getStyle=J.prototype.lf;J.prototype.getStyleFunction=J.prototype.nf;J.prototype.setStyle=J.prototype.oa;t("ol.interaction.DoubleClickZoom",Uj,OPENLAYERS);t("ol.interaction.DoubleClickZoom.handleEvent",Vj,OPENLAYERS);+t("ol.interaction.DragAndDrop",Yw,OPENLAYERS);t("ol.interaction.DragAndDrop.handleEvent",bd,OPENLAYERS);Zw.prototype.features=Zw.prototype.features;Zw.prototype.file=Zw.prototype.file;Zw.prototype.projection=Zw.prototype.projection;gl.prototype.coordinate=gl.prototype.coordinate;t("ol.interaction.DragBox",hl,OPENLAYERS);hl.prototype.getGeometry=hl.prototype.W;t("ol.interaction.DragPan",gk,OPENLAYERS);t("ol.interaction.DragRotateAndZoom",bx,OPENLAYERS);t("ol.interaction.DragRotate",kk,OPENLAYERS);+t("ol.interaction.DragZoom",Al,OPENLAYERS);fx.prototype.feature=fx.prototype.feature;t("ol.interaction.Draw",gx,OPENLAYERS);t("ol.interaction.Draw.handleEvent",ix,OPENLAYERS);gx.prototype.finishDrawing=gx.prototype.Y;t("ol.interaction.Interaction",Qj,OPENLAYERS);Qj.prototype.getActive=Qj.prototype.d;Qj.prototype.setActive=Qj.prototype.e;t("ol.interaction.defaults",Pl,OPENLAYERS);t("ol.interaction.KeyboardPan",Bl,OPENLAYERS);t("ol.interaction.KeyboardPan.handleEvent",Cl,OPENLAYERS);+t("ol.interaction.KeyboardZoom",Dl,OPENLAYERS);t("ol.interaction.KeyboardZoom.handleEvent",El,OPENLAYERS);t("ol.interaction.Modify",ux,OPENLAYERS);t("ol.interaction.Modify.handleEvent",xx,OPENLAYERS);t("ol.interaction.MouseWheelZoom",Fl,OPENLAYERS);t("ol.interaction.MouseWheelZoom.handleEvent",Gl,OPENLAYERS);t("ol.interaction.PinchRotate",Hl,OPENLAYERS);t("ol.interaction.PinchZoom",Ll,OPENLAYERS);t("ol.interaction.Pointer",dk,OPENLAYERS);t("ol.interaction.Pointer.handleEvent",ek,OPENLAYERS);+Ex.prototype.selected=Ex.prototype.selected;Ex.prototype.deselected=Ex.prototype.deselected;t("ol.interaction.Select",Fx,OPENLAYERS);Fx.prototype.getFeatures=Fx.prototype.s;t("ol.interaction.Select.handleEvent",Gx,OPENLAYERS);Fx.prototype.setMap=Fx.prototype.setMap;t("ol.geom.Circle",Jm,OPENLAYERS);Jm.prototype.clone=Jm.prototype.clone;Jm.prototype.getCenter=Jm.prototype.Sc;Jm.prototype.getRadius=Jm.prototype.Kf;Jm.prototype.getType=Jm.prototype.S;Jm.prototype.setCenter=Jm.prototype.Pj;+Jm.prototype.setCenterAndRadius=Jm.prototype.ug;Jm.prototype.setRadius=Jm.prototype.Lf;Jm.prototype.transform=Jm.prototype.transform;t("ol.geom.Geometry",ok,OPENLAYERS);ok.prototype.clone=ok.prototype.clone;ok.prototype.getClosestPoint=ok.prototype.j;ok.prototype.getExtent=ok.prototype.N;ok.prototype.getType=ok.prototype.S;ok.prototype.applyTransform=ok.prototype.va;ok.prototype.intersectsExtent=ok.prototype.na;ok.prototype.translate=ok.prototype.Na;ok.prototype.transform=ok.prototype.transform;+t("ol.geom.GeometryCollection",Lm,OPENLAYERS);Lm.prototype.clone=Lm.prototype.clone;Lm.prototype.getGeometries=Lm.prototype.qf;Lm.prototype.getType=Lm.prototype.S;Lm.prototype.intersectsExtent=Lm.prototype.na;Lm.prototype.setGeometries=Lm.prototype.vg;Lm.prototype.applyTransform=Lm.prototype.va;Lm.prototype.translate=Lm.prototype.Na;t("ol.geom.LinearRing",Kk,OPENLAYERS);Kk.prototype.clone=Kk.prototype.clone;Kk.prototype.getArea=Kk.prototype.Rj;Kk.prototype.getCoordinates=Kk.prototype.U;+Kk.prototype.getType=Kk.prototype.S;Kk.prototype.setCoordinates=Kk.prototype.$;t("ol.geom.LineString",Sm,OPENLAYERS);Sm.prototype.appendCoordinate=Sm.prototype.lh;Sm.prototype.clone=Sm.prototype.clone;Sm.prototype.forEachSegment=Sm.prototype.yh;Sm.prototype.getCoordinateAtM=Sm.prototype.Qj;Sm.prototype.getCoordinates=Sm.prototype.U;Sm.prototype.getLength=Sm.prototype.Mf;Sm.prototype.getType=Sm.prototype.S;Sm.prototype.intersectsExtent=Sm.prototype.na;Sm.prototype.setCoordinates=Sm.prototype.$;+t("ol.geom.MultiLineString",Um,OPENLAYERS);Um.prototype.appendLineString=Um.prototype.mh;Um.prototype.clone=Um.prototype.clone;Um.prototype.getCoordinateAtM=Um.prototype.Sj;Um.prototype.getCoordinates=Um.prototype.U;Um.prototype.getLineString=Um.prototype.Ph;Um.prototype.getLineStrings=Um.prototype.Pc;Um.prototype.getType=Um.prototype.S;Um.prototype.intersectsExtent=Um.prototype.na;Um.prototype.setCoordinates=Um.prototype.$;t("ol.geom.MultiPoint",Xm,OPENLAYERS);Xm.prototype.appendPoint=Xm.prototype.oh;+Xm.prototype.clone=Xm.prototype.clone;Xm.prototype.getCoordinates=Xm.prototype.U;Xm.prototype.getPoint=Xm.prototype.Zh;Xm.prototype.getPoints=Xm.prototype.Kd;Xm.prototype.getType=Xm.prototype.S;Xm.prototype.intersectsExtent=Xm.prototype.na;Xm.prototype.setCoordinates=Xm.prototype.$;t("ol.geom.MultiPolygon",Ym,OPENLAYERS);Ym.prototype.appendPolygon=Ym.prototype.ph;Ym.prototype.clone=Ym.prototype.clone;Ym.prototype.getArea=Ym.prototype.Tj;Ym.prototype.getCoordinates=Ym.prototype.U;+Ym.prototype.getInteriorPoints=Ym.prototype.Mh;Ym.prototype.getPolygon=Ym.prototype.ai;Ym.prototype.getPolygons=Ym.prototype.ud;Ym.prototype.getType=Ym.prototype.S;Ym.prototype.intersectsExtent=Ym.prototype.na;Ym.prototype.setCoordinates=Ym.prototype.$;t("ol.geom.Point",Mk,OPENLAYERS);Mk.prototype.clone=Mk.prototype.clone;Mk.prototype.getCoordinates=Mk.prototype.U;Mk.prototype.getType=Mk.prototype.S;Mk.prototype.intersectsExtent=Mk.prototype.na;Mk.prototype.setCoordinates=Mk.prototype.$;+t("ol.geom.Polygon",F,OPENLAYERS);F.prototype.appendLinearRing=F.prototype.nh;F.prototype.clone=F.prototype.clone;F.prototype.getArea=F.prototype.Uj;F.prototype.getCoordinates=F.prototype.U;F.prototype.getInteriorPoint=F.prototype.Lh;F.prototype.getLinearRingCount=F.prototype.Rh;F.prototype.getLinearRing=F.prototype.Qh;F.prototype.getLinearRings=F.prototype.qd;F.prototype.getType=F.prototype.S;F.prototype.intersectsExtent=F.prototype.na;F.prototype.setCoordinates=F.prototype.$;+t("ol.geom.Polygon.circular",bl,OPENLAYERS);t("ol.geom.Polygon.fromExtent",function(a){var b=a[0],d=a[1],e=a[2];a=a[3];b=[b,d,b,a,e,a,e,d,b,d];d=new F(null);Zk(d,"XY",b,[b.length]);return d},OPENLAYERS);t("ol.geom.SimpleGeometry",qk,OPENLAYERS);qk.prototype.getFirstCoordinate=qk.prototype.Cb;qk.prototype.getLastCoordinate=qk.prototype.Db;qk.prototype.getLayout=qk.prototype.Eb;qk.prototype.applyTransform=qk.prototype.va;qk.prototype.translate=qk.prototype.Na;t("ol.format.Feature",zp,OPENLAYERS);+t("ol.format.GeoJSON",Jp,OPENLAYERS);Jp.prototype.readFeature=Jp.prototype.Rb;Jp.prototype.readFeatures=Jp.prototype.qa;Jp.prototype.readGeometry=Jp.prototype.Vc;Jp.prototype.readProjection=Jp.prototype.Oa;Jp.prototype.writeFeature=Jp.prototype.fe;Jp.prototype.writeFeatureObject=Jp.prototype.c;Jp.prototype.writeFeatures=Jp.prototype.Ub;Jp.prototype.writeFeaturesObject=Jp.prototype.e;Jp.prototype.writeGeometry=Jp.prototype.ad;Jp.prototype.writeGeometryObject=Jp.prototype.j;t("ol.format.GPX",$q,OPENLAYERS);+$q.prototype.readFeature=$q.prototype.Rb;$q.prototype.readFeatures=$q.prototype.qa;$q.prototype.readProjection=$q.prototype.Oa;$q.prototype.writeFeatures=$q.prototype.Ub;$q.prototype.writeFeaturesNode=$q.prototype.c;t("ol.format.IGC",Kr,OPENLAYERS);Kr.prototype.readFeature=Kr.prototype.Rb;Kr.prototype.readFeatures=Kr.prototype.qa;Kr.prototype.readProjection=Kr.prototype.Oa;t("ol.format.KML",ps,OPENLAYERS);ps.prototype.readFeature=ps.prototype.Rb;ps.prototype.readFeatures=ps.prototype.qa;+ps.prototype.readName=ps.prototype.Il;ps.prototype.readNetworkLinks=ps.prototype.Jl;ps.prototype.readProjection=ps.prototype.Oa;ps.prototype.writeFeatures=ps.prototype.Ub;ps.prototype.writeFeaturesNode=ps.prototype.c;t("ol.format.OSMXML",Zt,OPENLAYERS);Zt.prototype.readFeatures=Zt.prototype.qa;Zt.prototype.readProjection=Zt.prototype.Oa;t("ol.format.Polyline",xu,OPENLAYERS);t("ol.format.Polyline.encodeDeltas",yu,OPENLAYERS);t("ol.format.Polyline.decodeDeltas",Au,OPENLAYERS);+t("ol.format.Polyline.encodeFloats",zu,OPENLAYERS);t("ol.format.Polyline.decodeFloats",Bu,OPENLAYERS);xu.prototype.readFeature=xu.prototype.Rb;xu.prototype.readFeatures=xu.prototype.qa;xu.prototype.readGeometry=xu.prototype.Vc;xu.prototype.readProjection=xu.prototype.Oa;xu.prototype.writeGeometry=xu.prototype.ad;t("ol.format.TopoJSON",Cu,OPENLAYERS);Cu.prototype.readFeatures=Cu.prototype.qa;Cu.prototype.readProjection=Cu.prototype.Oa;t("ol.format.WFS",Iu,OPENLAYERS);Iu.prototype.readFeatures=Iu.prototype.qa;+Iu.prototype.readTransactionResponse=Iu.prototype.k;Iu.prototype.readFeatureCollectionMetadata=Iu.prototype.i;Iu.prototype.writeGetFeature=Iu.prototype.p;Iu.prototype.writeTransaction=Iu.prototype.u;Iu.prototype.readProjection=Iu.prototype.Oa;t("ol.format.WKT",Vu,OPENLAYERS);Vu.prototype.readFeature=Vu.prototype.Rb;Vu.prototype.readFeatures=Vu.prototype.qa;Vu.prototype.readGeometry=Vu.prototype.Vc;Vu.prototype.writeFeature=Vu.prototype.fe;Vu.prototype.writeFeatures=Vu.prototype.Ub;+Vu.prototype.writeGeometry=Vu.prototype.ad;t("ol.format.WMSCapabilities",mv,OPENLAYERS);mv.prototype.read=mv.prototype.d;t("ol.format.WMSGetFeatureInfo",Jv,OPENLAYERS);Jv.prototype.readFeatures=Jv.prototype.qa;t("ol.format.WMTSCapabilities",Lv,OPENLAYERS);Lv.prototype.read=Lv.prototype.d;t("ol.format.GML2",Zq,OPENLAYERS);t("ol.format.GML3",Qq,OPENLAYERS);Qq.prototype.writeGeometryNode=Qq.prototype.l;Qq.prototype.writeFeatures=Qq.prototype.Ub;Qq.prototype.writeFeaturesNode=Qq.prototype.c;+t("ol.format.GML",Qq,OPENLAYERS);Qq.prototype.writeFeatures=Qq.prototype.Ub;Qq.prototype.writeFeaturesNode=Qq.prototype.c;t("ol.format.GMLBase",Eq,OPENLAYERS);Eq.prototype.readFeatures=Eq.prototype.qa;t("ol.events.condition.altKeyOnly",function(a){a=a.c;return a.f&&!a.k&&!a.e},OPENLAYERS);t("ol.events.condition.altShiftKeysOnly",Wj,OPENLAYERS);t("ol.events.condition.always",bd,OPENLAYERS);t("ol.events.condition.click",function(a){return a.type==Yi},OPENLAYERS);t("ol.events.condition.never",ad,OPENLAYERS);+t("ol.events.condition.pointerMove",Xj,OPENLAYERS);t("ol.events.condition.singleClick",Yj,OPENLAYERS);t("ol.events.condition.noModifierKeys",Zj,OPENLAYERS);t("ol.events.condition.platformModifierKeyOnly",function(a){a=a.c;return!a.f&&a.k&&!a.e},OPENLAYERS);t("ol.events.condition.shiftKeyOnly",ak,OPENLAYERS);t("ol.events.condition.targetNotEditable",bk,OPENLAYERS);t("ol.events.condition.mouseOnly",ck,OPENLAYERS);t("ol.dom.Input",wp,OPENLAYERS);wp.prototype.getChecked=wp.prototype.c;+wp.prototype.getValue=wp.prototype.d;wp.prototype.setValue=wp.prototype.j;wp.prototype.setChecked=wp.prototype.e;t("ol.control.Attribution",sh,OPENLAYERS);t("ol.control.Attribution.render",th,OPENLAYERS);sh.prototype.getCollapsible=sh.prototype.Gj;sh.prototype.setCollapsible=sh.prototype.Jj;sh.prototype.setCollapsed=sh.prototype.Ij;sh.prototype.getCollapsed=sh.prototype.Fj;t("ol.control.Control",Ug,OPENLAYERS);Ug.prototype.getMap=Ug.prototype.j;Ug.prototype.setMap=Ug.prototype.setMap;+Ug.prototype.setTarget=Ug.prototype.d;t("ol.control.defaults",yh,OPENLAYERS);t("ol.control.FullScreen",Dh,OPENLAYERS);t("ol.control.MousePosition",Eh,OPENLAYERS);t("ol.control.MousePosition.render",Fh,OPENLAYERS);Eh.prototype.getCoordinateFormat=Eh.prototype.n;Eh.prototype.getProjection=Eh.prototype.t;Eh.prototype.setMap=Eh.prototype.setMap;Eh.prototype.setCoordinateFormat=Eh.prototype.J;Eh.prototype.setProjection=Eh.prototype.v;t("ol.control.OverviewMap",Vo,OPENLAYERS);Vo.prototype.setMap=Vo.prototype.setMap;+t("ol.control.OverviewMap.render",Wo,OPENLAYERS);Vo.prototype.getCollapsible=Vo.prototype.Lj;Vo.prototype.setCollapsible=Vo.prototype.Oj;Vo.prototype.setCollapsed=Vo.prototype.Nj;Vo.prototype.getCollapsed=Vo.prototype.Kj;t("ol.control.Rotate",vh,OPENLAYERS);t("ol.control.Rotate.render",wh,OPENLAYERS);t("ol.control.ScaleLine",ap,OPENLAYERS);ap.prototype.getUnits=ap.prototype.s;t("ol.control.ScaleLine.render",bp,OPENLAYERS);ap.prototype.setUnits=ap.prototype.t;t("ol.control.Zoom",xh,OPENLAYERS);+t("ol.control.ZoomSlider",pp,OPENLAYERS);t("ol.control.ZoomSlider.render",rp,OPENLAYERS);t("ol.control.ZoomToExtent",up,OPENLAYERS);t("ol.color.asArray",qg,OPENLAYERS);t("ol.color.asString",sg,OPENLAYERS);qd.prototype.changed=qd.prototype.q;qd.prototype.getRevision=qd.prototype.C;qd.prototype.on=qd.prototype.A;qd.prototype.once=qd.prototype.D;qd.prototype.un=qd.prototype.B;qd.prototype.unByKey=qd.prototype.G;lg.prototype.bindTo=lg.prototype.O;lg.prototype.get=lg.prototype.get;+lg.prototype.getKeys=lg.prototype.K;lg.prototype.getProperties=lg.prototype.M;lg.prototype.set=lg.prototype.set;lg.prototype.setProperties=lg.prototype.I;lg.prototype.unbind=lg.prototype.P;lg.prototype.unbindAll=lg.prototype.Q;lg.prototype.changed=lg.prototype.q;lg.prototype.getRevision=lg.prototype.C;lg.prototype.on=lg.prototype.A;lg.prototype.once=lg.prototype.D;lg.prototype.un=lg.prototype.B;lg.prototype.unByKey=lg.prototype.G;vp.prototype.bindTo=vp.prototype.O;vp.prototype.get=vp.prototype.get;+vp.prototype.getKeys=vp.prototype.K;vp.prototype.getProperties=vp.prototype.M;vp.prototype.set=vp.prototype.set;vp.prototype.setProperties=vp.prototype.I;vp.prototype.unbind=vp.prototype.P;vp.prototype.unbindAll=vp.prototype.Q;vp.prototype.changed=vp.prototype.q;vp.prototype.getRevision=vp.prototype.C;vp.prototype.on=vp.prototype.A;vp.prototype.once=vp.prototype.D;vp.prototype.un=vp.prototype.B;vp.prototype.unByKey=vp.prototype.G;O.prototype.bindTo=O.prototype.O;O.prototype.get=O.prototype.get;+O.prototype.getKeys=O.prototype.K;O.prototype.getProperties=O.prototype.M;O.prototype.set=O.prototype.set;O.prototype.setProperties=O.prototype.I;O.prototype.unbind=O.prototype.P;O.prototype.unbindAll=O.prototype.Q;O.prototype.changed=O.prototype.q;O.prototype.getRevision=O.prototype.C;O.prototype.on=O.prototype.A;O.prototype.once=O.prototype.D;O.prototype.un=O.prototype.B;O.prototype.unByKey=O.prototype.G;X.prototype.bindTo=X.prototype.O;X.prototype.get=X.prototype.get;X.prototype.getKeys=X.prototype.K;+X.prototype.getProperties=X.prototype.M;X.prototype.set=X.prototype.set;X.prototype.setProperties=X.prototype.I;X.prototype.unbind=X.prototype.P;X.prototype.unbindAll=X.prototype.Q;X.prototype.changed=X.prototype.q;X.prototype.getRevision=X.prototype.C;X.prototype.on=X.prototype.A;X.prototype.once=X.prototype.D;X.prototype.un=X.prototype.B;X.prototype.unByKey=X.prototype.G;gw.prototype.state=gw.prototype.state;gw.prototype.changed=gw.prototype.d;gw.prototype.getTileCoord=gw.prototype.i;+K.prototype.bindTo=K.prototype.O;K.prototype.get=K.prototype.get;K.prototype.getKeys=K.prototype.K;K.prototype.getProperties=K.prototype.M;K.prototype.set=K.prototype.set;K.prototype.setProperties=K.prototype.I;K.prototype.unbind=K.prototype.P;K.prototype.unbindAll=K.prototype.Q;K.prototype.changed=K.prototype.q;K.prototype.getRevision=K.prototype.C;K.prototype.on=K.prototype.A;K.prototype.once=K.prototype.D;K.prototype.un=K.prototype.B;K.prototype.unByKey=K.prototype.G;Ui.prototype.map=Ui.prototype.map;+Ui.prototype.frameState=Ui.prototype.frameState;Vi.prototype.originalEvent=Vi.prototype.originalEvent;Vi.prototype.pixel=Vi.prototype.pixel;Vi.prototype.coordinate=Vi.prototype.coordinate;Vi.prototype.dragging=Vi.prototype.dragging;Vi.prototype.preventDefault=Vi.prototype.preventDefault;Vi.prototype.stopPropagation=Vi.prototype.tb;Vi.prototype.map=Vi.prototype.map;Vi.prototype.frameState=Vi.prototype.frameState;M.prototype.bindTo=M.prototype.O;M.prototype.get=M.prototype.get;M.prototype.getKeys=M.prototype.K;+M.prototype.getProperties=M.prototype.M;M.prototype.set=M.prototype.set;M.prototype.setProperties=M.prototype.I;M.prototype.unbind=M.prototype.P;M.prototype.unbindAll=M.prototype.Q;M.prototype.changed=M.prototype.q;M.prototype.getRevision=M.prototype.C;M.prototype.on=M.prototype.A;M.prototype.once=M.prototype.D;M.prototype.un=M.prototype.B;M.prototype.unByKey=M.prototype.G;B.prototype.bindTo=B.prototype.O;B.prototype.get=B.prototype.get;B.prototype.getKeys=B.prototype.K;+B.prototype.getProperties=B.prototype.M;B.prototype.set=B.prototype.set;B.prototype.setProperties=B.prototype.I;B.prototype.unbind=B.prototype.P;B.prototype.unbindAll=B.prototype.Q;B.prototype.changed=B.prototype.q;B.prototype.getRevision=B.prototype.C;B.prototype.on=B.prototype.A;B.prototype.once=B.prototype.D;B.prototype.un=B.prototype.B;B.prototype.unByKey=B.prototype.G;Ez.prototype.state=Ez.prototype.state;Ez.prototype.changed=Ez.prototype.d;Ez.prototype.getTileCoord=Ez.prototype.i;+sz.prototype.getMaxZoom=sz.prototype.rd;sz.prototype.getMinZoom=sz.prototype.td;sz.prototype.getOrigin=sz.prototype.Pb;sz.prototype.getResolution=sz.prototype.ra;sz.prototype.getResolutions=sz.prototype.Ud;sz.prototype.getTileCoordForCoordAndResolution=sz.prototype.$b;sz.prototype.getTileCoordForCoordAndZ=sz.prototype.Rc;sz.prototype.getTileSize=sz.prototype.ta;dy.prototype.getMaxZoom=dy.prototype.rd;dy.prototype.getMinZoom=dy.prototype.td;dy.prototype.getOrigin=dy.prototype.Pb;+dy.prototype.getResolution=dy.prototype.ra;dy.prototype.getResolutions=dy.prototype.Ud;dy.prototype.getTileCoordForCoordAndResolution=dy.prototype.$b;dy.prototype.getTileCoordForCoordAndZ=dy.prototype.Rc;dy.prototype.getTileSize=dy.prototype.ta;wz.prototype.getMaxZoom=wz.prototype.rd;wz.prototype.getMinZoom=wz.prototype.td;wz.prototype.getOrigin=wz.prototype.Pb;wz.prototype.getResolution=wz.prototype.ra;wz.prototype.getResolutions=wz.prototype.Ud;wz.prototype.getTileCoordForCoordAndResolution=wz.prototype.$b;+wz.prototype.getTileCoordForCoordAndZ=wz.prototype.Rc;wz.prototype.getTileSize=wz.prototype.ta;ul.prototype.getOpacity=ul.prototype.Pd;ul.prototype.getRotateWithView=ul.prototype.vd;ul.prototype.getRotation=ul.prototype.Qd;ul.prototype.getScale=ul.prototype.Rd;ul.prototype.getSnapToPixel=ul.prototype.wd;ul.prototype.setRotation=ul.prototype.Sd;ul.prototype.setScale=ul.prototype.Td;zj.prototype.getOpacity=zj.prototype.Pd;zj.prototype.getRotateWithView=zj.prototype.vd;zj.prototype.getRotation=zj.prototype.Qd;+zj.prototype.getScale=zj.prototype.Rd;zj.prototype.getSnapToPixel=zj.prototype.wd;zj.prototype.setRotation=zj.prototype.Sd;zj.prototype.setScale=zj.prototype.Td;Dz.prototype.getOpacity=Dz.prototype.Pd;Dz.prototype.getRotateWithView=Dz.prototype.vd;Dz.prototype.getRotation=Dz.prototype.Qd;Dz.prototype.getScale=Dz.prototype.Rd;Dz.prototype.getSnapToPixel=Dz.prototype.wd;Dz.prototype.setRotation=Dz.prototype.Sd;Dz.prototype.setScale=Dz.prototype.Td;$g.prototype.bindTo=$g.prototype.O;+$g.prototype.get=$g.prototype.get;$g.prototype.getKeys=$g.prototype.K;$g.prototype.getProperties=$g.prototype.M;$g.prototype.set=$g.prototype.set;$g.prototype.setProperties=$g.prototype.I;$g.prototype.unbind=$g.prototype.P;$g.prototype.unbindAll=$g.prototype.Q;$g.prototype.changed=$g.prototype.q;$g.prototype.getRevision=$g.prototype.C;$g.prototype.on=$g.prototype.A;$g.prototype.once=$g.prototype.D;$g.prototype.un=$g.prototype.B;$g.prototype.unByKey=$g.prototype.G;oh.prototype.getAttributions=oh.prototype.ba;+oh.prototype.getLogo=oh.prototype.aa;oh.prototype.getProjection=oh.prototype.ca;oh.prototype.getState=oh.prototype.da;oh.prototype.bindTo=oh.prototype.O;oh.prototype.get=oh.prototype.get;oh.prototype.getKeys=oh.prototype.K;oh.prototype.getProperties=oh.prototype.M;oh.prototype.set=oh.prototype.set;oh.prototype.setProperties=oh.prototype.I;oh.prototype.unbind=oh.prototype.P;oh.prototype.unbindAll=oh.prototype.Q;oh.prototype.changed=oh.prototype.q;oh.prototype.getRevision=oh.prototype.C;+oh.prototype.on=oh.prototype.A;oh.prototype.once=oh.prototype.D;oh.prototype.un=oh.prototype.B;oh.prototype.unByKey=oh.prototype.G;by.prototype.getTileGrid=by.prototype.Ba;by.prototype.getAttributions=by.prototype.ba;by.prototype.getLogo=by.prototype.aa;by.prototype.getProjection=by.prototype.ca;by.prototype.getState=by.prototype.da;by.prototype.bindTo=by.prototype.O;by.prototype.get=by.prototype.get;by.prototype.getKeys=by.prototype.K;by.prototype.getProperties=by.prototype.M;by.prototype.set=by.prototype.set;+by.prototype.setProperties=by.prototype.I;by.prototype.unbind=by.prototype.P;by.prototype.unbindAll=by.prototype.Q;by.prototype.changed=by.prototype.q;by.prototype.getRevision=by.prototype.C;by.prototype.on=by.prototype.A;by.prototype.once=by.prototype.D;by.prototype.un=by.prototype.B;by.prototype.unByKey=by.prototype.G;ey.prototype.getTileLoadFunction=ey.prototype.gb;ey.prototype.getTileUrlFunction=ey.prototype.hb;ey.prototype.setTileLoadFunction=ey.prototype.nb;ey.prototype.setTileUrlFunction=ey.prototype.ya;+ey.prototype.getTileGrid=ey.prototype.Ba;ey.prototype.getAttributions=ey.prototype.ba;ey.prototype.getLogo=ey.prototype.aa;ey.prototype.getProjection=ey.prototype.ca;ey.prototype.getState=ey.prototype.da;ey.prototype.bindTo=ey.prototype.O;ey.prototype.get=ey.prototype.get;ey.prototype.getKeys=ey.prototype.K;ey.prototype.getProperties=ey.prototype.M;ey.prototype.set=ey.prototype.set;ey.prototype.setProperties=ey.prototype.I;ey.prototype.unbind=ey.prototype.P;ey.prototype.unbindAll=ey.prototype.Q;+ey.prototype.changed=ey.prototype.q;ey.prototype.getRevision=ey.prototype.C;ey.prototype.on=ey.prototype.A;ey.prototype.once=ey.prototype.D;ey.prototype.un=ey.prototype.B;ey.prototype.unByKey=ey.prototype.G;un.prototype.getAttributions=un.prototype.ba;un.prototype.getLogo=un.prototype.aa;un.prototype.getProjection=un.prototype.ca;un.prototype.getState=un.prototype.da;un.prototype.bindTo=un.prototype.O;un.prototype.get=un.prototype.get;un.prototype.getKeys=un.prototype.K;+un.prototype.getProperties=un.prototype.M;un.prototype.set=un.prototype.set;un.prototype.setProperties=un.prototype.I;un.prototype.unbind=un.prototype.P;un.prototype.unbindAll=un.prototype.Q;un.prototype.changed=un.prototype.q;un.prototype.getRevision=un.prototype.C;un.prototype.on=un.prototype.A;un.prototype.once=un.prototype.D;un.prototype.un=un.prototype.B;un.prototype.unByKey=un.prototype.G;gy.prototype.addFeature=gy.prototype.Za;gy.prototype.addFeatures=gy.prototype.Ka;gy.prototype.clear=gy.prototype.clear;+gy.prototype.forEachFeature=gy.prototype.eb;gy.prototype.forEachFeatureInExtent=gy.prototype.Aa;gy.prototype.forEachFeatureIntersectingExtent=gy.prototype.Ra;gy.prototype.getFeatures=gy.prototype.Ea;gy.prototype.getFeaturesAtCoordinate=gy.prototype.Ta;gy.prototype.getClosestFeatureToCoordinate=gy.prototype.fb;gy.prototype.getExtent=gy.prototype.N;gy.prototype.getFeatureById=gy.prototype.Sa;gy.prototype.removeFeature=gy.prototype.jb;gy.prototype.getAttributions=gy.prototype.ba;+gy.prototype.getLogo=gy.prototype.aa;gy.prototype.getProjection=gy.prototype.ca;gy.prototype.getState=gy.prototype.da;gy.prototype.bindTo=gy.prototype.O;gy.prototype.get=gy.prototype.get;gy.prototype.getKeys=gy.prototype.K;gy.prototype.getProperties=gy.prototype.M;gy.prototype.set=gy.prototype.set;gy.prototype.setProperties=gy.prototype.I;gy.prototype.unbind=gy.prototype.P;gy.prototype.unbindAll=gy.prototype.Q;gy.prototype.changed=gy.prototype.q;gy.prototype.getRevision=gy.prototype.C;+gy.prototype.on=gy.prototype.A;gy.prototype.once=gy.prototype.D;gy.prototype.un=gy.prototype.B;gy.prototype.unByKey=gy.prototype.G;Z.prototype.addFeature=Z.prototype.Za;Z.prototype.addFeatures=Z.prototype.Ka;Z.prototype.clear=Z.prototype.clear;Z.prototype.forEachFeature=Z.prototype.eb;Z.prototype.forEachFeatureInExtent=Z.prototype.Aa;Z.prototype.forEachFeatureIntersectingExtent=Z.prototype.Ra;Z.prototype.getFeatures=Z.prototype.Ea;Z.prototype.getFeaturesAtCoordinate=Z.prototype.Ta;+Z.prototype.getClosestFeatureToCoordinate=Z.prototype.fb;Z.prototype.getExtent=Z.prototype.N;Z.prototype.getFeatureById=Z.prototype.Sa;Z.prototype.removeFeature=Z.prototype.jb;Z.prototype.getAttributions=Z.prototype.ba;Z.prototype.getLogo=Z.prototype.aa;Z.prototype.getProjection=Z.prototype.ca;Z.prototype.getState=Z.prototype.da;Z.prototype.bindTo=Z.prototype.O;Z.prototype.get=Z.prototype.get;Z.prototype.getKeys=Z.prototype.K;Z.prototype.getProperties=Z.prototype.M;Z.prototype.set=Z.prototype.set;+Z.prototype.setProperties=Z.prototype.I;Z.prototype.unbind=Z.prototype.P;Z.prototype.unbindAll=Z.prototype.Q;Z.prototype.changed=Z.prototype.q;Z.prototype.getRevision=Z.prototype.C;Z.prototype.on=Z.prototype.A;Z.prototype.once=Z.prototype.D;Z.prototype.un=Z.prototype.B;Z.prototype.unByKey=Z.prototype.G;$.prototype.readFeatures=$.prototype.c;$.prototype.addFeature=$.prototype.Za;$.prototype.addFeatures=$.prototype.Ka;$.prototype.clear=$.prototype.clear;$.prototype.forEachFeature=$.prototype.eb;+$.prototype.forEachFeatureInExtent=$.prototype.Aa;$.prototype.forEachFeatureIntersectingExtent=$.prototype.Ra;$.prototype.getFeatures=$.prototype.Ea;$.prototype.getFeaturesAtCoordinate=$.prototype.Ta;$.prototype.getClosestFeatureToCoordinate=$.prototype.fb;$.prototype.getExtent=$.prototype.N;$.prototype.getFeatureById=$.prototype.Sa;$.prototype.removeFeature=$.prototype.jb;$.prototype.getAttributions=$.prototype.ba;$.prototype.getLogo=$.prototype.aa;$.prototype.getProjection=$.prototype.ca;+$.prototype.getState=$.prototype.da;$.prototype.bindTo=$.prototype.O;$.prototype.get=$.prototype.get;$.prototype.getKeys=$.prototype.K;$.prototype.getProperties=$.prototype.M;$.prototype.set=$.prototype.set;$.prototype.setProperties=$.prototype.I;$.prototype.unbind=$.prototype.P;$.prototype.unbindAll=$.prototype.Q;$.prototype.changed=$.prototype.q;$.prototype.getRevision=$.prototype.C;$.prototype.on=$.prototype.A;$.prototype.once=$.prototype.D;$.prototype.un=$.prototype.B;$.prototype.unByKey=$.prototype.G;+Hy.prototype.readFeatures=Hy.prototype.c;Hy.prototype.addFeature=Hy.prototype.Za;Hy.prototype.addFeatures=Hy.prototype.Ka;Hy.prototype.clear=Hy.prototype.clear;Hy.prototype.forEachFeature=Hy.prototype.eb;Hy.prototype.forEachFeatureInExtent=Hy.prototype.Aa;Hy.prototype.forEachFeatureIntersectingExtent=Hy.prototype.Ra;Hy.prototype.getFeatures=Hy.prototype.Ea;Hy.prototype.getFeaturesAtCoordinate=Hy.prototype.Ta;Hy.prototype.getClosestFeatureToCoordinate=Hy.prototype.fb;Hy.prototype.getExtent=Hy.prototype.N;+Hy.prototype.getFeatureById=Hy.prototype.Sa;Hy.prototype.removeFeature=Hy.prototype.jb;Hy.prototype.getAttributions=Hy.prototype.ba;Hy.prototype.getLogo=Hy.prototype.aa;Hy.prototype.getProjection=Hy.prototype.ca;Hy.prototype.getState=Hy.prototype.da;Hy.prototype.bindTo=Hy.prototype.O;Hy.prototype.get=Hy.prototype.get;Hy.prototype.getKeys=Hy.prototype.K;Hy.prototype.getProperties=Hy.prototype.M;Hy.prototype.set=Hy.prototype.set;Hy.prototype.setProperties=Hy.prototype.I;Hy.prototype.unbind=Hy.prototype.P;+Hy.prototype.unbindAll=Hy.prototype.Q;Hy.prototype.changed=Hy.prototype.q;Hy.prototype.getRevision=Hy.prototype.C;Hy.prototype.on=Hy.prototype.A;Hy.prototype.once=Hy.prototype.D;Hy.prototype.un=Hy.prototype.B;Hy.prototype.unByKey=Hy.prototype.G;Iy.prototype.readFeatures=Iy.prototype.c;Iy.prototype.addFeature=Iy.prototype.Za;Iy.prototype.addFeatures=Iy.prototype.Ka;Iy.prototype.clear=Iy.prototype.clear;Iy.prototype.forEachFeature=Iy.prototype.eb;Iy.prototype.forEachFeatureInExtent=Iy.prototype.Aa;+Iy.prototype.forEachFeatureIntersectingExtent=Iy.prototype.Ra;Iy.prototype.getFeatures=Iy.prototype.Ea;Iy.prototype.getFeaturesAtCoordinate=Iy.prototype.Ta;Iy.prototype.getClosestFeatureToCoordinate=Iy.prototype.fb;Iy.prototype.getExtent=Iy.prototype.N;Iy.prototype.getFeatureById=Iy.prototype.Sa;Iy.prototype.removeFeature=Iy.prototype.jb;Iy.prototype.getAttributions=Iy.prototype.ba;Iy.prototype.getLogo=Iy.prototype.aa;Iy.prototype.getProjection=Iy.prototype.ca;Iy.prototype.getState=Iy.prototype.da;+Iy.prototype.bindTo=Iy.prototype.O;Iy.prototype.get=Iy.prototype.get;Iy.prototype.getKeys=Iy.prototype.K;Iy.prototype.getProperties=Iy.prototype.M;Iy.prototype.set=Iy.prototype.set;Iy.prototype.setProperties=Iy.prototype.I;Iy.prototype.unbind=Iy.prototype.P;Iy.prototype.unbindAll=Iy.prototype.Q;Iy.prototype.changed=Iy.prototype.q;Iy.prototype.getRevision=Iy.prototype.C;Iy.prototype.on=Iy.prototype.A;Iy.prototype.once=Iy.prototype.D;Iy.prototype.un=Iy.prototype.B;Iy.prototype.unByKey=Iy.prototype.G;+Jy.prototype.readFeatures=Jy.prototype.c;Jy.prototype.addFeature=Jy.prototype.Za;Jy.prototype.addFeatures=Jy.prototype.Ka;Jy.prototype.clear=Jy.prototype.clear;Jy.prototype.forEachFeature=Jy.prototype.eb;Jy.prototype.forEachFeatureInExtent=Jy.prototype.Aa;Jy.prototype.forEachFeatureIntersectingExtent=Jy.prototype.Ra;Jy.prototype.getFeatures=Jy.prototype.Ea;Jy.prototype.getFeaturesAtCoordinate=Jy.prototype.Ta;Jy.prototype.getClosestFeatureToCoordinate=Jy.prototype.fb;Jy.prototype.getExtent=Jy.prototype.N;+Jy.prototype.getFeatureById=Jy.prototype.Sa;Jy.prototype.removeFeature=Jy.prototype.jb;Jy.prototype.getAttributions=Jy.prototype.ba;Jy.prototype.getLogo=Jy.prototype.aa;Jy.prototype.getProjection=Jy.prototype.ca;Jy.prototype.getState=Jy.prototype.da;Jy.prototype.bindTo=Jy.prototype.O;Jy.prototype.get=Jy.prototype.get;Jy.prototype.getKeys=Jy.prototype.K;Jy.prototype.getProperties=Jy.prototype.M;Jy.prototype.set=Jy.prototype.set;Jy.prototype.setProperties=Jy.prototype.I;Jy.prototype.unbind=Jy.prototype.P;+Jy.prototype.unbindAll=Jy.prototype.Q;Jy.prototype.changed=Jy.prototype.q;Jy.prototype.getRevision=Jy.prototype.C;Jy.prototype.on=Jy.prototype.A;Jy.prototype.once=Jy.prototype.D;Jy.prototype.un=Jy.prototype.B;Jy.prototype.unByKey=Jy.prototype.G;fn.prototype.getAttributions=fn.prototype.ba;fn.prototype.getLogo=fn.prototype.aa;fn.prototype.getProjection=fn.prototype.ca;fn.prototype.getState=fn.prototype.da;fn.prototype.bindTo=fn.prototype.O;fn.prototype.get=fn.prototype.get;fn.prototype.getKeys=fn.prototype.K;+fn.prototype.getProperties=fn.prototype.M;fn.prototype.set=fn.prototype.set;fn.prototype.setProperties=fn.prototype.I;fn.prototype.unbind=fn.prototype.P;fn.prototype.unbindAll=fn.prototype.Q;fn.prototype.changed=fn.prototype.q;fn.prototype.getRevision=fn.prototype.C;fn.prototype.on=fn.prototype.A;fn.prototype.once=fn.prototype.D;fn.prototype.un=fn.prototype.B;fn.prototype.unByKey=fn.prototype.G;nn.prototype.getAttributions=nn.prototype.ba;nn.prototype.getLogo=nn.prototype.aa;+nn.prototype.getProjection=nn.prototype.ca;nn.prototype.getState=nn.prototype.da;nn.prototype.bindTo=nn.prototype.O;nn.prototype.get=nn.prototype.get;nn.prototype.getKeys=nn.prototype.K;nn.prototype.getProperties=nn.prototype.M;nn.prototype.set=nn.prototype.set;nn.prototype.setProperties=nn.prototype.I;nn.prototype.unbind=nn.prototype.P;nn.prototype.unbindAll=nn.prototype.Q;nn.prototype.changed=nn.prototype.q;nn.prototype.getRevision=nn.prototype.C;nn.prototype.on=nn.prototype.A;+nn.prototype.once=nn.prototype.D;nn.prototype.un=nn.prototype.B;nn.prototype.unByKey=nn.prototype.G;Ky.prototype.getAttributions=Ky.prototype.ba;Ky.prototype.getLogo=Ky.prototype.aa;Ky.prototype.getProjection=Ky.prototype.ca;Ky.prototype.getState=Ky.prototype.da;Ky.prototype.bindTo=Ky.prototype.O;Ky.prototype.get=Ky.prototype.get;Ky.prototype.getKeys=Ky.prototype.K;Ky.prototype.getProperties=Ky.prototype.M;Ky.prototype.set=Ky.prototype.set;Ky.prototype.setProperties=Ky.prototype.I;+Ky.prototype.unbind=Ky.prototype.P;Ky.prototype.unbindAll=Ky.prototype.Q;Ky.prototype.changed=Ky.prototype.q;Ky.prototype.getRevision=Ky.prototype.C;Ky.prototype.on=Ky.prototype.A;Ky.prototype.once=Ky.prototype.D;Ky.prototype.un=Ky.prototype.B;Ky.prototype.unByKey=Ky.prototype.G;Ly.prototype.getAttributions=Ly.prototype.ba;Ly.prototype.getLogo=Ly.prototype.aa;Ly.prototype.getProjection=Ly.prototype.ca;Ly.prototype.getState=Ly.prototype.da;Ly.prototype.bindTo=Ly.prototype.O;Ly.prototype.get=Ly.prototype.get;+Ly.prototype.getKeys=Ly.prototype.K;Ly.prototype.getProperties=Ly.prototype.M;Ly.prototype.set=Ly.prototype.set;Ly.prototype.setProperties=Ly.prototype.I;Ly.prototype.unbind=Ly.prototype.P;Ly.prototype.unbindAll=Ly.prototype.Q;Ly.prototype.changed=Ly.prototype.q;Ly.prototype.getRevision=Ly.prototype.C;Ly.prototype.on=Ly.prototype.A;Ly.prototype.once=Ly.prototype.D;Ly.prototype.un=Ly.prototype.B;Ly.prototype.unByKey=Ly.prototype.G;An.prototype.getAttributions=An.prototype.ba;An.prototype.getLogo=An.prototype.aa;+An.prototype.getProjection=An.prototype.ca;An.prototype.getState=An.prototype.da;An.prototype.bindTo=An.prototype.O;An.prototype.get=An.prototype.get;An.prototype.getKeys=An.prototype.K;An.prototype.getProperties=An.prototype.M;An.prototype.set=An.prototype.set;An.prototype.setProperties=An.prototype.I;An.prototype.unbind=An.prototype.P;An.prototype.unbindAll=An.prototype.Q;An.prototype.changed=An.prototype.q;An.prototype.getRevision=An.prototype.C;An.prototype.on=An.prototype.A;+An.prototype.once=An.prototype.D;An.prototype.un=An.prototype.B;An.prototype.unByKey=An.prototype.G;My.prototype.getAttributions=My.prototype.ba;My.prototype.getLogo=My.prototype.aa;My.prototype.getProjection=My.prototype.ca;My.prototype.getState=My.prototype.da;My.prototype.bindTo=My.prototype.O;My.prototype.get=My.prototype.get;My.prototype.getKeys=My.prototype.K;My.prototype.getProperties=My.prototype.M;My.prototype.set=My.prototype.set;My.prototype.setProperties=My.prototype.I;+My.prototype.unbind=My.prototype.P;My.prototype.unbindAll=My.prototype.Q;My.prototype.changed=My.prototype.q;My.prototype.getRevision=My.prototype.C;My.prototype.on=My.prototype.A;My.prototype.once=My.prototype.D;My.prototype.un=My.prototype.B;My.prototype.unByKey=My.prototype.G;Qy.prototype.readFeatures=Qy.prototype.c;Qy.prototype.addFeature=Qy.prototype.Za;Qy.prototype.addFeatures=Qy.prototype.Ka;Qy.prototype.clear=Qy.prototype.clear;Qy.prototype.forEachFeature=Qy.prototype.eb;+Qy.prototype.forEachFeatureInExtent=Qy.prototype.Aa;Qy.prototype.forEachFeatureIntersectingExtent=Qy.prototype.Ra;Qy.prototype.getFeatures=Qy.prototype.Ea;Qy.prototype.getFeaturesAtCoordinate=Qy.prototype.Ta;Qy.prototype.getClosestFeatureToCoordinate=Qy.prototype.fb;Qy.prototype.getExtent=Qy.prototype.N;Qy.prototype.getFeatureById=Qy.prototype.Sa;Qy.prototype.removeFeature=Qy.prototype.jb;Qy.prototype.getAttributions=Qy.prototype.ba;Qy.prototype.getLogo=Qy.prototype.aa;+Qy.prototype.getProjection=Qy.prototype.ca;Qy.prototype.getState=Qy.prototype.da;Qy.prototype.bindTo=Qy.prototype.O;Qy.prototype.get=Qy.prototype.get;Qy.prototype.getKeys=Qy.prototype.K;Qy.prototype.getProperties=Qy.prototype.M;Qy.prototype.set=Qy.prototype.set;Qy.prototype.setProperties=Qy.prototype.I;Qy.prototype.unbind=Qy.prototype.P;Qy.prototype.unbindAll=Qy.prototype.Q;Qy.prototype.changed=Qy.prototype.q;Qy.prototype.getRevision=Qy.prototype.C;Qy.prototype.on=Qy.prototype.A;+Qy.prototype.once=Qy.prototype.D;Qy.prototype.un=Qy.prototype.B;Qy.prototype.unByKey=Qy.prototype.G;Ry.prototype.getTileLoadFunction=Ry.prototype.gb;Ry.prototype.getTileUrlFunction=Ry.prototype.hb;Ry.prototype.setTileLoadFunction=Ry.prototype.nb;Ry.prototype.getTileGrid=Ry.prototype.Ba;Ry.prototype.getAttributions=Ry.prototype.ba;Ry.prototype.getLogo=Ry.prototype.aa;Ry.prototype.getProjection=Ry.prototype.ca;Ry.prototype.getState=Ry.prototype.da;Ry.prototype.bindTo=Ry.prototype.O;+Ry.prototype.get=Ry.prototype.get;Ry.prototype.getKeys=Ry.prototype.K;Ry.prototype.getProperties=Ry.prototype.M;Ry.prototype.set=Ry.prototype.set;Ry.prototype.setProperties=Ry.prototype.I;Ry.prototype.unbind=Ry.prototype.P;Ry.prototype.unbindAll=Ry.prototype.Q;Ry.prototype.changed=Ry.prototype.q;Ry.prototype.getRevision=Ry.prototype.C;Ry.prototype.on=Ry.prototype.A;Ry.prototype.once=Ry.prototype.D;Ry.prototype.un=Ry.prototype.B;Ry.prototype.unByKey=Ry.prototype.G;Uy.prototype.setTileUrlFunction=Uy.prototype.ya;+Uy.prototype.setUrl=Uy.prototype.d;Uy.prototype.getTileLoadFunction=Uy.prototype.gb;Uy.prototype.getTileUrlFunction=Uy.prototype.hb;Uy.prototype.setTileLoadFunction=Uy.prototype.nb;Uy.prototype.getTileGrid=Uy.prototype.Ba;Uy.prototype.getAttributions=Uy.prototype.ba;Uy.prototype.getLogo=Uy.prototype.aa;Uy.prototype.getProjection=Uy.prototype.ca;Uy.prototype.getState=Uy.prototype.da;Uy.prototype.bindTo=Uy.prototype.O;Uy.prototype.get=Uy.prototype.get;Uy.prototype.getKeys=Uy.prototype.K;+Uy.prototype.getProperties=Uy.prototype.M;Uy.prototype.set=Uy.prototype.set;Uy.prototype.setProperties=Uy.prototype.I;Uy.prototype.unbind=Uy.prototype.P;Uy.prototype.unbindAll=Uy.prototype.Q;Uy.prototype.changed=Uy.prototype.q;Uy.prototype.getRevision=Uy.prototype.C;Uy.prototype.on=Uy.prototype.A;Uy.prototype.once=Uy.prototype.D;Uy.prototype.un=Uy.prototype.B;Uy.prototype.unByKey=Uy.prototype.G;Sy.prototype.setTileUrlFunction=Sy.prototype.ya;Sy.prototype.setUrl=Sy.prototype.d;+Sy.prototype.getTileLoadFunction=Sy.prototype.gb;Sy.prototype.getTileUrlFunction=Sy.prototype.hb;Sy.prototype.setTileLoadFunction=Sy.prototype.nb;Sy.prototype.getTileGrid=Sy.prototype.Ba;Sy.prototype.getAttributions=Sy.prototype.ba;Sy.prototype.getLogo=Sy.prototype.aa;Sy.prototype.getProjection=Sy.prototype.ca;Sy.prototype.getState=Sy.prototype.da;Sy.prototype.bindTo=Sy.prototype.O;Sy.prototype.get=Sy.prototype.get;Sy.prototype.getKeys=Sy.prototype.K;Sy.prototype.getProperties=Sy.prototype.M;+Sy.prototype.set=Sy.prototype.set;Sy.prototype.setProperties=Sy.prototype.I;Sy.prototype.unbind=Sy.prototype.P;Sy.prototype.unbindAll=Sy.prototype.Q;Sy.prototype.changed=Sy.prototype.q;Sy.prototype.getRevision=Sy.prototype.C;Sy.prototype.on=Sy.prototype.A;Sy.prototype.once=Sy.prototype.D;Sy.prototype.un=Sy.prototype.B;Sy.prototype.unByKey=Sy.prototype.G;Xy.prototype.readFeatures=Xy.prototype.c;Xy.prototype.addFeature=Xy.prototype.Za;Xy.prototype.addFeatures=Xy.prototype.Ka;Xy.prototype.clear=Xy.prototype.clear;+Xy.prototype.forEachFeature=Xy.prototype.eb;Xy.prototype.forEachFeatureInExtent=Xy.prototype.Aa;Xy.prototype.forEachFeatureIntersectingExtent=Xy.prototype.Ra;Xy.prototype.getFeatures=Xy.prototype.Ea;Xy.prototype.getFeaturesAtCoordinate=Xy.prototype.Ta;Xy.prototype.getClosestFeatureToCoordinate=Xy.prototype.fb;Xy.prototype.getExtent=Xy.prototype.N;Xy.prototype.getFeatureById=Xy.prototype.Sa;Xy.prototype.removeFeature=Xy.prototype.jb;Xy.prototype.getAttributions=Xy.prototype.ba;+Xy.prototype.getLogo=Xy.prototype.aa;Xy.prototype.getProjection=Xy.prototype.ca;Xy.prototype.getState=Xy.prototype.da;Xy.prototype.bindTo=Xy.prototype.O;Xy.prototype.get=Xy.prototype.get;Xy.prototype.getKeys=Xy.prototype.K;Xy.prototype.getProperties=Xy.prototype.M;Xy.prototype.set=Xy.prototype.set;Xy.prototype.setProperties=Xy.prototype.I;Xy.prototype.unbind=Xy.prototype.P;Xy.prototype.unbindAll=Xy.prototype.Q;Xy.prototype.changed=Xy.prototype.q;Xy.prototype.getRevision=Xy.prototype.C;+Xy.prototype.on=Xy.prototype.A;Xy.prototype.once=Xy.prototype.D;Xy.prototype.un=Xy.prototype.B;Xy.prototype.unByKey=Xy.prototype.G;Yy.prototype.addFeature=Yy.prototype.Za;Yy.prototype.addFeatures=Yy.prototype.Ka;Yy.prototype.forEachFeature=Yy.prototype.eb;Yy.prototype.forEachFeatureInExtent=Yy.prototype.Aa;Yy.prototype.forEachFeatureIntersectingExtent=Yy.prototype.Ra;Yy.prototype.getFeatures=Yy.prototype.Ea;Yy.prototype.getFeaturesAtCoordinate=Yy.prototype.Ta;+Yy.prototype.getClosestFeatureToCoordinate=Yy.prototype.fb;Yy.prototype.getExtent=Yy.prototype.N;Yy.prototype.getFeatureById=Yy.prototype.Sa;Yy.prototype.removeFeature=Yy.prototype.jb;Yy.prototype.getAttributions=Yy.prototype.ba;Yy.prototype.getLogo=Yy.prototype.aa;Yy.prototype.getProjection=Yy.prototype.ca;Yy.prototype.getState=Yy.prototype.da;Yy.prototype.bindTo=Yy.prototype.O;Yy.prototype.get=Yy.prototype.get;Yy.prototype.getKeys=Yy.prototype.K;Yy.prototype.getProperties=Yy.prototype.M;+Yy.prototype.set=Yy.prototype.set;Yy.prototype.setProperties=Yy.prototype.I;Yy.prototype.unbind=Yy.prototype.P;Yy.prototype.unbindAll=Yy.prototype.Q;Yy.prototype.changed=Yy.prototype.q;Yy.prototype.getRevision=Yy.prototype.C;Yy.prototype.on=Yy.prototype.A;Yy.prototype.once=Yy.prototype.D;Yy.prototype.un=Yy.prototype.B;Yy.prototype.unByKey=Yy.prototype.G;az.prototype.setTileUrlFunction=az.prototype.ya;az.prototype.setUrl=az.prototype.d;az.prototype.getTileLoadFunction=az.prototype.gb;+az.prototype.getTileUrlFunction=az.prototype.hb;az.prototype.setTileLoadFunction=az.prototype.nb;az.prototype.getTileGrid=az.prototype.Ba;az.prototype.getAttributions=az.prototype.ba;az.prototype.getLogo=az.prototype.aa;az.prototype.getProjection=az.prototype.ca;az.prototype.getState=az.prototype.da;az.prototype.bindTo=az.prototype.O;az.prototype.get=az.prototype.get;az.prototype.getKeys=az.prototype.K;az.prototype.getProperties=az.prototype.M;az.prototype.set=az.prototype.set;+az.prototype.setProperties=az.prototype.I;az.prototype.unbind=az.prototype.P;az.prototype.unbindAll=az.prototype.Q;az.prototype.changed=az.prototype.q;az.prototype.getRevision=az.prototype.C;az.prototype.on=az.prototype.A;az.prototype.once=az.prototype.D;az.prototype.un=az.prototype.B;az.prototype.unByKey=az.prototype.G;cz.prototype.getTileLoadFunction=cz.prototype.gb;cz.prototype.getTileUrlFunction=cz.prototype.hb;cz.prototype.setTileLoadFunction=cz.prototype.nb;cz.prototype.setTileUrlFunction=cz.prototype.ya;+cz.prototype.getTileGrid=cz.prototype.Ba;cz.prototype.getAttributions=cz.prototype.ba;cz.prototype.getLogo=cz.prototype.aa;cz.prototype.getProjection=cz.prototype.ca;cz.prototype.getState=cz.prototype.da;cz.prototype.bindTo=cz.prototype.O;cz.prototype.get=cz.prototype.get;cz.prototype.getKeys=cz.prototype.K;cz.prototype.getProperties=cz.prototype.M;cz.prototype.set=cz.prototype.set;cz.prototype.setProperties=cz.prototype.I;cz.prototype.unbind=cz.prototype.P;cz.prototype.unbindAll=cz.prototype.Q;+cz.prototype.changed=cz.prototype.q;cz.prototype.getRevision=cz.prototype.C;cz.prototype.on=cz.prototype.A;cz.prototype.once=cz.prototype.D;cz.prototype.un=cz.prototype.B;cz.prototype.unByKey=cz.prototype.G;ez.prototype.getTileGrid=ez.prototype.Ba;ez.prototype.getAttributions=ez.prototype.ba;ez.prototype.getLogo=ez.prototype.aa;ez.prototype.getProjection=ez.prototype.ca;ez.prototype.getState=ez.prototype.da;ez.prototype.bindTo=ez.prototype.O;ez.prototype.get=ez.prototype.get;+ez.prototype.getKeys=ez.prototype.K;ez.prototype.getProperties=ez.prototype.M;ez.prototype.set=ez.prototype.set;ez.prototype.setProperties=ez.prototype.I;ez.prototype.unbind=ez.prototype.P;ez.prototype.unbindAll=ez.prototype.Q;ez.prototype.changed=ez.prototype.q;ez.prototype.getRevision=ez.prototype.C;ez.prototype.on=ez.prototype.A;ez.prototype.once=ez.prototype.D;ez.prototype.un=ez.prototype.B;ez.prototype.unByKey=ez.prototype.G;fz.prototype.getTileLoadFunction=fz.prototype.gb;+fz.prototype.getTileUrlFunction=fz.prototype.hb;fz.prototype.setTileLoadFunction=fz.prototype.nb;fz.prototype.setTileUrlFunction=fz.prototype.ya;fz.prototype.getTileGrid=fz.prototype.Ba;fz.prototype.getAttributions=fz.prototype.ba;fz.prototype.getLogo=fz.prototype.aa;fz.prototype.getProjection=fz.prototype.ca;fz.prototype.getState=fz.prototype.da;fz.prototype.bindTo=fz.prototype.O;fz.prototype.get=fz.prototype.get;fz.prototype.getKeys=fz.prototype.K;fz.prototype.getProperties=fz.prototype.M;+fz.prototype.set=fz.prototype.set;fz.prototype.setProperties=fz.prototype.I;fz.prototype.unbind=fz.prototype.P;fz.prototype.unbindAll=fz.prototype.Q;fz.prototype.changed=fz.prototype.q;fz.prototype.getRevision=fz.prototype.C;fz.prototype.on=fz.prototype.A;fz.prototype.once=fz.prototype.D;fz.prototype.un=fz.prototype.B;fz.prototype.unByKey=fz.prototype.G;gz.prototype.getTileGrid=gz.prototype.Ba;gz.prototype.getAttributions=gz.prototype.ba;gz.prototype.getLogo=gz.prototype.aa;+gz.prototype.getProjection=gz.prototype.ca;gz.prototype.getState=gz.prototype.da;gz.prototype.bindTo=gz.prototype.O;gz.prototype.get=gz.prototype.get;gz.prototype.getKeys=gz.prototype.K;gz.prototype.getProperties=gz.prototype.M;gz.prototype.set=gz.prototype.set;gz.prototype.setProperties=gz.prototype.I;gz.prototype.unbind=gz.prototype.P;gz.prototype.unbindAll=gz.prototype.Q;gz.prototype.changed=gz.prototype.q;gz.prototype.getRevision=gz.prototype.C;gz.prototype.on=gz.prototype.A;+gz.prototype.once=gz.prototype.D;gz.prototype.un=gz.prototype.B;gz.prototype.unByKey=gz.prototype.G;lz.prototype.readFeatures=lz.prototype.c;lz.prototype.forEachFeatureIntersectingExtent=lz.prototype.Ra;lz.prototype.getFeaturesAtCoordinate=lz.prototype.Ta;lz.prototype.getFeatureById=lz.prototype.Sa;lz.prototype.getAttributions=lz.prototype.ba;lz.prototype.getLogo=lz.prototype.aa;lz.prototype.getProjection=lz.prototype.ca;lz.prototype.getState=lz.prototype.da;lz.prototype.bindTo=lz.prototype.O;+lz.prototype.get=lz.prototype.get;lz.prototype.getKeys=lz.prototype.K;lz.prototype.getProperties=lz.prototype.M;lz.prototype.set=lz.prototype.set;lz.prototype.setProperties=lz.prototype.I;lz.prototype.unbind=lz.prototype.P;lz.prototype.unbindAll=lz.prototype.Q;lz.prototype.changed=lz.prototype.q;lz.prototype.getRevision=lz.prototype.C;lz.prototype.on=lz.prototype.A;lz.prototype.once=lz.prototype.D;lz.prototype.un=lz.prototype.B;lz.prototype.unByKey=lz.prototype.G;+nz.prototype.getTileLoadFunction=nz.prototype.gb;nz.prototype.getTileUrlFunction=nz.prototype.hb;nz.prototype.setTileLoadFunction=nz.prototype.nb;nz.prototype.setTileUrlFunction=nz.prototype.ya;nz.prototype.getTileGrid=nz.prototype.Ba;nz.prototype.getAttributions=nz.prototype.ba;nz.prototype.getLogo=nz.prototype.aa;nz.prototype.getProjection=nz.prototype.ca;nz.prototype.getState=nz.prototype.da;nz.prototype.bindTo=nz.prototype.O;nz.prototype.get=nz.prototype.get;nz.prototype.getKeys=nz.prototype.K;+nz.prototype.getProperties=nz.prototype.M;nz.prototype.set=nz.prototype.set;nz.prototype.setProperties=nz.prototype.I;nz.prototype.unbind=nz.prototype.P;nz.prototype.unbindAll=nz.prototype.Q;nz.prototype.changed=nz.prototype.q;nz.prototype.getRevision=nz.prototype.C;nz.prototype.on=nz.prototype.A;nz.prototype.once=nz.prototype.D;nz.prototype.un=nz.prototype.B;nz.prototype.unByKey=nz.prototype.G;rz.prototype.readFeatures=rz.prototype.c;rz.prototype.addFeature=rz.prototype.Za;+rz.prototype.addFeatures=rz.prototype.Ka;rz.prototype.clear=rz.prototype.clear;rz.prototype.forEachFeature=rz.prototype.eb;rz.prototype.forEachFeatureInExtent=rz.prototype.Aa;rz.prototype.forEachFeatureIntersectingExtent=rz.prototype.Ra;rz.prototype.getFeatures=rz.prototype.Ea;rz.prototype.getFeaturesAtCoordinate=rz.prototype.Ta;rz.prototype.getClosestFeatureToCoordinate=rz.prototype.fb;rz.prototype.getExtent=rz.prototype.N;rz.prototype.getFeatureById=rz.prototype.Sa;rz.prototype.removeFeature=rz.prototype.jb;+rz.prototype.getAttributions=rz.prototype.ba;rz.prototype.getLogo=rz.prototype.aa;rz.prototype.getProjection=rz.prototype.ca;rz.prototype.getState=rz.prototype.da;rz.prototype.bindTo=rz.prototype.O;rz.prototype.get=rz.prototype.get;rz.prototype.getKeys=rz.prototype.K;rz.prototype.getProperties=rz.prototype.M;rz.prototype.set=rz.prototype.set;rz.prototype.setProperties=rz.prototype.I;rz.prototype.unbind=rz.prototype.P;rz.prototype.unbindAll=rz.prototype.Q;rz.prototype.changed=rz.prototype.q;+rz.prototype.getRevision=rz.prototype.C;rz.prototype.on=rz.prototype.A;rz.prototype.once=rz.prototype.D;rz.prototype.un=rz.prototype.B;rz.prototype.unByKey=rz.prototype.G;uz.prototype.getTileLoadFunction=uz.prototype.gb;uz.prototype.getTileUrlFunction=uz.prototype.hb;uz.prototype.setTileLoadFunction=uz.prototype.nb;uz.prototype.setTileUrlFunction=uz.prototype.ya;uz.prototype.getTileGrid=uz.prototype.Ba;uz.prototype.getAttributions=uz.prototype.ba;uz.prototype.getLogo=uz.prototype.aa;+uz.prototype.getProjection=uz.prototype.ca;uz.prototype.getState=uz.prototype.da;uz.prototype.bindTo=uz.prototype.O;uz.prototype.get=uz.prototype.get;uz.prototype.getKeys=uz.prototype.K;uz.prototype.getProperties=uz.prototype.M;uz.prototype.set=uz.prototype.set;uz.prototype.setProperties=uz.prototype.I;uz.prototype.unbind=uz.prototype.P;uz.prototype.unbindAll=uz.prototype.Q;uz.prototype.changed=uz.prototype.q;uz.prototype.getRevision=uz.prototype.C;uz.prototype.on=uz.prototype.A;+uz.prototype.once=uz.prototype.D;uz.prototype.un=uz.prototype.B;uz.prototype.unByKey=uz.prototype.G;xz.prototype.getTileLoadFunction=xz.prototype.gb;xz.prototype.getTileUrlFunction=xz.prototype.hb;xz.prototype.setTileLoadFunction=xz.prototype.nb;xz.prototype.setTileUrlFunction=xz.prototype.ya;xz.prototype.getTileGrid=xz.prototype.Ba;xz.prototype.getAttributions=xz.prototype.ba;xz.prototype.getLogo=xz.prototype.aa;xz.prototype.getProjection=xz.prototype.ca;xz.prototype.getState=xz.prototype.da;+xz.prototype.bindTo=xz.prototype.O;xz.prototype.get=xz.prototype.get;xz.prototype.getKeys=xz.prototype.K;xz.prototype.getProperties=xz.prototype.M;xz.prototype.set=xz.prototype.set;xz.prototype.setProperties=xz.prototype.I;xz.prototype.unbind=xz.prototype.P;xz.prototype.unbindAll=xz.prototype.Q;xz.prototype.changed=xz.prototype.q;xz.prototype.getRevision=xz.prototype.C;xz.prototype.on=xz.prototype.A;xz.prototype.once=xz.prototype.D;xz.prototype.un=xz.prototype.B;xz.prototype.unByKey=xz.prototype.G;+nj.prototype.changed=nj.prototype.q;nj.prototype.getRevision=nj.prototype.C;nj.prototype.on=nj.prototype.A;nj.prototype.once=nj.prototype.D;nj.prototype.un=nj.prototype.B;nj.prototype.unByKey=nj.prototype.G;Bo.prototype.changed=Bo.prototype.q;Bo.prototype.getRevision=Bo.prototype.C;Bo.prototype.on=Bo.prototype.A;Bo.prototype.once=Bo.prototype.D;Bo.prototype.un=Bo.prototype.B;Bo.prototype.unByKey=Bo.prototype.G;Eo.prototype.changed=Eo.prototype.q;Eo.prototype.getRevision=Eo.prototype.C;+Eo.prototype.on=Eo.prototype.A;Eo.prototype.once=Eo.prototype.D;Eo.prototype.un=Eo.prototype.B;Eo.prototype.unByKey=Eo.prototype.G;Ko.prototype.changed=Ko.prototype.q;Ko.prototype.getRevision=Ko.prototype.C;Ko.prototype.on=Ko.prototype.A;Ko.prototype.once=Ko.prototype.D;Ko.prototype.un=Ko.prototype.B;Ko.prototype.unByKey=Ko.prototype.G;Mo.prototype.changed=Mo.prototype.q;Mo.prototype.getRevision=Mo.prototype.C;Mo.prototype.on=Mo.prototype.A;Mo.prototype.once=Mo.prototype.D;Mo.prototype.un=Mo.prototype.B;+Mo.prototype.unByKey=Mo.prototype.G;Hn.prototype.changed=Hn.prototype.q;Hn.prototype.getRevision=Hn.prototype.C;Hn.prototype.on=Hn.prototype.A;Hn.prototype.once=Hn.prototype.D;Hn.prototype.un=Hn.prototype.B;Hn.prototype.unByKey=Hn.prototype.G;In.prototype.changed=In.prototype.q;In.prototype.getRevision=In.prototype.C;In.prototype.on=In.prototype.A;In.prototype.once=In.prototype.D;In.prototype.un=In.prototype.B;In.prototype.unByKey=In.prototype.G;Jn.prototype.changed=Jn.prototype.q;+Jn.prototype.getRevision=Jn.prototype.C;Jn.prototype.on=Jn.prototype.A;Jn.prototype.once=Jn.prototype.D;Jn.prototype.un=Jn.prototype.B;Jn.prototype.unByKey=Jn.prototype.G;Ln.prototype.changed=Ln.prototype.q;Ln.prototype.getRevision=Ln.prototype.C;Ln.prototype.on=Ln.prototype.A;Ln.prototype.once=Ln.prototype.D;Ln.prototype.un=Ln.prototype.B;Ln.prototype.unByKey=Ln.prototype.G;Em.prototype.changed=Em.prototype.q;Em.prototype.getRevision=Em.prototype.C;Em.prototype.on=Em.prototype.A;+Em.prototype.once=Em.prototype.D;Em.prototype.un=Em.prototype.B;Em.prototype.unByKey=Em.prototype.G;Cn.prototype.changed=Cn.prototype.q;Cn.prototype.getRevision=Cn.prototype.C;Cn.prototype.on=Cn.prototype.A;Cn.prototype.once=Cn.prototype.D;Cn.prototype.un=Cn.prototype.B;Cn.prototype.unByKey=Cn.prototype.G;Dn.prototype.changed=Dn.prototype.q;Dn.prototype.getRevision=Dn.prototype.C;Dn.prototype.on=Dn.prototype.A;Dn.prototype.once=Dn.prototype.D;Dn.prototype.un=Dn.prototype.B;Dn.prototype.unByKey=Dn.prototype.G;+En.prototype.changed=En.prototype.q;En.prototype.getRevision=En.prototype.C;En.prototype.on=En.prototype.A;En.prototype.once=En.prototype.D;En.prototype.un=En.prototype.B;En.prototype.unByKey=En.prototype.G;C.prototype.bindTo=C.prototype.O;C.prototype.get=C.prototype.get;C.prototype.getKeys=C.prototype.K;C.prototype.getProperties=C.prototype.M;C.prototype.set=C.prototype.set;C.prototype.setProperties=C.prototype.I;C.prototype.unbind=C.prototype.P;C.prototype.unbindAll=C.prototype.Q;+C.prototype.changed=C.prototype.q;C.prototype.getRevision=C.prototype.C;C.prototype.on=C.prototype.A;C.prototype.once=C.prototype.D;C.prototype.un=C.prototype.B;C.prototype.unByKey=C.prototype.G;D.prototype.getBrightness=D.prototype.e;D.prototype.getContrast=D.prototype.j;D.prototype.getHue=D.prototype.i;D.prototype.getExtent=D.prototype.N;D.prototype.getMaxResolution=D.prototype.k;D.prototype.getMinResolution=D.prototype.l;D.prototype.getOpacity=D.prototype.u;D.prototype.getSaturation=D.prototype.n;+D.prototype.getVisible=D.prototype.d;D.prototype.setBrightness=D.prototype.J;D.prototype.setContrast=D.prototype.L;D.prototype.setHue=D.prototype.R;D.prototype.setExtent=D.prototype.s;D.prototype.setMaxResolution=D.prototype.V;D.prototype.setMinResolution=D.prototype.Y;D.prototype.setOpacity=D.prototype.t;D.prototype.setSaturation=D.prototype.ga;D.prototype.setVisible=D.prototype.ha;D.prototype.bindTo=D.prototype.O;D.prototype.get=D.prototype.get;D.prototype.getKeys=D.prototype.K;+D.prototype.getProperties=D.prototype.M;D.prototype.set=D.prototype.set;D.prototype.setProperties=D.prototype.I;D.prototype.unbind=D.prototype.P;D.prototype.unbindAll=D.prototype.Q;D.prototype.changed=D.prototype.q;D.prototype.getRevision=D.prototype.C;D.prototype.on=D.prototype.A;D.prototype.once=D.prototype.D;D.prototype.un=D.prototype.B;D.prototype.unByKey=D.prototype.G;J.prototype.setSource=J.prototype.ja;J.prototype.getBrightness=J.prototype.e;J.prototype.getContrast=J.prototype.j;+J.prototype.getHue=J.prototype.i;J.prototype.getExtent=J.prototype.N;J.prototype.getMaxResolution=J.prototype.k;J.prototype.getMinResolution=J.prototype.l;J.prototype.getOpacity=J.prototype.u;J.prototype.getSaturation=J.prototype.n;J.prototype.getVisible=J.prototype.d;J.prototype.setBrightness=J.prototype.J;J.prototype.setContrast=J.prototype.L;J.prototype.setHue=J.prototype.R;J.prototype.setExtent=J.prototype.s;J.prototype.setMaxResolution=J.prototype.V;J.prototype.setMinResolution=J.prototype.Y;+J.prototype.setOpacity=J.prototype.t;J.prototype.setSaturation=J.prototype.ga;J.prototype.setVisible=J.prototype.ha;J.prototype.bindTo=J.prototype.O;J.prototype.get=J.prototype.get;J.prototype.getKeys=J.prototype.K;J.prototype.getProperties=J.prototype.M;J.prototype.set=J.prototype.set;J.prototype.setProperties=J.prototype.I;J.prototype.unbind=J.prototype.P;J.prototype.unbindAll=J.prototype.Q;J.prototype.changed=J.prototype.q;J.prototype.getRevision=J.prototype.C;J.prototype.on=J.prototype.A;+J.prototype.once=J.prototype.D;J.prototype.un=J.prototype.B;J.prototype.unByKey=J.prototype.G;Y.prototype.getSource=Y.prototype.c;Y.prototype.getStyle=Y.prototype.lf;Y.prototype.getStyleFunction=Y.prototype.nf;Y.prototype.setStyle=Y.prototype.oa;Y.prototype.setSource=Y.prototype.ja;Y.prototype.getBrightness=Y.prototype.e;Y.prototype.getContrast=Y.prototype.j;Y.prototype.getHue=Y.prototype.i;Y.prototype.getExtent=Y.prototype.N;Y.prototype.getMaxResolution=Y.prototype.k;+Y.prototype.getMinResolution=Y.prototype.l;Y.prototype.getOpacity=Y.prototype.u;Y.prototype.getSaturation=Y.prototype.n;Y.prototype.getVisible=Y.prototype.d;Y.prototype.setBrightness=Y.prototype.J;Y.prototype.setContrast=Y.prototype.L;Y.prototype.setHue=Y.prototype.R;Y.prototype.setExtent=Y.prototype.s;Y.prototype.setMaxResolution=Y.prototype.V;Y.prototype.setMinResolution=Y.prototype.Y;Y.prototype.setOpacity=Y.prototype.t;Y.prototype.setSaturation=Y.prototype.ga;Y.prototype.setVisible=Y.prototype.ha;+Y.prototype.bindTo=Y.prototype.O;Y.prototype.get=Y.prototype.get;Y.prototype.getKeys=Y.prototype.K;Y.prototype.getProperties=Y.prototype.M;Y.prototype.set=Y.prototype.set;Y.prototype.setProperties=Y.prototype.I;Y.prototype.unbind=Y.prototype.P;Y.prototype.unbindAll=Y.prototype.Q;Y.prototype.changed=Y.prototype.q;Y.prototype.getRevision=Y.prototype.C;Y.prototype.on=Y.prototype.A;Y.prototype.once=Y.prototype.D;Y.prototype.un=Y.prototype.B;Y.prototype.unByKey=Y.prototype.G;H.prototype.setSource=H.prototype.ja;+H.prototype.getBrightness=H.prototype.e;H.prototype.getContrast=H.prototype.j;H.prototype.getHue=H.prototype.i;H.prototype.getExtent=H.prototype.N;H.prototype.getMaxResolution=H.prototype.k;H.prototype.getMinResolution=H.prototype.l;H.prototype.getOpacity=H.prototype.u;H.prototype.getSaturation=H.prototype.n;H.prototype.getVisible=H.prototype.d;H.prototype.setBrightness=H.prototype.J;H.prototype.setContrast=H.prototype.L;H.prototype.setHue=H.prototype.R;H.prototype.setExtent=H.prototype.s;+H.prototype.setMaxResolution=H.prototype.V;H.prototype.setMinResolution=H.prototype.Y;H.prototype.setOpacity=H.prototype.t;H.prototype.setSaturation=H.prototype.ga;H.prototype.setVisible=H.prototype.ha;H.prototype.bindTo=H.prototype.O;H.prototype.get=H.prototype.get;H.prototype.getKeys=H.prototype.K;H.prototype.getProperties=H.prototype.M;H.prototype.set=H.prototype.set;H.prototype.setProperties=H.prototype.I;H.prototype.unbind=H.prototype.P;H.prototype.unbindAll=H.prototype.Q;+H.prototype.changed=H.prototype.q;H.prototype.getRevision=H.prototype.C;H.prototype.on=H.prototype.A;H.prototype.once=H.prototype.D;H.prototype.un=H.prototype.B;H.prototype.unByKey=H.prototype.G;G.prototype.getBrightness=G.prototype.e;G.prototype.getContrast=G.prototype.j;G.prototype.getHue=G.prototype.i;G.prototype.getExtent=G.prototype.N;G.prototype.getMaxResolution=G.prototype.k;G.prototype.getMinResolution=G.prototype.l;G.prototype.getOpacity=G.prototype.u;G.prototype.getSaturation=G.prototype.n;+G.prototype.getVisible=G.prototype.d;G.prototype.setBrightness=G.prototype.J;G.prototype.setContrast=G.prototype.L;G.prototype.setHue=G.prototype.R;G.prototype.setExtent=G.prototype.s;G.prototype.setMaxResolution=G.prototype.V;G.prototype.setMinResolution=G.prototype.Y;G.prototype.setOpacity=G.prototype.t;G.prototype.setSaturation=G.prototype.ga;G.prototype.setVisible=G.prototype.ha;G.prototype.bindTo=G.prototype.O;G.prototype.get=G.prototype.get;G.prototype.getKeys=G.prototype.K;+G.prototype.getProperties=G.prototype.M;G.prototype.set=G.prototype.set;G.prototype.setProperties=G.prototype.I;G.prototype.unbind=G.prototype.P;G.prototype.unbindAll=G.prototype.Q;G.prototype.changed=G.prototype.q;G.prototype.getRevision=G.prototype.C;G.prototype.on=G.prototype.A;G.prototype.once=G.prototype.D;G.prototype.un=G.prototype.B;G.prototype.unByKey=G.prototype.G;I.prototype.setSource=I.prototype.ja;I.prototype.getBrightness=I.prototype.e;I.prototype.getContrast=I.prototype.j;+I.prototype.getHue=I.prototype.i;I.prototype.getExtent=I.prototype.N;I.prototype.getMaxResolution=I.prototype.k;I.prototype.getMinResolution=I.prototype.l;I.prototype.getOpacity=I.prototype.u;I.prototype.getSaturation=I.prototype.n;I.prototype.getVisible=I.prototype.d;I.prototype.setBrightness=I.prototype.J;I.prototype.setContrast=I.prototype.L;I.prototype.setHue=I.prototype.R;I.prototype.setExtent=I.prototype.s;I.prototype.setMaxResolution=I.prototype.V;I.prototype.setMinResolution=I.prototype.Y;+I.prototype.setOpacity=I.prototype.t;I.prototype.setSaturation=I.prototype.ga;I.prototype.setVisible=I.prototype.ha;I.prototype.bindTo=I.prototype.O;I.prototype.get=I.prototype.get;I.prototype.getKeys=I.prototype.K;I.prototype.getProperties=I.prototype.M;I.prototype.set=I.prototype.set;I.prototype.setProperties=I.prototype.I;I.prototype.unbind=I.prototype.P;I.prototype.unbindAll=I.prototype.Q;I.prototype.changed=I.prototype.q;I.prototype.getRevision=I.prototype.C;I.prototype.on=I.prototype.A;+I.prototype.once=I.prototype.D;I.prototype.un=I.prototype.B;I.prototype.unByKey=I.prototype.G;Qj.prototype.bindTo=Qj.prototype.O;Qj.prototype.get=Qj.prototype.get;Qj.prototype.getKeys=Qj.prototype.K;Qj.prototype.getProperties=Qj.prototype.M;Qj.prototype.set=Qj.prototype.set;Qj.prototype.setProperties=Qj.prototype.I;Qj.prototype.unbind=Qj.prototype.P;Qj.prototype.unbindAll=Qj.prototype.Q;Qj.prototype.changed=Qj.prototype.q;Qj.prototype.getRevision=Qj.prototype.C;Qj.prototype.on=Qj.prototype.A;+Qj.prototype.once=Qj.prototype.D;Qj.prototype.un=Qj.prototype.B;Qj.prototype.unByKey=Qj.prototype.G;Uj.prototype.getActive=Uj.prototype.d;Uj.prototype.setActive=Uj.prototype.e;Uj.prototype.bindTo=Uj.prototype.O;Uj.prototype.get=Uj.prototype.get;Uj.prototype.getKeys=Uj.prototype.K;Uj.prototype.getProperties=Uj.prototype.M;Uj.prototype.set=Uj.prototype.set;Uj.prototype.setProperties=Uj.prototype.I;Uj.prototype.unbind=Uj.prototype.P;Uj.prototype.unbindAll=Uj.prototype.Q;Uj.prototype.changed=Uj.prototype.q;+Uj.prototype.getRevision=Uj.prototype.C;Uj.prototype.on=Uj.prototype.A;Uj.prototype.once=Uj.prototype.D;Uj.prototype.un=Uj.prototype.B;Uj.prototype.unByKey=Uj.prototype.G;Yw.prototype.getActive=Yw.prototype.d;Yw.prototype.setActive=Yw.prototype.e;Yw.prototype.bindTo=Yw.prototype.O;Yw.prototype.get=Yw.prototype.get;Yw.prototype.getKeys=Yw.prototype.K;Yw.prototype.getProperties=Yw.prototype.M;Yw.prototype.set=Yw.prototype.set;Yw.prototype.setProperties=Yw.prototype.I;Yw.prototype.unbind=Yw.prototype.P;+Yw.prototype.unbindAll=Yw.prototype.Q;Yw.prototype.changed=Yw.prototype.q;Yw.prototype.getRevision=Yw.prototype.C;Yw.prototype.on=Yw.prototype.A;Yw.prototype.once=Yw.prototype.D;Yw.prototype.un=Yw.prototype.B;Yw.prototype.unByKey=Yw.prototype.G;dk.prototype.getActive=dk.prototype.d;dk.prototype.setActive=dk.prototype.e;dk.prototype.bindTo=dk.prototype.O;dk.prototype.get=dk.prototype.get;dk.prototype.getKeys=dk.prototype.K;dk.prototype.getProperties=dk.prototype.M;dk.prototype.set=dk.prototype.set;+dk.prototype.setProperties=dk.prototype.I;dk.prototype.unbind=dk.prototype.P;dk.prototype.unbindAll=dk.prototype.Q;dk.prototype.changed=dk.prototype.q;dk.prototype.getRevision=dk.prototype.C;dk.prototype.on=dk.prototype.A;dk.prototype.once=dk.prototype.D;dk.prototype.un=dk.prototype.B;dk.prototype.unByKey=dk.prototype.G;hl.prototype.getActive=hl.prototype.d;hl.prototype.setActive=hl.prototype.e;hl.prototype.bindTo=hl.prototype.O;hl.prototype.get=hl.prototype.get;hl.prototype.getKeys=hl.prototype.K;+hl.prototype.getProperties=hl.prototype.M;hl.prototype.set=hl.prototype.set;hl.prototype.setProperties=hl.prototype.I;hl.prototype.unbind=hl.prototype.P;hl.prototype.unbindAll=hl.prototype.Q;hl.prototype.changed=hl.prototype.q;hl.prototype.getRevision=hl.prototype.C;hl.prototype.on=hl.prototype.A;hl.prototype.once=hl.prototype.D;hl.prototype.un=hl.prototype.B;hl.prototype.unByKey=hl.prototype.G;gk.prototype.getActive=gk.prototype.d;gk.prototype.setActive=gk.prototype.e;gk.prototype.bindTo=gk.prototype.O;+gk.prototype.get=gk.prototype.get;gk.prototype.getKeys=gk.prototype.K;gk.prototype.getProperties=gk.prototype.M;gk.prototype.set=gk.prototype.set;gk.prototype.setProperties=gk.prototype.I;gk.prototype.unbind=gk.prototype.P;gk.prototype.unbindAll=gk.prototype.Q;gk.prototype.changed=gk.prototype.q;gk.prototype.getRevision=gk.prototype.C;gk.prototype.on=gk.prototype.A;gk.prototype.once=gk.prototype.D;gk.prototype.un=gk.prototype.B;gk.prototype.unByKey=gk.prototype.G;bx.prototype.getActive=bx.prototype.d;+bx.prototype.setActive=bx.prototype.e;bx.prototype.bindTo=bx.prototype.O;bx.prototype.get=bx.prototype.get;bx.prototype.getKeys=bx.prototype.K;bx.prototype.getProperties=bx.prototype.M;bx.prototype.set=bx.prototype.set;bx.prototype.setProperties=bx.prototype.I;bx.prototype.unbind=bx.prototype.P;bx.prototype.unbindAll=bx.prototype.Q;bx.prototype.changed=bx.prototype.q;bx.prototype.getRevision=bx.prototype.C;bx.prototype.on=bx.prototype.A;bx.prototype.once=bx.prototype.D;bx.prototype.un=bx.prototype.B;+bx.prototype.unByKey=bx.prototype.G;kk.prototype.getActive=kk.prototype.d;kk.prototype.setActive=kk.prototype.e;kk.prototype.bindTo=kk.prototype.O;kk.prototype.get=kk.prototype.get;kk.prototype.getKeys=kk.prototype.K;kk.prototype.getProperties=kk.prototype.M;kk.prototype.set=kk.prototype.set;kk.prototype.setProperties=kk.prototype.I;kk.prototype.unbind=kk.prototype.P;kk.prototype.unbindAll=kk.prototype.Q;kk.prototype.changed=kk.prototype.q;kk.prototype.getRevision=kk.prototype.C;kk.prototype.on=kk.prototype.A;+kk.prototype.once=kk.prototype.D;kk.prototype.un=kk.prototype.B;kk.prototype.unByKey=kk.prototype.G;Al.prototype.getGeometry=Al.prototype.W;Al.prototype.getActive=Al.prototype.d;Al.prototype.setActive=Al.prototype.e;Al.prototype.bindTo=Al.prototype.O;Al.prototype.get=Al.prototype.get;Al.prototype.getKeys=Al.prototype.K;Al.prototype.getProperties=Al.prototype.M;Al.prototype.set=Al.prototype.set;Al.prototype.setProperties=Al.prototype.I;Al.prototype.unbind=Al.prototype.P;Al.prototype.unbindAll=Al.prototype.Q;+Al.prototype.changed=Al.prototype.q;Al.prototype.getRevision=Al.prototype.C;Al.prototype.on=Al.prototype.A;Al.prototype.once=Al.prototype.D;Al.prototype.un=Al.prototype.B;Al.prototype.unByKey=Al.prototype.G;gx.prototype.getActive=gx.prototype.d;gx.prototype.setActive=gx.prototype.e;gx.prototype.bindTo=gx.prototype.O;gx.prototype.get=gx.prototype.get;gx.prototype.getKeys=gx.prototype.K;gx.prototype.getProperties=gx.prototype.M;gx.prototype.set=gx.prototype.set;gx.prototype.setProperties=gx.prototype.I;+gx.prototype.unbind=gx.prototype.P;gx.prototype.unbindAll=gx.prototype.Q;gx.prototype.changed=gx.prototype.q;gx.prototype.getRevision=gx.prototype.C;gx.prototype.on=gx.prototype.A;gx.prototype.once=gx.prototype.D;gx.prototype.un=gx.prototype.B;gx.prototype.unByKey=gx.prototype.G;Bl.prototype.getActive=Bl.prototype.d;Bl.prototype.setActive=Bl.prototype.e;Bl.prototype.bindTo=Bl.prototype.O;Bl.prototype.get=Bl.prototype.get;Bl.prototype.getKeys=Bl.prototype.K;Bl.prototype.getProperties=Bl.prototype.M;+Bl.prototype.set=Bl.prototype.set;Bl.prototype.setProperties=Bl.prototype.I;Bl.prototype.unbind=Bl.prototype.P;Bl.prototype.unbindAll=Bl.prototype.Q;Bl.prototype.changed=Bl.prototype.q;Bl.prototype.getRevision=Bl.prototype.C;Bl.prototype.on=Bl.prototype.A;Bl.prototype.once=Bl.prototype.D;Bl.prototype.un=Bl.prototype.B;Bl.prototype.unByKey=Bl.prototype.G;Dl.prototype.getActive=Dl.prototype.d;Dl.prototype.setActive=Dl.prototype.e;Dl.prototype.bindTo=Dl.prototype.O;Dl.prototype.get=Dl.prototype.get;+Dl.prototype.getKeys=Dl.prototype.K;Dl.prototype.getProperties=Dl.prototype.M;Dl.prototype.set=Dl.prototype.set;Dl.prototype.setProperties=Dl.prototype.I;Dl.prototype.unbind=Dl.prototype.P;Dl.prototype.unbindAll=Dl.prototype.Q;Dl.prototype.changed=Dl.prototype.q;Dl.prototype.getRevision=Dl.prototype.C;Dl.prototype.on=Dl.prototype.A;Dl.prototype.once=Dl.prototype.D;Dl.prototype.un=Dl.prototype.B;Dl.prototype.unByKey=Dl.prototype.G;ux.prototype.getActive=ux.prototype.d;ux.prototype.setActive=ux.prototype.e;+ux.prototype.bindTo=ux.prototype.O;ux.prototype.get=ux.prototype.get;ux.prototype.getKeys=ux.prototype.K;ux.prototype.getProperties=ux.prototype.M;ux.prototype.set=ux.prototype.set;ux.prototype.setProperties=ux.prototype.I;ux.prototype.unbind=ux.prototype.P;ux.prototype.unbindAll=ux.prototype.Q;ux.prototype.changed=ux.prototype.q;ux.prototype.getRevision=ux.prototype.C;ux.prototype.on=ux.prototype.A;ux.prototype.once=ux.prototype.D;ux.prototype.un=ux.prototype.B;ux.prototype.unByKey=ux.prototype.G;+Fl.prototype.getActive=Fl.prototype.d;Fl.prototype.setActive=Fl.prototype.e;Fl.prototype.bindTo=Fl.prototype.O;Fl.prototype.get=Fl.prototype.get;Fl.prototype.getKeys=Fl.prototype.K;Fl.prototype.getProperties=Fl.prototype.M;Fl.prototype.set=Fl.prototype.set;Fl.prototype.setProperties=Fl.prototype.I;Fl.prototype.unbind=Fl.prototype.P;Fl.prototype.unbindAll=Fl.prototype.Q;Fl.prototype.changed=Fl.prototype.q;Fl.prototype.getRevision=Fl.prototype.C;Fl.prototype.on=Fl.prototype.A;Fl.prototype.once=Fl.prototype.D;+Fl.prototype.un=Fl.prototype.B;Fl.prototype.unByKey=Fl.prototype.G;Hl.prototype.getActive=Hl.prototype.d;Hl.prototype.setActive=Hl.prototype.e;Hl.prototype.bindTo=Hl.prototype.O;Hl.prototype.get=Hl.prototype.get;Hl.prototype.getKeys=Hl.prototype.K;Hl.prototype.getProperties=Hl.prototype.M;Hl.prototype.set=Hl.prototype.set;Hl.prototype.setProperties=Hl.prototype.I;Hl.prototype.unbind=Hl.prototype.P;Hl.prototype.unbindAll=Hl.prototype.Q;Hl.prototype.changed=Hl.prototype.q;Hl.prototype.getRevision=Hl.prototype.C;+Hl.prototype.on=Hl.prototype.A;Hl.prototype.once=Hl.prototype.D;Hl.prototype.un=Hl.prototype.B;Hl.prototype.unByKey=Hl.prototype.G;Ll.prototype.getActive=Ll.prototype.d;Ll.prototype.setActive=Ll.prototype.e;Ll.prototype.bindTo=Ll.prototype.O;Ll.prototype.get=Ll.prototype.get;Ll.prototype.getKeys=Ll.prototype.K;Ll.prototype.getProperties=Ll.prototype.M;Ll.prototype.set=Ll.prototype.set;Ll.prototype.setProperties=Ll.prototype.I;Ll.prototype.unbind=Ll.prototype.P;Ll.prototype.unbindAll=Ll.prototype.Q;+Ll.prototype.changed=Ll.prototype.q;Ll.prototype.getRevision=Ll.prototype.C;Ll.prototype.on=Ll.prototype.A;Ll.prototype.once=Ll.prototype.D;Ll.prototype.un=Ll.prototype.B;Ll.prototype.unByKey=Ll.prototype.G;Fx.prototype.getActive=Fx.prototype.d;Fx.prototype.setActive=Fx.prototype.e;Fx.prototype.bindTo=Fx.prototype.O;Fx.prototype.get=Fx.prototype.get;Fx.prototype.getKeys=Fx.prototype.K;Fx.prototype.getProperties=Fx.prototype.M;Fx.prototype.set=Fx.prototype.set;Fx.prototype.setProperties=Fx.prototype.I;+Fx.prototype.unbind=Fx.prototype.P;Fx.prototype.unbindAll=Fx.prototype.Q;Fx.prototype.changed=Fx.prototype.q;Fx.prototype.getRevision=Fx.prototype.C;Fx.prototype.on=Fx.prototype.A;Fx.prototype.once=Fx.prototype.D;Fx.prototype.un=Fx.prototype.B;Fx.prototype.unByKey=Fx.prototype.G;ok.prototype.changed=ok.prototype.q;ok.prototype.getRevision=ok.prototype.C;ok.prototype.on=ok.prototype.A;ok.prototype.once=ok.prototype.D;ok.prototype.un=ok.prototype.B;ok.prototype.unByKey=ok.prototype.G;+qk.prototype.clone=qk.prototype.clone;qk.prototype.getClosestPoint=qk.prototype.j;qk.prototype.getExtent=qk.prototype.N;qk.prototype.getType=qk.prototype.S;qk.prototype.intersectsExtent=qk.prototype.na;qk.prototype.transform=qk.prototype.transform;qk.prototype.changed=qk.prototype.q;qk.prototype.getRevision=qk.prototype.C;qk.prototype.on=qk.prototype.A;qk.prototype.once=qk.prototype.D;qk.prototype.un=qk.prototype.B;qk.prototype.unByKey=qk.prototype.G;Jm.prototype.getFirstCoordinate=Jm.prototype.Cb;+Jm.prototype.getLastCoordinate=Jm.prototype.Db;Jm.prototype.getLayout=Jm.prototype.Eb;Jm.prototype.applyTransform=Jm.prototype.va;Jm.prototype.translate=Jm.prototype.Na;Jm.prototype.getClosestPoint=Jm.prototype.j;Jm.prototype.getExtent=Jm.prototype.N;Jm.prototype.intersectsExtent=Jm.prototype.na;Jm.prototype.changed=Jm.prototype.q;Jm.prototype.getRevision=Jm.prototype.C;Jm.prototype.on=Jm.prototype.A;Jm.prototype.once=Jm.prototype.D;Jm.prototype.un=Jm.prototype.B;Jm.prototype.unByKey=Jm.prototype.G;+Lm.prototype.getClosestPoint=Lm.prototype.j;Lm.prototype.getExtent=Lm.prototype.N;Lm.prototype.transform=Lm.prototype.transform;Lm.prototype.changed=Lm.prototype.q;Lm.prototype.getRevision=Lm.prototype.C;Lm.prototype.on=Lm.prototype.A;Lm.prototype.once=Lm.prototype.D;Lm.prototype.un=Lm.prototype.B;Lm.prototype.unByKey=Lm.prototype.G;Kk.prototype.getFirstCoordinate=Kk.prototype.Cb;Kk.prototype.getLastCoordinate=Kk.prototype.Db;Kk.prototype.getLayout=Kk.prototype.Eb;Kk.prototype.applyTransform=Kk.prototype.va;+Kk.prototype.translate=Kk.prototype.Na;Kk.prototype.getClosestPoint=Kk.prototype.j;Kk.prototype.getExtent=Kk.prototype.N;Kk.prototype.intersectsExtent=Kk.prototype.na;Kk.prototype.transform=Kk.prototype.transform;Kk.prototype.changed=Kk.prototype.q;Kk.prototype.getRevision=Kk.prototype.C;Kk.prototype.on=Kk.prototype.A;Kk.prototype.once=Kk.prototype.D;Kk.prototype.un=Kk.prototype.B;Kk.prototype.unByKey=Kk.prototype.G;Sm.prototype.getFirstCoordinate=Sm.prototype.Cb;Sm.prototype.getLastCoordinate=Sm.prototype.Db;+Sm.prototype.getLayout=Sm.prototype.Eb;Sm.prototype.applyTransform=Sm.prototype.va;Sm.prototype.translate=Sm.prototype.Na;Sm.prototype.getClosestPoint=Sm.prototype.j;Sm.prototype.getExtent=Sm.prototype.N;Sm.prototype.transform=Sm.prototype.transform;Sm.prototype.changed=Sm.prototype.q;Sm.prototype.getRevision=Sm.prototype.C;Sm.prototype.on=Sm.prototype.A;Sm.prototype.once=Sm.prototype.D;Sm.prototype.un=Sm.prototype.B;Sm.prototype.unByKey=Sm.prototype.G;Um.prototype.getFirstCoordinate=Um.prototype.Cb;+Um.prototype.getLastCoordinate=Um.prototype.Db;Um.prototype.getLayout=Um.prototype.Eb;Um.prototype.applyTransform=Um.prototype.va;Um.prototype.translate=Um.prototype.Na;Um.prototype.getClosestPoint=Um.prototype.j;Um.prototype.getExtent=Um.prototype.N;Um.prototype.transform=Um.prototype.transform;Um.prototype.changed=Um.prototype.q;Um.prototype.getRevision=Um.prototype.C;Um.prototype.on=Um.prototype.A;Um.prototype.once=Um.prototype.D;Um.prototype.un=Um.prototype.B;Um.prototype.unByKey=Um.prototype.G;+Xm.prototype.getFirstCoordinate=Xm.prototype.Cb;Xm.prototype.getLastCoordinate=Xm.prototype.Db;Xm.prototype.getLayout=Xm.prototype.Eb;Xm.prototype.applyTransform=Xm.prototype.va;Xm.prototype.translate=Xm.prototype.Na;Xm.prototype.getClosestPoint=Xm.prototype.j;Xm.prototype.getExtent=Xm.prototype.N;Xm.prototype.transform=Xm.prototype.transform;Xm.prototype.changed=Xm.prototype.q;Xm.prototype.getRevision=Xm.prototype.C;Xm.prototype.on=Xm.prototype.A;Xm.prototype.once=Xm.prototype.D;+Xm.prototype.un=Xm.prototype.B;Xm.prototype.unByKey=Xm.prototype.G;Ym.prototype.getFirstCoordinate=Ym.prototype.Cb;Ym.prototype.getLastCoordinate=Ym.prototype.Db;Ym.prototype.getLayout=Ym.prototype.Eb;Ym.prototype.applyTransform=Ym.prototype.va;Ym.prototype.translate=Ym.prototype.Na;Ym.prototype.getClosestPoint=Ym.prototype.j;Ym.prototype.getExtent=Ym.prototype.N;Ym.prototype.transform=Ym.prototype.transform;Ym.prototype.changed=Ym.prototype.q;Ym.prototype.getRevision=Ym.prototype.C;+Ym.prototype.on=Ym.prototype.A;Ym.prototype.once=Ym.prototype.D;Ym.prototype.un=Ym.prototype.B;Ym.prototype.unByKey=Ym.prototype.G;Mk.prototype.getFirstCoordinate=Mk.prototype.Cb;Mk.prototype.getLastCoordinate=Mk.prototype.Db;Mk.prototype.getLayout=Mk.prototype.Eb;Mk.prototype.applyTransform=Mk.prototype.va;Mk.prototype.translate=Mk.prototype.Na;Mk.prototype.getClosestPoint=Mk.prototype.j;Mk.prototype.getExtent=Mk.prototype.N;Mk.prototype.transform=Mk.prototype.transform;Mk.prototype.changed=Mk.prototype.q;+Mk.prototype.getRevision=Mk.prototype.C;Mk.prototype.on=Mk.prototype.A;Mk.prototype.once=Mk.prototype.D;Mk.prototype.un=Mk.prototype.B;Mk.prototype.unByKey=Mk.prototype.G;F.prototype.getFirstCoordinate=F.prototype.Cb;F.prototype.getLastCoordinate=F.prototype.Db;F.prototype.getLayout=F.prototype.Eb;F.prototype.applyTransform=F.prototype.va;F.prototype.translate=F.prototype.Na;F.prototype.getClosestPoint=F.prototype.j;F.prototype.getExtent=F.prototype.N;F.prototype.transform=F.prototype.transform;+F.prototype.changed=F.prototype.q;F.prototype.getRevision=F.prototype.C;F.prototype.on=F.prototype.A;F.prototype.once=F.prototype.D;F.prototype.un=F.prototype.B;F.prototype.unByKey=F.prototype.G;Zq.prototype.readFeatures=Zq.prototype.qa;Qq.prototype.readFeatures=Qq.prototype.qa;Qq.prototype.readFeatures=Qq.prototype.qa;wp.prototype.bindTo=wp.prototype.O;wp.prototype.get=wp.prototype.get;wp.prototype.getKeys=wp.prototype.K;wp.prototype.getProperties=wp.prototype.M;wp.prototype.set=wp.prototype.set;+wp.prototype.setProperties=wp.prototype.I;wp.prototype.unbind=wp.prototype.P;wp.prototype.unbindAll=wp.prototype.Q;wp.prototype.changed=wp.prototype.q;wp.prototype.getRevision=wp.prototype.C;wp.prototype.on=wp.prototype.A;wp.prototype.once=wp.prototype.D;wp.prototype.un=wp.prototype.B;wp.prototype.unByKey=wp.prototype.G;Ug.prototype.bindTo=Ug.prototype.O;Ug.prototype.get=Ug.prototype.get;Ug.prototype.getKeys=Ug.prototype.K;Ug.prototype.getProperties=Ug.prototype.M;Ug.prototype.set=Ug.prototype.set;+Ug.prototype.setProperties=Ug.prototype.I;Ug.prototype.unbind=Ug.prototype.P;Ug.prototype.unbindAll=Ug.prototype.Q;Ug.prototype.changed=Ug.prototype.q;Ug.prototype.getRevision=Ug.prototype.C;Ug.prototype.on=Ug.prototype.A;Ug.prototype.once=Ug.prototype.D;Ug.prototype.un=Ug.prototype.B;Ug.prototype.unByKey=Ug.prototype.G;sh.prototype.getMap=sh.prototype.j;sh.prototype.setMap=sh.prototype.setMap;sh.prototype.setTarget=sh.prototype.d;sh.prototype.bindTo=sh.prototype.O;sh.prototype.get=sh.prototype.get;+sh.prototype.getKeys=sh.prototype.K;sh.prototype.getProperties=sh.prototype.M;sh.prototype.set=sh.prototype.set;sh.prototype.setProperties=sh.prototype.I;sh.prototype.unbind=sh.prototype.P;sh.prototype.unbindAll=sh.prototype.Q;sh.prototype.changed=sh.prototype.q;sh.prototype.getRevision=sh.prototype.C;sh.prototype.on=sh.prototype.A;sh.prototype.once=sh.prototype.D;sh.prototype.un=sh.prototype.B;sh.prototype.unByKey=sh.prototype.G;Dh.prototype.getMap=Dh.prototype.j;Dh.prototype.setMap=Dh.prototype.setMap;+Dh.prototype.setTarget=Dh.prototype.d;Dh.prototype.bindTo=Dh.prototype.O;Dh.prototype.get=Dh.prototype.get;Dh.prototype.getKeys=Dh.prototype.K;Dh.prototype.getProperties=Dh.prototype.M;Dh.prototype.set=Dh.prototype.set;Dh.prototype.setProperties=Dh.prototype.I;Dh.prototype.unbind=Dh.prototype.P;Dh.prototype.unbindAll=Dh.prototype.Q;Dh.prototype.changed=Dh.prototype.q;Dh.prototype.getRevision=Dh.prototype.C;Dh.prototype.on=Dh.prototype.A;Dh.prototype.once=Dh.prototype.D;Dh.prototype.un=Dh.prototype.B;+Dh.prototype.unByKey=Dh.prototype.G;Eh.prototype.getMap=Eh.prototype.j;Eh.prototype.setTarget=Eh.prototype.d;Eh.prototype.bindTo=Eh.prototype.O;Eh.prototype.get=Eh.prototype.get;Eh.prototype.getKeys=Eh.prototype.K;Eh.prototype.getProperties=Eh.prototype.M;Eh.prototype.set=Eh.prototype.set;Eh.prototype.setProperties=Eh.prototype.I;Eh.prototype.unbind=Eh.prototype.P;Eh.prototype.unbindAll=Eh.prototype.Q;Eh.prototype.changed=Eh.prototype.q;Eh.prototype.getRevision=Eh.prototype.C;Eh.prototype.on=Eh.prototype.A;+Eh.prototype.once=Eh.prototype.D;Eh.prototype.un=Eh.prototype.B;Eh.prototype.unByKey=Eh.prototype.G;Vo.prototype.getMap=Vo.prototype.j;Vo.prototype.setTarget=Vo.prototype.d;Vo.prototype.bindTo=Vo.prototype.O;Vo.prototype.get=Vo.prototype.get;Vo.prototype.getKeys=Vo.prototype.K;Vo.prototype.getProperties=Vo.prototype.M;Vo.prototype.set=Vo.prototype.set;Vo.prototype.setProperties=Vo.prototype.I;Vo.prototype.unbind=Vo.prototype.P;Vo.prototype.unbindAll=Vo.prototype.Q;Vo.prototype.changed=Vo.prototype.q;+Vo.prototype.getRevision=Vo.prototype.C;Vo.prototype.on=Vo.prototype.A;Vo.prototype.once=Vo.prototype.D;Vo.prototype.un=Vo.prototype.B;Vo.prototype.unByKey=Vo.prototype.G;vh.prototype.getMap=vh.prototype.j;vh.prototype.setMap=vh.prototype.setMap;vh.prototype.setTarget=vh.prototype.d;vh.prototype.bindTo=vh.prototype.O;vh.prototype.get=vh.prototype.get;vh.prototype.getKeys=vh.prototype.K;vh.prototype.getProperties=vh.prototype.M;vh.prototype.set=vh.prototype.set;vh.prototype.setProperties=vh.prototype.I;+vh.prototype.unbind=vh.prototype.P;vh.prototype.unbindAll=vh.prototype.Q;vh.prototype.changed=vh.prototype.q;vh.prototype.getRevision=vh.prototype.C;vh.prototype.on=vh.prototype.A;vh.prototype.once=vh.prototype.D;vh.prototype.un=vh.prototype.B;vh.prototype.unByKey=vh.prototype.G;ap.prototype.getMap=ap.prototype.j;ap.prototype.setMap=ap.prototype.setMap;ap.prototype.setTarget=ap.prototype.d;ap.prototype.bindTo=ap.prototype.O;ap.prototype.get=ap.prototype.get;ap.prototype.getKeys=ap.prototype.K;+ap.prototype.getProperties=ap.prototype.M;ap.prototype.set=ap.prototype.set;ap.prototype.setProperties=ap.prototype.I;ap.prototype.unbind=ap.prototype.P;ap.prototype.unbindAll=ap.prototype.Q;ap.prototype.changed=ap.prototype.q;ap.prototype.getRevision=ap.prototype.C;ap.prototype.on=ap.prototype.A;ap.prototype.once=ap.prototype.D;ap.prototype.un=ap.prototype.B;ap.prototype.unByKey=ap.prototype.G;xh.prototype.getMap=xh.prototype.j;xh.prototype.setMap=xh.prototype.setMap;xh.prototype.setTarget=xh.prototype.d;+xh.prototype.bindTo=xh.prototype.O;xh.prototype.get=xh.prototype.get;xh.prototype.getKeys=xh.prototype.K;xh.prototype.getProperties=xh.prototype.M;xh.prototype.set=xh.prototype.set;xh.prototype.setProperties=xh.prototype.I;xh.prototype.unbind=xh.prototype.P;xh.prototype.unbindAll=xh.prototype.Q;xh.prototype.changed=xh.prototype.q;xh.prototype.getRevision=xh.prototype.C;xh.prototype.on=xh.prototype.A;xh.prototype.once=xh.prototype.D;xh.prototype.un=xh.prototype.B;xh.prototype.unByKey=xh.prototype.G;+pp.prototype.getMap=pp.prototype.j;pp.prototype.setTarget=pp.prototype.d;pp.prototype.bindTo=pp.prototype.O;pp.prototype.get=pp.prototype.get;pp.prototype.getKeys=pp.prototype.K;pp.prototype.getProperties=pp.prototype.M;pp.prototype.set=pp.prototype.set;pp.prototype.setProperties=pp.prototype.I;pp.prototype.unbind=pp.prototype.P;pp.prototype.unbindAll=pp.prototype.Q;pp.prototype.changed=pp.prototype.q;pp.prototype.getRevision=pp.prototype.C;pp.prototype.on=pp.prototype.A;pp.prototype.once=pp.prototype.D;+pp.prototype.un=pp.prototype.B;pp.prototype.unByKey=pp.prototype.G;up.prototype.getMap=up.prototype.j;up.prototype.setMap=up.prototype.setMap;up.prototype.setTarget=up.prototype.d;up.prototype.bindTo=up.prototype.O;up.prototype.get=up.prototype.get;up.prototype.getKeys=up.prototype.K;up.prototype.getProperties=up.prototype.M;up.prototype.set=up.prototype.set;up.prototype.setProperties=up.prototype.I;up.prototype.unbind=up.prototype.P;up.prototype.unbindAll=up.prototype.Q;up.prototype.changed=up.prototype.q;+up.prototype.getRevision=up.prototype.C;up.prototype.on=up.prototype.A;up.prototype.once=up.prototype.D;up.prototype.un=up.prototype.B;up.prototype.unByKey=up.prototype.G;+ return OPENLAYERS.ol;+}));+diff --git a/web/index.html b/web/index.htmlindex 09106a2f5..7d879db28 100644--- a/web/index.html+++ b/web/index.html@@ -60,7 +60,7 @@<!-- link.prod --> <!-- <link type="text/css" rel="Stylesheet" href="ext/image/jcrop-0.9.12/jquery.Jcrop.min.css"> --><link type="text/css" rel="Stylesheet" href="ext/ui/noUiSlider-6.1.10/jquery.nouislider.css">- <link type="text/css" rel="Stylesheet" href="ext/map/openlayers-3.3.0.wv1/ol.css">+ <link type="text/css" rel="Stylesheet" href="ext/map/openlayers-3.4.0.wv1/ol.css"><!-- link.prod --> <!-- <link type="text/css" href="css/wv.css?v=20131218215115174" rel="Stylesheet" /> -->@@ -122,8 +122,8 @@<!-- link.dev --> <script type="text/javascript" src="ext/image/jcrop-0.9.12/jquery.Jcrop.js"></script><!-- link.prod --> <!-- <script type="text/javascript" src="ext/image/jcrop-0.9.12/jquery.Jcrop.min.js"></script> -->- <!-- link.dev --> <script type="text/javascript" src="ext/map/openlayers-3.3.0.wv1/ol-debug.js"></script>- <!-- link.prod --> <!-- <script type="text/javascript" src="ext/map/openlayers-3.3.0.wv1/ol.js"></script> -->+ <!-- link.dev --> <script type="text/javascript" src="ext/map/openlayers-3.4.0.wv1/ol-debug.js"></script>+ <!-- link.prod --> <!-- <script type="text/javascript" src="ext/map/openlayers-3.4.0.wv1/ol.js"></script> --><script type="text/javascript" src="ext/ui/noUiSlider-6.1.10/jquery.nouislider.min.js"></script>@@ -153,7 +153,7 @@<!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.anim.js"></script><!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.model.js"></script><!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.label.js"></script>-+<!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.timeline.js"></script><!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.timeline.data.js"></script><!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.timeline.ticks.js"></script>@@ -162,7 +162,7 @@<!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.timeline.pan.js"></script><!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.timeline.input.js"></script><!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.timeline.config.js"></script>-+<!-- link.dev --> <script type="text/javascript" src="js/date/wv.date.wheels.js"></script><!-- link.dev --> <script type="text/javascript" src="js/layers/wv.layers.js"></script>