(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{374:function(t,e,i){var n,r,o;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){"use strict";function t(t,n,r,o,s){!function t(i,n,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,h=Math.log(a),u=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1),p=Math.max(r,Math.floor(n-l*u/a+c)),f=Math.min(o,Math.floor(n+(a-l)*u/a+c));t(i,n,p,f,s)}var d=i[n],_=r,g=o;for(e(i,r,n),s(i[o],d)>0&&e(i,r,o);_0;)g--}0===s(i[r],d)?e(i,r,g):(g++,e(i,g,o)),g<=n&&(r=g+1),n<=g&&(o=g-1)}}(t,n,r||0,o||t.length-1,s||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return te?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(e,i,n,r,o){for(var s=[i,n];s.length;)if(!((n=s.pop())-(i=s.pop())<=r)){var a=i+Math.ceil((n-i)/r/2)*r;t(e,a,i,n,o),s.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!f(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var o=0;o=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var s=this._chooseSplitIndex(i,r,n),a=d(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,r,o,a,l,h,c,p=1/0,f=1/0,d=e;d<=i-e;d++){var _=s(t,0,d,this.toBBox),g=s(t,d,i,this.toBBox),y=(r=_,o=g,a=void 0,l=void 0,h=void 0,c=void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),h=Math.min(r.maxX,o.maxX),c=Math.min(r.maxY,o.maxY),Math.max(0,h-a)*Math.max(0,c-l)),v=u(_)+u(g);y=e;f--){var d=t.children[f];a(l,t.leaf?r(d):d),h+=c(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n},"object"===s(e)&&void 0!==t?t.exports=o():void 0===(r="function"==typeof(n=o)?n.call(e,i,e,t):n)||(t.exports=r)},387:function(t,e){var i=null,n=null;function r(t,e,i){t.addEventListener(e,(function(t){var r=new MouseEvent(i,t);r.pointerId=1,r.isPrimary=!0,r.pointerType="mouse",r.width=1,r.height=1,r.tiltX=0,r.tiltY=0,"buttons"in t&&0!==t.buttons?r.pressure=.5:r.pressure=0;var o=t.target;null!==n&&(o=n,"mouseup"===e&&(n=null)),o.dispatchEvent(r),r.defaultPrevented&&t.preventDefault()}))}function o(t,e,n){t.addEventListener(e,(function(t){for(var r=t.changedTouches,o=r.length,s=0;se?1:t0){for(r=1;r0},e.prototype.removeEventListener=function(t,e){var i=this.listeners_[t];if(i){var n=i.indexOf(e);-1!==n&&(t in this.pendingRemovals_?(i[n]=u,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}},e}(b),P="change",M="error",L="contextmenu",F="click",A="dblclick",D="keydown",k="keypress",j="load",G="resize",z="touchmove",W="wheel",X=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var K=function(t){function e(){var e=t.call(this)||this;return e.revision_=0,e}return X(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(P)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),r=0;r0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:_t}):t.setRotation(0))}},e}(ut),St=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ct=function(t){function e(e){var i=this,n="Assertion failed. See https://openlayers.org/en/"+("v"+"6.3.0".split("-")[0])+"/doc/errors/#"+e+" for details.";return(i=t.call(this,n)||this).code=e,i.name="AssertionError",i.message=n,i}return St(e,t),e}(Error);function wt(t,e){if(!t)throw new Ct(e)}function Et(t,e,i){return Math.min(Math.max(t,e),i)}var bt="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2};function Tt(t,e,i,n,r,o){var s=r-i,a=o-n;if(0!==s||0!==a){var l=((t-i)*s+(e-n)*a)/(s*s+a*a);l>1?(i=r,n=o):l>0&&(i+=s*l,n+=a*l)}return Rt(t,e,i,n)}function Rt(t,e,i,n){var r=i-t,o=n-e;return r*r+o*o}function It(t){return t*Math.PI/180}function Ot(t,e){var i=t%e;return i*e<0?i+e:i}function Pt(t,e,i){return t+i*(e-t)}var Mt="Point",Lt="LineString",Ft="LinearRing",At="Polygon",Dt="MultiPoint",kt="MultiLineString",jt="MultiPolygon",Gt="GeometryCollection",zt="Circle";function Wt(t,e,i){var n=i||6371008.8,r=It(t[1]),o=It(e[1]),s=(o-r)/2,a=It(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*n*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}var Xt="bottom-left",Kt="bottom-right",Yt="top-left",Nt="top-right",Zt=0,Bt=1,Vt=2,Ut=4,Ht=8,qt=16;function Jt(t){for(var e=oe(),i=0,n=t.length;ir&&(l|=Ut),ao&&(l|=Vt),l===Zt&&(l=Bt),l}function oe(){return[1/0,1/0,-1/0,-1/0]}function se(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function ae(t){return se(1/0,1/0,-1/0,-1/0,t)}function le(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function he(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function ue(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function ce(t,e){for(var i=0,n=e.length;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Te(t){return t[2]1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=Fe,a=0;as?l=s:l<-s&&(l=-s),o[a+1]=l}return o}function ze(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var s=0;s=this.minWidth_)break;++f}p=this.scaleBar_?this.createScaleBar(u,h,a):h.toFixed(c<0?-c:0)+" "+a,this.renderedHTML_!=p&&(this.innerElement_.innerHTML=p,this.renderedHTML_=p),this.renderedWidth_!=u&&(this.innerElement_.style.width=u+"px",this.renderedWidth_=u),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.createScaleBar=function(t,e,i){for(var n="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),r=[],o=t/this.scaleBarSteps_,s="#ffffff",a=0;a
'+this.createMarker("relative",a)+(a%2==0||2===this.scaleBarSteps_?this.createStepText(a,t,!1,e,i):"")+""),a===this.scaleBarSteps_-1&&r.push(this.createStepText(a+1,t,!0,e,i)),s="#ffffff"===s?"#000000":"#ffffff";return'
'+(this.scaleBarText_?'
'+n+"
":"")+r.join("")+"
"},e.prototype.createMarker=function(t,e){return'
'},e.prototype.createStepText=function(t,e,i,n,r){var o=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return'
'+o+"
"},e.prototype.getScaleForResolution=function(){var t=this.getMap().getView().getResolution(),e=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*e*39.37*(25.4/.28)},e}(ut),Ei=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),bi=function(t){function e(e){var i=this,n=e||{};i=t.call(this,{element:document.createElement("div"),target:n.target})||this;var r=void 0!==n.className?n.className:"ol-zoom",o=void 0!==n.delta?n.delta:1,s=void 0!==n.zoomInLabel?n.zoomInLabel:"+",a=void 0!==n.zoomOutLabel?n.zoomOutLabel:"−",l=void 0!==n.zoomInTipLabel?n.zoomInTipLabel:"Zoom in",h=void 0!==n.zoomOutTipLabel?n.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=r+"-in",u.setAttribute("type","button"),u.title=l,u.appendChild("string"==typeof s?document.createTextNode(s):s),u.addEventListener(F,i.handleClick_.bind(i,o),!1);var c=document.createElement("button");c.className=r+"-out",c.setAttribute("type","button"),c.title=h,c.appendChild("string"==typeof a?document.createTextNode(a):a),c.addEventListener(F,i.handleClick_.bind(i,-o),!1);var p=r+" ol-unselectable ol-control",f=i.element;return f.className=p,f.appendChild(u),f.appendChild(c),i.duration_=void 0!==n.duration?n.duration:250,i}return Ei(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getZoom();if(void 0!==i){var n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:_t})):e.setZoom(n)}}},e}(ut),Ti="XY",Ri="XYZ",Ii="XYM",Oi="XYZM";function Pi(t,e,i,n,r,o){for(var s=o||[],a=0,l=e;l1)a=i;else{if(p>0){for(var f=0;fr&&(r=h),o=a,s=l}return r}function Bi(t,e,i,n,r){for(var o=0,s=i.length;o0;){for(var c=h.pop(),p=h.pop(),f=0,d=t[p],_=t[p+1],g=t[c],y=t[c+1],v=p+n;vf&&(u=v,f=m)}f>r&&(l[(u-e)/n]=1,p+n0&&_>f)&&(d<0&&g0&&g>d)?(a=c,l=p):(o[s++]=a,o[s++]=l,h=a,u=l,a=c,l=p)}}return o[s++]=a,o[s++]=l,s}function rn(t,e,i,n,r,o,s,a){for(var l=0,h=i.length;lo&&(h-a)*(o-l)-(r-a)*(u-l)>0&&s++:u<=o&&(h-a)*(o-l)-(r-a)*(u-l)<0&&s--,a=h,l=u}return 0!==s}function cn(t,e,i,n,r,o){if(0===i.length)return!1;if(!un(t,e,i[0],n,r,o))return!1;for(var s=1,a=i.length;sS&&cn(t,e,i,r,u=(c+p)/2,_)&&(x=u,S=C),c=p}return isNaN(x)&&(x=o[s]),a?(a.push(x,_,S),a):[x,_,S]}function fn(t,e,i,n,r){for(var o,s=[t[e],t[e+1]],a=[];e+n=r[0]&&o[2]<=r[2]||(o[1]>=r[1]&&o[3]<=r[3]||fn(t,e,i,n,(function(t,e){return function(t,e,i){var n=!1,r=re(t,e),o=re(t,i);if(r===Bt||o===Bt)n=!0;else{var s=t[0],a=t[1],l=t[2],h=t[3],u=e[0],c=e[1],p=i[0],f=i[1],d=(f-c)/(p-u),_=void 0,g=void 0;o&Vt&&!(r&Vt)&&(n=(_=p-(f-h)/d)>=s&&_<=l),n||!(o&Ut)||r&Ut||(n=(g=f-(p-l)*d)>=a&&g<=h),n||!(o&Ht)||r&Ht||(n=(_=p-(f-a)/d)>=s&&_<=l),n||!(o&qt)||r&qt||(n=(g=f-(p-s)*d)>=a&&g<=h)}return n}(r,t,e)})))))}function _n(t,e,i,n,r){if(!function(t,e,i,n,r){return!!dn(t,e,i,n,r)||(!!un(t,e,i,n,r[0],r[1])||(!!un(t,e,i,n,r[0],r[3])||(!!un(t,e,i,n,r[2],r[1])||!!un(t,e,i,n,r[2],r[3]))))}(t,e,i[0],n,r))return!1;if(1===i.length)return!0;for(var o=1,s=i.length;o0}function vn(t,e,i,n,r){for(var o=void 0!==r&&r,s=0,a=i.length;s>1)],e))<0?a=r+1:(l=r,h=!o);return h?a:~a}(f,y);if(v<0){var m=(y-f[-v-2])/(f[-v-1]-f[-v-2]),x=e+(-v-2)*r;a=Pt(t[x],t[x+r],m),l=Pt(t[x+1],t[x+r+1],m)}else a=t[e+v*r],l=t[e+v*r+1]}return s?(s[0]=a,s[1]=l,s):[a,l]}function Rn(t,e,i,n,r,o){if(i==e)return null;var s;if(r>1;r=1024){var i=0;for(var n in Wn)0==(3&i++)&&(delete Wn[n],--Xn)}e=function(t){var e,i,n,r,o;if(Gn.exec(t)&&(t=zn(t)),jn.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),r=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(r=(r<<4)+r)),o=[e,i,n,r/255]}else 0==t.indexOf("rgba(")?Nn(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Nn(o)):wt(!1,14);return o}(t),Wn[t]=e,++Xn}return e});function Yn(t){return Array.isArray(t)?t:Kn(t)}function Nn(t){return t[0]=Et(t[0]+.5|0,0,255),t[1]=Et(t[1]+.5|0,0,255),t[2]=Et(t[2]+.5|0,0,255),t[3]=Et(t[3],0,1),t}function Zn(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:t[3])+")"}var Bn="fraction",Vn="pixels",Un=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,i){var n=Hn(t,e,i);return n in this.cache_?this.cache_[n]:null},t.prototype.set=function(t,e,i,n){var r=Hn(t,e,i);this.cache_[r]=n,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function Hn(t,e,i){return e+":"+t+":"+(i?function(t){return"string"==typeof t?t:Zn(t)}(i):"null")}var qn=new Un,Jn=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Qn=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=n,o.resolution=i,o.state=r,o}return Jn(e,t),e.prototype.changed=function(){this.dispatchEvent(P)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return d()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){d()},e}(O),$n=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function tr(t,e,i){var n=t;if(n.src&&et){var r=n.decode(),o=!0;return r.then((function(){o&&e()})).catch((function(t){o&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():i())})),function(){o=!1}}var s=[w(n,j,e),w(n,M,i)];return function(){s.forEach(E)}}!function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,n,Fn)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=Fn,a.imageLoadFunction_=s,a}$n(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=kn,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=xe(this.extent)/this.image_.height),this.state=Dn,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=Fn&&this.state!=kn||(this.state=An,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=tr(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(Qn);var er=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ir=function(t){function e(e,i,n,r,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_=s?document.createElement("canvas"):null,a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=n,a.src_=i,a.tainted_,a}return er(e,t),e.prototype.isTainted_=function(t){if(void 0===this.tainted_&&this.imageState_===Dn){t||(t=nt(1,1)).drawImage(this.image_,0,0);try{t.getImageData(0,0,1,1),this.tainted_=!1}catch(t){this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(P)},e.prototype.handleImageError_=function(){this.imageState_=kn,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Dn,this.size_&&(this.image_.width=this.size_[0],this.image_.height=this.size_[1]),this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.replaceColor_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.canvas_?this.canvas_:this.image_},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionImage_)if(this.isTainted_()){var e=this.size_[0],i=this.size_[1],n=nt(e,i);n.fillRect(0,0,e,i),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==Fn){this.imageState_=An;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=tr(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(){if(this.color_){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var t=this.canvas_.getContext("2d");if(t.drawImage(this.image_,0,0),this.isTainted_(t)){var e=this.color_;return t.globalCompositeOperation="multiply",t.fillStyle="rgb("+e[0]+","+e[1]+","+e[2]+")",t.fillRect(0,0,this.image_.width,this.image_.height),t.globalCompositeOperation="destination-in",void t.drawImage(this.image_,0,0)}for(var i=t.getImageData(0,0,this.image_.width,this.image_.height),n=i.data,r=this.color_[0]/255,o=this.color_[1]/255,s=this.color_[2]/255,a=0,l=n.length;a0,6);var c=void 0!==n.src?Fn:Dn;return i.color_=void 0!==n.color?Yn(n.color):null,i.iconImage_=function(t,e,i,n,r,o){var s=qn.get(e,n,o);return s||(s=new ir(t,e,i,n,r,o),qn.set(e,n,o,s)),s}(l,u,h,i.crossOrigin_,c,i.color_),i.offset_=void 0!==n.offset?n.offset:[0,0],i.offsetOrigin_=void 0!==n.offsetOrigin?n.offsetOrigin:or,i.origin_=null,i.size_=void 0!==n.size?n.size:null,i}return lr(e,t),e.prototype.clone=function(){return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Bn||this.anchorYUnits_==Bn){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Bn&&(t[0]*=e[0]),this.anchorYUnits_==Bn&&(t[1]*=e[1])}if(this.anchorOrigin_!=or){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=sr&&this.anchorOrigin_!=rr||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=nr&&this.anchorOrigin_!=rr||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(t){return this.iconImage_.getHitDetectionImage(t)},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_,e=this.getDisplacement();if(this.offsetOrigin_!=or){var i=this.getSize(),n=this.iconImage_.getSize();if(!i||!n)return null;t=t.slice(),this.offsetOrigin_!=sr&&this.offsetOrigin_!=rr||(t[0]=n[0]-i[0]-t[0]),this.offsetOrigin_!=nr&&this.offsetOrigin_!=rr||(t[1]=n[1]-i[1]-t[1])}return t[0]+=e[0],t[1]+=e[1],this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(P,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(P,t)},e}(ar),ur="add",cr="remove",pr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),fr="length",dr=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.element=i,r.index=n,r}return pr(e,t),e}(R),_r=function(t){function e(e,i){var n=t.call(this)||this,r=i||{};if(n.unique_=!!r.unique,n.array_=e||[],n.unique_)for(var o=0,s=n.array_.length;o0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;ethis.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(E(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(z,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(E(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(E),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(O),Rr="layergroup",Ir="size",Or="target",Pr="view",Mr="prerender",Lr="postrender",Fr="precompose",Ar="postcompose",Dr="rendercomplete",kr=0,jr=1,Gr=2,zr=3,Wr=4,Xr=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,m(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},t.prototype.enqueue=function(t){wt(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=1/0&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,r=e[t],o=i[t],s=t;t>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),h=lt;){var s=this.getParentIndex_(e);if(!(n[s]>o))break;i[e]=i[s],n[e]=n[s],e=s}i[e]=r,n[e]=o},t.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,r=this.elements_,o=this.priorities_,s=0,a=r.length;for(e=0;e0;)n=(i=this.dequeue()[0]).getKey(),i.getState()!==kr||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++r,i.load())},e}(Xr);function Nr(t,e,i){return function(n,r,o,s){if(n){var a=e?0:o[0]*r,l=e?0:o[1]*r,h=t[0]+a/2,u=t[2]-a/2,c=t[1]+l/2,p=t[3]-l/2;h>u&&(u=h=(u+h)/2),c>p&&(p=c=(p+c)/2);var f=Et(n[0],h,u),d=Et(n[1],c,p),_=30*r;return s&&i&&(f+=-_*Math.log(1+Math.max(0,h-n[0])/_)+_*Math.log(1+Math.max(0,n[0]-u)/_),d+=-_*Math.log(1+Math.max(0,c-n[1])/_)+_*Math.log(1+Math.max(0,n[1]-p)/_)),[f,d]}}}function Zr(t){return t}function Br(t,e,i,n){var r=Ee(e)/i[0],o=xe(e)/i[1];return n?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function Vr(t,e,i){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),Et(n,i/2,2*e)}function Ur(t,e,i,n,r){return function(o,s,a,l){if(void 0!==o){var h=n?Br(t,n,a,r):t;return(void 0===i||i)&&l?Vr(o,h,e):Et(o,e,h)}}}function Hr(t){return void 0!==t?0:void 0}function qr(t){return void 0!==t?t:void 0}var Jr=0,Qr=1,$r="center",to="resolution",eo="rotation";function io(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function no(t,e){var i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,o=t[1]*i+t[0]*n;return t[0]=r,t[1]=o,t}function ro(t,e){var i=e.getExtent();if(e.canWrapX()&&(t[0]=i[2])){var n=Ee(i),r=Math.floor((t[0]-i[0])/n);t[0]-=r*n}return t}var oo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function so(t,e){setTimeout((function(){t(e)}),0)}function ao(t){return!(t.sourceCenter&&t.targetCenter&&!io(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}var lo=function(t){function e(e){var i=t.call(this)||this,n=v({},e);return i.hints_=[0,0],i.animations_=[],i.updateAnimationKey_,i.projection_=ti(n.projection,"EPSG:3857"),i.viewportSize_=[100,100],i.targetCenter_=null,i.targetResolution_,i.targetRotation_,i.cancelAnchor_=void 0,n.center&&(n.center=pi(n.center,i.projection_)),n.extent&&(n.extent=di(n.extent,i.projection_)),i.applyOptions_(n),i}return oo(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,i,n,o=void 0!==t.minZoom?t.minZoom:0,s=void 0!==t.maxZoom?t.maxZoom:28,a=void 0!==t.zoomFactor?t.zoomFactor:2,l=void 0!==t.multiWorld&&t.multiWorld,h=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,c=ti(t.projection,"EPSG:3857"),p=c.getExtent(),f=t.constrainOnlyCenter,d=t.extent;l||d||!c.isGlobal()||(f=!1,d=p);if(void 0!==t.resolutions){var _=t.resolutions;i=_[o],n=void 0!==_[s]?_[s]:_[_.length-1],e=t.constrainResolution?function(t,e,i,n){return function(o,s,a,l){if(void 0!==o){var h=t[0],u=t[t.length-1],c=i?Br(h,i,a,n):h;if(l)return void 0===e||e?Vr(o,c,u):Et(o,u,c);var p=Math.min(c,o),f=Math.floor(r(t,p,s));return t[f]>c&&f1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i),!this.isDef()){var n=arguments[i-1];return n.center&&this.setCenterInternal(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&so(e,!0))}for(var r=Date.now(),o=this.targetCenter_.slice(),s=this.targetResolution_,a=this.targetRotation_,l=[],h=0;h0},e.prototype.getInteracting=function(){return this.hints_[Qr]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(Jr,-this.hints_[Jr]);for(var e=0,i=this.animations_.length;e=0;--i){for(var n=this.animations_[i],r=!0,o=0,s=n.length;o0?l/a.duration:1;h>=1?(a.complete=!0,h=1):r=!1;var u=a.easing(h);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],f=c+u*(a.targetCenter[0]-c),d=p+u*(a.targetCenter[1]-p);this.targetCenter_=[f,d]}if(a.sourceResolution&&a.targetResolution){var _=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){var g=this.getViewportSize_(this.getRotation()),y=this.constraints_.resolution(_,0,g,!0);this.targetCenter_=this.calculateCenterZoom(y,a.anchor)}this.targetResolution_=_,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var v=1===u?Ot(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){var m=this.constraints_.rotation(v,!0);this.targetCenter_=this.calculateCenterRotate(m,a.anchor)}this.targetRotation_=v}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[i]=null,this.setHint(Jr,-1);var x=n[0].callback;x&&so(x,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var i,n,r,o=this.getCenterInternal();return void 0!==o&&(no(i=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),r=e,(n=i)[0]+=+r[0],n[1]+=+r[1]),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenterInternal(),r=this.getResolution();void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]);return i},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?ci(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get($r)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.options_.constrainResolution},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){return fi(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSize_(),i=this.getCenterInternal();wt(i,1);var n=this.getResolution();wt(void 0!==n,2);var r=this.getRotation();return wt(void 0!==r,3),me(i,n,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(to)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(di(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var i=e||this.getViewportSize_(),n=Ee(t)/i[0],r=xe(t)/i[1];return Math.max(n,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/Math.log(e);return function(t){return i/Math.pow(e,t*r)}},e.prototype.getRotation=function(){return this.get(eo)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/r}},e.prototype.getState=function(){var t=this.getCenterInternal(),e=this.getProjection(),i=this.getResolution(),n=this.getRotation();return{center:t.slice(0),projection:void 0!==e?e:null,resolution:i,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,i,n=this.minZoom_||0;if(this.resolutions_){var o=r(this.resolutions_,t,1);n=o,e=this.resolutions_[o],i=o==this.resolutions_.length-1?2:e/this.resolutions_[o+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Et(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,Et(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var i,n=v({size:this.getViewportSize_()},e||{});if(wt(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))wt(!Te(t),25),i=wn(r=di(t,this.getProjection()));else if(t.getType()===zt){var r;(i=wn(r=di(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),ye(r))}else{var o=ui();i=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(i,n)},e.prototype.fitInternal=function(t,e){var i=e||{},n=i.size;n||(n=this.getViewportSize_());var r,o=void 0!==i.padding?i.padding:[0,0,0,0],s=void 0!==i.nearest&&i.nearest;r=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;for(var a=t.getFlatCoordinates(),l=this.getRotation(),h=Math.cos(-l),c=Math.sin(-l),p=1/0,f=1/0,d=-1/0,_=-1/0,g=t.getStride(),y=0,v=a.length;y=0;n--){var r=i[n];if(r.getActive())if(!r.handleEvent(t))break}}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,n=i;if(t){var r=t.viewHints;if(r[Jr]||r[Qr]){var o=!et&&Date.now()-t.time>8;i=o?0:8,n=o?0:2}}e.getTilesLoading()0&&t[1]>0}(e)&&i&&i.isDef()){var o=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=i.getState();r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterItems:n?n.declutterItems:[],extent:me(s.center,s.resolution,s.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:s,viewHints:o,wantedTiles:{}}}if(this.frameState_=r,this.renderer_.renderFrame(r),r){if(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),n)(!this.previousExtent_||!Te(this.previousExtent_)&&!le(r.extent,this.previousExtent_))&&(this.dispatchEvent(new yr(p,this,n)),this.previousExtent_=ae(this.previousExtent_));this.previousExtent_&&!r.viewHints[Jr]&&!r.viewHints[Qr]&&!le(r.extent,this.previousExtent_)&&(this.dispatchEvent(new yr(f,this,r)),$t(r.extent,this.previousExtent_))}this.dispatchEvent(new yr(c,this,r)),this.postRenderTimeoutHandle_=setTimeout(this.handlePostRender.bind(this),0)},e.prototype.setLayerGroup=function(t){this.set(Rr,t)},e.prototype.setSize=function(t){this.set(Ir,t)},e.prototype.setTarget=function(t){this.set(Or,t)},e.prototype.setView=function(t){this.set(Pr,t)},e.prototype.updateSize=function(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0);this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}},e}(U),Oo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Po(t,e){if(!t.visible)return!1;var i=e.resolution;if(i=t.maxResolution)return!1;var n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var Mo=function(t){function e(e){var i=this,n=v({},e);delete n.source,(i=t.call(this,n)||this).mapPrecomposeKey_=null,i.mapRenderKey_=null,i.sourceChangeKey_=null,i.renderer_=null,e.render&&(i.render=e.render),e.map&&i.setMap(e.map),i.addEventListener(V(vo),i.handleSourcePropertyChange_);var r=e.source?e.source:null;return i.setSource(r),i}return Oo(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(vo)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():So},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(E(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=C(t,P,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_.getFeatures(t)},e.prototype.render=function(t,e){var i=this.getRenderer();if(i.prepareFrame(t))return i.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(E(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(E(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=C(t,Fr,(function(t){var e=t.frameState.layerStatesArray,i=this.getLayerState(!1);wt(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=C(this,P,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(vo,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.setSource(null),t.prototype.disposeInternal.call(this)},e}(xo),Lo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Fo(t){this.updateElement_(t.frameState)}var Ao=function(t){function e(e){var i=this,n=e||{};(i=t.call(this,{element:document.createElement("div"),render:n.render||Fo,target:n.target})||this).ulElement_=document.createElement("ul"),i.collapsed_=void 0===n.collapsed||n.collapsed,i.overrideCollapsible_=void 0!==n.collapsible,i.collapsible_=void 0===n.collapsible||n.collapsible,i.collapsible_||(i.collapsed_=!1);var r=void 0!==n.className?n.className:"ol-attribution",o=void 0!==n.tipLabel?n.tipLabel:"Attributions",s=void 0!==n.collapseLabel?n.collapseLabel:"»";"string"==typeof s?(i.collapseLabel_=document.createElement("span"),i.collapseLabel_.textContent=s):i.collapseLabel_=s;var a=void 0!==n.label?n.label:"i";"string"==typeof a?(i.label_=document.createElement("span"),i.label_.textContent=a):i.label_=a;var l=i.collapsible_&&!i.collapsed_?i.collapseLabel_:i.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=o,h.appendChild(l),h.addEventListener(F,i.handleClick_.bind(i),!1);var u=r+" ol-unselectable ol-control"+(i.collapsed_&&i.collapsible_?" ol-collapsed":"")+(i.collapsible_?"":" ol-uncollapsible"),c=i.element;return c.className=u,c.appendChild(i.ulElement_),c.appendChild(h),i.renderedAttributions_=[],i.renderedVisible_=!0,i}return Lo(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=t.layerStatesArray,r=0,o=n.length;r0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!a(e,this.renderedAttributions_)){lt(this.ulElement_);for(var n=0,r=e.length;n0&&this.points_[i+2]>t;)i-=3;var n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;var r=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/n,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),ko="active",jo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Go(t,e,i,n){var r=t.getZoom();if(void 0!==r){var o=t.getConstrainedZoom(r+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:i,duration:void 0!==n?n:250,easing:_t})}}var zo=function(t){function e(e){var i=t.call(this)||this;return e.handleEvent&&(i.handleEvent=e.handleEvent),i.map_=null,i.setActive(!0),i}return jo(e,t),e.prototype.getActive=function(){return this.get(ko)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(ko,t)},e.prototype.setMap=function(t){this.map_=t},e}(U),Wo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Xo(t){var e=!1;if(t.type==xr.DBLCLICK){var i=t.originalEvent,n=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_;Go(n.getView(),o,r,this.duration_),t.preventDefault(),e=!0}return!e}var Ko=function(t){function e(e){var i=t.call(this,{handleEvent:Xo})||this,n=e||{};return i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:250,i}return Wo(e,t),e}(zo),Yo=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},No=function(t){return t.target.getTargetElement()===document.activeElement},Zo=l,Bo=function(t){var e=t.originalEvent;return 0==e.button&&!(J&&Q&&e.ctrlKey)},Vo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Uo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Ho=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},qo=function(t){var e=t.pointerEvent;return wt(void 0!==e,56),"mouse"==e.pointerType},Jo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Qo(t){for(var e=t.length,i=0,n=0,r=0;r0}}else if(t.type==xr.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==xr.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===xr.POINTERDOWN||e===xr.POINTERDRAG||e===xr.POINTERUP}(t)){var e=t.pointerEvent,i=e.pointerId.toString();t.type==xr.POINTERUP?delete this.trackedPointers_[i]:t.type==xr.POINTERDOWN?this.trackedPointers_[i]=e:i in this.trackedPointers_&&(this.trackedPointers_[i]=e),this.targetPointers=x(this.trackedPointers_)}},e}(zo),ts=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function es(t){return Vo(t)&&function(t){var e=t.pointerEvent;return wt(void 0!==e,56),e.isPrimary&&0===e.button}(t)}var is=function(t){function e(e){var i=t.call(this,{stopDown:h})||this,n=e||{};return i.kinetic_=n.kinetic,i.lastCentroid=null,i.lastPointersCount_,i.panning_=!1,i.condition_=n.condition?n.condition:es,i.noKinetic_=!1,i}return ts(e,t),e.prototype.conditionInternal_=function(t){var e=!0;return t.map.getTargetElement().hasAttribute("tabindex")&&(e=No(t)),e&&this.condition_(t)},e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e,i,n=this.targetPointers,r=Qo(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var o=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],s=t.map.getView();e=o,i=s.getResolution(),e[0]*=i,e[1]*=i,no(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),o=i.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-n*Math.cos(r),s[1]-n*Math.sin(r)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:_t})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.conditionInternal_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}($o),ns=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),rs=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,{stopDown:h})||this).condition_=n.condition?n.condition:Yo,i.lastAngle_=void 0,i.duration_=void 0!==n.duration?n.duration:250,i}return ns(e,t),e.prototype.handleDragEvent=function(t){if(qo(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==Hr){var n=e.getSize(),r=t.pixel,o=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;i.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!qo(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!qo(t)&&(!(!Bo(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}($o),os=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ss=function(t){function e(e){var i=t.call(this)||this;return i.geometry_=null,i.element_=document.createElement("div"),i.element_.style.position="absolute",i.element_.className="ol-box "+e,i.map_=null,i.startPixel_=null,i.endPixel_=null,i}return os(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i=this.element_.style;i.left=Math.min(t[0],e[0])+"px",i.top=Math.min(t[1],e[1])+"px",i.width=Math.abs(e[0]-t[0])+"px",i.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Cn([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(b),as=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ls="boxstart",hs="boxdrag",us="boxend",cs=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r.coordinate=i,r.mapBrowserEvent=n,r}return as(e,t),e}(R),ps=function(t){function e(e){var i=t.call(this)||this,n=e||{};return i.box_=new ss(n.className||"ol-dragbox"),i.minArea_=void 0!==n.minArea?n.minArea:64,i.onBoxEnd_=n.onBoxEnd?n.onBoxEnd:u,i.startPixel_=null,i.condition_=n.condition?n.condition:Bo,i.boxEndCondition_=n.boxEndCondition?n.boxEndCondition:i.defaultBoxEndCondition,i}return as(e,t),e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new cs(hs,t.coordinate,t))},e.prototype.handleUpEvent=function(t){return this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd_(t),this.dispatchEvent(new cs(us,t.coordinate,t))),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new cs(ls,t.coordinate,t)),!0)},e}($o),fs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ds(){var t,e,i=this.getMap(),n=i.getView(),r=i.getSize(),o=this.getGeometry().getExtent();if(this.out_){var s=n.calculateExtentInternal(r),a=(t=[i.getPixelFromCoordinateInternal(_e(o)),i.getPixelFromCoordinateInternal(we(o))],ce(ae(e),t));!function(t,e){var i=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=i,t[2]+=i,t[1]-=n,t[3]+=n}(s,1/n.getResolutionForExtentInternal(a,r)),o=s}var l=n.getConstrainedResolution(n.getResolutionForExtentInternal(o,r)),h=n.getConstrainedCenter(ye(o),l);n.animateInternal({resolution:l,center:h,duration:this.duration_,easing:_t})}var _s=function(t){function e(e){var i=this,n=e||{},r=n.condition?n.condition:Uo;return(i=t.call(this,{condition:r,className:n.className||"ol-dragzoom",minArea:n.minArea,onBoxEnd:ds})||this).duration_=void 0!==n.duration?n.duration:200,i.out_=void 0!==n.out&&n.out,i}return fs(e,t),e}(ps),gs=37,ys=38,vs=39,ms=40,xs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Ss(t){var e=!1;if(t.type==D){var i=t.originalEvent.keyCode;if(this.condition_(t)&&(i==ms||i==gs||i==vs||i==ys)){var n=t.map.getView(),r=n.getResolution()*this.pixelDelta_,o=0,s=0;i==ms?s=-r:i==gs?o=-r:i==vs?o=r:s=r;var a=[o,s];no(a,n.getRotation()),function(t,e,i){var n=t.getCenterInternal();if(n){var r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:yt,center:t.getConstrainedCenter(r)})}}(n,a,this.duration_),t.preventDefault(),e=!0}}return!e}var Cs=function(t){function e(e){var i=t.call(this,{handleEvent:Ss})||this,n=e||{};return i.defaultCondition_=function(t){return Vo(t)&&Ho(t)},i.condition_=void 0!==n.condition?n.condition:i.defaultCondition_,i.duration_=void 0!==n.duration?n.duration:100,i.pixelDelta_=void 0!==n.pixelDelta?n.pixelDelta:128,i}return xs(e,t),e}(zo),ws=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function Es(t){var e=!1;if(t.type==D||t.type==k){var i=t.originalEvent.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var n=t.map,r=i=="+".charCodeAt(0)?this.delta_:-this.delta_;Go(n.getView(),r,void 0,this.duration_),t.preventDefault(),e=!0}}return!e}var bs=function(t){function e(e){var i=t.call(this,{handleEvent:Es})||this,n=e||{};return i.condition_=n.condition?n.condition:Ho,i.delta_=n.delta?n.delta:1,i.duration_=void 0!==n.duration?n.duration:100,i}return ws(e,t),e}(zo),Ts=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Rs="trackpad",Is="wheel",Os=function(t){function e(e){var i=this,n=e||{};return(i=t.call(this,n)||this).totalDelta_=0,i.lastDelta_=0,i.maxDelta_=void 0!==n.maxDelta?n.maxDelta:1,i.duration_=void 0!==n.duration?n.duration:250,i.timeout_=void 0!==n.timeout?n.timeout:80,i.useAnchor_=void 0===n.useAnchor||n.useAnchor,i.condition_=n.condition?n.condition:Zo,i.lastAnchor_=null,i.startTime_=void 0,i.timeoutId_,i.mode_=void 0,i.trackpadEventGap_=400,i.trackpadTimeoutId_,i.deltaPerZoom_=300,i}return Ts(e,t),e.prototype.conditionInternal_=function(t){var e=!0;return t.map.getTargetElement().hasAttribute("tabindex")&&(e=No(t)),e&&this.condition_(t)},e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.conditionInternal_(t))return!0;if(t.type!==W)return!0;t.preventDefault();var e,i=t.map,n=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==W&&(e=n.deltaY,q&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=$),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?Rs:Is);var o=i.getView();if(this.mode_===Rs&&!o.getConstrainResolution())return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=-Et(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;e.getConstrainResolution()&&(i=i?i>0?1:-1:0),Go(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(zo),Ps=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ms=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=h),(i=t.call(this,r)||this).anchor_=null,i.lastAngle_=void 0,i.rotating_=!1,i.rotationDelta_=0,i.threshold_=void 0!==n.threshold?n.threshold:.3,i.duration_=void 0!==n.duration?n.duration:250,i}return Ps(e,t),e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Hr){var l=s.getViewport().getBoundingClientRect(),h=Qo(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}($o),Ls=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Fs=function(t){function e(e){var i=this,n=e||{},r=n;return r.stopDown||(r.stopDown=h),(i=t.call(this,r)||this).anchor_=null,i.duration_=void 0!==n.duration?n.duration:400,i.lastDistance_=void 0,i.lastScaleDelta_=1,i}return Ls(e,t),e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,o=i.clientY-n.clientY,s=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var h=a.getViewport().getBoundingClientRect(),u=Qo(this.targetPointers);u[0]-=h.left,u[1]-=h.top,this.anchor_=a.getCoordinateFromPixelInternal(u),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}($o);var As=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ds=function(t){function e(e,i,n,r){var o=t.call(this,e)||this;return o.inversePixelTransform=i,o.frameState=n,o.context=r,o}return As(e,t),e}(R);function ks(t){return Array.isArray(t)?Zn(t):t}var js=function(){function t(){}return t.prototype.drawCustom=function(t,e,i){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}(),Gs=[],zs=[0,0,0,0],Ws=new U;(new O).setSize=function(){console.warn("labelCache is deprecated.")};var Xs,Ks,Ys,Ns=null,Zs={},Bs=function(){var t,e,i=["monospace","serif"],n=i.length,r="wmytzilWMYTZIL@#/&?$%10";function o(t,o,s){for(var a=!0,l=0;l=0;--x){var S=g[x],C=S.layer;if(C.hasRenderer()&&Po(S,h)&&s.call(a,C)){var w=C.getRenderer(),E=C.getSource();if(w&&E){var b=E.getWrapX()?p:t,T=u.bind(null,S.managed);v[0]=b[0]+f[m][0],v[1]=b[1]+f[m][1],l=w.forEachFeatureAtCoordinate(v,e,i,T,_)}if(l)return l}}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){return d()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,l,this,r,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){this.declutterTree_=function(t,e){e&&e.clear();for(var i=t.declutterItems,n=i.length-1;n>=0;--n)for(var r=i[n],o=r.items,s=0,a=o.length;s=0;--a){var l=s[a],h=l.layer;if(h.hasRenderer()&&Po(l,o)&&r(h)){var u=h.getRenderer().getDataAtPixel(t,e,i);if(u){var c=n(h,u);if(c)return c}}}},e}(_a),va=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ma=function(t){function e(e){return(e=v({},e)).controls||(e.controls=function(t){var e=t||{},i=new _r;return(void 0===e.zoom||e.zoom)&&i.push(new bi(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new xt(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new Ao(e.attributionOptions)),i}()),e.interactions||(e.interactions=function(t){var e=t||{},i=new _r,n=new Do(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new rs),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new Ko({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new is({condition:e.onFocusOnly?No:void 0,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new Ms),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new Fs({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new Cs),i.push(new bs({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new Os({condition:e.onFocusOnly?No:void 0,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new _s({duration:e.zoomDuration})),i}()),t.call(this,e)||this}return va(e,t),e.prototype.createRenderer=function(){return new ya(this)},e}(Io),xa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Sa=function(t){function e(e,i,n){var r=t.call(this)||this,o=n||{};return r.tileCoord=e,r.state=i,r.interimTile=null,r.hifi=!0,r.key="",r.transition_=void 0===o.transition?250:o.transition,r.transitionStarts_={},r}return xa(e,t),e.prototype.changed=function(){this.dispatchEvent(P)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==Gr)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==Gr){t.interimTile=null;break}t.getState()==jr?e=t:t.getState()==kr?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==zr&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){d()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var n=e-i+1e3/60;return n>=this.transition_?1:dt(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(O),Ca=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();var wa=function(t){function e(e,i,n,r,o,s){var a=t.call(this,e,i,s)||this;return a.crossOrigin_=r,a.src_=n,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=o,a}return Ca(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.getKey=function(){return this.src_},e.prototype.handleImageError_=function(){var t;this.state=zr,this.unlistenImage_(),this.image_=((t=nt(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=Gr:this.state=Wr,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==zr&&(this.state=kr,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==kr&&(this.state=jr,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=tr(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Sa),Ea=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var e=this.oldest_;e;)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var i=this.entries_[t];return wt(void 0!==i,15),i===this.newest_?i.value_:(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i,i.value_)},t.prototype.remove=function(t){var e=this.entries_[t];return wt(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){wt(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function ba(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function Ta(t,e,i){return t+"/"+e+"/"+i}function Ra(t){return Ta(t[0],t[1],t[2])}var Ia=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Oa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ia(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=function(t){return t.split("/").map(Number)}(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(Ra(e.tileCoord)),e.release())}.bind(this))}},e}(Ea);function Pa(t,e,i,n){var r=i-t,o=n-e,s=Math.sqrt(r*r+o*o);return[Math.round(i+r/s),Math.round(n+o/s)]}function Ma(t,e,i,n,r,o,s,a,l,h,u){var c=nt(Math.round(i*t),Math.round(i*e));if(0===l.length)return c.canvas;c.scale(i,i);var p=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,i){he(p,t.extent)}));var f=Ee(p),d=xe(p),_=nt(Math.round(i*f/n),Math.round(i*d/n)),g=i/n;l.forEach((function(t,e,i){var n=t.extent[0]-p[0],r=-(t.extent[3]-p[3]),o=Ee(t.extent),s=xe(t.extent);_.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,n*g,r*g,o*g,s*g)}));var y=Ce(s);return a.getTriangles().forEach((function(t,e,r){var s=t.source,a=t.target,l=s[0][0],h=s[0][1],u=s[1][0],f=s[1][1],d=s[2][0],g=s[2][1],v=(a[0][0]-y[0])/o,m=-(a[0][1]-y[1])/o,x=(a[1][0]-y[0])/o,S=-(a[1][1]-y[1])/o,C=(a[2][0]-y[0])/o,w=-(a[2][1]-y[1])/o,E=l,b=h;l=0,h=0;var T=function(t){for(var e=t.length,i=0;ir&&(r=s,n=o)}if(0===r)return null;var a=t[n];t[n]=t[i],t[i]=a;for(var l=i+1;l=0;p--){c[p]=t[p][e]/t[p][p];for(var f=p-1;f>=0;f--)t[f][e]-=t[f][p]*c[p]}return c}([[u-=E,f-=b,0,0,x-v],[d-=E,g-=b,0,0,C-v],[0,0,u,f,S-m],[0,0,d,g,w-m]]);if(T){c.save(),c.beginPath();var R=(v+x+C)/3,I=(m+S+w)/3,O=Pa(R,I,v,m),P=Pa(R,I,x,S),M=Pa(R,I,C,w);c.moveTo(P[0],P[1]),c.lineTo(O[0],O[1]),c.lineTo(M[0],M[1]),c.clip(),c.transform(T[0],T[2],T[1],T[3],v,m),c.translate(p[0]-E,p[3]-b),c.scale(n/i,-n/i),c.drawImage(_.canvas,0,0),c.restore()}})),u&&(c.save(),c.strokeStyle="black",c.lineWidth=1,a.getTriangles().forEach((function(t,e,i){var n=t.target,r=(n[0][0]-y[0])/o,s=-(n[0][1]-y[1])/o,a=(n[1][0]-y[0])/o,l=-(n[1][1]-y[1])/o,h=(n[2][0]-y[0])/o,u=-(n[2][1]-y[1])/o;c.beginPath(),c.moveTo(a,l),c.lineTo(r,s),c.lineTo(h,u),c.closePath(),c.stroke()})),c.restore()),c.canvas}var La=function(){function t(t,e,i,n,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=ni(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&Ee(n)==Ee(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Ee(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Ee(this.targetProj_.getExtent()):null;var l=Ce(i),h=we(i),u=ge(i),c=_e(i),p=this.transformInv_(l),f=this.transformInv_(h),d=this.transformInv_(u),_=this.transformInv_(c),g=10+(o?Math.max(0,Math.ceil(Math.log2(de(i)/(o*o*256*256)))):0);if(this.addQuad_(l,h,u,c,p,f,d,_,g),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach((function(t,e,i){y=Math.min(y,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-y>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-y>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-y>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-y>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i.5&&u<1,f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)f=Ee(Jt([t,e,i,n]))/this.targetWorldWidth_>.25||f;!p&&this.sourceProj_.isGlobal()&&u&&(f=u>.25||f)}if(f||!this.maxSourceExtent_||be(h,this.maxSourceExtent_)){if(!(f||isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1]))){if(!(l>0))return;f=!0}if(l>0){if(!f){var d=[(t[0]+i[0])/2,(t[1]+i[1])/2],_=this.transformInv_(d),g=void 0;if(p)g=(Ot(r[0],c)+Ot(s[0],c))/2-Ot(_[0],c);else g=(r[0]+s[0])/2-_[0];var y=(r[1]+s[1])/2-_[1];f=g*g+y*y>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var v=[(e[0]+i[0])/2,(e[1]+i[1])/2],m=this.transformInv_(v),x=[(n[0]+t[0])/2,(n[1]+t[1])/2],S=this.transformInv_(x);this.addQuad_(t,e,v,x,r,o,m,S,l-1),this.addQuad_(x,v,i,n,S,m,s,a,l-1)}else{var C=[(t[0]+e[0])/2,(t[1]+e[1])/2],w=this.transformInv_(C),E=[(i[0]+n[0])/2,(i[1]+n[1])/2],b=this.transformInv_(E);this.addQuad_(t,C,E,n,r,w,b,a,l-1),this.addQuad_(C,e,i,E,w,o,s,b,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}this.addTriangle_(t,i,n,r,s,a),this.addTriangle_(t,e,i,r,o,s)}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){var r=e.source;ue(t,r[0]),ue(t,r[1]),ue(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),Fa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Aa=function(t){function e(e,i,n,r,o,s,a,l,h,u,c){var p=t.call(this,o,kr)||this;p.renderEdges_=void 0!==c&&c,p.pixelRatio_=a,p.gutter_=l,p.canvas_=null,p.sourceTileGrid_=i,p.targetTileGrid_=r,p.wrappedTileCoord_=s||o,p.sourceTiles_=[],p.sourcesListenerKeys_=null,p.sourceZ_=0;var f=r.getTileCoordExtent(p.wrappedTileCoord_),d=p.targetTileGrid_.getExtent(),_=p.sourceTileGrid_.getExtent(),g=d?Se(f,d):f;if(0===de(g))return p.state=Wr,p;var y=e.getExtent();y&&(_=_?Se(_,y):y);var v=r.getResolution(p.wrappedTileCoord_[0]),m=function(t,e,i,n){var r=ri(i,e,t),o=Qe(e,n,i),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||ee(l,r)){var h=Qe(t,o,r)/o;isFinite(h)&&h>0&&(o/=h)}return o}(e,n,ye(g),v);if(!isFinite(m)||m<=0)return p.state=Wr,p;var x=void 0!==u?u:.5;if(p.triangulation_=new La(e,n,g,_,m*x,v),0===p.triangulation_.getTriangles().length)return p.state=Wr,p;p.sourceZ_=i.getZForResolution(m);var S=p.triangulation_.calculateSourceExtent();if(_&&(e.canWrapX()?(S[1]=Et(S[1],_[1],_[3]),S[3]=Et(S[3],_[1],_[3])):S=Se(S,_)),de(S)){for(var C=i.getTileRangeForExtentAndZ(S,p.sourceZ_),w=C.minX;w<=C.maxX;w++)for(var E=C.minY;E<=C.maxY;E++){var b=h(p.sourceZ_,w,E,a);b&&p.sourceTiles_.push(b)}0===p.sourceTiles_.length&&(p.state=Wr)}else p.state=Wr;return p}return Fa(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==Gr&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=zr;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Ma(n,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_),this.state=Gr}this.changed()},e.prototype.load=function(){if(this.state==kr){this.state=jr,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){var r=e.getState();if(r==kr||r==jr){t++;var o=C(e,P,(function(i){var n=e.getState();n!=Gr&&n!=zr&&n!=Wr||(E(o),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),this.sourceTiles_.forEach((function(t,e,i){t.getState()==kr&&t.load()})),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(E),this.sourcesListenerKeys_=null},e}(Sa);function Da(t,e){var i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(i,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){var t=s[0],i=e.getFullTileRange(t);return wt(i,55),(i.getHeight()-s[2]-1).toString()})):void 0}}function ka(t,e){for(var i=t.length,n=new Array(i),r=0;rthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Ka(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new Xa(t,e,i,n)}var Ya=Xa,Na=[0,0,0],Za=function(){function t(t){var e,i,r,o;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,wt((e=this.resolutions_,i=!0,r=function(t,e){return e-t}||n,e.every((function(t,n){if(0===n)return!0;var o=r(e[n-1],t);return!(o>0||i&&0===o)}))),17),!t.origins)for(var s=0,a=this.resolutions_.length-1;s=this.minZoom;){if(e(a,2===this.zoomFactor_?Ka(r=Math.floor(r/2),r,o=Math.floor(o/2),o,i):this.getTileRangeForExtentAndZ(s,a,i)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]0?n:Math.max(s/a[0],o/a[1]),h=r+1,u=new Array(h),c=0;ci||i>e.getMaxZoom())return!1;var o,s=e.getExtent();return!(o=s?e.getTileRangeForExtentAndZ(s,i):e.getFullTileRange(i))||o.containsXY(n,r)}(t,n)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.useTile=function(t,e,i,n){},e}(Wa),Ja=function(t){function e(e,i){var n=t.call(this,e)||this;return n.tile=i,n}return Ha(e,t),e}(R),Qa=qa,$a="tileloadstart",tl="tileloadend",el="tileloaderror",il=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),nl=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return i.generateTileUrlFunction_=!e.tileUrlFunction,i.tileLoadFunction=e.tileLoadFunction,i.tileUrlFunction=e.tileUrlFunction?e.tileUrlFunction.bind(i):ja,i.urls=null,e.urls?i.setUrls(e.urls):e.url&&i.setUrl(e.url),i.tileLoadingKeys_={},i}return il(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,i=t.target,n=g(i),r=i.getState();r==jr?(this.tileLoadingKeys_[n]=!0,e=$a):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=r==zr?el:r==Gr?tl:void 0),null!=e&&this.dispatchEvent(new Ja(e,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n=i[1].charCodeAt(0),r=i[2].charCodeAt(0),o=void 0;for(o=n;o<=r;++o)e.push(t.replace(i[0],String.fromCharCode(o)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(i[2],10),a=parseInt(i[1],10);a<=s;a++)e.push(t.replace(i[0],a.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(ka(t,this.tileGrid),e):this.setKey(e)},e.prototype.useTile=function(t,e,i){var n=Ta(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(Qa),rl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();function ol(t,e){t.getImage().src=e}var sl=function(t){function e(e){var i=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:ol,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return i.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,i.tileClass=void 0!==e.tileClass?e.tileClass:wa,i.tileCacheForProjection={},i.tileGridForProjection={},i.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,i.renderReprojectionEdges_=!1,i}return rl(e,t),e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var r=this.tileCacheForProjection[n];r.expireCache(r==i?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!ei(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!ei(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!ei(e,t)){var i=g(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Ba(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||ei(e,t))return this.tileCache;var i=g(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Oa(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,i,n,r,o){var s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,r),l=a?this.tileUrlFunction(a,n,r):void 0,h=new this.tileClass(s,void 0!==l?kr:Wr,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=o,h.addEventListener(P,this.handleTileChange.bind(this)),h},e.prototype.getTile=function(t,e,i,n,r){var o=this.getProjection();if(o&&r&&!ei(o,r)){var s=this.getTileCacheForProjection(r),a=[t,e,i],l=void 0,h=Ra(a);s.containsKey(h)&&(l=s.get(h));var u=this.getKey();if(l&&l.key==u)return l;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(r),f=this.getTileCoordForTileUrlFunction(a,r),d=new Aa(o,c,r,p,a,f,this.getTilePixelRatio(n),this.getGutter(),function(t,e,i,n){return this.getTileInternal(t,e,i,n,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);return d.key=u,l?(d.interimTile=l,d.refreshInterimChain(),s.replace(h,d)):s.set(h,d),d}return this.getTileInternal(t,e,i,n,o||r)},e.prototype.getTileInternal=function(t,e,i,n,r){var o=null,s=Ta(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,i,n,r,a),l.getState()==kr?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,i,n,r,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var i=Je(t);if(i){var n=g(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(nl),al=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ll=function(t){function e(e){var i=e||{},n=void 0!==i.projection?i.projection:"EPSG:3857",r=void 0!==i.tileGrid?i.tileGrid:function(t){var e=t||{},i=e.extent||Je("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Va(i,e.maxZoom,e.tileSize,e.maxResolution)};return new Za(n)}({extent:Ua(n),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,opaque:i.opaque,projection:n,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:r,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return al(e,t),e}(sl),hl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ul=function(t){function e(e){var i,n=e||{};i=void 0!==n.attributions?n.attributions:['© OpenStreetMap contributors.'];var r=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",o=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:i,cacheSize:n.cacheSize,crossOrigin:r,opaque:void 0===n.opaque||n.opaque,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,url:o,wrapX:n.wrapX,attributionsCollapsible:!1})||this}return hl(e,t),e}(ll),cl="bottom-left",pl="bottom-center",fl="bottom-right",dl="center-left",_l="center-center",gl="center-right",yl="top-left",vl="top-center",ml="top-right";function xl(t){return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Sl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Cl="element",wl="map",El="offset",bl="position",Tl="positioning",Rl=function(t){function e(e){var i=t.call(this)||this;i.options=e,i.id=e.id,i.insertFirst=void 0===e.insertFirst||e.insertFirst,i.stopEvent=void 0===e.stopEvent||e.stopEvent,i.element=document.createElement("div"),i.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",i.element.style.position="absolute";var n=e.autoPan;return n&&"object"!==xl(n)&&(n={animation:e.autoPanAnimation,margin:e.autoPanMargin}),i.autoPan=n||!1,i.rendered={transform_:"",visible:!0},i.mapPostrenderListenerKey=null,i.addEventListener(V(Cl),i.handleElementChanged),i.addEventListener(V(wl),i.handleMapChanged),i.addEventListener(V(El),i.handleOffsetChanged),i.addEventListener(V(bl),i.handlePositionChanged),i.addEventListener(V(Tl),i.handlePositioningChanged),void 0!==e.element&&i.setElement(e.element),i.setOffset(void 0!==e.offset?e.offset:[0,0]),i.setPositioning(void 0!==e.positioning?e.positioning:yl),void 0!==e.position&&i.setPosition(e.position),i}return Sl(e,t),e.prototype.getElement=function(){return this.get(Cl)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(wl)},e.prototype.getOffset=function(){return this.get(El)},e.prototype.getPosition=function(){return this.get(bl)},e.prototype.getPositioning=function(){return this.get(Tl)},e.prototype.handleElementChanged=function(){lt(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(at(this.element),E(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=C(t,c,this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(Cl,t)},e.prototype.setMap=function(t){this.set(wl,t)},e.prototype.setOffset=function(t){this.set(El,t)},e.prototype.setPosition=function(t){this.set(bl,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var e=this.getMap();if(e&&e.getTargetElement()&&this.get(bl)){var i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),r=this.getRect(n,[rt(n),ot(n)]),o=void 0===t.margin?20:t.margin;if(!ie(i,r)){var s=r[0]-i[0],a=i[2]-r[2],l=r[1]-i[1],h=i[3]-r[3],u=[0,0];if(s<0?u[0]=s-o:a<0&&(u[0]=Math.abs(a)+o),l<0?u[1]=l-o:h<0&&(u[1]=Math.abs(h)+o),0!==u[0]||0!==u[1]){var c=e.getView().getCenterInternal(),p=e.getPixelFromCoordinateInternal(c),f=[p[0]+u[0],p[1]+u[1]],d=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(f),duration:d.duration,easing:d.easing})}}}},e.prototype.getRect=function(t,e){var i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]},e.prototype.setPositioning=function(t){this.set(Tl,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var i=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+n[0])+"px",s=Math.round(t[1]+n[1])+"px",a="0%",l="0%";r==fl||r==gl||r==ml?a="-100%":r!=pl&&r!=_l&&r!=vl||(a="-50%"),r==cl||r==pl||r==fl?l="-100%":r!=dl&&r!=_l&&r!=gl||(l="-50%");var h="translate("+a+", "+l+") translate("+o+", "+s+")";this.rendered.transform_!=h&&(this.rendered.transform_=h,i.transform=h,i.msTransform=h)},e.prototype.getOptions=function(){return this.options},e}(U),Il=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.color_},t.prototype.getLineCap=function(){return this.lineCap_},t.prototype.getLineDash=function(){return this.lineDash_},t.prototype.getLineDashOffset=function(){return this.lineDashOffset_},t.prototype.getLineJoin=function(){return this.lineJoin_},t.prototype.getMiterLimit=function(){return this.miterLimit_},t.prototype.getWidth=function(){return this.width_},t.prototype.setColor=function(t){this.color_=t},t.prototype.setLineCap=function(t){this.lineCap_=t},t.prototype.setLineDash=function(t){this.lineDash_=t},t.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t},t.prototype.setLineJoin=function(t){this.lineJoin_=t},t.prototype.setMiterLimit=function(t){this.miterLimit_=t},t.prototype.setWidth=function(t){this.width_=t},t}(),Ol=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Pl=function(t){function e(e){var i=this,n=void 0!==e.rotateWithView&&e.rotateWithView;return(i=t.call(this,{opacity:1,rotateWithView:n,rotation:void 0!==e.rotation?e.rotation:0,scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_=null,i.hitDetectionCanvas_=null,i.fill_=void 0!==e.fill?e.fill:null,i.origin_=[0,0],i.points_=e.points,i.radius_=void 0!==e.radius?e.radius:e.radius1,i.radius2_=e.radius2,i.angle_=void 0!==e.angle?e.angle:0,i.stroke_=void 0!==e.stroke?e.stroke:null,i.anchor_=null,i.size_=null,i.imageSize_=null,i.hitDetectionImageSize_=null,i.render(),i}return Ol(e,t),e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(t){return this.hitDetectionCanvas_},e.prototype.getImage=function(t){return this.canvas_},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return Dn},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.render=function(){var t,e="round",i="round",n=0,r=null,o=0,s=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t="#000"),t=ks(t),void 0===(s=this.stroke_.getWidth())&&(s=1),r=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),void 0===(i=this.stroke_.getLineJoin())&&(i="round"),void 0===(e=this.stroke_.getLineCap())&&(e="round"),void 0===(n=this.stroke_.getMiterLimit())&&(n=10));var a=2*(this.radius_+s)+1,l={strokeStyle:t,strokeWidth:s,size:a,lineCap:e,lineDash:r,lineDashOffset:o,lineJoin:i,miterLimit:n},h=nt(a,a);this.canvas_=h.canvas;var u=a=this.canvas_.width,c=this.getDisplacement();this.draw_(l,h,0,0),this.createHitDetectionCanvas_(l),this.anchor_=[a/2-c[0],a/2+c[1]],this.size_=[a,a],this.imageSize_=[u,u]},e.prototype.draw_=function(t,e,i,n){var r,o,s;e.setTransform(1,0,0,1,0,0),e.translate(i,n),e.beginPath();var a=this.points_;if(a===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var l=void 0!==this.radius2_?this.radius2_:this.radius_;for(l!==this.radius_&&(a*=2),r=0;r<=a;r++)o=2*r*Math.PI/a-Math.PI/2+this.angle_,s=r%2==0?this.radius_:l,e.lineTo(t.size/2+s*Math.cos(o),t.size/2+s*Math.sin(o))}if(this.fill_){var h=this.fill_.getColor();null===h&&(h="#000"),e.fillStyle=ks(h),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,e.setLineDash&&t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionImageSize_=[t.size,t.size],this.hitDetectionCanvas_=this.canvas_,this.fill_){var e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=Yn(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){var n=nt(t.size,t.size);this.hitDetectionCanvas_=n.canvas,this.drawHitDetectionCanvas_(t,n,0,0)}}},e.prototype.drawHitDetectionCanvas_=function(t,e,i,n){e.setTransform(1,0,0,1,0,0),e.translate(i,n),e.beginPath();var r=this.points_;if(r===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var o=void 0!==this.radius2_?this.radius2_:this.radius_;o!==this.radius_&&(r*=2);var s=void 0,a=void 0,l=void 0;for(s=0;s<=r;s++)l=2*s*Math.PI/r-Math.PI/2+this.angle_,a=s%2==0?this.radius_:o,e.lineTo(t.size/2+a*Math.cos(l),t.size/2+a*Math.sin(l))}e.fillStyle="#000",e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e}(ar),Ml=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ll=function(t){function e(e){var i=e||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,displacement:void 0!==i.displacement?i.displacement:[0,0]})||this}return Ml(e,t),e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),displacement:this.getDisplacement().slice()});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(Pl),Fl=function(){function t(t){var e=t||{};this.color_=void 0!==e.color?e.color:null}return t.prototype.clone=function(){var e=this.getColor();return new t({color:Array.isArray(e)?e.slice():e||void 0})},t.prototype.getColor=function(){return this.color_},t.prototype.setColor=function(t){this.color_=t},t}();function Al(t){return(Al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Dl=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=Gl,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"===Al(e)&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Gl,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var kl=null;function jl(t,e){if(!kl){var i=new Fl({color:"rgba(255,255,255,0.4)"}),n=new Il({color:"#3399CC",width:1.25});kl=[new Dl({image:new Ll({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return kl}function Gl(t){return t.getGeometry()}var zl=Dl,Wl="preload",Xl="useInterimTilesOnError",Kl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yl=function(t){function e(e){var i=this,n=e||{},r=v({},n);return delete r.preload,delete r.useInterimTilesOnError,(i=t.call(this,r)||this).setPreload(void 0!==n.preload?n.preload:0),i.setUseInterimTilesOnError(void 0===n.useInterimTilesOnError||n.useInterimTilesOnError),i}return Kl(e,t),e.prototype.getPreload=function(){return this.get(Wl)},e.prototype.setPreload=function(t){this.set(Wl,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Xl)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Xl,t)},e}(Mo),Nl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Zl=function(t){function e(e){var i=t.call(this)||this;return i.boundHandleImageChange_=i.handleImageChange_.bind(i),i.layer_=e,i}return Nl(e,t),e.prototype.getFeatures=function(t){return d()},e.prototype.prepareFrame=function(t){return d()},e.prototype.renderFrame=function(t,e){return d()},e.prototype.loadedTileCallback=function(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,e,i){return function(n,r){var o=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){},e.prototype.getDataAtPixel=function(t,e,i){return d()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===Dn&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Dn&&e!=kn&&t.addEventListener(P,this.boundHandleImageChange_),e==Fn&&(t.load(),e=t.getState()),e==Dn},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Co&&t.changed()},e}(K),Bl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Vl=function(t){function e(e){var i=t.call(this,e)||this;return i.container=null,i.renderedResolution,i.tempTransform_=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i}return Bl(e,t),e.prototype.useContainer=function(t,e,i){var n,r,o=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===o&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(r=a.getContext("2d")));if(r&&r.canvas.style.transform===e?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(n=document.createElement("div")).className=o;var s=n.style;s.position="absolute",s.width="100%",s.height="100%";var a=(r=nt()).canvas;n.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=n,this.context=r}},e.prototype.clip=function(t,e,i){var n=e.pixelRatio,r=e.size[0]*n/2,o=e.size[1]*n/2,s=e.viewState.rotation,a=Ce(i),l=we(i),h=ge(i),u=_e(i);Li(e.coordinateToPixelTransform,a),Li(e.coordinateToPixelTransform,l),Li(e.coordinateToPixelTransform,h),Li(e.coordinateToPixelTransform,u),t.save(),Js(t,-s,r,o),t.beginPath(),t.moveTo(a[0]*n,a[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(h[0]*n,h[1]*n),t.lineTo(u[0]*n,u[1]*n),t.clip(),Js(t,s,r,o)},e.prototype.clipUnrotated=function(t,e,i){var n=Ce(i),r=we(i),o=ge(i),s=_e(i);Li(e.coordinateToPixelTransform,n),Li(e.coordinateToPixelTransform,r),Li(e.coordinateToPixelTransform,o),Li(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;Li(a,n),Li(a,r),Li(a,o),Li(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){var r=new Ds(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(Mr,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(Lr,t,e)},e.prototype.getRenderTransform=function(t,e,i,n,r,o,s){var a=r/2,l=o/2,h=n/e,u=-h,c=-t[0]+s,p=-t[1];return Fi(this.tempTransform_,a,l,h,u,-i,c,p)},e.prototype.getDataAtPixel=function(t,e,i){var n,r=Li(this.inversePixelTransform,t.slice()),o=this.context;try{n=o.getImageData(Math.round(r[0]),Math.round(r[1]),1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:n}return 0===n[3]?null:n},e}(Zl),Ul=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hl=function(t){function e(e){var i=t.call(this,e)||this;return i.extentChanged=!0,i.renderedExtent_=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.newTiles_=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.tmpTileRange_=new Ya(0,0,0,0),i}return Ul(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==Gr||i==Wr||i==zr&&!n},e.prototype.getTile=function(t,e,i,n){var r=n.pixelRatio,o=n.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,i,r,o);return a.getState()==zr&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(Gr)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.loadedTileCallback=function(e,i,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,e,i,n)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var i=t.layerStatesArray[t.layerIndex],r=t.viewState,o=r.projection,s=r.resolution,a=r.center,l=r.rotation,h=t.pixelRatio,u=this.getLayer(),c=u.getSource(),p=c.getRevision(),f=c.getTileGridForProjection(o),d=f.getZForResolution(s,c.zDirection),_=f.getResolution(d),y=t.extent,v=i.extent&&di(i.extent,o);v&&(y=Se(y,di(i.extent,o)));var m=c.getTilePixelRatio(h),x=Math.round(t.size[0]*m),S=Math.round(t.size[1]*m);if(l){var C=Math.round(Math.sqrt(x*x+S*S));x=C,S=C}var w=_*x/2/m,E=_*S/2/m,b=[a[0]-w,a[1]-E,a[0]+w,a[1]+E],T=f.getTileRangeForExtentAndZ(y,d),R={};R[d]={};var I=this.createLoadedTileFinder(c,o,R),O=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;for(var M=T.minX;M<=T.maxX;++M)for(var L=T.minY;L<=T.maxY;++L){var F=this.getTile(d,M,L,t);if(this.isDrawableTile(F)){var A=g(this);if(F.getState()==Gr){R[d][F.tileCoord.toString()]=F;var D=F.inTransition(A);this.newTiles_||!D&&-1!==this.renderedTiles.indexOf(F)||(this.newTiles_=!0)}if(1===F.getAlpha(A,t.time))continue}var k=f.getTileCoordChildTileRange(F.tileCoord,P,O),j=!1;k&&(j=I(d+1,k)),j||f.forEachTileCoordParentTileRange(F.tileCoord,I,P,O)}var G=_/s;Fi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,l,-x/2,-S/2);var z,W=(z=this.pixelTransform,tt?Di(z):($s||($s=nt(1,1).canvas),$s.style.transform=Di(z),$s.style.transform));this.useContainer(e,W,i.opacity);var X=this.context,K=X.canvas;Ai(this.inversePixelTransform,this.pixelTransform),Fi(this.tempTransform_,x/2,S/2,G,G,0,-x/2,-S/2),K.width!=x||K.height!=S?(K.width=x,K.height=S):this.containerReused||X.clearRect(0,0,x,S),v&&this.clipUnrotated(X,t,v),this.preRender(X,t),this.renderedTiles.length=0;var Y,N,Z,B=Object.keys(R).map(Number);B.sort(n),1!==i.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(Y=[],N=[]):B=B.reverse();for(var V=B.length-1;V>=0;--V){var U=B[V],H=c.getTilePixelSize(U,h,o),q=f.getResolution(U)/_,J=H[0]*q*G,Q=H[1]*q*G,$=f.getTileCoordForCoordAndZ(Ce(b),U),et=f.getTileCoordExtent($),it=Li(this.tempTransform_,[m*(et[0]-b[0])/_,m*(b[3]-et[3])/_]),rt=m*c.getGutterForProjection(o),ot=R[U];for(var st in ot){var at=(F=ot[st]).tileCoord,lt=it[0]-($[1]-at[1])*J,ht=Math.round(lt+J),ut=it[1]-($[2]-at[2])*Q,ct=Math.round(ut+Q),pt=ht-(M=Math.round(lt)),ft=ct-(L=Math.round(ut)),dt=d===U;if(!(D=dt&&1!==F.getAlpha(g(this),t.time)))if(Y){X.save(),Z=[M,L,M+pt,L,M+pt,L+ft,M,L+ft];for(var _t=0,gt=Y.length;_t=200&&a.status<300){var o=e.getType(),l=void 0;o==th||o==eh?l=a.responseText:o==ih?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):o==$l&&(l=a.response),l?i.call(this,e.readFeatures(l,{extent:r,featureProjection:s}),e.readProjection(l)):n.call(this)}else n.call(this)}.bind(this),a.onerror=function(){n.call(this)}.bind(this),a.send()}}(t,e,(function(t,e){"function"==typeof this.addFeatures&&this.addFeatures(t)}),u)}function oh(t,e){return[[-1/0,-1/0,1/0,1/0]]}var sh="addfeature",ah="changefeature",lh="clear",hh="removefeature",uh=i(374),ch=i.n(uh),ph=function(){function t(t){this.rbush_=new ch.a(t),this.items_={}}return t.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[g(e)]=i},t.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,r=e.length;nthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,i=[Eh.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Eh.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!a(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=l,t.currentMiterLimit=h)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[Eh.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=$t(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Qt(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(js),Rh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ih=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.declutterGroups_=null,o.hitDetectionImage_=null,o.image_=null,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o}return Rh(e,t),e.prototype.drawCoordinates_=function(t,e,i,n){return this.appendFlatCoordinates(t,e,i,n,!1,!1)},e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([Eh.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([Eh.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([Eh.DRAW_IMAGE,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([Eh.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroups_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),r=t.getHitDetectionImage(1),o=t.getImage(1),s=t.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroups_=e,this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScale(),this.width_=n[0]},e}(Th),Oh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ph=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return Oh(e,t),e.prototype.drawFlatCoordinates_=function(t,e,i,n){var r=this.coordinates.length,o=this.appendFlatCoordinates(t,e,i,n,!1,!1),s=[Eh.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},e.prototype.drawLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Eh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Ch);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(Sh),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Eh.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Ch);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,h=0,u=o.length;ht&&(y>g&&(g=y,d=v,_=o),y=0,v=o-r)),s=a,u=p,c=f),l=m,h=x}return(y+=a)>g?[v,o]:[d,_]}var Ah="line",Dh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),kh={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},jh={Circle:Lh,Default:Th,Image:Ih,LineString:Ph,Polygon:Lh,Text:function(t){function e(e,i,n,r){var o=t.call(this,e,i,n,r)||this;return o.declutterGroups_,o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o}return Dh(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o,s,a=this.coordinates.length,l=t.getType(),h=null,u=2,c=2;if(r.placement===Ah){if(!be(this.getBufferedMaxExtent(),t.getExtent()))return;var p=void 0;if(h=t.getFlatCoordinates(),c=t.getStride(),l==Lt)p=[h.length];else if(l==kt)p=t.getEnds();else if(l==At)p=t.getEnds().slice(0,1);else if(l==jt){var f=t.getEndss();for(p=[],o=0,s=f.length;ot[i-n],_=r.length,g=t[e],y=t[e+1],v=t[e+=n],m=t[e+1],x=0,S=Math.sqrt(Math.pow(v-g,2)+Math.pow(m-y,2)),C=!1,w=0;w<_;++w){for(var E=r[c=d?_-w-1:w],b=a*l(h,E,u),T=o+b/2;e0?-Math.PI:Math.PI),void 0!==p){var O=I-p;if(C=C||0!==O,O+=O>Math.PI?-2*Math.PI:O<-Math.PI?2*Math.PI:0,Math.abs(O)>s)return null}p=I;var P=R/S,M=Pt(g,v,P),L=Pt(y,m,P);f[c]=[M,L,b/2,I,E],o+=b}return C?f:[[f[0][0],f[0][1],f[0][2],f[0][3],r]]}var Wh=[1/0,1/0,-1/0,-1/0],Xh=[1,0,0,1,0,0],Kh=[],Yh=[],Nh=[],Zh=[],Bh=function(){function t(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.declutterItems=[],this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,i,n){var r=t+e+i+n;if(this.labels_[r])return this.labels_[r];var o=n?this.strokeStates[n]:null,s=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,h=a.scale*l,u=kh[a.textAlign||"center"],c=n&&o.lineWidth?o.lineWidth:0,p=t.split("\n"),f=p.length,d=[],_=function(t,e,i){for(var n=e.length,r=0,o=0;on.width?n.width-h:d,x=a+u>n.height?n.height-u:a,S=_[3]+m*p+_[1],C=_[0]+x*p+_[2],w=e-_[3],E=i-_[0];(v||0!==c)&&(Kh[0]=w,Zh[0]=w,Kh[1]=E,Yh[1]=E,Yh[0]=w+S,Nh[0]=Yh[0],Nh[1]=E+C,Zh[1]=Nh[1]);var b=null;if(0!==c){var T=e+r,R=i+o;b=Fi(Xh,T,R,1,1,c,-T,-R),Li(Xh,Kh),Li(Xh,Yh),Li(Xh,Nh),Li(Xh,Zh),se(Math.min(Kh[0],Yh[0],Nh[0],Zh[0]),Math.min(Kh[1],Yh[1],Nh[1],Zh[1]),Math.max(Kh[0],Yh[0],Nh[0],Zh[0]),Math.max(Kh[1],Yh[1],Nh[1],Zh[1]),Wh)}else se(w,E,w+S,E+C,Wh);var I=t.canvas,O=y?y[2]*p/2:0,P=Wh[0]-O<=I.width&&Wh[2]+O>=0&&Wh[1]-O<=I.height&&Wh[3]+O>=0;if(f&&(e=Math.round(e),i=Math.round(i)),s){if(!P&&1==s[4])return;he(s,Wh);var M=P?[t,b?b.slice(0):null,l,n,h,u,m,x,e,i,p]:null;M&&(v&&M.push(g,y,Kh.slice(0),Yh.slice(0),Nh.slice(0),Zh.slice(0)),s.push(M))}else P&&(v&&this.replayTextBackground_(t,Kh,Yh,Nh,Zh,g,y),Qs(t,b,l,n,h,u,m,x,e,i,p))},t.prototype.fill_=function(t){if(this.alignFill_){var e=Li(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.renderDeclutter=function(t,e,i,n){if(t&&t.length>5){var r=t[4];if(1==r||r==t.length-5){var o={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};if(n||(n=new ch.a(9)),!n.collides(o)){n.insert(o);for(var s=5,a=t.length;s11&&this.replayTextBackground_(l[0],l[13],l[14],l[15],l[16],l[11],l[12]),Qs.apply(void 0,l),u!==i&&(h.globalAlpha=u)}}t.length=5,ae(t)}}return n},t.prototype.drawLabelWithPointPlacement_=function(t,e,i,n){var r=this.textStates[e],o=this.createLabel(t,e,n,i),s=this.strokeStates[i],a=this.pixelRatio,l=kh[r.textAlign||"center"],h=kh[r.textBaseline||"middle"],u=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*r.scale)+2*(.5-l)*u,anchorY:h*o.height/a+2*(.5-h)*u}},t.prototype.execute_=function(t,e,i,n,r,o){var s,l,h;this.declutterItems.length=0,this.pixelCoordinates_&&a(e,this.renderedTransform_)?s=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),s=Pi(this.coordinates,0,this.coordinates.length,2,e,this.pixelCoordinates_),l=this.renderedTransform_,h=e,l[0]=h[0],l[1]=h[1],l[2]=h[2],l[3]=h[3],l[4]=h[4],l[5]=h[5]);for(var u,c,p,f,d,_,g,y,v,m,x,S,C,w,E,b,T,R=0,I=i.length,O=0,P=0,M=0,L=null,F=null,A=this.coordinateCache_,D=this.viewRotation_,k=Math.round(1e12*Math.atan2(-e[1],e[0]))/1e12,j={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},G=this.instructions!=i||this.overlaps?0:200;RG&&(this.fill_(t),P=0),M>G&&(t.stroke(),M=0),P||M||(t.beginPath(),f=NaN,d=NaN),++R;break;case Eh.CIRCLE:var W=s[O=z[1]],X=s[O+1],K=s[O+2]-W,Y=s[O+3]-X,N=Math.sqrt(K*K+Y*Y);t.moveTo(W+N,X),t.arc(W,X,N,0,2*Math.PI,!0),++R;break;case Eh.CLOSE_PATH:t.closePath(),++R;break;case Eh.CUSTOM:O=z[1],u=z[2];var Z=z[3],B=z[4],V=6==z.length?z[5]:void 0;j.geometry=Z,j.feature=E,R in A||(A[R]=[]);var U=A[R];V?V(s,O,u,2,U):(U[0]=s[O],U[1]=s[O+1],U.length=2),B(U,j),++R;break;case Eh.DRAW_IMAGE:O=z[1],u=z[2],m=z[3],c=z[4],p=z[5],v=r?null:z[6];var H=z[7],q=z[8],J=z[9],Q=z[10],$=z[11],tt=z[12],et=z[13],it=z[14];if(!m&&z.length>=19){x=z[18],S=z[19],C=z[20],w=z[21];var nt=this.drawLabelWithPointPlacement_(x,S,C,w);m=nt.label,z[3]=m;var rt=z[22];c=(nt.anchorX-rt)*this.pixelRatio,z[4]=c;var ot=z[23];p=(nt.anchorY-ot)*this.pixelRatio,z[5]=p,H=m.height,z[7]=H,it=m.width,z[14]=it}var st=void 0;z.length>24&&(st=z[24]);var at=void 0,lt=void 0,ht=void 0;z.length>16?(at=z[15],lt=z[16],ht=z[17]):(at=zs,lt=!1,ht=!1),$&&k?tt+=D:$||k||(tt-=D);for(var ut=0,ct=0;O=o;)qh(i,t+r,t+o),qh(i,t+o,t+r),qh(i,t-o,t+r),qh(i,t-r,t+o),qh(i,t-r,t-o),qh(i,t-o,t-r),qh(i,t+o,t-r),qh(i,t+r,t-o),o++,2*((s+=1+2*o)-r)+1>0&&(s+=1-2*(r-=1));return Hh[t]=i,i}(r);function f(t){for(var e=u.getImageData(0,0,a,a).data,i=0;i0){var r=void 0;return(!s||c!=ra&&c!=aa||-1!==s.indexOf(t))&&(r=o(t)),r||void u.clearRect(0,0,a,a)}}var d,_,g,y,v,m=Object.keys(this.executorsByZIndex_).map(Number);for(m.sort(n),d=m.length-1;d>=0;--d){var x=m[d].toString();for(g=this.executorsByZIndex_[x],_=Vh.length-1;_>=0;--_)if(void 0!==(y=g[c=Vh[_]])&&(v=y.executeHitDetection(u,l,i,f,h)))return v}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var i=e[0],n=e[1],r=e[2],o=e[3],s=[i,n,i,o,r,o,r,n];return Pi(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return S(this.executorsByZIndex_)},t.prototype.execute=function(t,e,i,r,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(n),this.maxExtent_&&(t.save(),this.clip(t,e));var l,h,u,c,p,f,d=o||Vh;for(l=0,h=a.length;l=r)for(n=r;n0&&(a.width=0),this.container;var h=Math.round(t.size[0]*i),u=Math.round(t.size[1]*i);a.width!=h||a.height!=u?(a.width=h,a.height=u,a.style.transform!==o&&(a.style.transform=o)):this.containerReused||s.clearRect(0,0,h,u),this.preRender(s,t);var c=t.extent,p=t.viewState,f=p.center,d=p.resolution,_=p.projection,g=p.rotation,y=_.getExtent(),v=this.getLayer().getSource(),m=!1;if(r.extent){var x=di(r.extent,_);(m=!ie(x,t.extent)&&be(x,t.extent))&&this.clip(s,t,x)}var S=t.viewHints,C=!(S[Jr]||S[Qr]),w=this.getRenderTransform(f,d,g,i,h,u,0),E=this.getLayer().getDeclutter()?{}:null;if(l.execute(s,w,g,C,void 0,E),v.getWrapX()&&_.canWrapX()&&!ie(y,c)){for(var b=c[0],T=Ee(y),R=0,I=void 0;by[2];){I=T*++R;var P=this.getRenderTransform(f,d,g,i,h,u,I);l.execute(s,P,g,C,void 0,E),b-=T}}if(E){var M=t.viewHints;!function(t,e,i,r,o,s){for(var a=Object.keys(t).map(Number).sort(n),l=0,h=a.length;l_[2];)m=y*++v,c.push(this.getRenderTransform(o,s,a,.5,p,f,m).slice()),g-=y}this.hitDetectionImageData_=function(t,e,i,r,o,s,a){var l=nt(t[0]/2,t[1]/2);l.imageSmoothingEnabled=!1;for(var h=l.canvas,u=new ea(l,.5,o,null,a),c=i.length,p=Math.floor(16777215/c),f={},d=1;d<=c;++d){var _=i[d-1],g=_.getStyleFunction()||r;if(r){var y=g(_,s);if(y){Array.isArray(y)||(y=[y]);for(var v="#"+("000000"+(d*p).toString(16)).slice(-6),m=0,x=y.length;m=i[2])){var r=Ee(i),o=Math.floor((n[0]-i[0])/r)*r;t[0]-=o,t[2]-=o}return t}(y[0],h);S[0]v[0]&&S[2]>v[2]&&y.push([S[0]-m,S[1],S[2]-m,S[3]])}if(!this.dirty_&&this.renderedResolution_==u&&this.renderedRevision_==p&&this.renderedRenderOrder_==d&&ie(this.renderedExtent_,g))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var C,w=new Gh(ca(u,c),g,u,c,e.getDeclutter()),E=ui();if(E){for(var b=0,T=y.length;b180)&&(i[0]=Ot(n+180,360)-180),i}},su={OSM:ul,Vector:_h,XYZ:ll},au={Icon:hr,Stroke:Il,Style:zl}}}]); //# sourceMappingURL=1.bundle.js.map