2 lines
301 KiB
JavaScript
2 lines
301 KiB
JavaScript
(self.webpackChunkulogger_server=self.webpackChunkulogger_server||[]).push([[521],{3260:function(t,e,n){"use strict";n.r(e),n.d(e,{Feature:function(){return Wi},Map:function(){return ga},Overlay:function(){return Ol},View:function(){return fs},control:function(){return Cu},extent:function(){return wu},geom:function(){return Su},layer:function(){return Eu},proj:function(){return bu},source:function(){return Tu},style:function(){return Ou}});var i=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),o="propertychange",r=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function s(t,e){return t>e?1:t<e?-1:0}function a(t,e,n){var i=t.length;if(t[0]<=e)return 0;if(e<=t[i-1])return i-1;var o=void 0;if(n>0){for(o=1;o<i;++o)if(t[o]<e)return o-1}else if(n<0){for(o=1;o<i;++o)if(t[o]<=e)return o}else for(o=1;o<i;++o){if(t[o]==e)return o;if(t[o]<e)return"function"==typeof n?n(e,t[o-1],t[o])>0?o-1:o:t[o-1]-e<e-t[o]?o-1:o}return i-1}function l(t,e,n){for(;e<n;){var i=t[e];t[e]=t[n],t[n]=i,++e,--n}}function h(t,e){for(var n=Array.isArray(e)?e:[e],i=n.length,o=0;o<i;o++)t[t.length]=n[o]}function u(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function c(){return!0}function p(){return!1}function f(){}var d="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),i=1,o=arguments.length;i<o;++i){var r=arguments[i];if(null!=r)for(var s in r)r.hasOwnProperty(s)&&(n[s]=r[s])}return n};function _(t){for(var e in t)delete t[e]}var g="function"==typeof Object.values?Object.values:function(t){var e=[];for(var n in t)e.push(t[n]);return e};function y(t){var e;for(e in t)return!1;return!e}var v,m=(v=function(t,e){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),x=function(t){function e(e){var n=t.call(this)||this;return n.eventTarget_=e,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return m(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var n=this.listeners_||(this.listeners_={}),i=n[t]||(n[t]=[]);-1===i.indexOf(e)&&i.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new i(t):t,n=e.type;e.target||(e.target=this.eventTarget_||this);var o,r=this.listeners_&&this.listeners_[n];if(r){var s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});n in s||(s[n]=0,a[n]=0),++s[n];for(var l=0,h=r.length;l<h;++l)if(!1===(o="handleEvent"in r[l]?r[l].handleEvent(e):r[l].call(this,e))||e.propagationStopped){o=!1;break}if(--s[n],0===s[n]){var u=a[n];for(delete a[n];u--;)this.removeEventListener(n,f);delete s[n]}return o}},e.prototype.disposeInternal=function(){this.listeners_&&_(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var i=n.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[i]=f,++this.pendingRemovals_[t]):(n.splice(i,1),0===n.length&&delete this.listeners_[t]))}},e}(r),C="change",w="error",S="contextmenu",E="click",b="dblclick",T="keydown",O="keypress",R="load",P="resize",I="touchmove",M="wheel";function F(t,e,n,i,o){if(i&&i!==t&&(n=n.bind(i)),o){var r=n;n=function(){t.removeEventListener(e,n),r.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function L(t,e,n,i){return F(t,e,n,i,!0)}function A(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),_(t))}var D=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),k=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return D(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(C)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,i=new Array(n),o=0;o<n;++o)i[o]=F(this,t[o],e);return i}return F(this,t,e)},e.prototype.onceInternal=function(t,e){var n;if(Array.isArray(t)){var i=t.length;n=new Array(i);for(var o=0;o<i;++o)n[o]=L(this,t[o],e)}else n=L(this,t,e);return e.ol_key=n,n},e.prototype.unInternal=function(t,e){var n=e.ol_key;if(n)!function(t){if(Array.isArray(t))for(var e=0,n=t.length;e<n;++e)A(t[e]);else A(t)}(n);else if(Array.isArray(t))for(var i=0,o=t.length;i<o;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)},e}(x);k.prototype.on,k.prototype.once,k.prototype.un;var j=k;function G(){return function(){throw new Error("Unimplemented abstract method.")}()}var z=0;function W(t){return t.ol_uid||(t.ol_uid=String(++z))}var X="6.6.1",N=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Y=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.key=n,o.oldValue=i,o}return N(e,t),e}(i),K=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,W(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return N(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&d({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var n;n="change:"+t,this.dispatchEvent(new Y(n,t,e)),n=o,this.dispatchEvent(new Y(n,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:"+t,e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:"+t,e)},e.prototype.set=function(t,e,n){var i=this.values_||(this.values_={});if(n)i[t]=e;else{var o=i[t];i[t]=e,o!==e&&this.notify(t,o)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&d(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var n=this.values_[t];delete this.values_[t],y(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(j),B="postrender",Z="movestart",V="moveend",U="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",H=-1!==U.indexOf("firefox"),q=(-1!==U.indexOf("safari")&&U.indexOf("chrom"),-1!==U.indexOf("webkit")&&-1==U.indexOf("edge")),J=-1!==U.indexOf("macintosh"),Q="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,$="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,tt="undefined"!=typeof Image&&Image.prototype.decode,et=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}();function nt(t,e,n,i){var o=n&&n.length?n.shift():$?new OffscreenCanvas(t||300,e||300):document.createElement("canvas");return t&&(o.width=t),e&&(o.height=e),o.getContext("2d",i)}function it(t){var e=t.offsetWidth,n=getComputedStyle(t);return e+=parseInt(n.marginLeft,10)+parseInt(n.marginRight,10)}function ot(t){var e=t.offsetHeight,n=getComputedStyle(t);return e+=parseInt(n.marginTop,10)+parseInt(n.marginBottom,10)}function rt(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function st(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function at(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var lt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ht=function(t){function e(e){var n=t.call(this)||this,i=e.element;return!i||e.target||i.style.pointerEvents||(i.style.pointerEvents="auto"),n.element=i||null,n.target_=null,n.map_=null,n.listenerKeys=[],e.render&&(n.render=e.render),e.target&&n.setTarget(e.target),n}return lt(e,t),e.prototype.disposeInternal=function(){st(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&st(this.element);for(var e=0,n=this.listenerKeys.length;e<n;++e)A(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==f&&this.listenerKeys.push(F(t,B,this.render,this)),t.render())},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(K),ut="ol-hidden",ct="ol-unselectable",pt="ol-control",ft="ol-collapsed",dt=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),_t=["style","variant","weight","size","lineHeight","family"],gt=function(t){var e=t.match(dt);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,o=_t.length;i<o;++i){var r=e[i+1];void 0!==r&&(n[_t[i]]=r)}return n.families=n.family.split(/,\s?/),n};function yt(t){return Math.pow(t,3)}function vt(t){return 1-yt(1-t)}function mt(t){return 3*t*t-2*t*t*t}function xt(t){return t}var Ct=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wt=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var o=void 0!==i.className?i.className:"ol-rotate",r=void 0!==i.label?i.label:"⇧",s=void 0!==i.compassClassName?i.compassClassName:"ol-compass";n.label_=null,"string"==typeof r?(n.label_=document.createElement("span"),n.label_.className=s,n.label_.textContent=r):(n.label_=r,n.label_.classList.add(s));var a=i.tipLabel?i.tipLabel:"Reset rotation",l=document.createElement("button");l.className=o+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(n.label_),l.addEventListener(E,n.handleClick_.bind(n),!1);var h=o+" "+"ol-unselectable "+pt,u=n.element;return u.className=h,u.appendChild(l),n.callResetNorth_=i.resetNorth?i.resetNorth:void 0,n.duration_=void 0!==i.duration?i.duration:250,n.autoHide_=void 0===i.autoHide||i.autoHide,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(ut),n}return Ct(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();if(t){var e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:vt}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var i="rotate("+n+"rad)";if(this.autoHide_){var o=this.element.classList.contains(ut);o||0!==n?o&&0!==n&&this.element.classList.remove(ut):this.element.classList.add(ut)}this.label_.style.transform=i}this.rotation_=n}},e}(ht),St={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Et={};Et[St.DEGREES]=2*Math.PI*6370997/360,Et[St.FEET]=.3048,Et[St.METERS]=1,Et[St.USFEET]=1200/3937;var bt=St,Tt=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Et[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}();function Ot(t,e,n){return Math.min(Math.max(t,e),n)}var Rt="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},Pt="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function It(t,e,n,i,o,r){var s=o-n,a=r-i;if(0!==s||0!==a){var l=((t-n)*s+(e-i)*a)/(s*s+a*a);l>1?(n=o,i=r):l>0&&(n+=s*l,i+=a*l)}return Mt(t,e,n,i)}function Mt(t,e,n,i){var o=n-t,r=i-e;return o*o+r*r}function Ft(t){return t*Math.PI/180}function Lt(t,e){var n=t%e;return n*e<0?n+e:n}function At(t,e,n){return t+n*(e-t)}var Dt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kt=6378137,jt=Math.PI*kt,Gt=[-jt,-jt,jt,jt],zt=[-180,-85,180,85],Wt=kt*Math.log(Math.tan(Math.PI/2)),Xt=function(t){function e(e){return t.call(this,{code:e,units:bt.METERS,extent:Gt,global:!0,worldExtent:zt,getPointResolution:function(t,e){return t/Rt(e[1]/kt)}})||this}return Dt(e,t),e}(Tt),Nt=[new Xt("EPSG:3857"),new Xt("EPSG:102100"),new Xt("EPSG:102113"),new Xt("EPSG:900913"),new Xt("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Yt(t,e,n){var i=t.length,o=n>1?n:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(i));for(var s=0;s<i;s+=o){r[s]=jt*t[s]/180;var a=kt*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>Wt?a=Wt:a<-Wt&&(a=-Wt),r[s+1]=a}return r}function Kt(t,e,n){var i=t.length,o=n>1?n:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(i));for(var s=0;s<i;s+=o)r[s]=180*t[s]/jt,r[s+1]=360*Math.atan(Math.exp(t[s+1]/kt))/Math.PI-90;return r}var Bt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zt=[-180,-90,180,90],Vt=6378137*Math.PI/180,Ut=function(t){function e(e,n){return t.call(this,{code:e,units:bt.DEGREES,extent:Zt,axisOrientation:n,global:!0,metersPerUnit:Vt,worldExtent:Zt})||this}return Bt(e,t),e}(Tt),Ht=[new Ut("CRS:84"),new Ut("EPSG:4326","neu"),new Ut("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ut("urn:ogc:def:crs:OGC:2:84"),new Ut("http://www.opengis.net/gml/srs/epsg.xml#4326","neu")],qt={};var Jt={};function Qt(t,e,n){var i=t.getCode(),o=e.getCode();i in Jt||(Jt[i]={}),Jt[i][o]=n}var $t="bottom-left",te="bottom-right",ee="top-left",ne="top-right",ie=0,oe=1,re=2,se=4,ae=8,le=16,he=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ue=function(t){function e(e){var n=this,i="Assertion failed. See https://openlayers.org/en/"+("v"+X.split("-")[0])+"/doc/errors/#"+e+" for details.";return(n=t.call(this,i)||this).code=e,n.name="AssertionError",n.message=i,n}return he(e,t),e}(Error);function ce(t,e){if(!t)throw new ue(e)}function pe(t){for(var e=xe(),n=0,i=t.length;n<i;++n)Ee(e,t[n]);return e}function fe(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function de(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function _e(t,e,n){var i,o;return(i=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*i+(o=n<t[1]?t[1]-n:t[3]<n?n-t[3]:0)*o}function ge(t,e){return ve(t,e[0],e[1])}function ye(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function ve(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function me(t,e){var n=t[0],i=t[1],o=t[2],r=t[3],s=e[0],a=e[1],l=ie;return s<n?l|=le:s>o&&(l|=se),a<i?l|=ae:a>r&&(l|=re),l===ie&&(l=oe),l}function xe(){return[1/0,1/0,-1/0,-1/0]}function Ce(t,e,n,i,o){return o?(o[0]=t,o[1]=e,o[2]=n,o[3]=i,o):[t,e,n,i]}function we(t){return Ce(1/0,1/0,-1/0,-1/0,t)}function Se(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Ee(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function be(t,e,n,i,o){for(;n<i;n+=o)Te(t,e[n],e[n+1]);return t}function Te(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function Oe(t,e){var n;return(n=e(Pe(t)))||(n=e(Ie(t)))||(n=e(je(t)))?n:(n=e(ke(t)))||!1}function Re(t){var e=0;return We(t)||(e=Ge(t)*Ae(t)),e}function Pe(t){return[t[0],t[1]]}function Ie(t){return[t[2],t[1]]}function Me(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Fe(t,e){var n;return e===$t?n=Pe(t):e===te?n=Ie(t):e===ee?n=ke(t):e===ne?n=je(t):ce(!1,13),n}function Le(t,e,n,i,o){var r=e*i[0]/2,s=e*i[1]/2,a=Math.cos(n),l=Math.sin(n),h=r*a,u=r*l,c=s*a,p=s*l,f=t[0],d=t[1],_=f-h+p,g=f-h-p,y=f+h-p,v=f+h+p,m=d-u-c,x=d-u+c,C=d+u+c,w=d+u-c;return Ce(Math.min(_,g,y,v),Math.min(m,x,C,w),Math.max(_,g,y,v),Math.max(m,x,C,w),o)}function Ae(t){return t[3]-t[1]}function De(t,e,n){var i=n||[1/0,1/0,-1/0,-1/0];return ze(t,e)?(t[0]>e[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]<e[2]?i[2]=t[2]:i[2]=e[2],t[3]<e[3]?i[3]=t[3]:i[3]=e[3]):we(i),i}function ke(t){return[t[0],t[3]]}function je(t){return[t[2],t[3]]}function Ge(t){return t[2]-t[0]}function ze(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function We(t){return t[2]<t[0]||t[3]<t[1]}function Xe(t,e,n,i){var o=[];if(i>1)for(var r=t[2]-t[0],s=t[3]-t[1],a=0;a<i;++a)o.push(t[0]+r*a/i,t[1],t[2],t[1]+s*a/i,t[2]-r*a/i,t[3],t[0],t[3]-s*a/i);else o=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(o,o,2);for(var l=[],h=[],u=(a=0,o.length);a<u;a+=2)l.push(o[a]),h.push(o[a+1]);return function(t,e,n){return Ce(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),n)}(l,h,n)}var Ne=6371008.8;function Ye(t,e,n){var i=n||Ne,o=Ft(t[1]),r=Ft(e[1]),s=(r-o)/2,a=Ft(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(o)*Math.cos(r);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function Ke(t,e,n){var i;if(void 0!==e){for(var o=0,r=t.length;o<r;++o)e[o]=t[o];i=e}else i=t.slice();return i}function Be(t,e,n){if(void 0!==e&&t!==e){for(var i=0,o=t.length;i<o;++i)e[i]=t[i];t=e}return t}function Ze(t){!function(t,e){qt[t]=e}(t.getCode(),t),Qt(t,t,Ke)}function Ve(t){return"string"==typeof t?qt[e=t]||qt[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function Ue(t,e,n,i){var o,r=(t=Ve(t)).getPointResolutionFunc();if(r){if(o=r(e,n),i&&i!==t.getUnits())(a=t.getMetersPerUnit())&&(o=o*a/Et[i])}else{var s=t.getUnits();if(s==bt.DEGREES&&!i||i==bt.DEGREES)o=e;else{var a,l=Qe(t,Ve("EPSG:4326"));if(l===Be&&s!==bt.DEGREES)o=e*t.getMetersPerUnit();else{var h=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];o=(Ye((h=l(h,h,2)).slice(0,2),h.slice(2,4))+Ye(h.slice(4,6),h.slice(6,8)))/2}void 0!==(a=i?Et[i]:t.getMetersPerUnit())&&(o/=a)}}return o}function He(t){!function(t){t.forEach(Ze)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&Qt(e,t,Ke)}))}))}function qe(t,e){return t?"string"==typeof t?Ve(t):t:Ve(e)}function Je(t,e){if(t===e)return!0;var n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||Qe(t,e)===Ke)&&n}function Qe(t,e){var n=function(t,e){var n;return t in Jt&&e in Jt[t]&&(n=Jt[t][e]),n}(t.getCode(),e.getCode());return n||(n=Be),n}function $e(t,e){return Qe(Ve(t),Ve(e))}function tn(t,e,n){return $e(e,n)(t,void 0,t.length)}function en(t,e,n,i){return Xe(t,$e(e,n),void 0,i)}var nn,on,rn,sn=null;function an(){return sn}function ln(t,e){return sn?tn(t,e,sn):t}function hn(t,e){return sn?tn(t,sn,e):t}function un(t,e){return sn?en(t,e,sn):t}function cn(t,e){return sn?en(t,sn,e):t}He(Nt),He(Ht),nn=Nt,on=Yt,rn=Kt,Ht.forEach((function(t){nn.forEach((function(e){Qt(t,e,on),Qt(e,t,rn)}))}));var pn,fn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),dn="units",_n="degrees",gn="imperial",yn="nautical",vn="metric",mn="us",xn=[1,2,5],Cn=25.4/.28,wn=function(t){function e(e){var n=this,i=e||{},o=void 0!==i.className?i.className:i.bar?"ol-scale-bar":"ol-scale-line";return(n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).on,n.once,n.un,n.innerElement_=document.createElement("div"),n.innerElement_.className=o+"-inner",n.element.className=o+" "+ct,n.element.appendChild(n.innerElement_),n.viewState_=null,n.minWidth_=void 0!==i.minWidth?i.minWidth:64,n.renderedVisible_=!1,n.renderedWidth_=void 0,n.renderedHTML_="",n.addChangeListener(dn,n.handleUnitsChanged_),n.setUnits(i.units||vn),n.scaleBar_=i.bar||!1,n.scaleBarSteps_=i.steps||4,n.scaleBarText_=i.text||!1,n.dpi_=i.dpi||void 0,n}return fn(e,t),e.prototype.getUnits=function(){return this.get(dn)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(dn,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,n=t.projection,i=this.getUnits(),o=i==_n?bt.DEGREES:bt.METERS,r=Ue(n,t.resolution,e,o),s=this.minWidth_*(this.dpi_||Cn)/Cn,a=s*r,l="";if(i==_n){var h=Et[bt.DEGREES];(a*=h)<h/60?(l="″",r*=3600):a<h?(l="′",r*=60):l="°"}else i==gn?a<.9144?(l="in",r/=.0254):a<1609.344?(l="ft",r/=.3048):(l="mi",r/=1609.344):i==yn?(r/=1852,l="nm"):i==vn?a<.001?(l="μm",r*=1e6):a<1?(l="mm",r*=1e3):a<1e3?l="m":(l="km",r/=1e3):i==mn?a<.9144?(l="in",r*=39.37):a<1609.344?(l="ft",r/=.30480061):(l="mi",r/=1609.3472):ce(!1,33);for(var u,c,p,f,d=3*Math.floor(Math.log(s*r)/Math.log(10));;){p=Math.floor(d/3);var _=Math.pow(10,p);if(u=xn[(d%3+3)%3]*_,c=Math.round(u/r),isNaN(c))return this.element.style.display="none",void(this.renderedVisible_=!1);if(c>=s)break;++d}f=this.scaleBar_?this.createScaleBar(c,u,l):u.toFixed(p<0?-p:0)+" "+l,this.renderedHTML_!=f&&(this.innerElement_.innerHTML=f,this.renderedHTML_=f),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),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,n){for(var i="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),o=[],r=t/this.scaleBarSteps_,s="#ffffff",a=0;a<this.scaleBarSteps_;a++)0===a&&o.push(this.createMarker("absolute",a)),o.push('<div><div class="ol-scale-singlebar" style="width: '+r+"px;background-color: "+s+';"></div>'+this.createMarker("relative",a)+(a%2==0||2===this.scaleBarSteps_?this.createStepText(a,t,!1,e,n):"")+"</div>"),a===this.scaleBarSteps_-1&&o.push(this.createStepText(a+1,t,!0,e,n)),s="#ffffff"===s?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+i+"</div>":"")+o.join("")+"</div>"},e.prototype.createMarker=function(t,e){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},e.prototype.createStepText=function(t,e,n,i,o){var r=(0===t?0:Math.round(i/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+o);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:e/this.scaleBarSteps_*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:e/this.scaleBarSteps_*2)+"px;left: "+(n?e+"px":"unset")+';">'+r+"</div>"},e.prototype.getScaleForResolution=function(){var t=Ue(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center),e=this.dpi_||Cn,n=this.viewState_.projection.getMetersPerUnit();return parseFloat(t.toString())*n*(1e3/25.4)*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(ht),Sn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),En=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),target:i.target})||this;var o=void 0!==i.className?i.className:"ol-zoom",r=void 0!==i.delta?i.delta:1,s=void 0!==i.zoomInClassName?i.zoomInClassName:o+"-in",a=void 0!==i.zoomOutClassName?i.zoomOutClassName:o+"-out",l=void 0!==i.zoomInLabel?i.zoomInLabel:"+",h=void 0!==i.zoomOutLabel?i.zoomOutLabel:"−",u=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",c=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=u,p.appendChild("string"==typeof l?document.createTextNode(l):l),p.addEventListener(E,n.handleClick_.bind(n,r),!1);var f=document.createElement("button");f.className=a,f.setAttribute("type","button"),f.title=c,f.appendChild("string"==typeof h?document.createTextNode(h):h),f.addEventListener(E,n.handleClick_.bind(n,-r),!1);var d=o+" "+"ol-unselectable "+pt,_=n.element;return _.className=d,_.appendChild(p),_.appendChild(f),n.duration_=void 0!==i.duration?i.duration:250,n}return Sn(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 n=e.getZoom();if(void 0!==n){var i=e.getConstrainedZoom(n+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:i,duration:this.duration_,easing:vt})):e.setZoom(i)}}},e}(ht),bn="XY",Tn="XYZ",On="XYM",Rn="XYZM",Pn="Point",In="LineString",Mn="LinearRing",Fn="Polygon",Ln="MultiPoint",An="MultiLineString",Dn="MultiPolygon",kn="GeometryCollection",jn="Circle";new Array(6);function Gn(t,e,n,i,o,r,s){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t[4]=r,t[5]=s,t}function zn(t,e){var n=e[0],i=e[1];return e[0]=t[0]*n+t[2]*i+t[4],e[1]=t[1]*n+t[3]*i+t[5],e}function Wn(t,e,n,i,o,r,s,a){var l=Math.sin(r),h=Math.cos(r);return t[0]=i*h,t[1]=o*l,t[2]=-i*l,t[3]=o*h,t[4]=s*i*h-a*i*l+e,t[5]=s*o*l+a*o*h+n,t}function Xn(t,e){var n,i=(n=e)[0]*n[3]-n[1]*n[2];ce(0!==i,32);var o=e[0],r=e[1],s=e[2],a=e[3],l=e[4],h=e[5];return t[0]=a/i,t[1]=-r/i,t[2]=-s/i,t[3]=o/i,t[4]=(s*h-a*l)/i,t[5]=-(o*h-r*l)/i,t}function Nn(t){var e="matrix("+t.join(", ")+")";if($)return e;var n=pn||(pn=document.createElement("div"));return n.style.transform=e,n.style.transform}function Yn(t,e,n,i,o,r){for(var s=r||[],a=0,l=e;l<n;l+=i){var h=t[l],u=t[l+1];s[a++]=o[0]*h+o[2]*u+o[4],s[a++]=o[1]*h+o[3]*u+o[5]}return r&&s.length!=a&&(s.length=a),s}function Kn(t,e,n,i,o,r,s){for(var a=s||[],l=Math.cos(o),h=Math.sin(o),u=r[0],c=r[1],p=0,f=e;f<n;f+=i){var d=t[f]-u,_=t[f+1]-c;a[p++]=u+d*l-_*h,a[p++]=c+d*h+_*l;for(var g=f+2;g<f+i;++g)a[p++]=t[g]}return s&&a.length!=p&&(a.length=p),a}var Bn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zn=[1,0,0,1,0,0],Vn=function(t){function e(){var e,n,i,o,r,s=t.call(this)||this;return s.extent_=[1/0,1/0,-1/0,-1/0],s.extentRevision_=-1,s.simplifiedGeometryMaxMinSquaredTolerance=0,s.simplifiedGeometryRevision=0,s.simplifyTransformedInternal=(e=function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);var i=this.clone();return i.applyTransform(n),i.getSimplifiedGeometry(e)},r=!1,function(){var t=Array.prototype.slice.call(arguments);return r&&this===o&&u(t,i)||(r=!0,o=this,i=t,n=e.apply(this,arguments)),n}),s}return Bn(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return G()},e.prototype.closestPointXY=function(t,e,n,i){return G()},e.prototype.containsXY=function(t,e){var n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e},e.prototype.getClosestPoint=function(t,e){var n=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],n,1/0),n},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return G()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&we(e),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){G()},e.prototype.scale=function(t,e,n){G()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return G()},e.prototype.getType=function(){return G()},e.prototype.applyTransform=function(t){G()},e.prototype.intersectsExtent=function(t){return G()},e.prototype.translate=function(t,e){G()},e.prototype.transform=function(t,e){var n=Ve(t),i=n.getUnits()==bt.TILE_PIXELS?function(t,i,o){var r=n.getExtent(),s=n.getWorldExtent(),a=Ae(s)/Ae(r);return Wn(Zn,s[0],s[3],a,-a,0,0,0),Yn(t,0,t.length,o,Zn,i),$e(n,e)(t,i,o)}:$e(n,e);return this.applyTransform(i),this},e}(K),Un=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function Hn(t){var e;return t==bn?e=2:t==Tn||t==On?e=3:t==Rn&&(e=4),e}var qn=function(t){function e(){var e=t.call(this)||this;return e.layout=bn,e.stride=2,e.flatCoordinates=null,e}return Un(e,t),e.prototype.computeExtent=function(t){return function(t,e,n,i,o){return be(we(o),t,e,n,i)}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return G()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=Hn(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){G()},e.prototype.setLayout=function(t,e,n){var i;if(t)i=Hn(t);else{for(var o=0;o<n;++o){if(0===e.length)return this.layout=bn,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=bn:3==t?e=Tn:4==t&&(e=Rn);return e}(i=e.length)}this.layout=t,this.stride=i},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var n=this.getFlatCoordinates();if(n){var i=this.getStride();Kn(n,0,n.length,i,t,e,n),this.changed()}},e.prototype.scale=function(t,e,n){var i=e;void 0===i&&(i=t);var o=n;o||(o=Me(this.getExtent()));var r=this.getFlatCoordinates();if(r){var s=this.getStride();!function(t,e,n,i,o,r,s,a){for(var l=a||[],h=s[0],u=s[1],c=0,p=e;p<n;p+=i){var f=t[p]-h,d=t[p+1]-u;l[c++]=h+o*f,l[c++]=u+r*d;for(var _=p+2;_<p+i;++_)l[c++]=t[_]}a&&l.length!=c&&(l.length=c)}(r,0,r.length,s,t,i,o,r),this.changed()}},e.prototype.translate=function(t,e){var n=this.getFlatCoordinates();if(n){var i=this.getStride();!function(t,e,n,i,o,r,s){for(var a=s||[],l=0,h=e;h<n;h+=i){a[l++]=t[h]+o,a[l++]=t[h+1]+r;for(var u=h+2;u<h+i;++u)a[l++]=t[u]}s&&a.length!=l&&(a.length=l)}(n,0,n.length,i,t,e,n),this.changed()}},e}(Vn);function Jn(t,e,n,i,o,r,s){var a,l=t[e],h=t[e+1],u=t[n]-l,c=t[n+1]-h;if(0===u&&0===c)a=e;else{var p=((o-l)*u+(r-h)*c)/(u*u+c*c);if(p>1)a=n;else{if(p>0){for(var f=0;f<i;++f)s[f]=At(t[e+f],t[n+f],p);return void(s.length=i)}a=e}}for(f=0;f<i;++f)s[f]=t[a+f];s.length=i}function Qn(t,e,n,i,o){var r=t[e],s=t[e+1];for(e+=i;e<n;e+=i){var a=t[e],l=t[e+1],h=Mt(r,s,a,l);h>o&&(o=h),r=a,s=l}return o}function $n(t,e,n,i,o){for(var r=0,s=n.length;r<s;++r){var a=n[r];o=Qn(t,e,a,i,o),e=a}return o}function ti(t,e,n,i,o,r,s,a,l,h,u){if(e==n)return h;var c,p;if(0===o){if((p=Mt(s,a,t[e],t[e+1]))<h){for(c=0;c<i;++c)l[c]=t[e+c];return l.length=i,p}return h}for(var f=u||[NaN,NaN],d=e+i;d<n;)if(Jn(t,d-i,d,i,s,a,f),(p=Mt(s,a,f[0],f[1]))<h){for(h=p,c=0;c<i;++c)l[c]=f[c];l.length=i,d+=i}else d+=i*Math.max((Math.sqrt(p)-Math.sqrt(h))/o|0,1);if(r&&(Jn(t,n-i,e,i,s,a,f),(p=Mt(s,a,f[0],f[1]))<h)){for(h=p,c=0;c<i;++c)l[c]=f[c];l.length=i}return h}function ei(t,e,n,i,o,r,s,a,l,h,u){for(var c=u||[NaN,NaN],p=0,f=n.length;p<f;++p){var d=n[p];h=ti(t,e,d,i,o,r,s,a,l,h,c),e=d}return h}function ni(t,e,n,i){for(var o=0,r=n.length;o<r;++o)for(var s=n[o],a=0;a<i;++a)t[e++]=s[a];return e}function ii(t,e,n,i,o){for(var r=o||[],s=0,a=0,l=n.length;a<l;++a){var h=ni(t,e,n[a],i);r[s++]=h,e=h}return r.length=s,r}function oi(t,e,n,i,o,r,s){var a=(n-e)/i;if(a<3){for(;e<n;e+=i)r[s++]=t[e],r[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;for(var h=[e,n-i],u=0;h.length>0;){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+i;v<c;v+=i){var m=It(t[v],t[v+1],d,_,g,y);m>f&&(u=v,f=m)}f>o&&(l[(u-e)/i]=1,p+i<u&&h.push(p,u),u+i<c&&h.push(u,c))}for(v=0;v<a;++v)l[v]&&(r[s++]=t[e+v*i],r[s++]=t[e+v*i+1]);return s}function ri(t,e){return e*Math.round(t/e)}function si(t,e,n,i,o,r,s){if(e==n)return s;var a,l,h=ri(t[e],o),u=ri(t[e+1],o);e+=i,r[s++]=h,r[s++]=u;do{if(a=ri(t[e],o),l=ri(t[e+1],o),(e+=i)==n)return r[s++]=a,r[s++]=l,s}while(a==h&&l==u);for(;e<n;){var c=ri(t[e],o),p=ri(t[e+1],o);if(e+=i,c!=a||p!=l){var f=a-h,d=l-u,_=c-h,g=p-u;f*g==d*_&&(f<0&&_<f||f==_||f>0&&_>f)&&(d<0&&g<d||d==g||d>0&&g>d)?(a=c,l=p):(r[s++]=a,r[s++]=l,h=a,u=l,a=c,l=p)}}return r[s++]=a,r[s++]=l,s}function ai(t,e,n,i,o,r,s,a){for(var l=0,h=n.length;l<h;++l){var u=n[l];s=si(t,e,u,i,o,r,s),a.push(s),e=u}return s}function li(t,e,n,i,o){for(var r=void 0!==o?o:[],s=0,a=e;a<n;a+=i)r[s++]=t.slice(a,a+i);return r.length=s,r}function hi(t,e,n,i,o){for(var r=void 0!==o?o:[],s=0,a=0,l=n.length;a<l;++a){var h=n[a];r[s++]=li(t,e,h,i,r[s]),e=h}return r.length=s,r}function ui(t,e,n,i,o){for(var r=void 0!==o?o:[],s=0,a=0,l=n.length;a<l;++a){var h=n[a];r[s++]=hi(t,e,h,i,r[s]),e=h[h.length-1]}return r.length=s,r}function ci(t,e,n,i){for(var o=0,r=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];o+=s*a-r*l,r=a,s=l}return o/2}function pi(t,e,n,i){for(var o=0,r=0,s=n.length;r<s;++r){var a=n[r];o+=ci(t,e,a,i),e=a}return o}var fi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),di=function(t){function e(e,n){var i=t.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?i.setCoordinates(e,n):i.setFlatCoordinates(n,e),i}return fi(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,n,i){return i<_e(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Qn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ti(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.getArea=function(){return ci(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return li(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=oi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,bn)},e.prototype.getType=function(){return Mn},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ni(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qn),_i=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),gi=function(t){function e(e,n){var i=t.call(this)||this;return i.setCoordinates(e,n),i}return _i(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,i){var o=this.flatCoordinates,r=Mt(t,e,o[0],o[1]);if(r<i){for(var s=this.stride,a=0;a<s;++a)n[a]=o[a];return n.length=s,r}return i},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return e=this.flatCoordinates,n=t,i=e[0],o=e[1],Ce(i,o,i,o,n);var e,n,i,o},e.prototype.getType=function(){return Pn},e.prototype.intersectsExtent=function(t){return ve(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,n,i){for(var o=0,r=n.length;o<r;++o)t[e++]=n[o];return e}(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qn);function yi(t,e,n,i,o){return!Oe(o,(function(o){return!vi(t,e,n,i,o[0],o[1])}))}function vi(t,e,n,i,o,r){for(var s=0,a=t[n-i],l=t[n-i+1];e<n;e+=i){var h=t[e],u=t[e+1];l<=r?u>r&&(h-a)*(r-l)-(o-a)*(u-l)>0&&s++:u<=r&&(h-a)*(r-l)-(o-a)*(u-l)<0&&s--,a=h,l=u}return 0!==s}function mi(t,e,n,i,o,r){if(0===n.length)return!1;if(!vi(t,e,n[0],i,o,r))return!1;for(var s=1,a=n.length;s<a;++s)if(vi(t,n[s-1],n[s],i,o,r))return!1;return!0}function xi(t,e,n,i,o,r,a){for(var l,h,u,c,p,f,d,_=o[r+1],g=[],y=0,v=n.length;y<v;++y){var m=n[y];for(c=t[m-i],f=t[m-i+1],l=e;l<m;l+=i)p=t[l],d=t[l+1],(_<=f&&d<=_||f<=_&&_<=d)&&(u=(_-f)/(d-f)*(p-c)+c,g.push(u)),c=p,f=d}var x=NaN,C=-1/0;for(g.sort(s),c=g[0],l=1,h=g.length;l<h;++l){p=g[l];var w=Math.abs(p-c);w>C&&mi(t,e,n,i,u=(c+p)/2,_)&&(x=u,C=w),c=p}return isNaN(x)&&(x=o[r]),a?(a.push(x,_,C),a):[x,_,C]}function Ci(t,e,n,i,o){for(var r,s=[t[e],t[e+1]],a=[];e+i<n;e+=i){if(a[0]=t[e+i],a[1]=t[e+i+1],r=o(s,a))return r;s[0]=a[0],s[1]=a[1]}return!1}function wi(t,e,n,i,o){var r=be([1/0,1/0,-1/0,-1/0],t,e,n,i);return!!ze(o,r)&&(!!ye(o,r)||(r[0]>=o[0]&&r[2]<=o[2]||(r[1]>=o[1]&&r[3]<=o[3]||Ci(t,e,n,i,(function(t,e){return function(t,e,n){var i=!1,o=me(t,e),r=me(t,n);if(o===oe||r===oe)i=!0;else{var s=t[0],a=t[1],l=t[2],h=t[3],u=e[0],c=e[1],p=n[0],f=n[1],d=(f-c)/(p-u),_=void 0,g=void 0;r&re&&!(o&re)&&(i=(_=p-(f-h)/d)>=s&&_<=l),i||!(r&se)||o&se||(i=(g=f-(p-l)*d)>=a&&g<=h),i||!(r&ae)||o&ae||(i=(_=p-(f-a)/d)>=s&&_<=l),i||!(r&le)||o&le||(i=(g=f-(p-s)*d)>=a&&g<=h)}return i}(o,t,e)})))))}function Si(t,e,n,i,o){if(!function(t,e,n,i,o){return!!(wi(t,e,n,i,o)||vi(t,e,n,i,o[0],o[1])||vi(t,e,n,i,o[0],o[3])||vi(t,e,n,i,o[2],o[1])||vi(t,e,n,i,o[2],o[3]))}(t,e,n[0],i,o))return!1;if(1===n.length)return!0;for(var r=1,s=n.length;r<s;++r)if(yi(t,n[r-1],n[r],i,o)&&!wi(t,n[r-1],n[r],i,o))return!1;return!0}function Ei(t,e,n,i){for(;e<n-i;){for(var o=0;o<i;++o){var r=t[e+o];t[e+o]=t[n-i+o],t[n-i+o]=r}e+=i,n-=i}}function bi(t,e,n,i){for(var o=0,r=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];o+=(a-r)*(l+s),r=a,s=l}return 0===o?void 0:o>0}function Ti(t,e,n,i,o){for(var r=void 0!==o&&o,s=0,a=n.length;s<a;++s){var l=n[s],h=bi(t,e,l,i);if(0===s){if(r&&h||!r&&!h)return!1}else if(r&&!h||!r&&h)return!1;e=l}return!0}function Oi(t,e,n,i,o){for(var r=void 0!==o&&o,s=0,a=n.length;s<a;++s){var l=n[s],h=bi(t,e,l,i);(0===s?r&&h||!r&&!h:r&&!h||!r&&h)&&Ei(t,e,l,i),e=l}return e}var Ri=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pi=function(t){function e(e,n,i){var o=t.call(this)||this;return o.ends_=[],o.flatInteriorPointRevision_=-1,o.flatInteriorPoint_=null,o.maxDelta_=-1,o.maxDeltaRevision_=-1,o.orientedRevision_=-1,o.orientedFlatCoordinates_=null,void 0!==n&&i?(o.setFlatCoordinates(n,e),o.ends_=i):o.setCoordinates(e,n),o}return Ri(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?h(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,i){return i<_e(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt($n(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ei(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.containsXY=function(t,e){return mi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return pi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Oi(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,hi(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Me(this.getExtent());this.flatInteriorPoint_=xi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new gi(this.getFlatInteriorPoint(),On)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new di(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,n=this.ends_,i=[],o=0,r=0,s=n.length;r<s;++r){var a=n[r],l=new di(e.slice(o,a),t);i.push(l),o=a}return i},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Ti(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Oi(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=ai(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,i),new e(n,bn,i)},e.prototype.getType=function(){return Fn},e.prototype.intersectsExtent=function(t){return Si(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=ii(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()},e}(qn),Ii=Pi;function Mi(t){var e=t[0],n=t[1],i=t[2],o=t[3],r=[e,n,e,o,i,o,i,n,e,n];return new Pi(r,bn,[r.length])}var Fi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Li=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{element:document.createElement("div"),target:i.target})||this).extent=i.extent?i.extent:null;var o=void 0!==i.className?i.className:"ol-zoom-extent",r=void 0!==i.label?i.label:"E",s=void 0!==i.tipLabel?i.tipLabel:"Fit to extent",a=document.createElement("button");a.setAttribute("type","button"),a.title=s,a.appendChild("string"==typeof r?document.createTextNode(r):r),a.addEventListener(E,n.handleClick_.bind(n),!1);var l=o+" "+"ol-unselectable "+pt,h=n.element;return h.className=l,h.appendChild(a),n}return Fi(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Mi(e))},e}(ht);function Ai(t,e,n,i,o,r,a){var l,h,u=(n-e)/i;if(1===u)l=e;else if(2===u)l=e,h=o;else if(0!==u){for(var c=t[e],p=t[e+1],f=0,d=[0],_=e+i;_<n;_+=i){var g=t[_],y=t[_+1];f+=Math.sqrt((g-c)*(g-c)+(y-p)*(y-p)),d.push(f),c=g,p=y}var v=o*f,m=function(t,e,n){for(var i,o,r=n||s,a=0,l=t.length,h=!1;a<l;)(o=+r(t[i=a+(l-a>>1)],e))<0?a=i+1:(l=i,h=!o);return h?a:~a}(d,v);m<0?(h=(v-d[-m-2])/(d[-m-1]-d[-m-2]),l=e+(-m-2)*i):l=e+m*i}var x=a>1?a:2,C=r||new Array(x);for(_=0;_<x;++_)C[_]=void 0===l?NaN:void 0===h?t[l+_]:At(t[l+_],t[l+i+_],h);return C}function Di(t,e,n,i,o,r){if(n==e)return null;var s;if(o<t[e+i-1])return r?((s=t.slice(e,e+i))[i-1]=o,s):null;if(t[n-1]<o)return r?((s=t.slice(n-i,n))[i-1]=o,s):null;if(o==t[e+i-1])return t.slice(e,e+i);for(var a=e/i,l=n/i;a<l;){var h=a+l>>1;o<t[(h+1)*i-1]?l=h:a=h+1}var u=t[a*i-1];if(o==u)return t.slice((a-1)*i,(a-1)*i+i);var c=(o-u)/(t[(a+1)*i-1]-u);s=[];for(var p=0;p<i-1;++p)s.push(At(t[(a-1)*i+p],t[a*i+p],c));return s.push(o),s}function ki(t,e,n,i){for(var o=t[e],r=t[e+1],s=0,a=e+i;a<n;a+=i){var l=t[a],h=t[a+1];s+=Math.sqrt((l-o)*(l-o)+(h-r)*(h-r)),o=l,r=h}return s}var ji=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gi=function(t){function e(e,n){var i=t.call(this)||this;return i.flatMidpoint_=null,i.flatMidpointRevision_=-1,i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?i.setCoordinates(e,n):i.setFlatCoordinates(n,e),i}return ji(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?h(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,i){return i<_e(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Qn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ti(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,i))},e.prototype.forEachSegment=function(t){return Ci(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=On&&this.layout!=Rn)return null;var n=void 0!==e&&e;return Di(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n)},e.prototype.getCoordinates=function(){return li(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return Ai(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return ki(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=oi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,bn)},e.prototype.getType=function(){return In},e.prototype.intersectsExtent=function(t){return wi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ni(this.flatCoordinates,0,t,this.stride),this.changed()},e}(qn),zi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();var Wi=function(t){function e(e){var n=t.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var i=e;n.setGeometry(i)}else{var o=e;n.setProperties(o)}return n}return zi(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&t.setGeometry(n.clone());var i=this.getStyle();return i&&t.setStyle(i),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(A(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=F(t,C,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;Array.isArray(t)?e=t:(ce("function"==typeof t.getZIndex,41),e=[t]);return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(K),Xi="fraction",Ni="pixels",Yi="bottom-left",Ki="bottom-right",Bi="top-left",Zi="top-right",Vi=0,Ui=1,Hi=2,qi=3;function Ji(t){return t[0]>0&&t[1]>0}function Qi(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var $i=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Qi(t.scale),this.displacement_=t.displacement}return t.prototype.clone=function(){var e=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.opacity_},t.prototype.getRotateWithView=function(){return this.rotateWithView_},t.prototype.getRotation=function(){return this.rotation_},t.prototype.getScale=function(){return this.scale_},t.prototype.getScaleArray=function(){return this.scaleArray_},t.prototype.getDisplacement=function(){return this.displacement_},t.prototype.getAnchor=function(){return G()},t.prototype.getImage=function(t){return G()},t.prototype.getHitDetectionImage=function(){return G()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return G()},t.prototype.getImageSize=function(){return G()},t.prototype.getOrigin=function(){return G()},t.prototype.getSize=function(){return G()},t.prototype.setOpacity=function(t){this.opacity_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=Qi(t)},t.prototype.listenImageChange=function(t){G()},t.prototype.load=function(){G()},t.prototype.unlistenImageChange=function(t){G()},t}(),to=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,eo=/^([a-z]*)$|^hsla?\(.*\)$/i;function no(t){return"string"==typeof t?t:ao(t)}function io(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}var oo=function(){var t={},e=0;return function(n){var i;if(t.hasOwnProperty(n))i=t[n];else{if(e>=1024){var o=0;for(var r in t)0==(3&o++)&&(delete t[r],--e)}i=function(t){var e,n,i,o,r;eo.exec(t)&&(t=io(t));if(to.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),n=parseInt(t.substr(1+1*a,a),16),i=parseInt(t.substr(1+2*a,a),16),o=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,l&&(o=(o<<4)+o)),r=[e,n,i,o/255]}else 0==t.indexOf("rgba(")?so(r=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((r=t.slice(4,-1).split(",").map(Number)).push(1),so(r)):ce(!1,14);return r}(n),t[n]=i,++e}return i}}();function ro(t){return Array.isArray(t)?t:oo(t)}function so(t){return t[0]=Ot(t[0]+.5|0,0,255),t[1]=Ot(t[1]+.5|0,0,255),t[2]=Ot(t[2]+.5|0,0,255),t[3]=Ot(t[3],0,1),t}function ao(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var i=t[2];return i!=(0|i)&&(i=i+.5|0),"rgba("+e+","+n+","+i+","+(void 0===t[3]?1:t[3])+")"}var lo=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 n=this.cache_[e];0!=(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var i=ho(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var o=ho(t,e,n);this.cache_[o]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function ho(t,e,n){return e+":"+t+":"+(n?no(n):"null")}var uo=new lo,co=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),po=function(t){function e(e,n,i,o){var r=t.call(this)||this;return r.extent=e,r.pixelRatio_=i,r.resolution=n,r.state=o,r}return co(e,t),e.prototype.changed=function(){this.dispatchEvent(C)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return G()},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(){G()},e}(x),fo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();!function(t){function e(e,n,i,o,r,s){var a=t.call(this,e,n,i,Vi)||this;return a.src_=o,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.state=Vi,a.imageLoadFunction_=s,a}fo(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=qi,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=Ae(this.extent)/this.image_.height),this.state=Hi,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=Vi&&this.state!=qi||(this.state=Ui,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=_o(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=Ae(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(po);function _o(t,e,n){var i=t;if(i.src&&tt){var o=i.decode(),r=!0;return o.then((function(){r&&e()})).catch((function(t){r&&("EncodingError"===t.name&&"Invalid image type."===t.message?e():n())})),function(){r=!1}}var s=[L(i,R,e),L(i,w,n)];return function(){s.forEach(A)}}var go=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yo=null,vo=function(t){function e(e,n,i,o,r,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==o&&(a.image_.crossOrigin=o),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=r,a.size_=i,a.src_=n,a.tainted_,a}return go(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===Hi){yo||(yo=nt(1,1)),yo.drawImage(this.image_,0,0);try{yo.getImageData(0,0,1,1),this.tainted_=!1}catch(t){yo=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(C)},e.prototype.handleImageError_=function(){this.imageState_=qi,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Hi,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.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],n=nt(t,e);n.fillRect(0,0,t,e),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_==Vi){this.imageState_=Ui;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=_o(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var n=e.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply","multiply"===n.globalCompositeOperation||this.isTainted_())n.fillStyle=no(this.color_),n.fillRect(0,0,e.width/t,e.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var i=n.getImageData(0,0,e.width,e.height),o=i.data,r=this.color_[0]/255,s=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],h=0,u=o.length;h<u;h+=4)o[h]*=r,o[h+1]*=s,o[h+2]*=a,o[h+3]*=l;n.putImageData(i,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(x);var mo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xo=function(t){function e(e){var n=this,i=e||{},o=void 0!==i.opacity?i.opacity:1,r=void 0!==i.rotation?i.rotation:0,s=void 0!==i.scale?i.scale:1,a=void 0!==i.rotateWithView&&i.rotateWithView;(n=t.call(this,{opacity:o,rotation:r,scale:s,displacement:void 0!==i.displacement?i.displacement:[0,0],rotateWithView:a})||this).anchor_=void 0!==i.anchor?i.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=void 0!==i.anchorOrigin?i.anchorOrigin:Bi,n.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:Xi,n.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:Xi,n.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var l=void 0!==i.img?i.img:null,h=void 0!==i.imgSize?i.imgSize:null,u=i.src;ce(!(void 0!==u&&l),4),ce(!l||l&&h,5),void 0!==u&&0!==u.length||!l||(u=l.src||W(l)),ce(void 0!==u&&u.length>0,6);var c=void 0!==i.src?Vi:Hi;return n.color_=void 0!==i.color?ro(i.color):null,n.iconImage_=function(t,e,n,i,o,r){var s=uo.get(e,i,r);return s||(s=new vo(t,e,n,i,o,r),uo.set(e,i,r,s)),s}(l,u,h,n.crossOrigin_,c,n.color_),n.offset_=void 0!==i.offset?i.offset:[0,0],n.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:Bi,n.origin_=null,n.size_=void 0!==i.size?i.size:null,n}return mo(e,t),e.prototype.clone=function(){var t=this.getScale();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:Array.isArray(t)?t.slice():t,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_==Xi||this.anchorYUnits_==Xi){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Xi&&(t[0]*=e[0]),this.anchorYUnits_==Xi&&(t[1]*=e[1])}if(this.anchorOrigin_!=Bi){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Zi&&this.anchorOrigin_!=Ki||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Yi&&this.anchorOrigin_!=Ki||(t[1]=-t[1]+e[1])}var n=this.getDisplacement();return t[0]-=n[0],t[1]+=n[1],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.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Bi){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=Zi&&this.offsetOrigin_!=Ki||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=Yi&&this.offsetOrigin_!=Ki||(t[1]=n[1]-e[1]-t[1])}return 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(C,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(C,t)},e}($i),Co="opacity",wo="visible",So="extent",Eo="zIndex",bo="maxResolution",To="minResolution",Oo="maxZoom",Ro="minZoom",Po="source";function Io(t){return(Io="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 Mo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Fo=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=d({},e);return"object"===Io(e.properties)&&(delete i.properties,d(i,e.properties)),i[Co]=void 0!==e.opacity?e.opacity:1,ce("number"==typeof i[Co],64),i[wo]=void 0===e.visible||e.visible,i[Eo]=e.zIndex,i[bo]=void 0!==e.maxResolution?e.maxResolution:1/0,i[To]=void 0!==e.minResolution?e.minResolution:0,i[Ro]=void 0!==e.minZoom?e.minZoom:-1/0,i[Oo]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==i.className?e.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return Mo(e,t),e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},n=this.getZIndex();return e.opacity=Ot(Math.round(100*this.getOpacity())/100,0,1),e.sourceState=this.getSourceState(),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==n||e.managed?n:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return G()},e.prototype.getLayerStatesArray=function(t){return G()},e.prototype.getExtent=function(){return this.get(So)},e.prototype.getMaxResolution=function(){return this.get(bo)},e.prototype.getMinResolution=function(){return this.get(To)},e.prototype.getMinZoom=function(){return this.get(Ro)},e.prototype.getMaxZoom=function(){return this.get(Oo)},e.prototype.getOpacity=function(){return this.get(Co)},e.prototype.getSourceState=function(){return G()},e.prototype.getVisible=function(){return this.get(wo)},e.prototype.getZIndex=function(){return this.get(Eo)},e.prototype.setExtent=function(t){this.set(So,t)},e.prototype.setMaxResolution=function(t){this.set(bo,t)},e.prototype.setMinResolution=function(t){this.set(To,t)},e.prototype.setMaxZoom=function(t){this.set(Oo,t)},e.prototype.setMinZoom=function(t){this.set(Ro,t)},e.prototype.setOpacity=function(t){ce("number"==typeof t,64),this.set(Co,t)},e.prototype.setVisible=function(t){this.set(wo,t)},e.prototype.setZIndex=function(t){this.set(Eo,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(K),Lo="prerender",Ao="postrender",Do="precompose",ko="postcompose",jo="rendercomplete",Go="undefined",zo="ready",Wo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function Xo(t,e){if(!t.visible)return!1;var n=e.resolution;if(n<t.minResolution||n>=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}var No=function(t){function e(e){var n=this,i=d({},e);delete i.source,(n=t.call(this,i)||this).on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(Po,n.handleSourcePropertyChange_);var o=e.source?e.source:null;return n.setSource(o),n}return Wo(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(Po)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Go},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(A(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=F(t,C,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return n.renderFrame(t,e)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(A(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(A(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=F(t,Do,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);ce(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=F(this,C,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Po,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}(Fo);function Yo(t,e){for(var n=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function Ko(t,e){var n=Math.cos(e),i=Math.sin(e),o=t[0]*n-t[1]*i,r=t[1]*n+t[0]*i;return t[0]=o,t[1]=r,t}function Bo(t,e){if(e.canWrapX()){var n=Ge(e.getExtent()),i=function(t,e,n){var i=e.getExtent(),o=0;if(e.canWrapX()&&(t[0]<i[0]||t[0]>i[2])){var r=n||Ge(i);o=Math.floor((t[0]-i[0])/r)}return o}(t,e,n);i&&(t[0]-=i*n)}return t}var Zo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function Vo(t,e){uo.expire()}var Uo=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return Zo(e,t),e.prototype.dispatchRenderEvent=function(t,e){G()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;Wn(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Xn(i,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o,r,s,a){var l,h=e.viewState;function u(t,e,n,i){return o.call(r,e,t?n:null,i)}var c=h.projection,p=Bo(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&i){var d=Ge(c.getExtent());f.push([-d,0],[d,0])}for(var _=e.layerStatesArray,g=_.length,y=[],v=[],m=0;m<f.length;m++)for(var x=g-1;x>=0;--x){var C=_[x],w=C.layer;if(w.hasRenderer()&&Xo(C,h)&&s.call(a,w)){var S=w.getRenderer(),E=w.getSource();if(S&&E){var b=E.getWrapX()?p:t,T=u.bind(null,C.managed);v[0]=b[0]+f[m][0],v[1]=b[1]+f[m][1],l=S.forEachFeatureAtCoordinate(v,e,n,T,y)}if(l)return l}}if(0!==y.length){var O=1/y.length;return y.forEach((function(t,e){return t.distanceSq+=e*O})),y.sort((function(t,e){return t.distanceSq-e.distanceSq})),y.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,n,i,o){return G()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,i,o,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,i,c,this,o,r)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){G()},e.prototype.scheduleExpireIconCache=function(t){uo.canExpireCache()&&t.postRenderFunctions.push(Vo)},e}(r),Ho=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qo=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.inversePixelTransform=n,r.frameState=i,r.context=o,r}return Ho(e,t),e}(i),Jo="10px sans-serif",Qo="#000",$o="round",tr=[],er="round",nr="#000",ir="center",or="middle",rr=[0,0,0,0],sr=new K;(new x).setSize=function(){console.warn("labelCache is deprecated.")};var ar,lr,hr=null,ur={},cr=function(){var t,e,n="32px ",i=["monospace","serif"],o=i.length,r="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,h=0;h<o;++h){var u=i[h];if(e=dr(t+" "+s+" "+n+u,r),a!=u){var c=dr(t+" "+s+" "+n+a+","+u,r);l=l&&c!=e}}return!!l}function a(){for(var e=!0,n=sr.getKeys(),i=0,o=n.length;i<o;++i){var r=n[i];sr.get(r)<100&&(s.apply(this,r.split("\n"))?(_(ur),hr=null,ar=void 0,sr.set(r,100)):(sr.set(r,sr.get(r)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var n=gt(e);if(n)for(var i=n.families,o=0,r=i.length;o<r;++o){var l=i[o],h=n.style+"\n"+n.weight+"\n"+l;void 0===sr.get(h)&&(sr.set(h,100,!0),s(n.style,n.weight,l)||(sr.set(h,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),pr=function(t){var e=ur[t];if(null==e){if($){var n=gt(t),i=fr(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else lr||((lr=document.createElement("div")).innerHTML="M",lr.style.minHeight="0",lr.style.maxHeight="none",lr.style.height="auto",lr.style.padding="0",lr.style.border="none",lr.style.position="absolute",lr.style.display="block",lr.style.left="-99999px"),lr.style.font=t,document.body.appendChild(lr),e=lr.offsetHeight,document.body.removeChild(lr);ur[t]=e}return e};function fr(t,e){return hr||(hr=nt(1,1)),t!=ar&&(hr.font=t,ar=hr.font),hr.measureText(e)}function dr(t,e){return fr(t,e).width}function _r(t,e,n){if(e in n)return n[e];var i=dr(t,e);return n[e]=i,i}function gr(t,e,n,i,o,r,s,a,l,h,u){t.save(),1!==n&&(t.globalAlpha*=n),e&&t.setTransform.apply(t,e),i.contextInstructions?(t.translate(l,h),t.scale(u[0],u[1]),function(t,e){for(var n=t.contextInstructions,i=0,o=n.length;i<o;i+=2)Array.isArray(n[i+1])?e[n[i]].apply(e,n[i+1]):e[n[i]]=n[i+1]}(i,t)):u[0]<0||u[1]<0?(t.translate(l,h),t.scale(u[0],u[1]),t.drawImage(i,o,r,s,a,0,0,s,a)):t.drawImage(i,o,r,s,a,l,h,s*u[0],a*u[1]),t.restore()}var yr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vr=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=F(sr,o,e.redrawText.bind(e)),n.element_=document.createElement("div");var i=n.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",n.element_.className="ol-unselectable ol-layers";var r=e.getViewport();return r.insertBefore(n.element_,r.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return yr(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var i=new qo(t,void 0,e);n.dispatchEvent(i)}},e.prototype.disposeInternal=function(){A(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(Do,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=t.viewState;this.children_.length=0;for(var i=[],o=null,r=0,s=e.length;r<s;++r){var a=e[r];if(t.layerIndex=r,Xo(a,n)&&(a.sourceState==zo||a.sourceState==Go)){var l=a.layer,h=l.render(t,o);h&&(h!==o&&(this.children_.push(h),o=h),"getDeclutter"in l&&i.push(l))}}for(r=i.length-1;r>=0;--r)i[r].renderDeclutter(t);!function(t,e){for(var n=t.childNodes,i=0;;++i){var o=n[i],r=e[i];if(!o&&!r)break;o!==r&&(o?r?t.insertBefore(r,o):(t.removeChild(o),--i):t.appendChild(r))}}(this.element_,this.children_),this.dispatchRenderEvent(ko,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,n,i,o){for(var r=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],h=l.layer;if(h.hasRenderer()&&Xo(l,r)&&o(h)){var u=h.getRenderer().getDataAtPixel(t,e,n);if(u){var c=i(h,u);if(c)return c}}}},e}(Uo),mr="add",xr="remove",Cr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wr="length",Sr=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.element=n,o.index=i,o}return Cr(e,t),e}(i),Er=function(t){function e(e,n){var i=t.call(this)||this;i.on,i.once,i.un;var o=n||{};if(i.unique_=!!o.unique,i.array_=e||[],i.unique_)for(var r=0,s=i.array_.length;r<s;++r)i.assertUnique_(i.array_[r],r);return i.updateLength_(),i}return Cr(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e<n;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)t(e[n],n,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(wr)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Sr(mr,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)if(e[n]===t)return this.removeAt(n)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Sr(xr,e,t)),e},e.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Sr(xr,i,t)),this.dispatchEvent(new Sr(mr,e,t))}else{for(var o=n;o<t;++o)this.insertAt(o,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(wr,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var n=0,i=this.array_.length;n<i;++n)if(this.array_[n]===t&&n!==e)throw new ue(58)},e}(K),br=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Tr="layers",Or=function(t){function e(e){var n=this,i=e||{},o=d({},i);delete o.layers;var r=i.layers;return(n=t.call(this,o)||this).layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(Tr,n.handleLayersChanged_),r?Array.isArray(r)?r=new Er(r.slice(),{unique:!0}):ce("function"==typeof r.getArray,43):r=new Er(void 0,{unique:!0}),n.setLayers(r),n}return br(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(A),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(F(t,mr,this.handleLayersAdd_,this),F(t,xr,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(A);_(this.listenerKeys_);for(var n=t.getArray(),i=0,r=n.length;i<r;i++){var s=n[i];this.listenerKeys_[W(s)]=[F(s,o,this.handleLayerChange_,this),F(s,C,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[W(e)]=[F(e,o,this.handleLayerChange_,this),F(e,C,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=W(t.element);this.listenerKeys_[e].forEach(A),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(Tr)},e.prototype.setLayers=function(t){this.set(Tr,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],n=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var i=this.getLayerState(),o=i.zIndex;t||void 0!==i.zIndex||(o=0);for(var r=n,s=e.length;r<s;r++){var a=e[r];a.opacity*=i.opacity,a.visible=a.visible&&i.visible,a.maxResolution=Math.min(a.maxResolution,i.maxResolution),a.minResolution=Math.max(a.minResolution,i.minResolution),a.minZoom=Math.max(a.minZoom,i.minZoom),a.maxZoom=Math.min(a.maxZoom,i.maxZoom),void 0!==i.extent&&(void 0!==a.extent?a.extent=De(a.extent,i.extent):a.extent=i.extent),void 0===a.zIndex&&(a.zIndex=o)}return e},e.prototype.getSourceState=function(){return zo},e}(Fo),Rr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pr=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.map=n,o.frameState=void 0!==i?i:null,o}return Rr(e,t),e}(i),Ir=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Mr=function(t){function e(e,n,i,o,r){var s=t.call(this,e,n,r)||this;return s.originalEvent=i,s.pixel_=null,s.coordinate_=null,s.dragging=void 0!==o&&o,s}return Ir(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(Pr),Fr={SINGLECLICK:"singleclick",CLICK:E,DBLCLICK:b,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Lr="pointermove",Ar="pointerdown",Dr=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kr=function(t){function e(e,n){var i=t.call(this,e)||this;i.map_=e,i.clickTimeoutId_,i.emulateClicks_=!1,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=void 0===n?1:n,i.down_=null;var o=i.map_.getViewport();return i.activePointers_=0,i.trackedTouches_={},i.element_=o,i.pointerdownListenerKey_=F(o,Ar,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=F(o,Lr,i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(I,i.boundHandleTouchMove_,!!et&&{passive:!1}),i}return Dr(e,t),e.prototype.emulateClick_=function(t){var e=new Mr(Fr.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Mr(Fr.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new Mr(Fr.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==Fr.POINTERUP||e.type==Fr.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==Fr.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new Mr(Fr.POINTERUP,this.map_,t);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(A),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_,this.updateActivePointers_(t);var e=new Mr(Fr.POINTERDOWN,this.map_,t);for(var n in this.dispatchEvent(e),this.down_={},t){var i=t[n];this.down_[n]="function"==typeof i?f:i}if(0===this.dragListenerKeys_.length){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push(F(o,Fr.POINTERMOVE,this.handlePointerMove_,this),F(o,Fr.POINTERUP,this.handlePointerUp_,this),F(this.element_,Fr.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push(F(this.element_.getRootNode(),Fr.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new Mr(Fr.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Mr(t.type,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(A(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(I,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(A(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(A),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(x),jr="layergroup",Gr="size",zr="target",Wr="view",Xr=1/0,Nr=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,_(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},t.prototype.enqueue=function(t){ce(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=Xr&&(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_,n=this.priorities_,i=e.length,o=e[t],r=n[t],s=t;t<i>>1;){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),h=l<i&&n[l]<n[a]?l:a;e[t]=e[h],n[t]=n[h],t=h}e[t]=o,n[t]=r,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var n=this.elements_,i=this.priorities_,o=n[e],r=i[e];e>t;){var s=this.getParentIndex_(e);if(!(i[s]>r))break;n[e]=n[s],i[e]=i[s],e=s}n[e]=o,i[e]=r},t.prototype.reprioritize=function(){var t,e,n,i=this.priorityFunction_,o=this.elements_,r=this.priorities_,s=0,a=o.length;for(e=0;e<a;++e)(n=i(t=o[e]))==Xr?delete this.queuedElements_[this.keyFunction_(t)]:(r[s]=n,o[s++]=t);o.length=s,r.length=s,this.heapify_()},t}(),Yr=0,Kr=1,Br=2,Zr=3,Vr=4,Ur=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hr=function(t){function e(e,n){var i=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return i.boundHandleTileChange_=i.handleTileChange.bind(i),i.tileChangeCallback_=n,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return Ur(e,t),e.prototype.enqueue=function(e){var n=t.prototype.enqueue.call(this,e);n&&e[0].addEventListener(C,this.boundHandleTileChange_);return n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,n=e.getState();if(n===Br||n===Zr||n===Vr){e.removeEventListener(C,this.boundHandleTileChange_);var i=e.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var n,i,o=0;this.tilesLoading_<t&&o<e&&this.getCount()>0;)i=(n=this.dequeue()[0]).getKey(),n.getState()!==Yr||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++o,n.load())},e}(Nr);var qr=0,Jr=1,Qr="center",$r="resolution",ts="rotation",es=256;function ns(t,e,n){return function(i,o,r,s,a){if(i){var l=e?0:r[0]*o,h=e?0:r[1]*o,u=a?a[0]:0,c=a?a[1]:0,p=t[0]+l/2+u,f=t[2]-l/2+u,d=t[1]+h/2+c,_=t[3]-h/2+c;p>f&&(f=p=(f+p)/2),d>_&&(_=d=(_+d)/2);var g=Ot(i[0],p,f),y=Ot(i[1],d,_),v=30*o;return s&&n&&(g+=-v*Math.log(1+Math.max(0,p-i[0])/v)+v*Math.log(1+Math.max(0,i[0]-f)/v),y+=-v*Math.log(1+Math.max(0,d-i[1])/v)+v*Math.log(1+Math.max(0,i[1]-_)/v)),[g,y]}}}function is(t){return t}function os(t,e,n,i){var o=Ge(e)/n[0],r=Ae(e)/n[1];return i?Math.min(t,Math.max(o,r)):Math.min(t,Math.min(o,r))}function rs(t,e,n){var i=Math.min(t,e);return i*=Math.log(1+50*Math.max(0,t/e-1))/50+1,n&&(i=Math.max(i,n),i/=Math.log(1+50*Math.max(0,n/t-1))/50+1),Ot(i,n/2,2*e)}function ss(t,e,n,i,o){return function(r,s,a,l){if(void 0!==r){var h=i?os(t,i,a,o):t;return(void 0===n||n)&&l?rs(r,h,e):Ot(r,e,h)}}}function as(t){return void 0!==t?0:void 0}function ls(t){return void 0!==t?t:void 0}var hs=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function us(t,e){setTimeout((function(){t(e)}),0)}function cs(t){return!(t.sourceCenter&&t.targetCenter&&!Yo(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function ps(t,e,n,i,o){var r=Math.cos(-o),s=Math.sin(-o),a=t[0]*r-t[1]*s,l=t[1]*r+t[0]*s;return[(a+=(e[0]/2-n[0])*i)*r-(l+=(n[1]-e[1]/2)*i)*(s=-s),l*r+a*s]}var fs=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=d({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=qe(i.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.cancelAnchor_=void 0,i.center&&(i.center=hn(i.center,n.projection_)),i.extent&&(i.extent=cn(i.extent,n.projection_)),n.applyOptions_(i),n}return hs(e,t),e.prototype.applyOptions_=function(t){var e=function(t){var e,n,i,o=28,r=2,s=void 0!==t.minZoom?t.minZoom:0,l=void 0!==t.maxZoom?t.maxZoom:o,h=void 0!==t.zoomFactor?t.zoomFactor:r,u=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,p=void 0!==t.showFullExtent&&t.showFullExtent,f=qe(t.projection,"EPSG:3857"),d=f.getExtent(),_=t.constrainOnlyCenter,g=t.extent;u||g||!f.isGlobal()||(_=!1,g=d);if(void 0!==t.resolutions){var y=t.resolutions;n=y[s],i=void 0!==y[l]?y[l]:y[y.length-1],e=t.constrainResolution?function(t,e,n,i){return function(o,r,s,l){if(void 0!==o){var h=t[0],u=t[t.length-1],c=n?os(h,n,s,i):h;if(l)return void 0===e||e?rs(o,c,u):Ot(o,u,c);var p=Math.min(c,o),f=Math.floor(a(t,p,r));return t[f]>c&&f<t.length-1?t[f+1]:t[f]}}}(y,c,!_&&g,p):ss(n,i,c,!_&&g,p)}else{var v=(d?Math.max(Ge(d),Ae(d)):360*Et[bt.DEGREES]/f.getMetersPerUnit())/es/Math.pow(r,0),m=v/Math.pow(r,o-0);void 0!==(n=t.maxResolution)?s=0:n=v/Math.pow(h,s),void 0===(i=t.minResolution)&&(i=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(h,l):v/Math.pow(h,l):m),l=s+Math.floor(Math.log(n/i)/Math.log(h)),i=n/Math.pow(h,l-s),e=t.constrainResolution?function(t,e,n,i,o,r){return function(s,a,l,h){if(void 0!==s){var u=o?os(e,o,l,r):e,c=void 0!==n?n:0;if(h)return void 0===i||i?rs(s,u,c):Ot(s,c,u);var p=Math.ceil(Math.log(e/u)/Math.log(t)-1e-9),f=-a*(.5-1e-9)+.5,d=Math.min(u,s),_=Math.floor(Math.log(e/d)/Math.log(t)+f),g=Math.max(p,_);return Ot(e/Math.pow(t,g),c,u)}}}(h,n,i,c,!_&&g,p):ss(n,i,c,!_&&g,p)}return{constraint:e,maxResolution:n,minResolution:i,minZoom:s,zoomFactor:h}}(t);this.maxResolution_=e.maxResolution,this.minResolution_=e.minResolution,this.zoomFactor_=e.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=e.minZoom;var n=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return ns(t.extent,t.constrainOnlyCenter,e)}var n=qe(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&n.isGlobal()){var i=n.getExtent().slice();return i[0]=-1/0,i[2]=1/0,ns(i,!1,!1)}return is}(t),i=e.constraint,o=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(r=o||Ft(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=r?0:t:void 0}):!1===e?ls:"number"==typeof e?(n=e,i=2*Math.PI/n,function(t,e){return e?t:void 0!==t?t=Math.floor(t/i+.5)*i:void 0}):ls}return as;var n,i;var o,r}(t);this.constraints_={center:n,resolution:i,rotation:o},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom),this.setProperties({}),this.options_=t},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var n=this.getCenter();if(n){var i=t||[0,0,0,0];e=e||[0,0,0,0];var o=this.getResolution(),r=o/2*(i[3]-e[3]+e[1]-i[1]),s=o/2*(i[0]-e[0]+e[2]-i[2]);this.setCenterInternal([n[0]+r,n[1]-s])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=d({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),d({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),n=0;n<e.length;++n){var i=arguments[n];i.center&&((i=d({},i)).center=hn(i.center,this.getProjection())),i.anchor&&((i=d({},i)).anchor=hn(i.anchor,this.getProjection())),e[n]=i}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,n=arguments.length;if(n>1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n),!this.isDef()){var i=arguments[n-1];return i.center&&this.setCenterInternal(i.center),void 0!==i.zoom&&this.setZoom(i.zoom),void 0!==i.rotation&&this.setRotation(i.rotation),void(e&&us(e,!0))}for(var o=Date.now(),r=this.targetCenter_.slice(),s=this.targetResolution_,a=this.targetRotation_,l=[],h=0;h<n;++h){var u=arguments[h],c={start:o,complete:!1,anchor:u.anchor,duration:void 0!==u.duration?u.duration:1e3,easing:u.easing||mt,callback:e};if(u.center&&(c.sourceCenter=r,c.targetCenter=u.center.slice(),r=c.targetCenter),void 0!==u.zoom?(c.sourceResolution=s,c.targetResolution=this.getResolutionForZoom(u.zoom),s=c.targetResolution):u.resolution&&(c.sourceResolution=s,c.targetResolution=u.resolution,s=c.targetResolution),void 0!==u.rotation){c.sourceRotation=a;var p=Lt(u.rotation-a+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=a+p,a=c.targetRotation}cs(c)?c.complete=!0:o+=c.duration,l.push(c)}this.animations_.push(l),this.setHint(qr,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[qr]>0},e.prototype.getInteracting=function(){return this.hints_[Jr]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(qr,-this.hints_[qr]);for(var e=0,n=this.animations_.length;e<n;++e){var i=this.animations_[e];if(i[0].callback&&us(i[0].callback,!1),!t)for(var o=0,r=i.length;o<r;++o){var s=i[o];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,n=this.animations_.length-1;n>=0;--n){for(var i=this.animations_[n],o=!0,r=0,s=i.length;r<s;++r){var a=i[r];if(!a.complete){var l=t-a.start,h=a.duration>0?l/a.duration:1;h>=1?(a.complete=!0,h=1):o=!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?Lt(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(o){this.animations_[n]=null,this.setHint(qr,-1);var x=i[0].callback;x&&us(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 n,i,o,r=this.getCenterInternal();return void 0!==r&&(Ko(n=[r[0]-e[0],r[1]-e[1]],t-this.getRotation()),o=e,(i=n)[0]+=+o[0],i[1]+=+o[1]),n},e.prototype.calculateCenterZoom=function(t,e){var n,i=this.getCenterInternal(),o=this.getResolution();void 0!==i&&void 0!==o&&(n=[e[0]-t*(e[0]-i[0])/o,e[1]-t*(e[1]-i[1])/o]);return n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],i=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(i*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?ln(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(Qr)},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 un(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();ce(n,1);var i=this.getResolution();ce(void 0!==i,2);var o=this.getRotation();return ce(void 0!==o,3),Le(n,i,o,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($r)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(cn(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),i=Ge(t)/n[0],o=Ae(t)/n[1];return Math.max(i,o)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,o=Math.log(n/i)/Math.log(e);return function(t){return n/Math.pow(e,t*o)}},e.prototype.getRotation=function(){return this.get(ts)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,o=Math.log(n/i)/e;return function(t){return Math.log(n/t)/e/o}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),n=this.getRotation(),i=this.getCenterInternal(),o=this.padding_;if(o){var r=this.getViewportSizeMinusPadding_();i=ps(i,this.getViewportSize_(),[r[0]/2+o[3],r[1]/2+o[0]],e,n)}return{center:i.slice(0),projection:void 0!==t?t:null,resolution:e,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,n,i=this.minZoom_||0;if(this.resolutions_){var o=a(this.resolutions_,t,1);i=o,e=this.resolutions_[o],n=o==this.resolutions_.length-1?2:e/this.resolutions_[o+1]}else e=this.maxResolution_,n=this.zoomFactor_;return i+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Ot(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Ot(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if(ce(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))ce(!We(t),25),n=Mi(i=cn(t,this.getProjection()));else if(t.getType()===jn){var i;(n=Mi(i=cn(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),Me(i))}else{var o=an();n=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),i=Math.sin(-e),o=t.getFlatCoordinates(),r=t.getStride(),s=1/0,a=1/0,l=-1/0,h=-1/0,u=0,c=o.length;u<c;u+=r){var p=o[u]*n-o[u+1]*i,f=o[u]*i+o[u+1]*n;s=Math.min(s,p),a=Math.min(a,f),l=Math.max(l,p),h=Math.max(h,f)}return[s,a,l,h]},e.prototype.fitInternal=function(t,e){var n=e||{},i=n.size;i||(i=this.getViewportSizeMinusPadding_());var o,r=void 0!==n.padding?n.padding:[0,0,0,0],s=void 0!==n.nearest&&n.nearest;o=void 0!==n.minResolution?n.minResolution:void 0!==n.maxZoom?this.getResolutionForZoom(n.maxZoom):0;var a=this.rotatedExtentForGeometry(t),l=this.getResolutionForExtentInternal(a,[i[0]-r[1]-r[3],i[1]-r[0]-r[2]]);l=isNaN(l)?o:Math.max(l,o),l=this.getConstrainedResolution(l,s?0:1);var h=this.getRotation(),u=Math.sin(h),c=Math.cos(h),p=Me(a);p[0]+=(r[1]-r[3])/2*l,p[1]+=(r[0]-r[2])/2*l;var d=p[0]*c-p[1]*u,_=p[1]*c+p[0]*u,g=this.getConstrainedCenter([d,_],l),y=n.callback?n.callback:f;void 0!==n.duration?this.animateInternal({resolution:l,center:g,duration:n.duration,easing:n.easing},y):(this.targetResolution_=l,this.targetCenter_=g,this.applyTargetState_(!1,!0),us(y,!0))},e.prototype.centerOn=function(t,e,n){this.centerOnInternal(hn(t,this.getProjection()),e,n)},e.prototype.centerOnInternal=function(t,e,n){this.setCenterInternal(ps(t,e,n,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,n,i){var o,r=this.padding_;if(r&&t){var s=this.getViewportSizeMinusPadding_(-n),a=ps(t,i,[s[0]/2+r[3],s[1]/2+r[0]],e,n);o=[t[0]-a[0],t[1]-a[1]]}return o},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=ln(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var n=e&&hn(e,this.getProjection());this.adjustResolutionInternal(t,n)},e.prototype.adjustResolutionInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,i,n);e&&(this.targetCenter_=this.calculateCenterZoom(o,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=hn(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(i,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(hn(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var n=this.getAnimating()||this.getInteracting()||e,i=this.constraints_.rotation(this.targetRotation_,n),o=this.getViewportSize_(i),r=this.constraints_.resolution(this.targetResolution_,0,o,n),s=this.constraints_.center(this.targetCenter_,r,o,n,this.calculateCenterShift(this.targetCenter_,r,i,o));this.get(ts)!==i&&this.set(ts,i),this.get($r)!==r&&this.set($r,r),this.get(Qr)&&Yo(this.get(Qr),s)||this.set(Qr,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,n){var i=void 0!==t?t:200,o=e||0,r=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(r),a=this.constraints_.resolution(this.targetResolution_,o,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,r,s));if(0===i&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=r,this.targetCenter_=l,void this.applyTargetState_();var h=n||(0===i?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===r&&this.getCenterInternal()&&Yo(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:l,resolution:a,duration:i,easing:vt,anchor:h}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Jr,1)},e.prototype.endInteraction=function(t,e,n){var i=n&&hn(n,this.getProjection());this.endInteractionInternal(t,e,i)},e.prototype.endInteractionInternal=function(t,e,n){this.setHint(Jr,-1),this.resolveConstraints(t,e,n)},e.prototype.getConstrainedCenter=function(t,e){var n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)},e.prototype.getConstrainedZoom=function(t,e){var n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))},e.prototype.getConstrainedResolution=function(t,e){var n=e||0,i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,n,i)},e}(K),ds=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();var _s=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var n,i,o,r={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Or({layers:t.layers});r[jr]=s,r[zr]=t.target,r[Wr]=void 0!==t.view?t.view:new fs,void 0!==t.controls&&(Array.isArray(t.controls)?n=new Er(t.controls.slice()):(ce("function"==typeof t.controls.getArray,47),n=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?i=new Er(t.interactions.slice()):(ce("function"==typeof t.interactions.getArray,48),i=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?o=new Er(t.overlays.slice()):(ce("function"==typeof t.overlays.getArray,49),o=t.overlays):o=new Er;return{controls:n,interactions:i,keyboardEventTarget:e,overlays:o,values:r}}(e);return n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,n.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:Q,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=[1,0,0,1,0,0],n.pixelToCoordinateTransform_=[1,0,0,1,0,0],n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=e.moveTolerance,n.keyboardEventTarget_=i.keyboardEventTarget,n.keyHandlerKeys_=null,n.controls=i.controls||new Er,n.interactions=i.interactions||new Er,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.handleResize_,n.postRenderFunctions_=[],n.tileQueue_=new Hr(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(jr,n.handleLayerGroupChanged_),n.addChangeListener(Wr,n.handleViewChanged_),n.addChangeListener(Gr,n.handleSizeChanged_),n.addChangeListener(zr,n.handleTargetChanged_),n.setProperties(i.values),n.controls.forEach(function(t){t.setMap(this)}.bind(n)),n.controls.addEventListener(mr,function(t){t.element.setMap(this)}.bind(n)),n.controls.addEventListener(xr,function(t){t.element.setMap(null)}.bind(n)),n.interactions.forEach(function(t){t.setMap(this)}.bind(n)),n.interactions.addEventListener(mr,function(t){t.element.setMap(this)}.bind(n)),n.interactions.addEventListener(xr,function(t){t.element.setMap(null)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n.overlays_.addEventListener(mr,function(t){this.addOverlayInternal_(t.element)}.bind(n)),n.overlays_.addEventListener(xr,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(n)),n}return ds(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,n){if(this.frameState_){var i=this.getCoordinateFromPixelInternal(t),o=void 0!==(n=void 0!==n?n:{}).hitTolerance?n.hitTolerance:0,r=void 0!==n.layerFilter?n.layerFilter:c,s=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,o,s,e,null,r,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var n=[];return this.forEachFeatureAtPixel(t,(function(t){n.push(t)}),e),n},e.prototype.forEachLayerAtPixel=function(t,e,n){if(this.frameState_){var i=n||{},o=void 0!==i.hitTolerance?i.hitTolerance:0,r=i.layerFilter||c;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,o,e,r)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var n=this.getCoordinateFromPixelInternal(t),i=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:c,o=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,o,r,i,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]},e.prototype.getTarget=function(){return this.get(zr)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return ln(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?zn(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(jr)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var i=t[e].layer.getSource();if(i&&i.loading)return!0}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=hn(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?zn(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(Gr)},e.prototype.getView=function(){return this.get(Wr)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,n,i){return function(t,e,n,i,o){if(!t||!(n in t.wantedTiles))return Xr;if(!t.wantedTiles[n][e.getKey()])return Xr;var r=t.viewState.center,s=i[0]-r[0],a=i[1]-r[1];return 65536*Math.log(o)+Math.sqrt(s*s+a*a)/o}(this.frameState_,t,e,n,i)},e.prototype.handleBrowserEvent=function(t,e){var n=e||t.type,i=new Mr(n,this,t);this.handleMapBrowserEvent(i)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,n=e.type;if(n===Ar||n===M||n===T){var i=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():i,r=e.target;if(this.overlayContainerStopEvent_.contains(r)||!(o===i?i.documentElement:o).contains(r))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement())if(!l.handleEvent(t)||t.propagationStopped)break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,i=n;if(t){var o=t.viewHints;if(o[qr]||o[Jr]){var r=Date.now()-t.time>8;n=r?0:8,i=r?0:2}}e.getTilesLoading()<n&&(e.reprioritize(),e.loadMoreTiles(n,i))}!t||!this.hasListener(jo)||t.animate||this.tileQueue_.getTilesLoading()||this.getLoading()||this.renderer_.dispatchRenderEvent(jo,t);for(var s=this.postRenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.mapBrowserEventHandler_){for(var e=0,n=this.keyHandlerKeys_.length;e<n;++e)A(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null,this.viewport_.removeEventListener(S,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(M,this.boundHandleBrowserEvent_),void 0!==this.handleResize_&&(removeEventListener(P,this.handleResize_,!1),this.handleResize_=void 0),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,st(this.viewport_)}if(t){for(var i in t.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new kr(this,this.moveTolerance_),Fr)this.mapBrowserEventHandler_.addEventListener(Fr[i],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(S,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(M,this.boundHandleBrowserEvent_,!!et&&{passive:!1});var o=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[F(o,T,this.handleBrowserEvent,this),F(o,O,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(P,this.handleResize_,!1))}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(A(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(A(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=F(t,o,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=F(t,C,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(A),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[F(t,o,this.render,this),F(t,C,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,n=this.getSize(),i=this.getView(),o=this.frameState_,r=null;if(void 0!==n&&Ji(n)&&i&&i.isDef()){var s=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=i.getState();r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Le(a.center,a.resolution,a.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{}}}if(this.frameState_=r,this.renderer_.renderFrame(r),r){if(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),o)(!this.previousExtent_||!We(this.previousExtent_)&&!Se(r.extent,this.previousExtent_))&&(this.dispatchEvent(new Pr(Z,this,o)),this.previousExtent_=we(this.previousExtent_));this.previousExtent_&&!r.viewHints[qr]&&!r.viewHints[Jr]&&!Se(r.extent,this.previousExtent_)&&(this.dispatchEvent(new Pr(V,this,r)),de(r.extent,this.previousExtent_))}this.dispatchEvent(new Pr(B,this,r)),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){this.set(jr,t)},e.prototype.setSize=function(t){this.set(Gr,t)},e.prototype.setTarget=function(t){this.set(zr,t)},e.prototype.setView=function(t){this.set(Wr,t)},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var n=getComputedStyle(t),i=t.offsetWidth-parseFloat(n.borderLeftWidth)-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderRightWidth),o=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);isNaN(i)||isNaN(o)||Ji(e=[i,o])||console.warn("No map visible because the map container's width or height are 0.")}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}},e}(K),gs=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ys=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).ulElement_=document.createElement("ul"),n.collapsed_=void 0===i.collapsed||i.collapsed,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=void 0!==i.collapsible,n.collapsible_=void 0===i.collapsible||i.collapsible,n.collapsible_||(n.collapsed_=!1);var o=void 0!==i.className?i.className:"ol-attribution",r=void 0!==i.tipLabel?i.tipLabel:"Attributions",s=void 0!==i.expandClassName?i.expandClassName:o+"-expand",a=void 0!==i.collapseLabel?i.collapseLabel:"»",l=void 0!==i.collapseClassName?i.collapseClassName:o+"-collpase";"string"==typeof a?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=a,n.collapseLabel_.className=l):n.collapseLabel_=a;var h=void 0!==i.label?i.label:"i";"string"==typeof h?(n.label_=document.createElement("span"),n.label_.textContent=h,n.label_.className=s):n.label_=h;var u=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=r,n.toggleButton_.appendChild(u),n.toggleButton_.addEventListener(E,n.handleClick_.bind(n),!1);var c=o+" "+"ol-unselectable "+pt+(n.collapsed_&&n.collapsible_?" ol-collapsed":"")+(n.collapsible_?"":" ol-uncollapsible"),p=n.element;return p.className=c,p.appendChild(n.toggleButton_),p.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return gs(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},n=[],i=!0,o=t.layerStatesArray,r=0,s=o.length;r<s;++r){var a=o[r];if(Xo(a,t.viewState)){var l=a.layer.getSource();if(l){var h=l.getAttributions();if(h){var u=h(t);if(u)if(i=i&&!1!==l.getAttributionsCollapsible(),Array.isArray(u))for(var c=0,p=u.length;c<p;++c)u[c]in e||(n.push(u[c]),e[u[c]]=!0);else u in e||(n.push(u),e[u]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(i),n},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!u(e,this.renderedAttributions_)){at(this.ulElement_);for(var i=0,o=e.length;i<o;++i){var r=document.createElement("li");r.innerHTML=e[i],this.ulElement_.appendChild(r)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(ft),this.collapsed_?rt(this.collapseLabel_,this.label_):rt(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(ht);var vs="active",ms=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function xs(t,e,n,i){var o=t.getZoom();if(void 0!==o){var r=t.getConstrainedZoom(o+e),s=t.getResolutionForZoom(r);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:n,duration:void 0!==i?i:250,easing:vt})}}var Cs=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return ms(e,t),e.prototype.getActive=function(){return this.get(vs)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(vs,t)},e.prototype.setMap=function(t){this.map_=t},e}(K),ws=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ss=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:250,n}return ws(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==Fr.DBLCLICK){var n=t.originalEvent,i=t.map,o=t.coordinate,r=n.shiftKey?-this.delta_:this.delta_;xs(i.getView(),r,o,this.duration_),n.preventDefault(),e=!0}return!e},e}(Cs),Es=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function bs(t){for(var e=t.length,n=0,i=0,o=0;o<e;o++)n+=t[o].clientX,i+=t[o].clientY;return[n/e,i/e]}var Ts=function(t){function e(e){var n=this,i=e||{};return n=t.call(this,i)||this,i.handleDownEvent&&(n.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(n.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(n.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(n.handleUpEvent=i.handleUpEvent),i.stopDown&&(n.stopDown=i.stopDown),n.handlingDownUpSequence=!1,n.trackedPointers_={},n.targetPointers=[],n}return Es(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Fr.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Fr.POINTERUP){var n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==Fr.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==Fr.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===Fr.POINTERDOWN||e===Fr.POINTERDRAG||e===Fr.POINTERUP}(t)){var e=t.originalEvent,n=e.pointerId.toString();t.type==Fr.POINTERUP?delete this.trackedPointers_[n]:(t.type==Fr.POINTERDOWN||n in this.trackedPointers_)&&(this.trackedPointers_[n]=e),this.targetPointers=g(this.trackedPointers_)}},e}(Cs);function Os(t){var e=arguments;return function(t){for(var n=!0,i=0,o=e.length;i<o&&(n=n&&e[i](t));++i);return n}}var Rs=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Ps=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){return t.target.getTargetElement().contains(document.activeElement)}(t)},Is=c,Ms=function(t){var e=t.originalEvent;return 0==e.button&&!(q&&J&&e.ctrlKey)},Fs=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Ls=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},As=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},Ds=function(t){var e=t.originalEvent;return ce(void 0!==e,56),"mouse"==e.pointerType},ks=function(t){var e=t.originalEvent;return ce(void 0!==e,56),e.isPrimary&&0===e.button},js=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Gs=function(t){function e(e){var n=t.call(this,{stopDown:p})||this,i=e||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var o=i.condition?i.condition:Os(Fs,ks);return n.condition_=i.onFocusOnly?Os(Ps,o):o,n.noKinetic_=!1,n}return js(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,n=bs(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){var i=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],o=t.map.getView();!function(t,e){t[0]*=e,t[1]*=e}(i,o.getResolution()),Ko(i,o.getRotation()),o.adjustCenterInternal(i)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var i=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),r=n.getCenterInternal(),s=e.getPixelFromCoordinateInternal(r),a=e.getCoordinateFromPixelInternal([s[0]-i*Math.cos(o),s[1]-i*Math.sin(o)]);n.animateInternal({center:n.getConstrainedCenter(a),duration:500,easing:vt})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(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}(Ts),zs=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ws=function(t){function e(e){var n=this,i=e||{};return(n=t.call(this,{stopDown:p})||this).condition_=i.condition?i.condition:Rs,n.lastAngle_=void 0,n.duration_=void 0!==i.duration?i.duration:250,n}return zs(e,t),e.prototype.handleDragEvent=function(t){if(Ds(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==as){var i=e.getSize(),o=t.pixel,r=Math.atan2(i[1]/2-o[1],o[0]-i[0]/2);if(void 0!==this.lastAngle_){var s=r-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=r}}},e.prototype.handleUpEvent=function(t){return!Ds(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!!Ds(t)&&(!(!Ms(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))},e}(Ts),Xs=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ns=function(t){function e(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return Xs(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n="px",i=this.element_.style;i.left=Math.min(t[0],e[0])+n,i.top=Math.min(t[1],e[1])+n,i.width=Math.abs(e[0]-t[0])+n,i.height=Math.abs(e[1]-t[1])+n},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_,n=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new Ii([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(r),Ys=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ks="boxstart",Bs="boxdrag",Zs="boxend",Vs="boxcancel",Us=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.coordinate=n,o.mapBrowserEvent=i,o}return Ys(e,t),e}(i),Hs=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.box_=new Ns(i.className||"ol-dragbox"),n.minArea_=void 0!==i.minArea?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:Ms,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return Ys(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var i=n[0]-e[0],o=n[1]-e[1];return i*i+o*o>=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 Us(Bs,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Us(e?Zs:Vs,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 Us(Ks,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(Ts),qs=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Js=function(t){function e(e){var n=this,i=e||{},o=i.condition?i.condition:Ls;return(n=t.call(this,{condition:o,className:i.className||"ol-dragzoom",minArea:i.minArea})||this).duration_=void 0!==i.duration?i.duration:200,n.out_=void 0!==i.out&&i.out,n}return qs(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var i=e.rotatedExtentForGeometry(n),o=e.getResolutionForExtentInternal(i),r=e.getResolution()/o;(n=n.clone()).scale(r*r)}e.fitInternal(n,{duration:this.duration_,easing:vt})},e}(Hs),Qs=37,$s=38,ta=39,ea=40,na=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ia=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.defaultCondition_=function(t){return Fs(t)&&As(t)},n.condition_=void 0!==i.condition?i.condition:n.defaultCondition_,n.duration_=void 0!==i.duration?i.duration:100,n.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128,n}return na(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==T){var n=t.originalEvent,i=n.keyCode;if(this.condition_(t)&&(i==ea||i==Qs||i==ta||i==$s)){var o=t.map.getView(),r=o.getResolution()*this.pixelDelta_,s=0,a=0;i==ea?a=-r:i==Qs?s=-r:i==ta?s=r:a=r;var l=[s,a];Ko(l,o.getRotation()),function(t,e,n){var i=t.getCenterInternal();if(i){var o=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:xt,center:t.getConstrainedCenter(o)})}}(o,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Cs),oa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ra=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.condition_=i.condition?i.condition:As,n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:100,n}return oa(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==T||t.type==O){var n=t.originalEvent,i=n.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var o=t.map,r=i=="+".charCodeAt(0)?this.delta_:-this.delta_;xs(o.getView(),r,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Cs),sa=function(){function t(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var n=e-3;n>0&&this.points_[n+2]>t;)n-=3;var i=this.points_[e+2]-this.points_[n+2];if(i<1e3/60)return!1;var o=this.points_[e]-this.points_[n],r=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(r,o),this.initialVelocity_=Math.sqrt(o*o+r*r)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),aa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),la="trackpad",ha="wheel",ua=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,i)||this).totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==i.maxDelta?i.maxDelta:1,n.duration_=void 0!==i.duration?i.duration:250,n.timeout_=void 0!==i.timeout?i.timeout:80,n.useAnchor_=void 0===i.useAnchor||i.useAnchor,n.constrainResolution_=void 0!==i.constrainResolution&&i.constrainResolution;var o=i.condition?i.condition:Is;return n.condition_=i.onFocusOnly?Os(Ps,o):o,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return aa(e,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.condition_(t))return!0;if(t.type!==M)return!0;var e,n=t.map,i=t.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==M&&(e=i.deltaY,H&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=Q),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?la:ha);var r=n.getView();if(this.mode_===la&&!r.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(r.getAnimating()&&r.cancelAnimations(),r.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),r.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),s),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-Ot(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),xs(e,n,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}(Cs),ca=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),pa=function(t){function e(e){var n=this,i=e||{},o=i;return o.stopDown||(o.stopDown=p),(n=t.call(this,o)||this).anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==i.threshold?i.threshold:.3,n.duration_=void 0!==i.duration?i.duration:250,n}return ca(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],i=this.targetPointers[1],o=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(void 0!==this.lastAngle_){var r=o-this.lastAngle_;this.rotationDelta_+=r,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=r}this.lastAngle_=o;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==as){var l=s.getViewport().getBoundingClientRect(),h=bs(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}(Ts),fa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),da=function(t){function e(e){var n=this,i=e||{},o=i;return o.stopDown||(o.stopDown=p),(n=t.call(this,o)||this).anchor_=null,n.duration_=void 0!==i.duration?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return fa(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],i=this.targetPointers[1],o=n.clientX-i.clientX,r=n.clientY-i.clientY,s=Math.sqrt(o*o+r*r);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=bs(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(),n=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,n),!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}(Ts);var _a=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ga=function(t){function e(e){return(e=d({},e)).controls||(e.controls=function(t){var e=t||{},n=new Er;return(void 0===e.zoom||e.zoom)&&n.push(new En(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&n.push(new wt(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&n.push(new ys(e.attributionOptions)),n}()),e.interactions||(e.interactions=function(t){var e=t||{},n=new Er,i=new sa(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new Ws),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new Ss({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&n.push(new Gs({onFocusOnly:e.onFocusOnly,kinetic:i})),(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new pa),(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new da({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(n.push(new ia),n.push(new ra({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new ua({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new Js({duration:e.zoomDuration})),n}({onFocusOnly:!0})),t.call(this,e)||this}return _a(e,t),e.prototype.createRenderer=function(){return new vr(this)},e}(_s),ya=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),va=function(t){function e(e,n,i){var o=t.call(this)||this,r=i||{};return o.tileCoord=e,o.state=n,o.interimTile=null,o.key="",o.transition_=void 0===r.transition?250:r.transition,o.transitionStarts_={},o}return ya(e,t),e.prototype.changed=function(){this.dispatchEvent(C)},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()==Br)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()==Br){t.interimTile=null;break}t.getState()==Kr?e=t:t.getState()==Yr?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(){G()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var i=e-n+1e3/60;return i>=this.transition_?1:yt(i/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}(x),ma=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();var xa,Ca=function(t){function e(e,n,i,o,r,s){var a=t.call(this,e,n,s)||this;return a.crossOrigin_=o,a.src_=i,a.key=i,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.tileLoadFunction_=r,a}return ma(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=Br,this.unlistenImage_(),this.changed()},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=Br:this.state=Vr,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==Zr&&(this.state=Yr,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Yr&&(this.state=Kr,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=_o(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(va),wa=function(){function t(t,e,n,i,o,r){this.sourceProj_=t,this.targetProj_=e;var s={},a=$e(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_=i,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Ge(i)==Ge(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Ge(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Ge(this.targetProj_.getExtent()):null;var l=ke(n),h=je(n),u=Ie(n),c=Pe(n),p=this.transformInv_(l),f=this.transformInv_(h),d=this.transformInv_(u),_=this.transformInv_(c),g=10+(r?Math.max(0,Math.ceil(Pt(Re(n)/(r*r*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,n){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 n=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-n<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,n,i,o,r){this.triangles_.push({source:[i,o,r],target:[t,e,n]})},t.prototype.addQuad_=function(t,e,n,i,o,r,s,a,l){var h=pe([o,r,s,a]),u=this.sourceWorldWidth_?Ge(h)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&u>.5&&u<1,f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)f=Ge(pe([t,e,n,i]))/this.targetWorldWidth_>.25||f;!p&&this.sourceProj_.isGlobal()&&u&&(f=u>.25||f)}if(!(!f&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||ze(h,this.maxSourceExtent_)){var d=0;if(!(f||isFinite(o[0])&&isFinite(o[1])&&isFinite(r[0])&&isFinite(r[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)f=!0;else if(1!=(d=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(r[0])&&isFinite(r[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(l>0){if(!f){var _=[(t[0]+n[0])/2,(t[1]+n[1])/2],g=this.transformInv_(_),y=void 0;if(p)y=(Lt(o[0],c)+Lt(s[0],c))/2-Lt(g[0],c);else y=(o[0]+s[0])/2-g[0];var v=(o[1]+s[1])/2-g[1];f=y*y+v*v>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var m=[(e[0]+n[0])/2,(e[1]+n[1])/2],x=this.transformInv_(m),C=[(i[0]+t[0])/2,(i[1]+t[1])/2],w=this.transformInv_(C);this.addQuad_(t,e,m,C,o,r,x,w,l-1),this.addQuad_(C,m,n,i,w,x,s,a,l-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],E=this.transformInv_(S),b=[(n[0]+i[0])/2,(n[1]+i[1])/2],T=this.transformInv_(b);this.addQuad_(t,S,b,i,o,E,T,a,l-1),this.addQuad_(S,e,n,b,E,r,s,T,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&d)&&this.addTriangle_(t,n,i,o,s,a),0==(14&d)&&this.addTriangle_(t,n,e,o,s,r),d&&(0==(13&d)&&this.addTriangle_(e,i,t,r,a,o),0==(7&d)&&this.addTriangle_(e,i,n,r,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,n,i){var o=e.source;Ee(t,o[0]),Ee(t,o[1]),Ee(t,o[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),Sa={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1};function Ea(t,e,n,i,o){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(i,o),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(n,o)),t.restore()}function ba(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Ta(t,e,n,i){var o=tn(n,e,t),r=Ue(e,i,n),s=e.getMetersPerUnit();void 0!==s&&(r*=s);var a=t.getMetersPerUnit();void 0!==a&&(r/=a);var l=t.getExtent();if(!l||ge(l,o)){var h=Ue(t,r,o)/r;isFinite(h)&&h>0&&(r/=h)}return r}function Oa(t,e,n,i,o,r,s,a,l,h,u,c){var p=nt(Math.round(n*t),Math.round(n*e));if(d(p,c),0===l.length)return p.canvas;function f(t){return Math.round(t*n)/n}p.scale(n,n),p.globalCompositeOperation="lighter";var _=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,n){var i,o;i=_,(o=t.extent)[0]<i[0]&&(i[0]=o[0]),o[2]>i[2]&&(i[2]=o[2]),o[1]<i[1]&&(i[1]=o[1]),o[3]>i[3]&&(i[3]=o[3])}));var g=Ge(_),y=Ae(_),v=nt(Math.round(n*g/i),Math.round(n*y/i));d(v,c);var m=n/i;l.forEach((function(t,e,n){var i=t.extent[0]-_[0],o=-(t.extent[3]-_[3]),r=Ge(t.extent),s=Ae(t.extent);t.image.width>0&&t.image.height>0&&v.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,i*m,o*m,r*m,s*m)}));var x=ke(s);return a.getTriangles().forEach((function(t,e,o){var s=t.source,a=t.target,l=s[0][0],h=s[0][1],u=s[1][0],d=s[1][1],g=s[2][0],y=s[2][1],m=f((a[0][0]-x[0])/r),C=f(-(a[0][1]-x[1])/r),w=f((a[1][0]-x[0])/r),S=f(-(a[1][1]-x[1])/r),E=f((a[2][0]-x[0])/r),b=f(-(a[2][1]-x[1])/r),T=l,O=h;l=0,h=0;var R=function(t){for(var e=t.length,n=0;n<e;n++){for(var i=n,o=Math.abs(t[n][n]),r=n+1;r<e;r++){var s=Math.abs(t[r][n]);s>o&&(o=s,i=r)}if(0===o)return null;var a=t[i];t[i]=t[n],t[n]=a;for(var l=n+1;l<e;l++)for(var h=-t[l][n]/t[n][n],u=n;u<e+1;u++)n==u?t[l][u]=0:t[l][u]+=h*t[n][u]}for(var c=new Array(e),p=e-1;p>=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-=T,d-=O,0,0,w-m],[g-=T,y-=O,0,0,E-m],[0,0,u,d,S-C],[0,0,g,y,b-C]]);if(R){if(p.save(),p.beginPath(),function(){if(void 0===xa){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Ea(t,4,5,4,0),Ea(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;xa=ba(e,0)||ba(e,4)||ba(e,8)}return xa}()||c===Sa){p.moveTo(w,S);for(var P=m-w,I=C-S,M=0;M<4;M++)p.lineTo(w+f((M+1)*P/4),S+f(M*I/3)),3!=M&&p.lineTo(w+f((M+1)*P/4),S+f((M+1)*I/3));p.lineTo(E,b)}else p.moveTo(w,S),p.lineTo(m,C),p.lineTo(E,b);p.clip(),p.transform(R[0],R[2],R[1],R[3],m,C),p.translate(_[0]-T,_[3]-O),p.scale(i/n,-i/n),p.drawImage(v.canvas,0,0),p.restore()}})),u&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,n){var i=t.target,o=(i[0][0]-x[0])/r,s=-(i[0][1]-x[1])/r,a=(i[1][0]-x[0])/r,l=-(i[1][1]-x[1])/r,h=(i[2][0]-x[0])/r,u=-(i[2][1]-x[1])/r;p.beginPath(),p.moveTo(a,l),p.lineTo(o,s),p.lineTo(h,u),p.closePath(),p.stroke()})),p.restore()),p.canvas}var Ra=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pa=function(t){function e(e,n,i,o,r,s,a,l,h,u,c,p){var f=t.call(this,r,Yr)||this;f.renderEdges_=void 0!==c&&c,f.contextOptions_=p,f.pixelRatio_=a,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=n,f.targetTileGrid_=o,f.wrappedTileCoord_=s||r,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=o.getTileCoordExtent(f.wrappedTileCoord_),_=f.targetTileGrid_.getExtent(),g=f.sourceTileGrid_.getExtent(),y=_?De(d,_):d;if(0===Re(y))return f.state=Vr,f;var v=e.getExtent();v&&(g=g?De(g,v):v);var m=o.getResolution(f.wrappedTileCoord_[0]),x=function(t,e,n,i){var o=Me(n),r=Ta(t,e,o,i);return(!isFinite(r)||r<=0)&&Oe(n,(function(n){return r=Ta(t,e,n,i),isFinite(r)&&r>0})),r}(e,i,y,m);if(!isFinite(x)||x<=0)return f.state=Vr,f;var C=void 0!==u?u:.5;if(f.triangulation_=new wa(e,i,y,g,x*C,m),0===f.triangulation_.getTriangles().length)return f.state=Vr,f;f.sourceZ_=n.getZForResolution(x);var w=f.triangulation_.calculateSourceExtent();if(g&&(e.canWrapX()?(w[1]=Ot(w[1],g[1],g[3]),w[3]=Ot(w[3],g[1],g[3])):w=De(w,g)),Re(w)){for(var S=n.getTileRangeForExtentAndZ(w,f.sourceZ_),E=S.minX;E<=S.maxX;E++)for(var b=S.minY;b<=S.maxY;b++){var T=h(f.sourceZ_,E,b,a);T&&f.sourceTiles_.push(T)}0===f.sourceTiles_.length&&(f.state=Vr)}else f.state=Vr;return f}return Ra(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,i){e&&e.getState()==Br&&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],n=this.targetTileGrid_.getTileSize(e),i="number"==typeof n?n:n[0],o="number"==typeof n?n:n[1],r=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Oa(i,o,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),r,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.contextOptions_),this.state=Br}this.changed()},e.prototype.load=function(){if(this.state==Yr){this.state=Kr,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,i){var o=e.getState();if(o==Yr||o==Kr){t++;var r=F(e,C,(function(n){var i=e.getState();i!=Br&&i!=Zr&&i!=Vr||(A(r),0===--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(r)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,n){t.getState()==Yr&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(A),this.sourcesListenerKeys_=null},e}(va),Ia=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.highWaterMark>0&&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 n=this.entries_[t];return ce(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return ce(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_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=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){ce(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Ma(t,e,n,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function Fa(t,e,n){return t+"/"+e+"/"+n}function La(t){return Fa(t[0],t[1],t[2])}var Aa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Da=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Aa(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(La(e.tileCoord)),e.release())}.bind(this))}},e}(Ia),ka="tileloadstart",ja="tileloadend",Ga="tileloaderror",za=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function Wa(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var Xa=function(t){function e(e){var n=t.call(this)||this;return n.projection=Ve(e.projection),n.attributions_=Wa(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:zo,n.wrapX_=void 0!==e.wrapX&&e.wrapX,n}return za(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return G()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getContextOptions=function(){},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=Wa(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(K),Na=function(){function t(t,e,n,i){this.minX=t,this.maxX=e,this.minY=n,this.maxY=i}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.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 Ya(t,e,n,i,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=n,o.maxY=i,o):new Na(t,e,n,i)}var Ka=Na,Ba=[0,0,0],Za=function(){function t(t){var e,n,i,o;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,ce((e=this.resolutions_,n=!0,i=function(t,e){return e-t}||s,e.every((function(t,o){if(0===o)return!0;var r=i(e[o-1],t);return!(r>0||n&&0===r)}))),17),!t.origins)for(var r=0,a=this.resolutions_.length-1;r<a;++r)if(o){if(this.resolutions_[r]/this.resolutions_[r+1]!==o){o=void 0;break}}else o=this.resolutions_[r]/this.resolutions_[r+1];this.zoomFactor_=o,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,ce(this.origins_.length==this.resolutions_.length,20));var l=t.extent;void 0===l||this.origin_||this.origins_||(this.origin_=ke(l)),ce(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,ce(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:es,ce(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==l?l:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((function(t,e){var n=new Ka(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(l){var i=this.getTileRangeForExtentAndZ(l,e);n.minX=Math.max(i.minX,n.minX),n.maxX=Math.min(i.maxX,n.maxX),n.minY=Math.max(i.minY,n.minY),n.maxY=Math.min(i.maxY,n.maxY)}return n}),this):l&&this.calculateTileRanges_(l)}return t.prototype.forEachTileCoord=function(t,e,n){for(var i=this.getTileRangeForExtentAndZ(t,e),o=i.minX,r=i.maxX;o<=r;++o)for(var s=i.minY,a=i.maxY;s<=a;++s)n([e,o,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,n,i){var o,r,s=null,a=t[0]-1;for(2===this.zoomFactor_?(o=t[1],r=t[2]):s=this.getTileCoordExtent(t,i);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?Ya(o=Math.floor(o/2),o,r=Math.floor(r/2),r,n):this.getTileRangeForExtentAndZ(s,a,n)))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,n){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var i=2*t[1],o=2*t[2];return Ya(i,i+1,o,o+1,e)}var r=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;var i=t[0],o=t[1],r=t[2];if(e===i)return Ya(o,r,o,r,n);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-i),a=Math.floor(o*s),l=Math.floor(r*s);return e<i?Ya(a,a,l,l,n):Ya(a,Math.floor(s*(o+1))-1,l,Math.floor(s*(r+1))-1,n)}var h=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(h,e,n)},t.prototype.getTileRangeExtent=function(t,e,n){var i=this.getOrigin(t),o=this.getResolution(t),r=Qi(this.getTileSize(t),this.tmpSize_),s=i[0]+e.minX*r[0]*o,a=i[0]+(e.maxX+1)*r[0]*o;return Ce(s,i[1]+e.minY*r[1]*o,a,i[1]+(e.maxY+1)*r[1]*o,n)},t.prototype.getTileRangeForExtentAndZ=function(t,e,n){var i=Ba;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,i);var o=i[1],r=i[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,i),Ya(o,i[1],r,i[2],n)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),n=this.getResolution(t[0]),i=Qi(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*i[0]*n,e[1]-(t[2]+.5)*i[1]*n]},t.prototype.getTileCoordExtent=function(t,e){var n=this.getOrigin(t[0]),i=this.getResolution(t[0]),o=Qi(this.getTileSize(t[0]),this.tmpSize_),r=n[0]+t[1]*o[0]*i,s=n[1]-(t[2]+1)*o[1]*i;return Ce(r,s,r+o[0]*i,s+o[1]*i,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,n,i,o){var r=this.getZForResolution(n),s=n/this.getResolution(r),a=this.getOrigin(r),l=Qi(this.getTileSize(r),this.tmpSize_),h=i?.5:0,u=i?.5:0,c=Math.floor((t-a[0])/n+h),p=Math.floor((a[1]-e)/n+u),f=s*c/l[0],d=s*p/l[1];return i?(f=Math.ceil(f)-1,d=Math.ceil(d)-1):(f=Math.floor(f),d=Math.floor(d)),Ma(r,f,d,o)},t.prototype.getTileCoordForXYAndZ_=function(t,e,n,i,o){var r=this.getOrigin(n),s=this.getResolution(n),a=Qi(this.getTileSize(n),this.tmpSize_),l=i?.5:0,h=i?.5:0,u=Math.floor((t-r[0])/s+l),c=Math.floor((r[1]-e)/s+h),p=u/a[0],f=c/a[1];return i?(p=Math.ceil(p)-1,f=Math.ceil(f)-1):(p=Math.floor(p),f=Math.floor(f)),Ma(n,p,f,o)},t.prototype.getTileCoordForCoordAndZ=function(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)},t.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},t.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},t.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null},t.prototype.getZForResolution=function(t,e){return Ot(a(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,n=new Array(e),i=this.minZoom;i<e;++i)n[i]=this.getTileRangeForExtentAndZ(t,i);this.fullTileRanges_=n},t}();function Va(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,n,i){return function(t,e,n,i){var o=void 0!==i?i:ee,r=Ua(t,e,n);return new Za({extent:t,origin:Fe(t,o),resolutions:r,tileSize:n})}(Ha(t),e,n,i)}(t),t.setDefaultTileGrid(e)),e}function Ua(t,e,n,i){for(var o=void 0!==e?e:42,r=Ae(t),s=Ge(t),a=Qi(void 0!==n?n:es),l=i>0?i:Math.max(s/a[0],r/a[1]),h=o+1,u=new Array(h),c=0;c<h;++c)u[c]=l/Math.pow(2,c);return u}function Ha(t){var e=(t=Ve(t)).getExtent();if(!e){var n=180*Et[bt.DEGREES]/t.getMetersPerUnit();e=Ce(-n,-n,n,n)}return e}var qa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ja=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX})||this;n.on,n.once,n.un,n.opaque_=void 0!==e.opaque&&e.opaque,n.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,n.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var i=e.tileGrid;return i&&Qi(i.getTileSize(i.getMinZoom()),[256,256]),n.tileCache=new Da(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition},n.zDirection=e.zDirection?e.zDirection:0,n}return qa(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,i){var o=this.getTileCacheForProjection(t);if(!o)return!1;for(var r,s,a,l=!0,h=n.minX;h<=n.maxX;++h)for(var u=n.minY;u<=n.maxY;++u)s=Fa(e,h,u),a=!1,o.containsKey(s)&&(a=(r=o.get(s)).getState()===Br)&&(a=!1!==i(r)),a||(l=!1);return l},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,n,i,o){return G()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Va(t)},e.prototype.getTileCacheForProjection=function(t){return ce(Je(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var i,o,r,s=this.getTileGridForProjection(n),a=this.getTilePixelRatio(e),l=Qi(s.getTileSize(t),this.tmpSize);return 1==a?l:(i=l,o=a,void 0===(r=this.tmpSize)&&(r=[0,0]),r[0]=i[0]*o+.5|0,r[1]=i[1]*o+.5|0,r)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),i=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=function(t,e,n){var i=e[0],o=t.getTileCoordCenter(e),r=Ha(n);if(ge(r,o))return e;var s=Ge(r),a=Math.ceil((r[0]-o[0])/s);return o[0]+=s*a,t.getTileCoordForCoordAndZ(o,i)}(i,t,n)),function(t,e){var n=t[0],i=t[1],o=t[2];if(e.getMinZoom()>n||n>e.getMaxZoom())return!1;var r=e.getFullTileRange(n);return!r||r.containsXY(i,o)}(t,i)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,i){},e}(Xa),Qa=function(t){function e(e,n){var i=t.call(this,e)||this;return i.tile=n,i}return qa(e,t),e}(i),$a=Ja;function tl(t,e){var n=/\{z\}/g,i=/\{x\}/g,o=/\{y\}/g,r=/\{-y\}/g;return function(s,a,l){return s?t.replace(n,s[0].toString()).replace(i,s[1].toString()).replace(o,s[2].toString()).replace(r,(function(){var t=s[0],n=e.getFullTileRange(t);return ce(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}function el(t,e){for(var n=t.length,i=new Array(n),o=0;o<n;++o)i[o]=tl(t[o],e);return function(t){if(1===t.length)return t[0];return function(e,n,i){if(e){var o=Lt(function(t){return(t[1]<<t[0])+t[2]}(e),t.length);return t[o](e,n,i)}}}(i)}var nl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),il=function(t){function e(n){var i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return i.generateTileUrlFunction_=i.tileUrlFunction===e.prototype.tileUrlFunction,i.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(i.tileUrlFunction=n.tileUrlFunction),i.urls=null,n.urls?i.setUrls(n.urls):n.url&&i.setUrl(n.url),i.tileLoadingKeys_={},i}return nl(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,i=W(n),o=n.getState();o==Kr?(this.tileLoadingKeys_[i]=!0,e=ka):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=o==Zr?Ga:o==Br?ja:void 0),null!=e&&this.dispatchEvent(new Qa(e,n))},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=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var i=n[1].charCodeAt(0),o=n[2].charCodeAt(0),r=void 0;for(r=i;r<=o;++r)e.push(t.replace(n[0],String.fromCharCode(r)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(n[2],10),a=parseInt(n[1],10);a<=s;a++)e.push(t.replace(n[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(el(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var i=Fa(t,e,n);this.tileCache.containsKey(i)&&this.tileCache.get(i)},e}($a),ol=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function rl(t,e){t.getImage().src=e}var sl=function(t){function e(e){var n=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:rl,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 n.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:Ca,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.contextOptions_=!1===e.imageSmoothing?Sa:void 0,n.renderReprojectionEdges_=!1,n}return ol(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 n=this.getTileCacheForProjection(t);for(var i in this.tileCache.expireCache(this.tileCache==n?e:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[i];o.expireCache(o==n?e:{})}},e.prototype.getContextOptions=function(){return this.contextOptions_},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Je(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.contextOptions_?"\n"+JSON.stringify(this.contextOptions_):"")},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Je(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Je(e,t)){var n=W(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Va(t)),this.tileGridForProjection[n]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Je(e,t))return this.tileCache;var n=W(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Da(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]},e.prototype.createTile_=function(t,e,n,i,o,r){var s=[t,e,n],a=this.getTileCoordForTileUrlFunction(s,o),l=a?this.tileUrlFunction(a,i,o):void 0,h=new this.tileClass(s,void 0!==l?Yr:Vr,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=r,h.addEventListener(C,this.handleTileChange.bind(this)),h},e.prototype.getTile=function(t,e,n,i,o){var r=this.getProjection();if(r&&o&&!Je(r,o)){var s=this.getTileCacheForProjection(o),a=[t,e,n],l=void 0,h=La(a);s.containsKey(h)&&(l=s.get(h));var u=this.getKey();if(l&&l.key==u)return l;var c=this.getTileGridForProjection(r),p=this.getTileGridForProjection(o),f=this.getTileCoordForTileUrlFunction(a,o),d=new Pa(r,c,o,p,a,f,this.getTilePixelRatio(i),this.getGutter(),function(t,e,n,i){return this.getTileInternal(t,e,n,i,r)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.contextOptions_);return d.key=u,l?(d.interimTile=l,d.refreshInterimChain(),s.replace(h,d)):s.set(h,d),d}return this.getTileInternal(t,e,n,i,r||o)},e.prototype.getTileInternal=function(t,e,n,i,o){var r=null,s=Fa(t,e,n),a=this.getKey();if(this.tileCache.containsKey(s)){if((r=this.tileCache.get(s)).key!=a){var l=r;r=this.createTile_(t,e,n,i,o,a),l.getState()==Yr?r.interimTile=l.interimTile:r.interimTile=l,r.refreshInterimChain(),this.tileCache.replace(s,r)}}else r=this.createTile_(t,e,n,i,o,a),this.tileCache.set(s,r);return r},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 n=Ve(t);if(n){var i=W(n);i in this.tileGridForProjection||(this.tileGridForProjection[i]=e)}},e}(il),al=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ll=function(t){function e(e){var n=e||{},i=void 0!==n.projection?n.projection:"EPSG:3857",o=void 0!==n.tileGrid?n.tileGrid:function(t){var e=t||{},n=e.extent||Ve("EPSG:3857").getExtent(),i={extent:n,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Ua(n,e.maxZoom,e.tileSize,e.maxResolution)};return new Za(i)}({extent:Ha(i),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize});return t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,opaque:n.opaque,projection:i,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this}return al(e,t),e}(sl),hl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ul=function(t){function e(e){var n,i=e||{};n=void 0!==i.attributions?i.attributions:['© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];var o=void 0!==i.crossOrigin?i.crossOrigin:"anonymous",r=void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:n,attributionsCollapsible:!1,cacheSize:i.cacheSize,crossOrigin:o,imageSmoothing:i.imageSmoothing,maxZoom:void 0!==i.maxZoom?i.maxZoom:19,opaque:void 0===i.opaque||i.opaque,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,transition:i.transition,url:r,wrapX:i.wrapX,zDirection:i.zDirection})||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 Cl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wl="element",Sl="map",El="offset",bl="position",Tl="positioning",Ol=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.options=e,n.id=e.id,n.insertFirst=void 0===e.insertFirst||e.insertFirst,n.stopEvent=void 0===e.stopEvent||e.stopEvent,n.element=document.createElement("div"),n.element.className=void 0!==e.className?e.className:"ol-overlay-container ol-selectable",n.element.style.position="absolute",n.element.style.pointerEvents="auto";var i=e.autoPan;return i&&"object"!==xl(i)&&(i={animation:e.autoPanAnimation,margin:e.autoPanMargin}),n.autoPan=i||!1,n.rendered={transform_:"",visible:!0},n.mapPostrenderListenerKey=null,n.addChangeListener(wl,n.handleElementChanged),n.addChangeListener(Sl,n.handleMapChanged),n.addChangeListener(El,n.handleOffsetChanged),n.addChangeListener(bl,n.handlePositionChanged),n.addChangeListener(Tl,n.handlePositioningChanged),void 0!==e.element&&n.setElement(e.element),n.setOffset(void 0!==e.offset?e.offset:[0,0]),n.setPositioning(void 0!==e.positioning?e.positioning:yl),void 0!==e.position&&n.setPosition(e.position),n}return Cl(e,t),e.prototype.getElement=function(){return this.get(wl)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(Sl)},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(){at(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(st(this.element),A(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=F(t,B,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(wl,t)},e.prototype.setMap=function(t){this.set(Sl,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 n=this.getRect(e.getTargetElement(),e.getSize()),i=this.getElement(),o=this.getRect(i,[it(i),ot(i)]),r=t||{},s=void 0===r.margin?20:r.margin;if(!ye(n,o)){var a=o[0]-n[0],l=n[2]-o[2],h=o[1]-n[1],u=n[3]-o[3],c=[0,0];if(a<0?c[0]=a-s:l<0&&(c[0]=Math.abs(l)+s),h<0?c[1]=h-s:u<0&&(c[1]=Math.abs(u)+s),0!==c[0]||0!==c[1]){var p=e.getView().getCenterInternal(),f=e.getPixelFromCoordinateInternal(p);if(!f)return;var d=[f[0]+c[0],f[1]+c[1]],_=r.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(d),duration:_.duration,easing:_.easing})}}}},e.prototype.getRect=function(t,e){var n=t.getBoundingClientRect(),i=n.left+window.pageXOffset,o=n.top+window.pageYOffset;return[i,o,i+e[0],o+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 n=t.getPixelFromCoordinate(e),i=t.getSize();this.updateRenderedPosition(n,i)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var n=this.element.style,i=this.getOffset(),o=this.getPositioning();this.setVisible(!0);var r=Math.round(t[0]+i[0])+"px",s=Math.round(t[1]+i[1])+"px",a="0%",l="0%";o==fl||o==gl||o==ml?a="-100%":o!=pl&&o!=_l&&o!=vl||(a="-50%"),o==cl||o==pl||o==fl?l="-100%":o!=dl&&o!=_l&&o!=gl||(l="-50%");var h="translate("+a+", "+l+") translate("+r+", "+s+")";this.rendered.transform_!=h&&(this.rendered.transform_=h,n.transform=h,n.msTransform=h)},e.prototype.getOptions=function(){return this.options},e}(K),Rl=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}();function Pl(t){return Array.isArray(t)?ao(t):t}var Il=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ml=function(t){function e(e){var n=this,i=void 0!==e.rotateWithView&&e.rotateWithView;return(n=t.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:void 0!==e.scale?e.scale:1,displacement:void 0!==e.displacement?e.displacement:[0,0]})||this).canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=void 0!==e.fill?e.fill:null,n.origin_=[0,0],n.points_=e.points,n.radius_=void 0!==e.radius?e.radius:e.radius1,n.radius2_=e.radius2,n.angle_=void 0!==e.angle?e.angle:0,n.stroke_=void 0!==e.stroke?e.stroke:null,n.anchor_=null,n.size_=null,n.renderOptions_=null,n.render(),n}return Il(e,t),e.prototype.clone=function(){var t=this.getScale(),n=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(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},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(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var e=this.canvas_[t];if(!e){var n=this.renderOptions_,i=nt(n.size*t,n.size*t);this.draw_(n,i,t),e=i.canvas,this.canvas_[t]=e}return e},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return Hi},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.calculateLineJoinSize_=function(t,e,n){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var i=this.radius_,o=void 0===this.radius2_?i:this.radius2_;if(i<o){var r=i;i=o,o=r}var s=void 0===this.radius2_?this.points_:2*this.points_,a=2*Math.PI/s,l=o*Math.sin(a),h=i-Math.sqrt(o*o-l*l),u=Math.sqrt(l*l+h*h),c=u/l;if("miter"===t&&c<=n)return c*e;var p=e/2/c,f=e/2*(h/u),d=Math.sqrt((i+p)*(i+p)+f*f)-i;if(void 0===this.radius2_||"bevel"===t)return 2*d;var _=i*Math.sin(a),g=o-Math.sqrt(i*i-_*_),y=Math.sqrt(_*_+g*g)/_;if(y<=n){var v=y*e/2-o-i;return 2*Math.max(d,v)}return 2*d},e.prototype.createRenderOptions=function(){var t,e=er,n=0,i=null,o=0,r=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=nr),t=Pl(t),void 0===(r=this.stroke_.getWidth())&&(r=1),i=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=er),void 0===(n=this.stroke_.getMiterLimit())&&(n=10));var s=this.calculateLineJoinSize_(e,r,n),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:r,size:Math.ceil(2*a+s),lineDash:i,lineDashOffset:o,lineJoin:e,miterLimit:n}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size,e=this.getDisplacement();this.canvas_={},this.anchor_=[t/2-e[0],t/2+e[1]],this.size_=[t,t]},e.prototype.draw_=function(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var i=this.fill_.getColor();null===i&&(i=Qo),e.fillStyle=Pl(i),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.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var e=this.fill_.getColor(),n=0;if("string"==typeof e&&(e=ro(e)),null===e?n=1:Array.isArray(e)&&(n=4===e.length?e[3]:1),0===n){var i=nt(t.size,t.size);this.hitDetectionCanvas_=i.canvas,this.drawHitDetectionCanvas_(t,i)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var e=this.points_,n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{var i=void 0===this.radius2_?n:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var o=this.angle_-Math.PI/2,r=2*Math.PI/e,s=0;s<e;s++){var a=o+s*r,l=s%2==0?n:i;t.lineTo(l*Math.cos(a),l*Math.sin(a))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Qo,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())},e}($i),Fl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ll=function(t){function e(e){var n=e||{};return t.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:void 0!==n.scale?n.scale:1,rotation:void 0!==n.rotation?n.rotation:0,rotateWithView:void 0!==n.rotateWithView&&n.rotateWithView,displacement:void 0!==n.displacement?n.displacement:[0,0]})||this}return Fl(e,t),e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(Ml),Al=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 Dl(t){return(Dl="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 kl=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=zl,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"===Dl(e)&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),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_=zl,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();var jl=null;function Gl(t,e){if(!jl){var n=new Al({color:"rgba(255,255,255,0.4)"}),i=new Rl({color:"#3399CC",width:1.25});jl=[new kl({image:new Ll({fill:n,stroke:i,radius:5}),fill:n,stroke:i})]}return jl}function zl(t){return t.getGeometry()}var Wl=kl,Xl="preload",Nl="useInterimTilesOnError",Yl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Kl=function(t){function e(e){var n=this,i=e||{},o=d({},i);return delete o.preload,delete o.useInterimTilesOnError,(n=t.call(this,o)||this).on,n.once,n.un,n.setPreload(void 0!==i.preload?i.preload:0),n.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),n}return Yl(e,t),e.prototype.getPreload=function(){return this.get(Xl)},e.prototype.setPreload=function(t){this.set(Xl,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Nl)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Nl,t)},e}(No),Bl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Zl=function(t){function e(e){var n=t.call(this)||this;return n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=e,n.declutterExecutorGroup=null,n}return Bl(e,t),e.prototype.getFeatures=function(t){return G()},e.prototype.prepareFrame=function(t){return G()},e.prototype.renderFrame=function(t,e){return G()},e.prototype.loadedTileCallback=function(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n},e.prototype.createLoadedTileFinder=function(t,e,n){return function(i,o){var r=this.loadedTileCallback.bind(this,n,i);return t.forEachLoadedTile(e,i,o,r)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o){},e.prototype.getDataAtPixel=function(t,e,n){return G()},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===Hi&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Hi&&e!=qi&&t.addEventListener(C,this.boundHandleImageChange_),e==Vi&&(t.load(),e=t.getState()),e==Hi},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==zo&&t.changed()},e}(j),Vl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ul=function(t){function e(e){var n=t.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=[1,0,0,1,0,0],n.pixelTransform=[1,0,0,1,0,0],n.inversePixelTransform=[1,0,0,1,0,0],n.context=null,n.containerReused=!1,n}return Vl(e,t),e.prototype.useContainer=function(t,e,n){var i,o,r=this.getLayer().getClassName();t&&""===t.style.opacity&&t.className===r&&((a=t.firstElementChild)instanceof HTMLCanvasElement&&(o=a.getContext("2d")));if(!o||0!==o.canvas.width&&o.canvas.style.transform!==e?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=o,this.containerReused=!0),!this.container){(i=document.createElement("div")).className=r;var s=i.style;s.position="absolute",s.width="100%",s.height="100%";var a=(o=nt()).canvas;i.appendChild(a),(s=a.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=i,this.context=o}},e.prototype.clipUnrotated=function(t,e,n){var i=ke(n),o=je(n),r=Ie(n),s=Pe(n);zn(e.coordinateToPixelTransform,i),zn(e.coordinateToPixelTransform,o),zn(e.coordinateToPixelTransform,r),zn(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;zn(a,i),zn(a,o),zn(a,r),zn(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,n){var i=this.getLayer();if(i.hasListener(t)){var o=new qo(t,this.inversePixelTransform,n,e);i.dispatchEvent(o)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(Lo,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(Ao,t,e)},e.prototype.getRenderTransform=function(t,e,n,i,o,r,s){var a=o/2,l=r/2,h=i/e,u=-h,c=-t[0]+s,p=-t[1];return Wn(this.tempTransform,a,l,h,u,-n,c,p)},e.prototype.getDataAtPixel=function(t,e,n){var i,o=zn(this.inversePixelTransform,t.slice()),r=this.context,s=this.getLayer().getExtent();if(s&&!ge(s,zn(e.pixelToCoordinateTransform,t.slice())))return null;try{var a=Math.round(o[0]),l=Math.round(o[1]),h=document.createElement("canvas"),u=h.getContext("2d");h.width=1,h.height=1,u.clearRect(0,0,1,1),u.drawImage(r.canvas,a,l,1,1,0,0,1,1),i=u.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:i}return 0===i[3]?null:i},e}(Zl),Hl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ql=function(t){function e(e){var n=t.call(this,e)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=[1/0,1/0,-1/0,-1/0],n.tmpTileRange_=new Ka(0,0,0,0),n}return Hl(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),n=t.getState(),i=e.getUseInterimTilesOnError();return n==Br||n==Vr||n==Zr&&!i},e.prototype.getTile=function(t,e,n,i){var o=i.pixelRatio,r=i.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,n,o,r);return a.getState()==Zr&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(Br)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},e.prototype.loadedTileCallback=function(e,n,i){return!!this.isDrawableTile(i)&&t.prototype.loadedTileCallback.call(this,e,n,i)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var n=t.layerStatesArray[t.layerIndex],i=t.viewState,o=i.projection,r=i.resolution,a=i.center,l=i.rotation,h=t.pixelRatio,u=this.getLayer(),c=u.getSource(),p=c.getRevision(),f=c.getTileGridForProjection(o),_=f.getZForResolution(r,c.zDirection),g=f.getResolution(_),y=t.extent,v=n.extent&&cn(n.extent,o);v&&(y=De(y,cn(n.extent,o)));var m=c.getTilePixelRatio(h),x=Math.round(t.size[0]*m),C=Math.round(t.size[1]*m);if(l){var w=Math.round(Math.sqrt(x*x+C*C));x=w,C=w}var S=g*x/2/m,E=g*C/2/m,b=[a[0]-S,a[1]-E,a[0]+S,a[1]+E],T=f.getTileRangeForExtentAndZ(y,_),O={};O[_]={};var R=this.createLoadedTileFinder(c,o,O),P=this.tmpExtent,I=this.tmpTileRange_;this.newTiles_=!1;for(var M=T.minX;M<=T.maxX;++M)for(var F=T.minY;F<=T.maxY;++F){var L=this.getTile(_,M,F,t);if(this.isDrawableTile(L)){var A=W(this);if(L.getState()==Br){O[_][L.tileCoord.toString()]=L;var D=L.inTransition(A);this.newTiles_||!D&&-1!==this.renderedTiles.indexOf(L)||(this.newTiles_=!0)}if(1===L.getAlpha(A,t.time))continue}var k=f.getTileCoordChildTileRange(L.tileCoord,I,P),j=!1;k&&(j=R(_+1,k)),j||f.forEachTileCoordParentTileRange(L.tileCoord,R,I,P)}var G=g/r;Wn(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,l,-x/2,-C/2);var z=Nn(this.pixelTransform);this.useContainer(e,z,n.opacity);var X=this.context,N=X.canvas;Xn(this.inversePixelTransform,this.pixelTransform),Wn(this.tempTransform,x/2,C/2,G,G,0,-x/2,-C/2),N.width!=x||N.height!=C?(N.width=x,N.height=C):this.containerReused||X.clearRect(0,0,x,C),v&&this.clipUnrotated(X,t,v),d(X,c.getContextOptions()),this.preRender(X,t),this.renderedTiles.length=0;var Y,K,B,Z=Object.keys(O).map(Number);Z.sort(s),1!==n.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(Y=[],K=[]):Z=Z.reverse();for(var V=Z.length-1;V>=0;--V){var U=Z[V],H=c.getTilePixelSize(U,h,o),q=f.getResolution(U)/g,J=H[0]*q*G,Q=H[1]*q*G,$=f.getTileCoordForCoordAndZ(ke(b),U),tt=f.getTileCoordExtent($),et=zn(this.tempTransform,[m*(tt[0]-b[0])/g,m*(b[3]-tt[3])/g]),nt=m*c.getGutterForProjection(o),it=O[U];for(var ot in it){var rt=(L=it[ot]).tileCoord,st=$[1]-rt[1],at=Math.round(et[0]-(st-1)*J),lt=$[2]-rt[2],ht=Math.round(et[1]-(lt-1)*Q),ut=at-(M=Math.round(et[0]-st*J)),ct=ht-(F=Math.round(et[1]-lt*Q)),pt=_===U;if(!(D=pt&&1!==L.getAlpha(W(this),t.time)))if(Y){X.save(),B=[M,F,M+ut,F,M+ut,F+ct,M,F+ct];for(var ft=0,dt=Y.length;ft<dt;++ft)if(_!==U&&U<K[ft]){var _t=Y[ft];X.beginPath(),X.moveTo(B[0],B[1]),X.lineTo(B[2],B[3]),X.lineTo(B[4],B[5]),X.lineTo(B[6],B[7]),X.moveTo(_t[6],_t[7]),X.lineTo(_t[4],_t[5]),X.lineTo(_t[2],_t[3]),X.lineTo(_t[0],_t[1]),X.clip()}Y.push(B),K.push(U)}else X.clearRect(M,F,ut,ct);this.drawTileImage(L,t,M,F,ut,ct,nt,pt,n.opacity),Y&&!D?(X.restore(),this.renderedTiles.unshift(L)):this.renderedTiles.push(L),this.updateUsedTiles(t.usedTiles,c,L)}}return this.renderedRevision=p,this.renderedResolution=g,this.extentChanged=!this.renderedExtent_||!Se(this.renderedExtent_,b),this.renderedExtent_=b,this.renderedPixelRatio=h,this.renderedProjection=o,this.manageTilePyramid(t,c,f,h,o,y,_,u.getPreload()),this.scheduleExpireCache(t,c),this.postRender(X,t),n.extent&&X.restore(),z!==N.style.transform&&(N.style.transform=z),this.container},e.prototype.drawTileImage=function(t,e,n,i,o,r,s,a,l){var h=this.getTileImage(t);if(h){var u=W(this),c=a?t.getAlpha(u,e.time):1,p=l*c,f=p!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=p),this.context.drawImage(h,s,s,h.width-2*s,h.height-2*s,n,i,o,r),f&&this.context.restore(),1!==c?e.animate=!0:a&&t.endTransition(u)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var n=function(t,e,n){var i=W(t);i in n.usedTiles&&t.expireCache(n.viewState.projection,n.usedTiles[i])}.bind(null,e);t.postRenderFunctions.push(n)}},e.prototype.updateUsedTiles=function(t,e,n){var i=W(e);i in t||(t[i]={}),t[i][n.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,n,i,o,r,s,a,l){var h=W(e);h in t.wantedTiles||(t.wantedTiles[h]={});var u,c,p,f,d,_,g=t.wantedTiles[h],y=t.tileQueue,v=0;for(_=n.getMinZoom();_<=s;++_)for(c=n.getTileRangeForExtentAndZ(r,_,c),p=n.getResolution(_),f=c.minX;f<=c.maxX;++f)for(d=c.minY;d<=c.maxY;++d)s-_<=a?(++v,(u=e.getTile(_,f,d,i,o)).getState()==Yr&&(g[u.getKey()]=!0,y.isKeyQueued(u.getKey())||y.enqueue([u,h,n.getTileCoordCenter(u.tileCoord),p])),void 0!==l&&l(u)):e.useTile(_,f,d,o);e.updateCacheSize(v,o)},e}(Ul);ql.prototype.getLayer;var Jl=ql,Ql=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$l=function(t){function e(e){return t.call(this,e)||this}return Ql(e,t),e.prototype.createRenderer=function(){return new Jl(this)},e}(Kl),th=n(7072),eh=function(){function t(t){this.rbush_=new th(t),this.items_={}}return t.prototype.insert=function(t,e){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[W(e)]=n},t.prototype.load=function(t,e){for(var n=new Array(e.length),i=0,o=e.length;i<o;i++){var r=t[i],s=e[i],a={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3],value:s};n[i]=a,this.items_[W(s)]=a}this.rbush_.load(n)},t.prototype.remove=function(t){var e=W(t),n=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(n)},t.prototype.update=function(t,e){var n=this.items_[W(e)];Se([n.minX,n.minY,n.maxX,n.maxY],t)||(this.remove(e),this.insert(t,e))},t.prototype.getAll=function(){return this.rbush_.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.forEach_(this.getAll(),t)},t.prototype.forEachInExtent=function(t,e){return this.forEach_(this.getInExtent(t),e)},t.prototype.forEach_=function(t,e){for(var n,i=0,o=t.length;i<o;i++)if(n=e(t[i]))return n;return n},t.prototype.isEmpty=function(){return y(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return Ce(e.minX,e.minY,e.maxX,e.maxY,t)},t.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]},t}(),nh="addfeature",ih="changefeature",oh="clear",rh="removefeature",sh="featuresloadstart",ah="featuresloadend",lh="featuresloaderror";function hh(t,e){return[[-1/0,-1/0,1/0,1/0]]}var uh="arraybuffer",ch="json",ph="text",fh="xml",dh=!1;function _h(t,e){return function(n,i,o,r,s){var a=this;!function(t,e,n,i,o,r,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(n,i,o):t,!0),e.getType()==uh&&(a.responseType="arraybuffer"),a.withCredentials=dh,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var i=e.getType(),l=void 0;i==ch||i==ph?l=a.responseText:i==fh?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):i==uh&&(l=a.response),l?r(e.readFeatures(l,{extent:n,featureProjection:o}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}(t,e,n,i,o,(function(t,e){a.addFeatures(t),void 0!==r&&r(t)}),s||f)}}var gh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yh=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.feature=n,o.features=i,o}return gh(e,t),e}(i),vh=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{attributions:i.attributions,projection:void 0,state:zo,wrapX:void 0===i.wrapX||i.wrapX})||this).on,n.once,n.un,n.loader_=f,n.format_=i.format,n.overlaps_=void 0===i.overlaps||i.overlaps,n.url_=i.url,void 0!==i.loader?n.loader_=i.loader:void 0!==n.url_&&(ce(n.format_,7),n.loader_=_h(n.url_,n.format_)),n.strategy_=void 0!==i.strategy?i.strategy:hh;var o,r,s=void 0===i.useSpatialIndex||i.useSpatialIndex;return n.featuresRtree_=s?new eh:null,n.loadedExtentsRtree_=new eh,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(i.features)?r=i.features:i.features&&(r=(o=i.features).getArray()),s||void 0!==o||(o=new Er(r)),void 0!==r&&n.addFeaturesInternal(r),void 0!==o&&n.bindFeaturesCollection_(o),n}return gh(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=W(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var n=t.getGeometry();if(n){var i=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new yh(nh,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[F(e,C,this.handleFeatureChange_,this),F(e,o,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var n=!0,i=e.getId();return void 0!==i&&(i.toString()in this.idIndex_?n=!1:this.idIndex_[i.toString()]=e),n&&(ce(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],n=[],i=[],o=0,r=t.length;o<r;o++){var s=W(l=t[o]);this.addToIndex_(s,l)&&n.push(l)}o=0;for(var a=n.length;o<a;o++){var l;s=W(l=n[o]);this.setupChangeEvents_(s,l);var h=l.getGeometry();if(h){var u=h.getExtent();e.push(u),i.push(l)}else this.nullGeometryFeatures_[s]=l}this.featuresRtree_&&this.featuresRtree_.load(e,i);o=0;for(var c=n.length;o<c;o++)this.dispatchEvent(new yh(nh,n[o]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(nh,(function(n){e||(e=!0,t.push(n.feature),e=!1)})),this.addEventListener(rh,(function(n){e||(e=!0,t.remove(n.feature),e=!1)})),t.addEventListener(mr,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(xr,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(A)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_)for(var n in this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this)),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[n]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var i=new yh(oh);this.dispatchEvent(i),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,(function(n){return n.getGeometry().intersectsCoordinate(t)?e(n):void 0}))},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,(function(n){if(n.getGeometry().intersectsExtent(t)){var i=e(n);if(i)return i}}))},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),y(this.nullGeometryFeatures_)||h(t,g(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,e){var n=t[0],i=t[1],o=null,r=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],l=e||c;return this.featuresRtree_.forEachInExtent(a,(function(t){if(l(t)){var e=t.getGeometry(),h=s;if((s=e.closestPointXY(n,i,r,s))<h){o=t;var u=Math.sqrt(s);a[0]=n-u,a[1]=i-u,a[2]=n+u,a[3]=i+u}}})),o},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFeatureByUid=function(t){var e=this.uidIndex_[t];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,n=W(e),i=e.getGeometry();if(i){var o=i.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(o,e)):this.featuresRtree_&&this.featuresRtree_.update(o,e)}else n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);var r=e.getId();if(void 0!==r){var s=r.toString();this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new yh(ih,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:W(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&y(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,n){for(var i=this.loadedExtentsRtree_,o=this.strategy_(t,e),r=function(t,r){var a=o[t];i.forEachInExtent(a,(function(t){return ye(t.extent,a)}))||(++s.loadingExtentsCount_,s.dispatchEvent(new yh(sh)),s.loader_.call(s,a,e,n,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new yh(ah,void 0,t))}.bind(s),function(){--this.loadingExtentsCount_,this.dispatchEvent(new yh(lh))}.bind(s)),i.insert(a,{extent:a.slice()}))},s=this,a=0,l=o.length;a<l;++a)r(a);this.loading=this.loader_!==f&&this.loadingExtentsCount_>0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,n=this.loadedExtentsRtree_;n.forEachInExtent(t,(function(n){if(Se(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){var e=W(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=W(t);this.featureChangeKeys_[e].forEach(A),delete this.featureChangeKeys_[e];var n=t.getId();void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new yh(rh,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){ce(this.format_,7),this.url_=t,this.setLoader(_h(t,this.format_))},e}(Xa),mh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xh="renderOrder",Ch=function(t){function e(e){var n=this,i=e||{},o=d({},i);return delete o.style,delete o.renderBuffer,delete o.updateWhileAnimating,delete o.updateWhileInteracting,(n=t.call(this,o)||this).declutter_=void 0!==i.declutter&&i.declutter,n.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(i.style),n.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,n.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,n}return mh(e,t),e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(xh)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new th(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(xh,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:Gl,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var n;Array.isArray(t)?n=t:(ce("function"==typeof t.getZIndex,41),n=[t]),e=function(){return n}}return e}(this.style_),this.changed()},e}(No),wh={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Sh=[wh.FILL],Eh=[wh.STROKE],bh=[wh.BEGIN_PATH],Th=[wh.CLOSE_PATH],Oh=wh,Rh=function(){function t(){}return t.prototype.drawCustom=function(t,e,n){},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}(),Ph=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ih=function(t){function e(e,n,i,o){var r=t.call(this)||this;return r.tolerance=e,r.maxExtent=n,r.pixelRatio=o,r.maxLineWidth=0,r.resolution=i,r.beginGeometryInstruction1_=null,r.beginGeometryInstruction2_=null,r.bufferedMaxExtent_=null,r.instructions=[],r.coordinates=[],r.tmpCoordinate_=[],r.hitDetectionInstructions=[],r.state={},r}return Ph(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var n=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,o=this.coordinates,r=o.length,s=0,a=t.length;s<a;s+=e)i[0]=t[s],i[1]=t[s+1],ge(n,i)&&(o[r++]=i[0],o[r++]=i[1]);return r},e.prototype.appendFlatLineCoordinates=function(t,e,n,i,o,r){var s=this.coordinates,a=s.length,l=this.getBufferedMaxExtent();r&&(e+=i);var h,u,c,p=t[e],f=t[e+1],d=this.tmpCoordinate_,_=!0;for(h=e+i;h<n;h+=i)d[0]=t[h],d[1]=t[h+1],(c=me(l,d))!==u?(_&&(s[a++]=p,s[a++]=f,_=!1),s[a++]=d[0],s[a++]=d[1]):c===oe?(s[a++]=d[0],s[a++]=d[1],_=!1):_=!0,p=d[0],f=d[1],u=c;return(o&&_||h===e+i)&&(s[a++]=p,s[a++]=f),a},e.prototype.drawCustomCoordinates_=function(t,e,n,i,o){for(var r=0,s=n.length;r<s;++r){var a=n[r],l=this.appendFlatLineCoordinates(t,e,a,i,!1,!1);o.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,n){this.beginGeometry(t,e);var i,o,r,s,a,l=t.getType(),h=t.getStride(),u=this.coordinates.length;if(l==Dn){i=t.getOrientedFlatCoordinates(),s=[];var c=t.getEndss();a=0;for(var p=0,f=c.length;p<f;++p){var d=[];a=this.drawCustomCoordinates_(i,a,c[p],h,d),s.push(d)}this.instructions.push([Oh.CUSTOM,u,s,t,n,ui])}else l==Fn||l==An?(r=[],i=l==Fn?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.drawCustomCoordinates_(i,0,t.getEnds(),h,r),this.instructions.push([Oh.CUSTOM,u,r,t,n,hi])):l==In||l==jn?(i=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(i,0,i.length,h,!1,!1),this.instructions.push([Oh.CUSTOM,u,o,t,n,li])):l==Ln?(i=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(i,h))>u&&this.instructions.push([Oh.CUSTOM,u,o,t,n,li])):l==Pn&&(i=t.getFlatCoordinates(),this.coordinates.push(i[0],i[1]),o=this.coordinates.length,this.instructions.push([Oh.CUSTOM,u,o,t,n]));this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[Oh.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Oh.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var n,i,o=e.length,r=-1;for(t=0;t<o;++t)(i=(n=e[t])[0])==Oh.END_GEOMETRY?r=t:i==Oh.BEGIN_GEOMETRY&&(n[2]=t,l(this.hitDetectionInstructions,r,t),r=-1)},e.prototype.setFillStrokeStyle=function(t,e){var n=this.state;if(t){var i=t.getColor();n.fillStyle=Pl(i||Qo)}else n.fillStyle=void 0;if(e){var o=e.getColor();n.strokeStyle=Pl(o||nr);var r=e.getLineCap();n.lineCap=void 0!==r?r:$o;var s=e.getLineDash();n.lineDash=s?s.slice():tr;var a=e.getLineDashOffset();n.lineDashOffset=a||0;var l=e.getLineJoin();n.lineJoin=void 0!==l?l:er;var h=e.getWidth();n.lineWidth=void 0!==h?h:1;var u=e.getMiterLimit();n.miterLimit=void 0!==u?u:10,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,n=[Oh.SET_FILL_STYLE,e];return"string"!=typeof e&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[Oh.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 n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,i=t.lineCap,o=t.lineDash,r=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=i||o!=t.currentLineDash&&!u(t.currentLineDash,o)||t.currentLineDashOffset!=r||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=i,t.currentLineDash=o,t.currentLineDashOffset=r,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)},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=[Oh.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=de(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;fe(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Rh),Mh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Fh=function(t){function e(e,n,i,o){var r=t.call(this,e,n,i,o)||this;return r.hitDetectionImage_=null,r.image_=null,r.imagePixelRatio_=void 0,r.anchorX_=void 0,r.anchorY_=void 0,r.height_=void 0,r.opacity_=void 0,r.originX_=void 0,r.originY_=void 0,r.rotateWithView_=void 0,r.rotation_=void 0,r.scale_=void 0,r.width_=void 0,r.declutterImageWithText_=void 0,r}return Mh(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),o=this.coordinates.length,r=this.appendFlatPointCoordinates(n,i);this.instructions.push([Oh.DRAW_IMAGE,o,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([Oh.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),o=this.coordinates.length,r=this.appendFlatPointCoordinates(n,i);this.instructions.push([Oh.DRAW_IMAGE,o,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([Oh.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),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.imagePixelRatio_=void 0,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 n=t.getAnchor(),i=t.getSize(),o=t.getHitDetectionImage(),r=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=o,this.image_=r,this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0],this.declutterImageWithText_=e},e}(Ih),Lh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ah=function(t){function e(e,n,i,o){return t.call(this,e,n,i,o)||this}return Lh(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,i){var o=this.coordinates.length,r=this.appendFlatLineCoordinates(t,e,n,i,!1,!1),s=[Oh.MOVE_TO_LINE_TO,o,r];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,i=n.strokeStyle,o=n.lineWidth;if(void 0!==i&&void 0!==o){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Oh.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,tr,0],bh);var r=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(r,0,r.length,s),this.hitDetectionInstructions.push(Eh),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,i=n.strokeStyle,o=n.lineWidth;if(void 0!==i&&void 0!==o){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Oh.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],bh);for(var r=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,h=0,u=r.length;h<u;++h)l=this.drawFlatCoordinates_(s,l,r[h],a);this.hitDetectionInstructions.push(Eh),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(Eh),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},e.prototype.applyStroke=function(e){null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Eh),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(bh)},e}(Ih),Dh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),kh=function(t){function e(e,n,i,o){return t.call(this,e,n,i,o)||this}return Dh(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,n,i){var o=this.state,r=void 0!==o.fillStyle,s=void 0!==o.strokeStyle,a=n.length;this.instructions.push(bh),this.hitDetectionInstructions.push(bh);for(var l=0;l<a;++l){var h=n[l],u=this.coordinates.length,c=this.appendFlatLineCoordinates(t,e,h,i,!0,!s),p=[Oh.MOVE_TO_LINE_TO,u,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(Th),this.hitDetectionInstructions.push(Th)),e=h}return r&&(this.instructions.push(Sh),this.hitDetectionInstructions.push(Sh)),s&&(this.instructions.push(Eh),this.hitDetectionInstructions.push(Eh)),e},e.prototype.drawCircle=function(t,e){var n=this.state,i=n.fillStyle,o=n.strokeStyle;if(void 0!==i||void 0!==o){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Oh.SET_FILL_STYLE,Qo]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Oh.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var r=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(r,0,r.length,s,!1,!1);var l=[Oh.CIRCLE,a];this.instructions.push(bh,l),this.hitDetectionInstructions.push(bh,l),void 0!==n.fillStyle&&(this.instructions.push(Sh),this.hitDetectionInstructions.push(Sh)),void 0!==n.strokeStyle&&(this.instructions.push(Eh),this.hitDetectionInstructions.push(Eh)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var n=this.state,i=n.fillStyle,o=n.strokeStyle;if(void 0!==i||void 0!==o){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Oh.SET_FILL_STYLE,Qo]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Oh.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var r=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,r,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var n=this.state,i=n.fillStyle,o=n.strokeStyle;if(void 0!==i||void 0!==o){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Oh.SET_FILL_STYLE,Qo]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Oh.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);for(var r=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,h=0,u=r.length;h<u;++h)l=this.drawFlatCoordinatess_(s,l,r[h],a);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var n=this.coordinates,i=0,o=n.length;i<o;++i)n[i]=ri(n[i],e);return t.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},e}(Ih),jh="line";function Gh(t,e,n,i,o){var r,s,a,l,h,u,c,p,f,d=n,_=n,g=0,y=0,v=n;for(r=n;r<i;r+=o){var m=e[r],x=e[r+1];void 0!==l&&(p=m-l,f=x-h,a=Math.sqrt(p*p+f*f),void 0!==u&&(y+=s,Math.acos((u*p+c*f)/(s*a))>t&&(y>g&&(g=y,d=v,_=r),y=0,v=r-o)),s=a,u=p,c=f),l=m,h=x}return(y+=a)>g?[v,r]:[d,_]}var zh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Wh={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Xh={Circle:kh,Default:Ih,Image:Fh,LineString:Ah,Polygon:kh,Text:function(t){function e(e,n,i,o){var r=t.call(this,e,n,i,o)||this;return r.labels_=null,r.text_="",r.textOffsetX_=0,r.textOffsetY_=0,r.textRotateWithView_=void 0,r.textRotation_=0,r.textFillState_=null,r.fillStates={},r.textStrokeState_=null,r.strokeStates={},r.textState_={},r.textStates={},r.textKey_="",r.fillKey_="",r.strokeKey_="",r.declutterImageWithText_=void 0,r}return zh(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 n=this.textFillState_,i=this.textStrokeState_,o=this.textState_;if(""!==this.text_&&o&&(n||i)){var r=this.coordinates,s=r.length,a=t.getType(),l=null,h=t.getStride();if(o.placement!==jh||a!=In&&a!=An&&a!=Fn&&a!=Dn){var u=o.overflow?null:[];switch(a){case Pn:case Ln:l=t.getFlatCoordinates();break;case In:l=t.getFlatMidpoint();break;case jn:l=t.getCenter();break;case An:l=t.getFlatMidpoints(),h=2;break;case Fn:l=t.getFlatInteriorPoint(),o.overflow||u.push(l[2]/this.resolution),h=3;break;case Dn:var c=t.getFlatInteriorPoints();l=[];for(w=0,S=c.length;w<S;w+=3)o.overflow||u.push(c[w+2]/this.resolution),l.push(c[w],c[w+1]);if(0===l.length)return;h=2}if((I=this.appendFlatPointCoordinates(l,h))===s)return;if(u&&(I-s)/2!=l.length/h){var p=s/2;u=u.filter((function(t,e){var n=r[2*(p+e)]===l[e*h]&&r[2*(p+e)+1]===l[e*h+1];return n||--p,n}))}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var f=o.padding;if(f!=rr&&(o.scale[0]<0||o.scale[1]<0)){var d=o.padding[0],_=o.padding[1],g=o.padding[2],y=o.padding[3];o.scale[0]<0&&(_=-_,y=-y),o.scale[1]<0&&(d=-d,g=-g),f=[d,_,g,y]}var v=this.pixelRatio;this.instructions.push([Oh.DRAW_IMAGE,s,I,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,f==rr?rr:f.map((function(t){return t*v})),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]);var m=1/v;this.hitDetectionInstructions.push([Oh.DRAW_IMAGE,s,I,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,this.declutterImageWithText_,f,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]),this.endGeometry(e)}else{if(!ze(this.getBufferedMaxExtent(),t.getExtent()))return;var x=void 0;if(l=t.getFlatCoordinates(),a==In)x=[l.length];else if(a==An)x=t.getEnds();else if(a==Fn)x=t.getEnds().slice(0,1);else if(a==Dn){var C=t.getEndss();x=[];for(var w=0,S=C.length;w<S;++w)x.push(C[w][0])}this.beginGeometry(t,e);for(var E=o.textAlign,b=0,T=void 0,O=0,R=x.length;O<R;++O){if(null==E){var P=Gh(o.maxAngle,l,b,x[O],h);b=P[0],T=P[1]}else T=x[O];for(var w=b;w<T;w+=h)r.push(l[w],l[w+1]);var I=r.length;b=x[O],this.drawChars_(s,I),s=I}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,i=this.strokeKey_;t&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var o=this.textKey_;o in this.textStates||(this.textStates[o]={font:e.font,textAlign:e.textAlign||ir,textBaseline:e.textBaseline||or,scale:e.scale});var r=this.fillKey_;n&&(r in this.fillStates||(this.fillStates[r]={fillStyle:n.fillStyle}))},e.prototype.drawChars_=function(t,e){var n=this.textStrokeState_,i=this.textState_,o=this.strokeKey_,r=this.textKey_,s=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=Wh[i.textBaseline],h=this.textOffsetY_*a,u=this.text_,c=n?n.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([Oh.DRAW_CHARS,t,e,l,i.overflow,s,i.maxAngle,a,h,o,c*a,u,r,1]),this.hitDetectionInstructions.push([Oh.DRAW_CHARS,t,e,l,i.overflow,s,i.maxAngle,1,h,o,c,u,r,1/a])},e.prototype.setTextStyle=function(t,e){var n,i,o;if(t){var r=t.getFill();r?((i=this.textFillState_)||(i={},this.textFillState_=i),i.fillStyle=Pl(r.getColor()||Qo)):(i=null,this.textFillState_=i);var s=t.getStroke();if(s){(o=this.textStrokeState_)||(o={},this.textStrokeState_=o);var a=s.getLineDash(),l=s.getLineDashOffset(),h=s.getWidth(),u=s.getMiterLimit();o.lineCap=s.getLineCap()||$o,o.lineDash=a?a.slice():tr,o.lineDashOffset=void 0===l?0:l,o.lineJoin=s.getLineJoin()||er,o.lineWidth=void 0===h?1:h,o.miterLimit=void 0===u?10:u,o.strokeStyle=Pl(s.getColor()||nr)}else o=null,this.textStrokeState_=o;n=this.textState_;var c=t.getFont()||Jo;cr(c);var p=t.getScaleArray();n.overflow=t.getOverflow(),n.font=c,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.textBaseline=t.getTextBaseline()||or,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||rr,n.scale=void 0===p?[1,1]:p;var f=t.getOffsetX(),d=t.getOffsetY(),_=t.getRotateWithView(),g=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===d?0:d,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===g?0:g,this.strokeKey_=o?("string"==typeof o.strokeStyle?o.strokeStyle:W(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.textBaseline||"?"),this.fillKey_=i?"string"==typeof i.fillStyle?i.fillStyle:"|"+W(i.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(Ih)},Nh=function(){function t(t,e,n,i){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=i,this.resolution_=n,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var n=this.buildersByZIndex_[e];for(var i in n){var o=n[i].finish();t[e][i]=o}}return t},t.prototype.getBuilder=function(t,e){var n=void 0!==t?t.toString():"0",i=this.buildersByZIndex_[n];void 0===i&&(i={},this.buildersByZIndex_[n]=i);var o=i[e];void 0===o&&(o=new(0,Xh[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=o);return o},t}(),Yh="Circle",Kh="Default",Bh="Image",Zh="LineString",Vh="Polygon",Uh="Text";function Hh(t,e,n,i,o,r,s,a,l,h,u,c){var p=t[e],f=t[e+1],d=0,_=0,g=0,y=0;function v(){d=p,_=f,p=t[e+=i],f=t[e+1],y+=g,g=Math.sqrt((p-d)*(p-d)+(f-_)*(f-_))}do{v()}while(e<n-i&&y+g<r);for(var m=(r-y)/g,x=At(d,p,m),C=At(_,f,m),w=e-i,S=y,E=r+a*l(h,o,u);e<n-i&&y+g<E;)v();var b,T=At(d,p,m=(E-y)/g),O=At(_,f,m);if(c){var R=[x,C,T,O];Kn(R,0,4,2,c,R,R),b=R[0]>R[2]}else b=x>T;var P,I=Math.PI,M=[],F=w+i===e;if(g=0,y=S,p=t[e=w],f=t[e+1],F){v();var L=Math.atan2(f-_,p-d);b&&(L+=L>0?-I:I);var A=(T+x)/2,D=(O+C)/2;return M[0]=[A,D,(E-r)/2,L,o],M}for(var k=0,j=o.length;k<j;){v();var G=Math.atan2(f-_,p-d);if(b&&(G+=G>0?-I:I),void 0!==P){var z=G-P;if(z+=z>I?-2*I:z<-I?2*I:0,Math.abs(z)>s)return null}P=G;for(var W=k,X=0;k<j;++k){var N=a*l(h,o[b?j-k-1:k],u);if(e+i<n&&y+g<r+X+N/2)break;X+=N}if(k!==W){var Y=b?o.substring(j-W,j-k):o.substring(W,k);A=At(d,p,m=(r+X/2-y)/g),D=At(_,f,m);M.push([A,D,X/2,G,Y]),r+=X}}return M}var qh=[1/0,1/0,-1/0,-1/0],Jh=[],Qh=[],$h=[],tu=[];function eu(t){return t[3].declutterBox}var nu=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function iu(t,e){return"start"!==e&&"end"!==e||nu.test(t)||(e="start"===e?"left":"right"),Wh[e]}var ou=function(){function t(t,e,n,i){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,n,i){var o=t+e+n+i;if(this.labels_[o])return this.labels_[o];var r=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],u=iu(t,a.textAlign||ir),c=i&&r.lineWidth?r.lineWidth:0,p=t.split("\n"),f=p.length,d=[],_=function(t,e,n){for(var i=e.length,o=0,r=0;r<i;++r){var s=dr(t,e[r]);o=Math.max(o,s),n.push(s)}return o}(a.font,p,d),g=pr(a.font),y=_+c,v=[],m=(y+2)*h[0],x=(g*f+c)*h[1],C={width:m<0?Math.floor(m):Math.ceil(m),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:v};(1==h[0]&&1==h[1]||v.push("scale",h),v.push("font",a.font),i)&&(v.push("strokeStyle",r.strokeStyle),v.push("lineWidth",c),v.push("lineCap",r.lineCap),v.push("lineJoin",r.lineJoin),v.push("miterLimit",r.miterLimit),($?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(v.push("setLineDash",[r.lineDash]),v.push("lineDashOffset",r.lineDashOffset)));n&&v.push("fillStyle",s.fillStyle),v.push("textBaseline","middle"),v.push("textAlign","center");var w,S=.5-u,E=u*y+S*c;if(i)for(w=0;w<f;++w)v.push("strokeText",[p[w],E+S*d[w],.5*(c+g)+w*g]);if(n)for(w=0;w<f;++w)v.push("fillText",[p[w],E+S*d[w],.5*(c+g)+w*g]);return this.labels_[o]=C,C},t.prototype.replayTextBackground_=function(t,e,n,i,o,r,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,o),t.lineTo.apply(t,e),r&&(this.alignFill_=r[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,n,i,o,r,s,a,l,h,u,c,p,f,d,_){var g,y=n-(s*=c[0]),v=i-(a*=c[1]),m=o+l>t?t-l:o,x=r+h>e?e-h:r,C=f[3]+m*c[0]+f[1],w=f[0]+x*c[1]+f[2],S=y-f[3],E=v-f[0];return(d||0!==u)&&(Jh[0]=S,tu[0]=S,Jh[1]=E,Qh[1]=E,Qh[0]=S+C,$h[0]=Qh[0],$h[1]=E+w,tu[1]=$h[1]),0!==u?(zn(g=Wn([1,0,0,1,0,0],n,i,1,1,u,-n,-i),Jh),zn(g,Qh),zn(g,$h),zn(g,tu),Ce(Math.min(Jh[0],Qh[0],$h[0],tu[0]),Math.min(Jh[1],Qh[1],$h[1],tu[1]),Math.max(Jh[0],Qh[0],$h[0],tu[0]),Math.max(Jh[1],Qh[1],$h[1],tu[1]),qh)):Ce(Math.min(S,S+C),Math.min(E,E+w),Math.max(S,S+C),Math.max(E,E+w),qh),p&&(y=Math.round(y),v=Math.round(v)),{drawImageX:y,drawImageY:v,drawImageW:m,drawImageH:x,originX:l,originY:h,declutterBox:{minX:qh[0],minY:qh[1],maxX:qh[2],maxY:qh[3],value:_},canvasTransform:g,scale:c}},t.prototype.replayImageOrLabel_=function(t,e,n,i,o,r,s){var a=!(!r&&!s),l=i.declutterBox,h=t.canvas,u=s?s[2]*i.scale[0]/2:0;return l.minX-u<=h.width/e&&l.maxX+u>=0&&l.minY-u<=h.height/e&&l.maxY+u>=0&&(a&&this.replayTextBackground_(t,Jh,Qh,$h,tu,r,s),gr(t,i.canvasTransform,o,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=zn(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),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.drawLabelWithPointPlacement_=function(t,e,n,i){var o=this.textStates[e],r=this.createLabel(t,e,i,n),s=this.strokeStates[n],a=this.pixelRatio,l=iu(t,o.textAlign||ir),h=Wh[o.textBaseline||or],u=s&&s.lineWidth?s.lineWidth:0;return{label:r,anchorX:l*(r.width/a-2*o.scale[0])+2*(.5-l)*u,anchorY:h*r.height/a+2*(.5-h)*u}},t.prototype.execute_=function(t,e,n,i,o,r,s,a){var l,h,c;this.pixelCoordinates_&&u(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Yn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),h=this.renderedTransform_,c=n,h[0]=c[0],h[1]=c[1],h[2]=c[2],h[3]=c[3],h[4]=c[4],h[5]=c[5]);for(var p,f,d,_,g,y,v,m,x,C,w,S,E,b,T,O,R=0,P=i.length,I=0,M=0,F=0,L=null,A=null,D=this.coordinateCache_,k=this.viewRotation_,j=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,G={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:k},z=this.instructions!=i||this.overlaps?0:200;R<P;){var W=i[R];switch(W[0]){case Oh.BEGIN_GEOMETRY:E=W[1],O=W[3],E.getGeometry()?void 0===s||ze(s,O.getExtent())?++R:R=W[2]+1:R=W[2];break;case Oh.BEGIN_PATH:M>z&&(this.fill_(t),M=0),F>z&&(t.stroke(),F=0),M||F||(t.beginPath(),_=NaN,g=NaN),++R;break;case Oh.CIRCLE:var X=l[I=W[1]],N=l[I+1],Y=l[I+2]-X,K=l[I+3]-N,B=Math.sqrt(Y*Y+K*K);t.moveTo(X+B,N),t.arc(X,N,B,0,2*Math.PI,!0),++R;break;case Oh.CLOSE_PATH:t.closePath(),++R;break;case Oh.CUSTOM:I=W[1],p=W[2];var Z=W[3],V=W[4],U=6==W.length?W[5]:void 0;G.geometry=Z,G.feature=E,R in D||(D[R]=[]);var H=D[R];U?U(l,I,p,2,H):(H[0]=l[I],H[1]=l[I+1],H.length=2),V(H,G),++R;break;case Oh.DRAW_IMAGE:I=W[1],p=W[2],m=W[3],f=W[4],d=W[5];var q=W[6],J=W[7],Q=W[8],$=W[9],tt=W[10],et=W[11],nt=W[12],it=W[13],ot=W[14];if(!m&&W.length>=19){x=W[18],C=W[19],w=W[20],S=W[21];var rt=this.drawLabelWithPointPlacement_(x,C,w,S);m=rt.label,W[3]=m;var st=W[22];f=(rt.anchorX-st)*this.pixelRatio,W[4]=f;var at=W[23];d=(rt.anchorY-at)*this.pixelRatio,W[5]=d,q=m.height,W[6]=q,it=m.width,W[13]=it}var lt=void 0;W.length>24&&(lt=W[24]);var ht=void 0,ut=void 0,ct=void 0;W.length>16?(ht=W[15],ut=W[16],ct=W[17]):(ht=rr,ut=!1,ct=!1),tt&&j?et+=k:tt||j||(et-=k);for(var pt=0;I<p;I+=2)if(!(lt&<[pt++]<it/this.pixelRatio)){var ft=[t,e,m,Wt=this.calculateImageOrLabelDimensions_(m.width,m.height,l[I],l[I+1],it,q,f,d,Q,$,et,nt,o,ht,ut||ct,E),J,ut?L:null,ct?A:null],dt=void 0,_t=void 0;if(a&&ot){var gt=p-I;if(!ot[gt]){ot[gt]=ft;continue}if(dt=ot[gt],delete ot[gt],_t=eu(dt),a.collides(_t))continue}a&&a.collides(Wt.declutterBox)||(dt&&(a&&a.insert(_t),this.replayImageOrLabel_.apply(this,dt)),a&&a.insert(Wt.declutterBox),this.replayImageOrLabel_.apply(this,ft))}++R;break;case Oh.DRAW_CHARS:var yt=W[1],vt=W[2],mt=W[3],xt=W[4];S=W[5];var Ct=W[6],wt=W[7],St=W[8];w=W[9];var Et=W[10];x=W[11],C=W[12];var bt=[W[13],W[13]],Tt=this.textStates[C],Ot=Tt.font,Rt=[Tt.scale[0]*wt,Tt.scale[1]*wt],Pt=void 0;Ot in this.widths_?Pt=this.widths_[Ot]:(Pt={},this.widths_[Ot]=Pt);var It=ki(l,yt,vt,2),Mt=Math.abs(Rt[0])*_r(Ot,x,Pt);if(xt||Mt<=It){var Ft=this.textStates[C].textAlign,Lt=Hh(l,yt,vt,2,x,(It-Mt)*Wh[Ft],Ct,Math.abs(Rt[0]),_r,Ot,Pt,j?0:this.viewRotation_);t:if(Lt){var At=[],Dt=void 0,kt=void 0,jt=void 0,Gt=void 0,zt=void 0;if(w)for(Dt=0,kt=Lt.length;Dt<kt;++Dt){jt=(zt=Lt[Dt])[4],Gt=this.createLabel(jt,C,"",w),f=zt[2]+(Rt[0]<0?-Et:Et),d=mt*Gt.height+2*(.5-mt)*Et*Rt[1]/Rt[0]-St;var Wt=this.calculateImageOrLabelDimensions_(Gt.width,Gt.height,zt[0],zt[1],Gt.width,Gt.height,f,d,0,0,zt[3],bt,!1,rr,!1,E);if(a&&a.collides(Wt.declutterBox))break t;At.push([t,e,Gt,Wt,1,null,null])}if(S)for(Dt=0,kt=Lt.length;Dt<kt;++Dt){jt=(zt=Lt[Dt])[4],Gt=this.createLabel(jt,C,S,""),f=zt[2],d=mt*Gt.height-St;Wt=this.calculateImageOrLabelDimensions_(Gt.width,Gt.height,zt[0],zt[1],Gt.width,Gt.height,f,d,0,0,zt[3],bt,!1,rr,!1,E);if(a&&a.collides(Wt.declutterBox))break t;At.push([t,e,Gt,Wt,1,null,null])}a&&a.load(At.map(eu));for(var Xt=0,Nt=At.length;Xt<Nt;++Xt)this.replayImageOrLabel_.apply(this,At[Xt])}}++R;break;case Oh.END_GEOMETRY:if(void 0!==r){var Yt=r(E=W[1],O);if(Yt)return Yt}++R;break;case Oh.FILL:z?M++:this.fill_(t),++R;break;case Oh.MOVE_TO_LINE_TO:for(I=W[1],p=W[2],b=l[I],v=(T=l[I+1])+.5|0,(y=b+.5|0)===_&&v===g||(t.moveTo(b,T),_=y,g=v),I+=2;I<p;I+=2)y=(b=l[I])+.5|0,v=(T=l[I+1])+.5|0,I!=p-2&&y===_&&v===g||(t.lineTo(b,T),_=y,g=v);++R;break;case Oh.SET_FILL_STYLE:L=W,this.alignFill_=W[2],M&&(this.fill_(t),M=0,F&&(t.stroke(),F=0)),t.fillStyle=W[1],++R;break;case Oh.SET_STROKE_STYLE:A=W,F&&(t.stroke(),F=0),this.setStrokeStyle_(t,W),++R;break;case Oh.STROKE:z?F++:t.stroke(),++R;break;default:++R}}M&&this.fill_(t),F&&t.stroke()},t.prototype.execute=function(t,e,n,i,o,r){this.viewRotation_=i,this.execute_(t,e,n,this.instructions,o,void 0,void 0,r)},t.prototype.executeHitDetection=function(t,e,n,i,o){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,o)},t}(),ru=[Vh,Yh,Zh,Bh,Uh,Kh],su=function(){function t(t,e,n,i,o,r){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(o)}return t.prototype.clip=function(t,e){var n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var n=this.executorsByZIndex_[e];void 0===n&&(n={},this.executorsByZIndex_[e]=n);var i=t[e];for(var o in i){var r=i[o];n[o]=new ou(this.resolution_,this.pixelRatio_,this.overlaps_,r)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[e],i=0,o=t.length;i<o;++i)if(t[i]in n)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o,r){var a=2*(i=Math.round(i))+1,l=Wn(this.hitDetectionTransform_,i+.5,i+.5,1/e,-1/e,-n,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=nt(a,a));var u,c=this.hitDetectionContext_;c.canvas.width!==a||c.canvas.height!==a?(c.canvas.width=a,c.canvas.height=a):h||c.clearRect(0,0,a,a),void 0!==this.renderBuffer_&&(Ee(u=[1/0,1/0,-1/0,-1/0],t),fe(u,e*(this.renderBuffer_+i),u));var p,f=function(t){if(void 0!==au[t])return au[t];for(var e=2*t+1,n=t*t,i=new Array(n+1),o=0;o<=t;++o)for(var r=0;r<=t;++r){var s=o*o+r*r;if(s>n)break;var a=i[s];a||(a=[],i[s]=a),a.push(4*((t+o)*e+(t+r))+3),o>0&&a.push(4*((t-o)*e+(t+r))+3),r>0&&(a.push(4*((t+o)*e+(t-r))+3),o>0&&a.push(4*((t-o)*e+(t-r))+3))}for(var l=[],h=(o=0,i.length);o<h;++o)i[o]&&l.push.apply(l,i[o]);return au[t]=l,l}(i);function d(t,e){for(var n=c.getImageData(0,0,a,a).data,s=0,l=f.length;s<l;s++)if(n[f[s]]>0){if(!r||p!==Bh&&p!==Uh||-1!==r.indexOf(t)){var h=(f[s]-3)/4,u=i-h%a,d=i-(h/a|0),_=o(t,e,u*u+d*d);if(_)return _}c.clearRect(0,0,a,a);break}}var _,g,y,v,m,x=Object.keys(this.executorsByZIndex_).map(Number);for(x.sort(s),_=x.length-1;_>=0;--_){var C=x[_].toString();for(y=this.executorsByZIndex_[C],g=ru.length-1;g>=0;--g)if(void 0!==(v=y[p=ru[g]])&&(m=v.executeHitDetection(c,l,n,d,u)))return m}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],i=e[1],o=e[2],r=e[3],s=[n,i,n,r,o,r,o,i];return Yn(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return y(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,i,o,r,a){var l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(s),this.maxExtent_&&(t.save(),this.clip(t,n));var h,u,c,p,f,d,_=r||ru;for(a&&l.reverse(),h=0,u=l.length;h<u;++h){var g=l[h].toString();for(f=this.executorsByZIndex_[g],c=0,p=_.length;c<p;++c){void 0!==(d=f[_[c]])&&d.execute(t,e,n,i,o,a)}}this.maxExtent_&&t.restore()},t}(),au={};var lu=su,hu=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),uu=function(t){function e(e,n,i,o,r,s,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=n,l.extent_=i,l.transform_=o,l.viewRotation_=r,l.squaredTolerance_=s,l.userTransform_=a,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=[1,0,0,1,0,0],l}return hu(e,t),e.prototype.drawImages_=function(t,e,n,i){if(this.image_){var o=Yn(t,e,n,i,this.transform_,this.pixelCoordinates_),r=this.context_,s=this.tmpLocalTransform_,a=r.globalAlpha;1!=this.imageOpacity_&&(r.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var h=0,u=o.length;h<u;h+=2){var c=o[h]-this.imageAnchorX_,p=o[h+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var f=c+this.imageAnchorX_,d=p+this.imageAnchorY_;Wn(s,f,d,1,1,l,-f,-d),r.setTransform.apply(r,s),r.translate(f,d),r.scale(this.imageScale_[0],this.imageScale_[1]),r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),r.setTransform(1,0,0,1,0,0)}else r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(r.globalAlpha=a)}},e.prototype.drawText_=function(t,e,n,i){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var o=Yn(t,e,n,i,this.transform_,this.pixelCoordinates_),r=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<n;e+=i){var a=o[e]+this.textOffsetX_,l=o[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){var h=Wn(this.tmpLocalTransform_,a,l,1,1,s,-a,-l);r.setTransform.apply(r,h),r.translate(a,l),r.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&r.strokeText(this.text_,0,0),this.textFillState_&&r.fillText(this.text_,0,0),r.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&r.strokeText(this.text_,a,l),this.textFillState_&&r.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,n,i,o){var r=this.context_,s=Yn(t,e,n,i,this.transform_,this.pixelCoordinates_);r.moveTo(s[0],s[1]);var a=s.length;o&&(a-=2);for(var l=2;l<a;l+=2)r.lineTo(s[l],s[l+1]);return o&&r.closePath(),n},e.prototype.drawRings_=function(t,e,n,i){for(var o=0,r=n.length;o<r;++o)e=this.moveToLineTo_(t,e,n[o],i,!0);return e},e.prototype.drawCircle=function(t){if(ze(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,n){var i=t.getFlatCoordinates();if(i){var o=t.getStride();return Yn(i,0,i.length,o,e,n)}return null}(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],i=e[3]-e[1],o=Math.sqrt(n*n+i*i),r=this.context_;r.beginPath(),r.arc(e[0],e[1],o,0,2*Math.PI),this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){switch(t.getType()){case Pn:this.drawPoint(t);break;case In:this.drawLineString(t);break;case Fn:this.drawPolygon(t);break;case Ln:this.drawMultiPoint(t);break;case An:this.drawMultiLineString(t);break;case Dn:this.drawMultiPolygon(t);break;case kn:this.drawGeometryCollection(t);break;case jn:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var n=e.getGeometryFunction()(t);n&&ze(this.extent_,n.getExtent())&&(this.setStyle(e),this.drawGeometry(n))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),n=0,i=e.length;n<i;++n)this.drawGeometry(e[n])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),""!==this.text_&&this.drawText_(e,0,e.length,n)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ze(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var i=t.getFlatMidpoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getExtent();if(ze(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=t.getFlatCoordinates(),o=0,r=t.getEnds(),s=t.getStride();n.beginPath();for(var a=0,l=r.length;a<l;++a)o=this.moveToLineTo_(i,o,r[a],s,!1);n.stroke()}if(""!==this.text_){var h=t.getFlatMidpoints();this.drawText_(h,0,h.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ze(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var n=t.getFlatInteriorPoint();this.drawText_(n,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ze(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,n=t.getOrientedFlatCoordinates(),i=0,o=t.getEndss(),r=t.getStride();e.beginPath();for(var s=0,a=o.length;s<a;++s){var l=o[s];i=this.drawRings_(n,i,l,r)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var h=t.getFlatInteriorPoints();this.drawText_(h,0,h.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&(u(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,n=this.contextTextState_,i=t.textAlign?t.textAlign:ir;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=i&&(n.textAlign=i,e.textAlign=i),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=i,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:i,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){var n=this;if(t){var i=t.getColor();this.fillState_={fillStyle:Pl(i||Qo)}}else this.fillState_=null;if(e){var o=e.getColor(),r=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),l=e.getLineJoin(),h=e.getWidth(),u=e.getMiterLimit(),c=s||tr;this.strokeState_={lineCap:void 0!==r?r:$o,lineDash:1===this.pixelRatio_?c:c.map((function(t){return t*n.pixelRatio_})),lineDashOffset:(a||0)*this.pixelRatio_,lineJoin:void 0!==l?l:er,lineWidth:(void 0!==h?h:1)*this.pixelRatio_,miterLimit:void 0!==u?u:10,strokeStyle:Pl(o||nr)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var n=t.getAnchor(),i=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*this.pixelRatio_,this.imageAnchorY_=n[1]*this.pixelRatio_,this.imageHeight_=e[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=i[0],this.imageOriginY_=i[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=e[0]*this.pixelRatio_}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var n=e.getColor();this.textFillState_={fillStyle:Pl(n||Qo)}}else this.textFillState_=null;var i=t.getStroke();if(i){var o=i.getColor(),r=i.getLineCap(),s=i.getLineDash(),a=i.getLineDashOffset(),l=i.getLineJoin(),h=i.getWidth(),u=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==r?r:$o,lineDash:s||tr,lineDashOffset:a||0,lineJoin:void 0!==l?l:er,lineWidth:void 0!==h?h:1,miterLimit:void 0!==u?u:10,strokeStyle:Pl(o||nr)}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),f=t.getOffsetY(),d=t.getRotateWithView(),_=t.getRotation(),g=t.getScaleArray(),y=t.getText(),v=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:void 0!==c?c:Jo,textAlign:void 0!==v?v:ir,textBaseline:void 0!==m?m:or},this.text_=void 0!==y?y:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==_?_:0,this.textScale_=[this.pixelRatio_*g[0],this.pixelRatio_*g[1]]}else this.text_=""},e}(Rh),cu=.5;var pu={Point:function(t,e,n,i,o){var r,s=n.getImage(),a=n.getText();o&&(t=o,r=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=Hi)return;var l=t.getBuilder(n.getZIndex(),Bh);l.setImageStyle(s,r),l.drawPoint(e,i)}if(a&&a.getText()){var h=t.getBuilder(n.getZIndex(),Uh);h.setTextStyle(a,r),h.drawText(e,i)}},LineString:function(t,e,n,i,o){var r=n.getStroke();if(r){var s=t.getBuilder(n.getZIndex(),Zh);s.setFillStrokeStyle(null,r),s.drawLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(o||t).getBuilder(n.getZIndex(),Uh);l.setTextStyle(a),l.drawText(e,i)}},Polygon:function(t,e,n,i,o){var r=n.getFill(),s=n.getStroke();if(r||s){var a=t.getBuilder(n.getZIndex(),Vh);a.setFillStrokeStyle(r,s),a.drawPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var h=(o||t).getBuilder(n.getZIndex(),Uh);h.setTextStyle(l),h.drawText(e,i)}},MultiPoint:function(t,e,n,i,o){var r,s=n.getImage(),a=n.getText();o&&(t=o,r=s&&a&&a.getText()?{}:void 0);if(s){if(s.getImageState()!=Hi)return;var l=t.getBuilder(n.getZIndex(),Bh);l.setImageStyle(s,r),l.drawMultiPoint(e,i)}if(a&&a.getText()){var h=(o||t).getBuilder(n.getZIndex(),Uh);h.setTextStyle(a,r),h.drawText(e,i)}},MultiLineString:function(t,e,n,i,o){var r=n.getStroke();if(r){var s=t.getBuilder(n.getZIndex(),Zh);s.setFillStrokeStyle(null,r),s.drawMultiLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(o||t).getBuilder(n.getZIndex(),Uh);l.setTextStyle(a),l.drawText(e,i)}},MultiPolygon:function(t,e,n,i,o){var r=n.getFill(),s=n.getStroke();if(s||r){var a=t.getBuilder(n.getZIndex(),Vh);a.setFillStrokeStyle(r,s),a.drawMultiPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var h=(o||t).getBuilder(n.getZIndex(),Uh);h.setTextStyle(l),h.drawText(e,i)}},GeometryCollection:function(t,e,n,i,o){var r,s,a=e.getGeometriesArray();for(r=0,s=a.length;r<s;++r){(0,pu[a[r].getType()])(t,a[r],n,i,o)}},Circle:function(t,e,n,i,o){var r=n.getFill(),s=n.getStroke();if(r||s){var a=t.getBuilder(n.getZIndex(),Yh);a.setFillStrokeStyle(r,s),a.drawCircle(e,i)}var l=n.getText();if(l&&l.getText()){var h=(o||t).getBuilder(n.getZIndex(),Uh);h.setTextStyle(l),h.drawText(e,i)}}};function fu(t,e){return parseInt(W(t),10)-parseInt(W(e),10)}function du(t,e){return.5*t/e}function _u(t,e,n,i,o,r,s){var a=!1,l=n.getImage();if(l){var h=l.getImageState();h==Hi||h==qi?l.unlistenImageChange(o):(h==Vi&&l.load(),h=l.getImageState(),l.listenImageChange(o),a=!0)}return function(t,e,n,i,o,r){var s=n.getGeometryFunction()(e);if(!s)return;var a=s.simplifyTransformed(i,o);if(n.getRenderer())gu(t,a,n,e);else{(0,pu[a.getType()])(t,a,n,e,r)}}(t,e,n,i,r,s),a}function gu(t,e,n,i){if(e.getType()!=kn)t.getBuilder(n.getZIndex(),Kh).drawCustom(e,i,n.getRenderer());else for(var o=e.getGeometries(),r=0,s=o.length;r<s;++r)gu(t,o[r],n,i)}var yu=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vu=function(t){function e(e){var n=t.call(this,e)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.animatingOrInteracting_,n.dirty_=!1,n.hitDetectionImageData_=null,n.renderedFeatures_=null,n.renderedRevision_=-1,n.renderedResolution_=NaN,n.renderedExtent_=[1/0,1/0,-1/0,-1/0],n.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],n.renderedRotation_,n.renderedCenter_=null,n.renderedProjection_=null,n.renderedRenderOrder_=null,n.replayGroup_=null,n.replayGroupChanged=!0,n.declutterExecutorGroup=null,n.clipping=!0,n}return yu(e,t),e.prototype.useContainer=function(e,n,i){i<1&&(e=null),t.prototype.useContainer.call(this,e,n,i)},e.prototype.renderWorlds=function(t,e,n){var i=e.extent,o=e.viewState,r=o.center,s=o.resolution,a=o.projection,l=o.rotation,h=a.getExtent(),u=this.getLayer().getSource(),c=e.pixelRatio,p=e.viewHints,f=!(p[qr]||p[Jr]),d=this.context,_=Math.round(e.size[0]*c),g=Math.round(e.size[1]*c),y=u.getWrapX()&&a.canWrapX(),v=y?Ge(h):null,m=y?Math.ceil((i[2]-h[2])/v)+1:1,x=y?Math.floor((i[0]-h[0])/v):0;do{var C=this.getRenderTransform(r,s,l,c,_,g,x*v);t.execute(d,1,C,l,f,void 0,n)}while(++x<m)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var n=t.pixelRatio,i=t.layerStatesArray[t.layerIndex];!function(t,e,n){Gn(t,e,0,0,n,0,0)}(this.pixelTransform,1/n,1/n),Xn(this.inversePixelTransform,this.pixelTransform);var o=Nn(this.pixelTransform);this.useContainer(e,o,i.opacity);var r=this.context,s=r.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return!this.containerReused&&s.width>0&&(s.width=0),this.container;var h=Math.round(t.size[0]*n),u=Math.round(t.size[1]*n);s.width!=h||s.height!=u?(s.width=h,s.height=u,s.style.transform!==o&&(s.style.transform=o)):this.containerReused||r.clearRect(0,0,h,u),this.preRender(r,t);var c=t.viewState,p=c.projection,f=!1,d=!0;if(i.extent&&this.clipping){var _=cn(i.extent,p);(f=(d=ze(_,t.extent))&&!ye(_,t.extent))&&this.clipUnrotated(r,t,_)}d&&this.renderWorlds(a,t),f&&r.restore(),this.postRender(r,t);var g=i.opacity,y=this.container;return g!==parseFloat(y.style.opacity)&&(y.style.opacity=1===g?"":String(g)),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var n=[this.context.canvas.width,this.context.canvas.height];zn(this.pixelTransform,n);var i=this.renderedCenter_,o=this.renderedResolution_,r=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),u=[],c=n[0]*cu,p=n[1]*cu;u.push(this.getRenderTransform(i,o,r,cu,c,p,0).slice());var f=h.getSource(),d=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!ye(d,l)){for(var _=l[0],g=Ge(d),y=0,v=void 0;_<d[0];)v=g*--y,u.push(this.getRenderTransform(i,o,r,cu,c,p,v).slice()),_+=g;for(y=0,_=l[2];_>d[2];)v=g*++y,u.push(this.getRenderTransform(i,o,r,cu,c,p,v).slice()),_-=g}this.hitDetectionImageData_=function(t,e,n,i,o,r,a){var l=nt(t[0]*cu,t[1]*cu);l.imageSmoothingEnabled=!1;for(var h=l.canvas,u=new uu(l,cu,o,null,a),c=n.length,p=Math.floor(16777215/c),f={},d=1;d<=c;++d){var _=n[d-1],g=_.getStyleFunction()||i;if(i){var y=g(_,r);if(y){Array.isArray(y)||(y=[y]);for(var v="#"+("000000"+(d*p).toString(16)).slice(-6),m=0,x=y.length;m<x;++m){var C=y[m],w=C.getGeometryFunction()(_);if(w&&ze(o,w.getExtent())){var S=C.clone(),E=S.getFill();E&&E.setColor(v);var b=S.getStroke();b&&(b.setColor(v),b.setLineDash(null)),S.setText(void 0);var T=C.getImage();if(T&&0!==T.getOpacity()){var O=T.getImageSize();if(!O)continue;var R=nt(O[0],O[1],void 0,{alpha:!1}),P=R.canvas;R.fillStyle=v,R.fillRect(0,0,P.width,P.height),S.setImage(new xo({img:P,imgSize:O,anchor:T.getAnchor(),anchorXUnits:Ni,anchorYUnits:Ni,offset:T.getOrigin(),opacity:1,size:T.getSize(),scale:T.getScale(),rotation:T.getRotation(),rotateWithView:T.getRotateWithView()}))}var I=S.getZIndex()||0;(L=f[I])||(L={},f[I]=L,L[Fn]=[],L[jn]=[],L[In]=[],L[Pn]=[]),L[w.getType().replace("Multi","")].push(w,S)}}}}}for(var M=Object.keys(f).map(Number).sort(s),F=(d=0,M.length);d<F;++d){var L=f[M[d]];for(var A in L){var D=L[A];for(m=0,x=D.length;m<x;m+=2){u.setStyle(D[m+1]);for(var k=0,j=e.length;k<j;++k)u.setTransform(e[k]),u.drawGeometry(D[m])}}}return l.getImageData(0,0,h.width,h.height)}(n,u,this.renderedFeatures_,h.getStyleFunction(),l,o,r)}e(function(t,e,n){var i=[];if(n){var o=Math.floor(Math.round(t[0])*cu),r=Math.floor(Math.round(t[1])*cu),s=4*(Ot(o,0,n.width-1)+Ot(r,0,n.height-1)*n.width),a=n.data[s],l=n.data[s+1],h=n.data[s+2]+256*(l+256*a),u=Math.floor(16777215/e.length);h&&h%u==0&&i.push(e[h/u-1])}return i}(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o){var r=this;if(this.replayGroup_){var s,a=e.viewState.resolution,l=e.viewState.rotation,h=this.getLayer(),u={},c=function(t,e,n){var r=W(t),s=u[r];if(s){if(!0!==s&&n<s.distanceSq){if(0===n)return u[r]=!0,o.splice(o.lastIndexOf(s),1),i(t,h,e);s.geometry=e,s.distanceSq=n}}else{if(0===n)return u[r]=!0,i(t,h,e);o.push(u[r]={feature:t,layer:h,geometry:e,distanceSq:n,callback:i})}},p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some((function(i){return s=i.forEachFeatureAtCoordinate(t,a,l,n,c,i===r.declutterExecutorGroup?e.declutterTree.all().map((function(t){return t.value})):null)})),s}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var e=this.getLayer(),n=e.getSource();if(!n)return!1;var i=t.viewHints[qr],o=t.viewHints[Jr],r=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(!this.dirty_&&!r&&i||!s&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var a=t.extent,l=t.viewState,h=l.projection,c=l.resolution,p=t.pixelRatio,f=e.getRevision(),d=e.getRenderBuffer(),_=e.getRenderOrder();void 0===_&&(_=fu);var g=l.center.slice(),y=fe(a,d*c),v=y.slice(),m=[y.slice()],x=h.getExtent();if(n.getWrapX()&&h.canWrapX()&&!ye(x,t.extent)){var C=Ge(x),w=Math.max(Ge(y)/2,C);y[0]=x[0]-w,y[2]=x[2]+w,Bo(g,h);var S=function(t,e){var n=e.getExtent(),i=Me(t);if(e.canWrapX()&&(i[0]<n[0]||i[0]>=n[2])){var o=Ge(n),r=Math.floor((i[0]-n[0])/o)*o;t[0]-=r,t[2]-=r}return t}(m[0],h);S[0]<x[0]&&S[2]<x[2]?m.push([S[0]+C,S[1],S[2]+C,S[3]]):S[0]>x[0]&&S[2]>x[2]&&m.push([S[0]-C,S[1],S[2]-C,S[3]])}if(!this.dirty_&&this.renderedResolution_==c&&this.renderedRevision_==f&&this.renderedRenderOrder_==_&&ye(this.wrappedRenderedExtent_,y))return u(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var E,b=new Nh(du(c,p),y,c,p);this.getLayer().getDeclutter()&&(E=new Nh(du(c,p),y,c,p));var T,O=an();if(O){for(var R=0,P=m.length;R<P;++R)n.loadFeatures(un(m[R],h),c,O);T=Qe(O,h)}else for(R=0,P=m.length;R<P;++R)n.loadFeatures(m[R],c,h);var I=function(t,e){var n=du(t,e);return n*n}(c,p),M=function(t){var n,i=t.getStyleFunction()||e.getStyleFunction();if(i&&(n=i(t,c)),n){var o=this.renderFeature(t,I,n,b,T,E);this.dirty_=this.dirty_||o}}.bind(this),F=un(y,h),L=n.getFeaturesInExtent(F);_&&L.sort(_);for(R=0,P=L.length;R<P;++R)M(L[R]);this.renderedFeatures_=L;var A=b.finish(),D=new lu(y,c,p,n.getOverlaps(),A,e.getRenderBuffer());return E&&(this.declutterExecutorGroup=new lu(y,c,p,n.getOverlaps(),E.finish(),e.getRenderBuffer())),this.renderedResolution_=c,this.renderedRevision_=f,this.renderedRenderOrder_=_,this.renderedExtent_=v,this.wrappedRenderedExtent_=y,this.renderedCenter_=g,this.renderedProjection_=h,this.replayGroup_=D,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,n,i,o,r){if(!n)return!1;var s=!1;if(Array.isArray(n))for(var a=0,l=n.length;a<l;++a)s=_u(i,t,n[a],e,this.boundHandleStyleImageChange_,o,r)||s;else s=_u(i,t,n,e,this.boundHandleStyleImageChange_,o,r);return s},e}(Ul),mu=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xu=function(t){function e(e){return t.call(this,e)||this}return mu(e,t),e.prototype.createRenderer=function(){return new vu(this)},e}(Ch),Cu={Control:ht,Rotate:wt,ScaleLine:wn,Zoom:En,ZoomToExtent:Li},wu={containsCoordinate:ge},Su={LineString:Gi,Point:gi},Eu={TileLayer:$l,VectorLayer:xu},bu={fromLonLat:function(t,e){return tn(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")},toLonLat:function(t,e){var n=tn(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),i=n[0];return(i<-180||i>180)&&(n[0]=Lt(i+180,360)-180),n}},Tu={OSM:ul,Vector:vh,XYZ:ll},Ou={Icon:xo,Stroke:Rl,Style:Wl}},7072:function(t,e,n){var i,o,r;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)}r=function(){"use strict";function t(t,i,o,r,s){!function t(n,i,o,r,s){for(;r>o;){if(r-o>600){var a=r-o+1,l=i-o+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);t(n,i,Math.max(o,Math.floor(i-l*u/a+c)),Math.min(r,Math.floor(i+(a-l)*u/a+c)),s)}var p=n[i],f=o,d=r;for(e(n,o,i),s(n[r],p)>0&&e(n,o,r);f<d;){for(e(n,f,d),f++,d--;s(n[f],p)<0;)f++;for(;s(n[d],p)>0;)d--}0===s(n[o],p)?e(n,o,d):e(n,++d,r),d<=i&&(o=d+1),i<=d&&(r=d-1)}}(t,i,o||0,r||t.length-1,s||n)}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return t<e?-1:t>e?1:0}var i=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 o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function r(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,o){o||(o=d(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var r=e;r<n;r++){var s=t.children[r];a(o,t.leaf?i(s):s)}return o}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function u(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=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,n,i,o,r){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=o)){var a=n+Math.ceil((i-n)/o/2)*o;t(e,a,n,i,r),s.push(n,a,a,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var i=this.toBBox,o=[];e;){for(var r=0;r<e.children.length;r++){var s=e.children[r],a=e.leaf?i(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):o.push(s))}e=o.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var i=0;i<e.children.length;i++){var o=e.children[i],r=e.leaf?this.toBBox(o):o;if(f(t,r)){if(e.leaf||p(t,r))return!0;n.push(o)}}e=n.pop()}return!1},i.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=d([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var n,i,r,s=this.data,a=this.toBBox(t),l=[],h=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=h.pop(),r=!0),s.leaf){var u=o(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}r||s.leaf||!p(s,a)?i?(n++,s=i.children[n],r=!1):s=null:(l.push(s),h.push(n),n=0,i=s,s=s.children[0])}return this},i.prototype.toBBox=function(t){return t},i.prototype.compareMinX=function(t,e){return t.minX-e.minX},i.prototype.compareMinY=function(t,e){return t.minY-e.minY},i.prototype.toJSON=function(){return this.data},i.prototype.fromJSON=function(t){return this.data=t,this},i.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},i.prototype._build=function(t,e,n,i){var o,s=n-e+1,a=this._maxEntries;if(s<=a)return r(o=d(t.slice(e,n+1)),this.toBBox),o;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(o=d([])).leaf=!1,o.height=i;var l=Math.ceil(s/a),h=l*Math.ceil(Math.sqrt(a));_(t,e,n,h,this.compareMinX);for(var u=e;u<=n;u+=h){var c=Math.min(u+h-1,n);_(t,u,c,l,this.compareMinY);for(var p=u;p<=c;p+=l){var f=Math.min(p+l-1,c);o.children.push(this._build(t,p,f,i-1))}}return r(o,this.toBBox),o},i.prototype._chooseSubtree=function(t,e,n,i){for(;i.push(e),!e.leaf&&i.length-1!==n;){for(var o=1/0,r=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],h=u(l),c=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-h);c<r?(r=c,o=h<o?h:o,s=l):c===r&&h<o&&(o=h,s=l)}e=s||e.children[0]}var p,f;return e},i.prototype._insert=function(t,e,n){var i=n?t:this.toBBox(t),o=[],r=this._chooseSubtree(i,this.data,e,o);for(r.children.push(t),a(r,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var s=this._chooseSplitIndex(n,o,i),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,r(n,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},i.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,o,r,a,l,h,c,p=1/0,f=1/0,d=e;d<=n-e;d++){var _=s(t,0,d,this.toBBox),g=s(t,d,n,this.toBBox),y=(o=_,r=g,a=Math.max(o.minX,r.minX),l=Math.max(o.minY,r.minY),h=Math.min(o.maxX,r.maxX),c=Math.min(o.maxY,r.maxY),Math.max(0,h-a)*Math.max(0,c-l)),v=u(_)+u(g);y<p?(p=y,i=d,f=v<f?v:f):y===p&&v<f&&(f=v,i=d)}return i||n-e},i.prototype._chooseSplitAxis=function(t,e,n){var i=t.leaf?this.compareMinX:l,o=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,o)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,n,i){t.children.sort(i);for(var o=this.toBBox,r=s(t,0,e,o),l=s(t,n-e,n,o),h=c(r)+c(l),u=e;u<n-e;u++){var p=t.children[u];a(r,t.leaf?o(p):p),h+=c(r)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?o(d):d),h+=c(l)}return h},i.prototype._adjustParentBBoxes=function(t,e,n){for(var i=n;i>=0;i--)a(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},i},"object"==s(e)?t.exports=r():void 0===(o="function"==typeof(i=r)?i.call(e,n,e,t):i)||(t.exports=o)}}]);
|
||
//# sourceMappingURL=521.bundle.js.map
|